Make "list ambiguous" show symbol names too
[external/binutils.git] / gdb / ChangeLog
1 2017-09-20  Pedro Alves  <palves@redhat.com>
2
3         * cli/cli-cmds.c (list_command): Use print_sal_location.
4         (print_sal_location): New function.
5         (ambiguous_line_spec): Use print_sal_location.
6         * linespec.c (symbol_to_sal): Record the symbol in the sal.
7         * symtab.c (find_function_start_sal): Likewise.
8         * symtab.h (symtab_and_line::symbol): New field.
9
10 2017-09-20  Pedro Alves  <palves@redhat.com>
11
12         * linespec.c (minsym_found): Handle non-text minsyms.
13         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
14
15 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
16
17         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
18         backslash.
19
20 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
21
22         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
23         vmovups instead vmovaps.
24         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
25
26 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
27
28         * NEWS (Changes since GDB 8.0): Add starti.
29         * infcmd.c (enum run_break): New.
30         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
31         case.
32         (run_command): Use enum run_how.
33         (start_command): Likewise.
34         (starti_command): New function.
35         (RUN_ARGS_HELP): New macro.
36         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
37         commands.  Add starti command.
38
39 2017-09-19  Yao Qi  <yao.qi@linaro.org>
40
41         * Makefile.in (monitor.o): Remove the rule.
42
43 2017-09-19  Yao Qi  <yao.qi@linaro.org>
44
45         * annotate.h (struct annotate_arg_emitter): Use
46         DISABLE_COPY_AND_ASSIGN.
47         * common/refcounted-object.h (refcounted_object): Likewise.
48         * completer.h (struct completion_result): Likewise.
49         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
50         * filename-seen-cache.h (filename_seen_cache): Likewise.
51         * gdbcore.h (thread_section_name): Likewise.
52         * gdb_regex.h (compiled_regex): Likewise.
53         * gdbthread.h (scoped_restore_current_thread): Likewise.
54         * inferior.h (scoped_restore_current_inferior): Likewise.
55         * jit.c (jit_reader): Likewise.
56         * linespec.h (struct linespec_result): Likewise.
57         * mi/mi-parse.h (struct mi_parse): Likewise.
58         * nat/fork-inferior.c (execv_argv): Likewise.
59         * progspace.h (scoped_restore_current_program_space): Likewise.
60         * python/python-internal.h (class gdbpy_enter): Likewise.
61         * regcache.h (regcache): Likewise.
62         * target-descriptions.c (struct tdesc_reg): Likewise.
63         (struct tdesc_type): Likewise.
64         (struct tdesc_feature): Likewise.
65         * ui-out.h (ui_out_emit_type): Likewise.
66
67 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
68
69         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
70         label abort_expression.
71
72 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
73
74         * common/buffer.c (buffer_xml_printf): Adjust.
75         * common/xml-utils.c (xml_escape_text): Change return type to
76         std::string, update code accordingly.
77         * common/xml-utils.h (xml_escape_text): Change return type to
78         std::string.
79         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
80         * windows-tdep.c (windows_xfer_shared_library): Adjust.
81         * unittests/xml-utils-selftests.c (test_xml_escape_text):
82         Adjust.
83
84 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
85
86         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
87         (SUBDIR_UNITTESTS_OBS): Add new object file.
88         * unittests/xml-utils-selftests.c: New file.
89
90 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
91
92         * common/selftest.h (selftest): New struct/interface.
93         (register_test): Add name parameter, add new overload.
94         (run_tests): Add filter parameter.
95         (for_each_selftest_ftype): New typedef.
96         (for_each_selftest): New declaration.
97         * common/selftest.c (tests): Change type to
98         map<string, unique_ptr<selftest>>.
99         (simple_selftest): New struct.
100         (register_test): New function.
101         (register_test): Add name parameter and use it.
102         (run_tests): Add filter parameter and use it.  Add prints.
103         Adjust to vector -> map change.
104         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
105         registering selftests.
106         * arm-tdep.c (_initialize_arm_tdep): Likewise.
107         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
108         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
109         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
110         * findvar.c (_initialize_findvar): Likewise.
111         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
112         * maint.c (maintenance_selftest): Update call to run_tests.
113         (maintenance_info_selftests): New function.
114         (_initialize_maint_cmds): Register "maintenance info selftests"
115         command.  Update "maintenance selftest" doc.
116         * regcache.c (_initialize_regcache): Add names when registering
117         selftests.
118         * rust-exp.y (_initialize_rust_exp): Likewise.
119         * selftest-arch.c (gdbarch_selftest): New struct.
120         (gdbarch_tests): Remove.
121         (register_test_foreach_arch): Add name parameter.  Call
122         register_test.
123         (tests_with_arch): Remove, move most content to
124         gdbarch_selftest::operator().
125         (_initialize_selftests_foreach_arch): Remove.
126         * selftest-arch.h (register_test_foreach_arch): Add name
127         parameter.
128         (run_tests_with_arch): New declaration.
129         * utils-selftests.c (_initialize_utils_selftests): Add names
130         when registering selftests.
131         * utils.c (_initialize_utils): Likewise.
132         * unittests/array-view-selftests.c
133         (_initialize_array_view_selftests): Likewise.
134         * unittests/environ-selftests.c (_initialize_environ_selftests):
135         Likewise.
136         * unittests/function-view-selftests.c
137         (_initialize_function_view_selftests): Likewise.
138         * unittests/offset-type-selftests.c
139         (_initialize_offset_type_selftests): Likewise.
140         * unittests/optional-selftests.c
141         (_initialize_optional_selftests): Likewise.
142         * unittests/scoped_restore-selftests.c
143         (_initialize_scoped_restore_selftests): Likewise.
144         * NEWS: Document "maintenance selftest" and "maint info
145         selftests".
146
147 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
148
149         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
150         scoped_restore.
151
152 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
153
154         * mi/mi-main.c (mi_load_progress): Make uiout variable
155         a unique_ptr.
156
157 2017-09-15  Pedro Alves  <palves@redhat.com>
158
159         * compile/compile-c-types.c (convert_enum, convert_int)
160         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
161
162 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
163
164         * dwarf2read.c (copy_string): Remove.
165         (parse_macro_definition): Replace copy_string with savestring.
166
167 2017-09-15  Yao Qi  <yao.qi@linaro.org>
168
169         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
170         gdb_target_obs.
171         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
172         Likewise.
173         (i[34567]86-*-linux*): Likewise.
174
175 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
176
177         * dwarf2expr.h (dwarf_stack_value): Add constructor.
178         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
179         <stack>: Change type to std::vector.
180         <stack_len, stack_allocated>: Remove.
181         <grow_stack>: Remove.
182         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
183         (dwarf_expr_context::~dwarf_expr_context): Remove.
184         (dwarf_expr_context::grow_stack): Remove.
185         (dwarf_expr_context::push): Adjust.
186         (dwarf_expr_context::pop): Adjust.
187         (dwarf_expr_context::fetch): Adjust.
188         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
189         (dwarf_expr_context::stack_empty_p): Adjust.
190         (dwarf_expr_context::execute_stack_op): Adjust.
191
192 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
193
194         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
195         return type to bool.
196         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
197
198 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
199
200         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
201         Change type to bool.
202         (dwarf_stack_value) <in_stack_memory>: Likewise.
203         (dwarf_expr_context) <push_address>: Change parameter type to
204         bool.
205         <fetch_in_stack_memory>: Change return type to bool.
206         <push>: Change parameter type to bool.
207         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
208         to bool.
209         (dwarf_expr_context::push_address): Likewise.
210         (dwarf_expr_context::fetch_in_stack_memory): Change return type
211         to bool.
212         (dwarf_expr_context::execute_stack_op): Adjust.
213         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
214
215 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
216
217         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
218         (struct dwarf_expr_context) <n_pieces>: Remove.
219         <pieces>: Change type to std::vector.
220         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
221         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
222         pieces.
223         (dwarf_expr_context::add_piece): Adjust.
224         * dwarf2loc.c (struct piece_closure): Initialize fields.
225         <n_pieces>: Remove.
226         <pieces>: Change type to std::vector.
227         (allocate_piece_closure): Adjust, change parameter to
228         std::vector rvalue and std::move it to piece_closure.
229         (rw_pieced_value): Adjust.
230         (check_pieced_synthetic_pointer): Adjust.
231         (indirect_synthetic_pointer): Adjust.
232         (coerce_pieced_ref): Adjust.
233         (free_pieced_value_closure):  Adjust.  Use delete to free
234         piece_closure.
235         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
236         to allocate_piece_closure.
237         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
238
239 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
240
241         * probe.h (probe_ops_cp): Remove typedef.
242         (DEF_VEC_P (probe_ops_cp)): Remove.
243         (all_probe_ops): Change type to std::vector.
244         * probe.c (info_probes_for_ops): Adjust to vector change.
245         (probe_linespec_to_ops): Likewise.
246         (all_probe_ops): Change type to std::vector.
247         (_initialize_probe): Adjust to vector change.
248         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
249         * elfread.c (elf_get_probes): Likewise.
250         * stap-probe.c (_initialize_stap_probe): Likewise.
251
252 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
253
254         * probe.h (struct bound_probe): Define constructors.
255         * probe.c (bound_probe_s): Remove typedef.
256         (DEF_VEC_O (bound_probe_s)): Remove VEC.
257         (collect_probes): Change return type to std::vector, remove
258         cleanup.
259         (compare_probes): Return bool, change parameter type.  Change
260         semantic to "less than".
261         (gen_ui_out_table_header_info): Change parameter to std::vector
262         and update.
263         (exists_probe_with_pops): Likewise.
264         (info_probes_for_ops): Update to std::vector change.
265         (enable_probes_command): Likewise.
266         (disable_probes_command): Likewise.
267
268 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
269
270         * probe.h (struct probe_ops) <get_probes>: Change parameter from
271         vec to std::vector.
272         * probe.c (parse_probes_in_pspace): Update.
273         (find_probes_in_objfile): Update.
274         (find_probe_by_pc): Update.
275         (collect_probes): Update.
276         (probe_any_get_probes): Update.
277         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
278         return type to reference to std::vector.
279         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
280         std::vector and update.
281         (dtrace_process_dof): Likewise.
282         (dtrace_get_probes): Likewise.
283         * elfread.c (elf_get_probes): Change return type to std::vector,
284         store an std::vector in bfd_data.
285         (probe_key_free): Update to std::vector.
286         * stap-probe.c (handle_stap_probe): Change parameter to
287         std::vector and update.
288         (stap_get_probes): Likewise.
289         * symfile-debug.c (debug_sym_get_probes): Change return type to
290         std::vector and update.
291
292 2017-09-11  Tom Tromey  <tom@tromey.com>
293
294         * breakpoint.c (program_breakpoint_here_p): Update.
295         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
296         from make_show_memory_breakpoints_cleanup.  Return a
297         scoped_restore_tmpl<int>.
298         (restore_show_memory_breakpoints): Remove.
299         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
300         * mem-break.c (memory_validate_breakpoint): Update.
301         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
302         (ia64_memory_remove_breakpoint): Update.
303         (ia64_breakpoint_from_pc): Update.
304         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
305         from make_show_memory_breakpoints_cleanup.
306
307 2017-09-11  Tom Tromey  <tom@tromey.com>
308
309         * d-namespace.c (d_lookup_symbol): Use std::string.
310         (find_symbol_in_baseclass): Likewise.
311
312 2017-09-11  Tom Tromey  <tom@tromey.com>
313
314         * ctf.c (ctf_start): Use std::string.
315
316 2017-09-11  Tom Tromey  <tom@tromey.com>
317
318         * ada-lang.c (is_known_support_routine): Update.
319         (ada_unhandled_exception_name_addr_from_raise): Update.
320         * guile/scm-frame.c (gdbscm_frame_name): Update.
321         * python/py-frame.c (frapy_name): Update.
322         (frapy_function): Update.
323         * stack.h (find_frame_funname): Update.
324         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
325         (print_frame): Update.
326
327 2017-09-11  Tom Tromey  <tom@tromey.com>
328
329         * findcmd.c (put_bits): Take a gdb::byte_vector.
330         (parse_find_args): Return gdb::byte_vector.  "args" now const.
331         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
332         cleanups.
333         (find_command): Update.
334
335 2017-09-11  Tom Tromey  <tom@tromey.com>
336
337         * cli/cli-script.c (class scoped_restore_hook_in): New.
338         (clear_hook_in_cleanup): Remove.
339         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
340         scoped_restore_hook_in.
341
342 2017-09-11  Tom Tromey  <tom@tromey.com>
343
344         * cli/cli-script.c (restore_interp): Remove.
345         (read_command_lines): Use scoped_restore_interp.
346         * interps.c (scoped_restore_interp::set_temp): Rename from
347         interp_set_temp.
348         * interps.h (class scoped_restore_interp): New.
349         (interp_set_temp): Remove.
350
351 2017-09-11  Tom Tromey  <tom@tromey.com>
352
353         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
354         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
355         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
356         scoped_restore.
357         (mi_cmd_break_insert_1): Update.
358         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
359         scoped_restore.
360
361 2017-09-11  Tom Tromey  <tom@tromey.com>
362
363         * demangle.c (demangle_command): Update.
364         * breakpoint.c (disable_command): Update.
365         (enable_command): Update.
366         (find_location_by_number): Make "number" const.  Use
367         get_number_trailer.
368         * cli/cli-utils.c (extract_arg): Return std::string.
369         * probe.c (parse_probe_linespec): Update.  Change types.
370         (collect_probes): Take string arguments.
371         (parse_probe_linespec): Likewise.
372         (info_probes_for_ops): Update.
373         (enable_probes_command): Update.
374         (disable_probes_command): Update.
375         * break-catch-sig.c (catch_signal_split_args): Update.
376         * mi/mi-parse.c (mi_parse): Update.
377
378 2017-09-11  Tom Tromey  <tom@tromey.com>
379
380         * language.h (language_enum): Make argument const.
381         * language.c (language_enum): Make argument const.
382
383 2017-09-11  Tom Tromey  <tom@tromey.com>
384
385         * common/common-utils.h (skip_to_space): Remove macro, redeclare
386         as function.
387         (skip_to_space): Rename from skip_to_space_const.
388         * common/common-utils.c (skip_to_space): New function.
389         (skip_to_space): Rename from skip_to_space_const.
390         * cli/cli-utils.h (get_number): Rename from get_number_const.
391         (extract_arg): Rename from extract_arg_const.
392         * cli/cli-utils.c (get_number): Rename from get_number_const.
393         (extract_arg): Rename from extract_arg_const.
394         (number_or_range_parser::get_number): Use ::get_number.
395         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
396         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
397         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
398         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
399         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
400         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
401         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
402         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
403
404 2017-09-11  Tom Tromey  <tom@tromey.com>
405
406         * python/python.c (do_start_initialization): Use
407         py-event-types.def to initialize types.
408         Define all object type structures.
409         * python/python-internal.h: Don't declare event initialization
410         functions.
411         * python/py-threadevent.c (thread_event_object_type): Don't
412         define.
413         * python/py-stopevent.c (stop_event_object_type): Don't define.
414         * python/py-signalevent.c (signal_event_object_type): Don't
415         declare or define.
416         * python/py-newobjfileevent.c (new_objfile_event_object_type)
417         (clear_objfiles_event_object_type): Don't declare or define.
418         * python/py-infevents.c (inferior_call_pre_event_object_type)
419         (inferior_call_post_event_object_type)
420         (register_changed_event_object_type)
421         (memory_changed_event_object_type): Don't declare or define.
422         * python/py-inferior.c (new_thread_event_object_type)
423         (new_inferior_event_object_type)
424         (inferior_deleted_event_object_type): Don't declare or define.
425         * python/py-exitedevent.c (exited_event_object_type): Don't
426         declare or define.
427         * python/py-evts.c (gdbpy_initialize_py_events): Use
428         py-all-events.def.
429         * python/py-events.h (thread_event_object_type): Don't declare.
430         (events_object): Use py-all-events.def.
431         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
432         py-event-types.def.
433         * python/py-event-types.def: New file.
434         * python/py-continueevent.c (create_continue_event_object): Don't
435         declare or define.
436         * python/py-bpevent.c (breakpoint_event_object_type): Don't
437         declare or define.
438         * python/py-all-events.def: New file.
439
440 2017-09-11  Tom Tromey  <tom@tromey.com>
441
442         * python/py-threadevent.c (create_thread_event_object): Return
443         gdbpy_ref.
444         * python/py-stopevent.h (create_stop_event_object)
445         (create_breakpoint_event_object, create_signal_event_object):
446         Update.
447         * python/py-stopevent.c (create_stop_event_object): Return
448         gdbpy_ref.
449         (emit_stop_event): Update.
450         * python/py-signalevent.c (create_signal_event_object): Return
451         gdbpy_ref.
452         * python/py-infevents.c (create_inferior_call_event_object):
453         Update.
454         * python/py-event.h (create_event_object)
455         (create_thread_event_object): Update.
456         * python/py-event.c (create_event_object): Return gdbpy_ref.
457         * python/py-continueevent.c: Return gdbpy_ref.
458         * python/py-bpevent.c (create_breakpoint_event_object): Return
459         gdbpy_ref.
460
461 2017-09-11  Tom Tromey  <tom@tromey.com>
462
463         PR python/15622:
464         * NEWS: Add entry.
465         * python/python.c (do_start_initialization): Initialize new event
466         types.
467         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
468         (gdbpy_initialize_inferior_deleted_event)
469         (gdbpy_initialize_new_thread_event): Declare.
470         * python/py-threadevent.c (create_thread_event_object): Add option
471         "thread" parameter.
472         * python/py-inferior.c (new_thread_event_object_type)
473         (new_inferior_event_object_type)
474         (inferior_deleted_event_object_type): Declare.
475         (python_new_inferior, python_inferior_deleted): New functions.
476         (add_thread_object): Emit new_thread event.
477         (gdbpy_initialize_inferior): Attach new functions to corresponding
478         observers.
479         (new_thread, new_inferior, inferior_deleted): Define new event
480         types.
481         * python/py-evts.c (gdbpy_initialize_py_events): Add new
482         registries.
483         * python/py-events.h (events_object) <new_inferior,
484         inferior_deleted, new_thread>: New fields.
485         * python/py-event.h (create_thread_event_breakpoint): Add optional
486         "thread" parameter.
487
488 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
489
490         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
491         check current_ui instead.
492         (internal_vproblem): Likewise.
493
494 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
495
496         * thread.c (print_thread_info_1): Remove unnecessary calls to
497         uiout->is_mi_like_p.
498
499 2017-09-09  Tom Tromey  <tom@tromey.com>
500
501         * namespace.h (add_using_directive): Update.
502         * namespace.c (add_using_directive): Change type of excludes to
503         std::vector.
504         * dwarf2read.c (read_import_statement): Use std::vector.
505         (read_namespace): Update.
506         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
507
508 2017-09-09  Tom Tromey  <tom@tromey.com>
509
510         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
511
512 2017-09-09  Tom Tromey  <tom@tromey.com>
513
514         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
515
516 2017-09-09  Tom Tromey  <tom@tromey.com>
517
518         * stack.c (func_command): Use gdb::def_vector.
519
520 2017-09-09  Tom Tromey  <tom@tromey.com>
521
522         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
523         ui_out_emit_list, ui_out_emit_tuple.
524         (mi_cmd_var_update): Likewise.
525
526 2017-09-09  Tom Tromey  <tom@tromey.com>
527
528         * mi/mi-interp.c (mi_user_selected_context_changed): Use
529         ui_out_redirect_pop.
530         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
531         ui_out_redirect_pop.
532         * utils.c (do_ui_out_redirect_pop)
533         (make_cleanup_ui_out_redirect_pop): Remove.
534         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
535         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
536         * ui-out.h (ui_out_redirect_pop): New class.
537
538 2017-09-09  Tom Tromey  <tom@tromey.com>
539
540         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
541         (list_available_thread_groups, mi_cmd_list_thread_groups)
542         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
543         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
544         Likewise.
545
546 2017-09-09  Tom Tromey  <tom@tromey.com>
547
548         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
549         ui_out_emit_tuple.
550
551 2017-09-09  Tom Tromey  <tom@tromey.com>
552
553         * target.c (flash_erase_command): Use ui_out_emit_tuple.
554         * stack.c (print_frame): Use ui_out_emit_tuple.
555         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
556         (info_spu_mailbox_command, info_spu_dma_command)
557         (info_spu_proxydma_command): Likewise.
558         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
559         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
560         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
561         ui_out_emit_tuple.
562         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
563
564 2017-09-09  Tom Tromey  <tom@tromey.com>
565
566         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
567         (class ui_out_emit_table): Update comment.
568         * ui-out.c (do_cleanup_table_end)
569         (make_cleanup_ui_out_table_begin_end): Remove.
570         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
571         (info_spu_dma_cmdlist): Likewise.
572         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
573         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
574         ui_out_emit_table.
575
576 2017-09-09  Tom Tromey  <tom@tromey.com>
577
578         * thread.c (print_thread_info_1): Use ui_out_emit_table,
579         ui_out_emit_list, gdb::optional.
580
581 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
582
583         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
584         prototype.
585         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
586         prototype.
587         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
588         prototype.
589         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
590         * ada-exp.y: Remove _initialize_ada_exp prototype.
591         * ada-lang.c: Remove _initialize_ada_language prototype.
592         * ada-tasks.c: Remove _initialize_tasks prototype.
593         * addrmap.c: Remove _initialize_addrmap prototype.
594         * agent.c: Remove _initialize_agent prototype.
595         * aix-thread.c: Remove _initialize_aix_thread prototype.
596         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
597         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
598         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
599         prototype.
600         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
601         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
602         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
603         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
604         prototype.
605         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
606         prototype.
607         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
608         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
609         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
610         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
611         prototype.
612         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
613         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
614         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
615         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
616         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
617         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
618         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
619         prototype.
620         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
621         prototype.
622         * annotate.c: Remove _initialize_annotate prototype.
623         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
624         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
625         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
626         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
627         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
628         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
629         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
630         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
631         prototype.
632         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
633         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
634         * auto-load.c: Remove _initialize_auto_load prototype.
635         * auxv.c: Remove _initialize_auxv prototype.
636         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
637         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
638         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
639         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
640         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
641         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
642         prototype.
643         * break-catch-throw.c: Remove _initialize_break_catch_throw
644         prototype.
645         * breakpoint.c: Remove _initialize_breakpoint prototype.
646         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
647         * btrace.c: Remove _initialize_btrace prototype.
648         * charset.c: Remove _initialize_charset prototype.
649         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
650         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
651         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
652         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
653         * cli/cli-script.c: Remove _initialize_cli_script prototype.
654         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
655         * coffread.c: Remove _initialize_coffread prototype.
656         * compile/compile.c: Remove _initialize_compile prototype.
657         * complaints.c: Remove _initialize_complaints prototype.
658         * completer.c: Remove _initialize_completer prototype.
659         * copying.awk: Remove _initialize_copying prototype.
660         * copying.c: Regenerate.
661         * core-regset.c: Remove _initialize_core_regset prototype.
662         * corefile.c: Remove _initialize_core prototype.
663         * corelow.c: Remove _initialize_corelow prototype.
664         * cp-abi.c: Remove _initialize_cp_abi prototype.
665         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
666         * cp-support.c: Remove _initialize_cp_support prototype.
667         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
668         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
669         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
670         * ctf.c: Remove _initialize_ctf prototype.
671         * d-lang.c: Remove _initialize_d_language prototype.
672         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
673         prototype.
674         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
675         * dbxread.c: Remove _initialize_dbxread prototype.
676         * dcache.c: Remove _initialize_dcache prototype.
677         * demangle.c: Remove _initialize_demangler prototype.
678         * disasm-selftests.c: Remove _initialize_disasm_selftests
679         prototype.
680         * disasm.c: Remove _initialize_disasm prototype.
681         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
682         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
683         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
684         prototype.
685         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
686         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
687         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
688         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
689         * elfread.c: Remove _initialize_elfread prototype.
690         * exec.c: Remove _initialize_exec prototype.
691         * extension.c: Remove _initialize_extension prototype.
692         * f-lang.c: Remove _initialize_f_language prototype.
693         * f-valprint.c: Remove _initialize_f_valprint prototype.
694         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
695         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
696         * filesystem.c: Remove _initialize_filesystem prototype.
697         * findcmd.c: Remove _initialize_mem_search prototype.
698         * fork-child.c: Remove _initialize_fork_child prototype.
699         * frame-base.c: Remove _initialize_frame_base prototype.
700         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
701         * frame.c: Remove _initialize_frame prototype.
702         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
703         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
704         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
705         * gcore.c: Remove _initialize_gcore prototype.
706         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
707         * gdbarch.c: Regenerate.
708         * gdbarch.sh: Remove _initialize_gdbarch prototype.
709         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
710         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
711         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
712         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
713         * go-lang.c: Remove _initialize_go_language prototype.
714         * go32-nat.c: Remove _initialize_go32_nat prototype.
715         * guile/guile.c: Remove _initialize_guile prototype.
716         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
717         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
718         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
719         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
720         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
721         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
722         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
723         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
724         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
725         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
726         prototype.
727         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
728         prototype.
729         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
730         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
731         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
732         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
733         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
734         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
735         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
736         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
737         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
738         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
739         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
740         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
741         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
742         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
743         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
744         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
745         prototype.
746         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
747         prototype.
748         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
749         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
750         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
751         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
752         * infcall.c: Remove _initialize_infcall prototype.
753         * infcmd.c: Remove _initialize_infcmd prototype.
754         * inferior.c: Remove _initialize_inferiors prototype.
755         * inflow.c: Remove _initialize_inflow prototype.
756         * infrun.c: Remove _initialize_infrun prototype.
757         * interps.c: Remove _initialize_interpreter prototype.
758         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
759         * jit.c: Remove _initialize_jit prototype.
760         * language.c: Remove _initialize_language prototype.
761         * linux-fork.c: Remove _initialize_linux_fork prototype.
762         * linux-nat.c: Remove _initialize_linux_nat prototype.
763         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
764         * linux-thread-db.c: Remove _initialize_thread_db prototype.
765         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
766         * m2-lang.c: Remove _initialize_m2_language prototype.
767         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
768         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
769         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
770         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
771         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
772         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
773         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
774         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
775         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
776         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
777         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
778         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
779         * machoread.c: Remove _initialize_machoread prototype.
780         * macrocmd.c: Remove _initialize_macrocmd prototype.
781         * macroscope.c: Remove _initialize_macroscope prototype.
782         * maint.c: Remove _initialize_maint_cmds prototype.
783         * mdebugread.c: Remove _initialize_mdebugread prototype.
784         * memattr.c: Remove _initialize_mem prototype.
785         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
786         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
787         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
788         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
789         * mi/mi-main.c: Remove _initialize_mi_main prototype.
790         * microblaze-linux-tdep.c: Remove
791         _initialize_microblaze_linux_tdep prototype.
792         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
793         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
794         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
795         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
796         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
797         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
798         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
799         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
800         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
801         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
802         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
803         prototype.
804         * mipsread.c: Remove _initialize_mipsread prototype.
805         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
806         prototype.
807         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
808         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
809         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
810         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
811         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
812         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
813         prototype.
814         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
815         * nto-procfs.c: Remove _initialize_procfs prototype.
816         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
817         * objc-lang.c: Remove _initialize_objc_language prototype.
818         * objfiles.c: Remove _initialize_objfiles prototype.
819         * observer.c: Remove observer_test_first_notification_function,
820         observer_test_second_notification_function,
821         observer_test_third_notification_function, and
822         _initialize_observer prototypes.
823         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
824         * osabi.c: Remove _initialize_gdb_osabi prototype.
825         * osdata.c: Remove _initialize_osdata prototype.
826         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
827         * parse.c: Remove _initialize_parse prototype.
828         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
829         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
830         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
831         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
832         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
833         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
834         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
835         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
836         * printcmd.c: Remove _initialize_printcmd prototype.
837         * probe.c: Remove _initialize_probe prototype.
838         * proc-api.c: Remove _initialize_proc_api prototype.
839         * proc-events.c: Remove _initialize_proc_events prototype.
840         * proc-service.c: Remove _initialize_proc_service prototype.
841         * procfs.c: Remove _initialize_procfs prototype.
842         * psymtab.c: Remove _initialize_psymtab prototype.
843         * python/python.c: Remove _initialize_python prototype.
844         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
845         * record-btrace.c: Remove _initialize_record_btrace prototype.
846         * record-full.c: Remove _initialize_record_full prototype.
847         * record.c: Remove _initialize_record prototype.
848         * regcache.c: Remove _initialize_regcache prototype.
849         * reggroups.c: Remove _initialize_reggroup prototype.
850         * remote-notif.c: Remove _initialize_notif prototype.
851         * remote-sim.c: Remove _initialize_remote_sim prototype.
852         * remote.c: Remove _initialize_remote prototype.
853         * reverse.c: Remove _initialize_reverse prototype.
854         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
855         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
856         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
857         prototype.
858         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
859         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
860         * rust-exp.y: Remove _initialize_rust_exp prototype.
861         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
862         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
863         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
864         * score-tdep.c: Remove _initialize_score_tdep prototype.
865         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
866         prototype.
867         * ser-go32.c: Remove _initialize_ser_dos prototype.
868         * ser-mingw.c: Remove _initialize_ser_windows prototype.
869         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
870         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
871         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
872         * serial.c: Remove _initialize_serial prototype.
873         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
874         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
875         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
876         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
877         * skip.c: Remove _initialize_step_skip prototype.
878         * sol-thread.c: Remove _initialize_sol_thread prototype.
879         * solib-aix.c: Remove _initialize_solib_aix prototype.
880         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
881         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
882         * solib-frv.c: Remove _initialize_frv_solib prototype.
883         * solib-spu.c: Remove _initialize_spu_solib prototype.
884         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
885         * solib-target.c: Remove _initialize_solib_target prototype.
886         * solib.c: Remove _initialize_solib prototype.
887         * source.c: Remove _initialize_source prototype.
888         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
889         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
890         prototype.
891         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
892         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
893         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
894         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
895         prototype.
896         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
897         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
898         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
899         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
900         prototype.
901         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
902         prototype.
903         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
904         prototype.
905         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
906         prototype.
907         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
908         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
909         prototype.
910         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
911         prototype.
912         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
913         prototype.
914         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
915         prototype.
916         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
917         prototype.
918         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
919         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
920         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
921         * stabsread.c: Remove _initialize_stabsread prototype.
922         * stack.c: Remove _initialize_stack prototype.
923         * stap-probe.c: Remove _initialize_stap_probe prototype.
924         * std-regs.c: Remove _initialize_frame_reg prototype.
925         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
926         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
927         * symfile.c: Remove _initialize_symfile prototype.
928         * symmisc.c: Remove _initialize_symmisc prototype.
929         * symtab.c: Remove _initialize_symtab prototype.
930         * target-dcache.c: Remove _initialize_target_dcache prototype.
931         * target-descriptions.c: Remove _initialize_target_descriptions
932         prototype.
933         * thread.c: Remove _initialize_thread prototype.
934         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
935         prototype.
936         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
937         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
938         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
939         prototype.
940         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
941         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
942         * tracefile.c: Remove _initialize_tracefile prototype.
943         * tracepoint.c: Remove _initialize_tracepoint prototype.
944         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
945         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
946         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
947         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
948         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
949         * tui/tui-win.c: Remove _initialize_tui_win prototype.
950         * tui/tui.c: Remove _initialize_tui prototype.
951         * typeprint.c: Remove _initialize_typeprint prototype.
952         * user-regs.c: Remove _initialize_user_regs prototype.
953         * utils.c: Remove _initialize_utils prototype.
954         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
955         * valarith.c: Remove _initialize_valarith prototype.
956         * valops.c: Remove _initialize_valops prototype.
957         * valprint.c: Remove _initialize_valprint prototype.
958         * value.c: Remove _initialize_values prototype.
959         * varobj.c: Remove _initialize_varobj prototype.
960         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
961         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
962         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
963         * windows-nat.c: Remove _initialize_windows_nat,
964         _initialize_check_for_gdb_ini, and _initialize_loadable
965         prototypes.
966         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
967         * xcoffread.c: Remove _initialize_xcoffread prototype.
968         * xml-support.c: Remove _initialize_xml_support prototype.
969         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
970         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
971         prototype.
972         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
973         prototype.
974         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
975
976 2017-09-08  Keith Seitz  <keiths@redhat.com>
977
978         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
979         field.
980
981 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
982
983         * f-valprint.c (f_val_print): Remove check for one byte
984         sized integers. Remove printing of character type.
985
986 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
987             Christoph Weinmann  <christoph.t.weinmann@intel.com>
988             Bernhard Heckel  <bernhard.heckel@intel.com>
989
990         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
991         to maintain proper indentation when printing pointers/refs.
992
993 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
994
995         GDB 8.0.1 released.
996
997 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
998
999         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
1000
1001 2017-09-05  Tom Tromey  <tom@tromey.com>
1002
1003         * parse.c (funcall_chain): Now a std::vector.
1004         (start_arglist, end_arglist): Simplify.
1005         (free_funcalls): Remove.
1006         (parse_exp_in_context_1): Remove cleanup.
1007
1008 2017-09-05  Tom Tromey  <tom@tromey.com>
1009
1010         * go-exp.y (go_parse): Don't create a cleanup.
1011
1012 2017-09-05  Tom Tromey  <tom@tromey.com>
1013
1014         * d-exp.y (PrimaryExpression): Use std::string.
1015         (d_parse): Don't create a cleanup.
1016
1017 2017-09-05  Tom Tromey  <tom@tromey.com>
1018
1019         * utils.c (do_clear_parser_state): Remove.
1020         (make_cleanup_clear_parser_state): Remove.
1021         * p-exp.y (pascal_parse): Use scoped_restore.
1022         * m2-exp.y (m2_parse): Use scoped_restore.
1023         * f-exp.y (f_parse): Use scoped_restore.
1024         * d-exp.y (d_parse): Use scoped_restore.
1025         * c-exp.y (c_parse): Use scoped_restore.
1026         * ada-exp.y (ada_parse): Use scoped_restore.
1027         * utils.h (make_cleanup_clear_parser_state): Remove.
1028
1029 2017-09-06  Keith Seitz  <keiths@redhat.com>
1030
1031         * dwarf2read.c (dw2_linkage_name_attr): New function.
1032         (dw2_linkage_name): New function.
1033         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
1034         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
1035         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
1036
1037 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
1038
1039         * config/djgpp/djconfig.sh: Correct shell portability issue.
1040
1041 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
1042
1043         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
1044
1045 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
1046
1047         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
1048         * NEWS: Mention new FreeBSD/mips native configuration.
1049         * configure.host: Add aarch64*-*-freebsd*.
1050         * configure.nat: Likewise.
1051         * aarch64-fbsd-nat.c: New file.
1052
1053 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
1054
1055         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
1056         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
1057         * NEWS: Mention new FreeBSD/aarch64 target.
1058         * configure.tgt: Add aarch64*-*-freebsd*.
1059         * aarch64-fbsd-tdep.c: New file.
1060         * aarch64-fbsd-tdep.h: New file.
1061
1062 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
1063
1064         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
1065
1066 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
1067
1068         * parse.c (find_minsym_type_and_address): Don't relocate addresses
1069         of TLS symbols.
1070
1071 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1072
1073         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
1074         call.
1075
1076 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
1077
1078         * infrun.c (follow_exec): Call add_thread after
1079         target_find_description.
1080
1081 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
1082
1083         * infrun.c (handle_inferior_event_1): When exec'ing, read
1084         stop_pc after follow_exec.
1085
1086 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
1087
1088         * remote.c (process_g_packet): Update error message.
1089
1090 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1091
1092         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
1093         targets.
1094
1095 2017-09-05  Pedro Alves  <palves@redhat.com>
1096
1097         * eval.c (eval_call, evaluate_funcall): New functions, factored
1098         out from ...
1099         (evaluate_subexp_standard): ... this.
1100
1101 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1102
1103         * amd64-tdep.c (amd64_target_description): Create target
1104         descriptions.
1105         (_initialize_amd64_tdep): Don't call functions
1106         initialize_tdesc_amd64_*.  Add self tests.
1107         * arch/amd64.c (amd64_create_target_description): Add parameter
1108         is_linux.  Call set_tdesc_osabi if is_linux is true.
1109         * arch/amd64.h (amd64_create_target_description): Update the
1110         declaration.
1111         * arch/i386.c (i386_create_target_description): Add parameter
1112         is_linux.  Call set_tdesc_osabi if is_linux is true.
1113         * arch/i386.h (i386_create_target_description): Update
1114         declaration.
1115         * configure.tgt: Add i386.o to gdb_target_obs.
1116         * features/Makefile (XMLTOC): Remove i386/*.xml.
1117         * features/i386/amd64-avx-avx512.c: Remove.
1118         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
1119         * features/i386/amd64-avx-mpx.c: Remove.
1120         * features/i386/amd64-avx.c: Remove.
1121         * features/i386/amd64-mpx.c: Remove.
1122         * features/i386/amd64.c: Remove.
1123         * features/i386/i386-avx-avx512.c: Remove.
1124         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
1125         * features/i386/i386-avx-mpx.c: Remove.
1126         * features/i386/i386-avx.c: Remove.
1127         * features/i386/i386-mmx.c: Remove.
1128         * features/i386/i386-mpx.c: Remove.
1129         * features/i386/i386.c: Remove.
1130         * i386-tdep.c: Don't include features/i386/i386*.c., include
1131         target-descriptions.h and arch/i386.h.
1132         (i386_target_description): Create target descriptions.
1133         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
1134         functions.  Do self tests.
1135
1136 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1137
1138         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
1139         * features/i386/amd64-avx-avx512-linux.c: Removed.
1140         * features/i386/amd64-avx-linux.c: Removed.
1141         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
1142         * features/i386/amd64-avx-mpx-linux.c: Removed.
1143         * features/i386/amd64-linux.c: Removed.
1144         * features/i386/amd64-mpx-linux.c: Removed.
1145         * features/i386/x32-avx-avx512-linux.c: Removed.
1146         * features/i386/x32-avx-linux.c: Removed.
1147         * features/i386/x32-linux.c: Removed.
1148
1149 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1150
1151         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
1152         features/i386/*.c.
1153         (amd64_linux_read_description): Call
1154         amd64_create_target_description.
1155         * arch/amd64.c: New file.
1156         * arch/amd64.h: New file.
1157         * configure.tgt (x86_64-*-linux*): Append amd64.o.
1158         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
1159
1160 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1161
1162         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
1163         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
1164         (amd64_linux_read_description): Create target descriptions.
1165         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
1166         functions.  Add unit tests.
1167         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
1168         x32-core.xml.
1169         * features/i386/64bit-avx.c: Generated.
1170         * features/i386/64bit-avx512.c: Generated.
1171         * features/i386/64bit-core.c: Generated.
1172         * features/i386/64bit-linux.c: Generated.
1173         * features/i386/64bit-mpx.c: Generated.
1174         * features/i386/64bit-pkeys.c: Generated.
1175         * features/i386/64bit-segments.c: Generated.
1176         * features/i386/64bit-sse.c: Generated.
1177         * features/i386/x32-core.c: Generated.
1178         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
1179         c files for amd64-linux and x32-linux.
1180
1181 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1182
1183         * amd64-linux-tdep.c (amd64_linux_read_description): New
1184         function.
1185         (amd64_linux_core_read_description): Call
1186         amd64_linux_read_description.
1187         (amd64_linux_init_abi): Likewise.
1188         (amd64_x32_linux_init_abi): Likewise.
1189         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
1190         * x86-linux-nat.c (x86_linux_read_description): Call
1191         amd64_linux_read_description.
1192
1193 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1194
1195         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
1196         comments.
1197
1198 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1199
1200         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
1201         * features/i386/i386-avx-avx512-linux.c: Remove.
1202         * features/i386/i386-avx-linux.c: Remove.
1203         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
1204         * features/i386/i386-avx-mpx-linux.c: Remove.
1205         * features/i386/i386-linux.c: Remove.
1206         * features/i386/i386-mmx-linux.c: Remove.
1207         * features/i386/i386-mpx-linux.c: Remove.
1208
1209 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1210
1211         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
1212         (SFILES): Add arch/i386.c.
1213         (HFILES_NO_SRCDIR): Add arch/i386.h.
1214         * arch/i386.c: New file.
1215         * arch/i386.h: New file.
1216         * arch/tdesc.h (allocate_target_description): Declare.
1217         (set_tdesc_architecture): Declare.
1218         (set_tdesc_osabi): Declare.
1219         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
1220         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
1221         include arch/i386.h.
1222         (i386_linux_read_description): Remove code and call
1223         i386_create_target_description.
1224         (set_tdesc_architecture): New function.
1225         (set_tdesc_osabi): New function.
1226         * target-descriptions.h (allocate_target_description): Remove.
1227
1228 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1229
1230         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
1231         * target-descriptions.c (tdesc_create_feature): Likewise, and
1232         adjust code.
1233         * features/i386/32bit-avx.c: Re-generated.
1234         * features/i386/32bit-avx512.c: Re-generated.
1235         * features/i386/32bit-core.c: Re-generated.
1236         * features/i386/32bit-linux.c: Re-generated.
1237         * features/i386/32bit-mpx.c: Re-generated.
1238         * features/i386/32bit-pkeys.c: Re-generated.
1239         * features/i386/32bit-sse.c: Re-generated.
1240
1241 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1242
1243         * regformats/regdef.h (struct reg): Override operator == and !=.
1244
1245 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1246
1247         * arch/tdesc.h: New file.
1248         * regformats/regdat.sh: Generate code using tdesc_create_reg.
1249         * target-descriptions.c: Update comments.
1250         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
1251         declarations.
1252         * features/i386/32bit-avx.c: Re-generated.
1253         * features/i386/32bit-avx512.c: Re-generated.
1254         * features/i386/32bit-core.c: Re-generated.
1255         * features/i386/32bit-linux.c: Re-generated.
1256         * features/i386/32bit-mpx.c: Re-generated.
1257         * features/i386/32bit-pkeys.c: Re-generated.
1258         * features/i386/32bit-sse.c: Re-generated.
1259
1260 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1261
1262         * regformats/regdat.sh: Update generated code.
1263
1264 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1265
1266         * regformats/regdat.sh: Adjust code order.
1267
1268 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
1269
1270         * expprint.c (dump_subexp_body_standard): Use constant format
1271         string in fprintf_filtered call.
1272
1273 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
1274
1275         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
1276         NetBSD/i386.
1277         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
1278
1279 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
1280
1281         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
1282
1283 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
1284
1285         * bsd-kvm.o: Define _KMEMUSER.
1286         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
1287         * configure: Regenerate.
1288
1289 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
1290
1291         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
1292         * i386-fbsd-nat.c: Likewise.
1293
1294 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
1295
1296         * unittests/array-view-selftests.c: Add include of <array>.
1297
1298 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
1299
1300         * spu-tdep.c (flush_ea_cache): Add missing argument to
1301         call_function_by_hand.
1302
1303 2017-09-04  Pedro Alves  <palves@redhat.com>
1304
1305         * NEWS (Safer support for debugging with no debug info): New.
1306
1307 2017-09-04  Pedro Alves  <palves@redhat.com>
1308
1309         * c-exp.y (function_method, function_method_void): Add current
1310         instance flags to TYPE_INSTANCE.
1311         * dwarf2read.c (check_modifier): New.
1312         (compute_delayed_physnames): Assert that only C++ adds delayed
1313         physnames.  Mark fn_fields as const/volatile depending on
1314         physname.
1315         * eval.c (make_params): New type_instance_flags parameter.  Use
1316         it as the new type's instance flags.
1317         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
1318         flags element and pass it to make_params.
1319         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
1320         instance flags element.
1321         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
1322         * gdbtypes.h: Include "enum-flags.h".
1323         (type_instance_flags): New enum-flags type.
1324         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
1325         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
1326         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
1327         (follow_type_instance_flags): New function.
1328         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
1329         * parser-defs.h (follow_type_instance_flags): Declare.
1330         * valops.c (value_struct_elt_for_reference): const/volatile must
1331         match too.
1332
1333 2017-09-04  Pedro Alves  <palves@redhat.com>
1334
1335         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
1336         function/method scopes; lookup the nested name as a function local
1337         static variable.
1338
1339 2017-09-04  Pedro Alves  <palves@redhat.com>
1340
1341         (%type <voidval>): Add function_method.
1342         * c-exp.y (exp): New production for calls with no arguments.
1343         (function_method, function_method_void_or_typelist): New
1344         productions.
1345         (exp): New production for "method()::static_var".
1346         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
1347         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1348         Handle OP_FUNC_STATIC_VAR.
1349         * parse.c (operator_length_standard):
1350         Handle OP_FUNC_STATIC_VAR.
1351
1352 2017-09-04  Pedro Alves  <palves@redhat.com>
1353
1354         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
1355         handling.
1356         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1357         Ditto.
1358         * parse.c (operator_length_standard, operator_check_standard):
1359         Ditto.
1360         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
1361
1362 2017-09-04  Pedro Alves  <palves@redhat.com>
1363
1364         * ax-gdb.c: Include "typeprint.h".
1365         (gen_expr_for_cast): New function.
1366         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
1367         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
1368         type is unknown.
1369         * dwarf2read.c (new_symbol_full): Fallback to int instead of
1370         nodebug_data_symbol.
1371         * eval.c: Include "typeprint.h".
1372         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
1373         Error out if symbol has unknown type.
1374         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
1375         evaluate_subexp_for_cast.
1376         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
1377         OP_VAR_MSYM_VALUE.
1378         (evaluate_subexp_for_cast): New function.
1379         * gdbtypes.c (init_nodebug_var_type): New function.
1380         (objfile_type): Use it to initialize types of variables with no
1381         debug info.
1382         * typeprint.c (error_unknown_type): New.
1383         * typeprint.h (error_unknown_type): New declaration.
1384         * compile/compile-c-types.c (convert_type_basic): Handle
1385         TYPE_CODE_ERROR; warn and fallback to int for variables with
1386         unknown type.
1387
1388 2017-09-04  Pedro Alves  <palves@redhat.com>
1389
1390         * eval.c (evaluate_var_value): New function, factored out from ...
1391         (evaluate_subexp_standard): ... here.
1392
1393 2017-09-04  Pedro Alves  <palves@redhat.com>
1394
1395         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
1396         Remove useless assignments to 'op'.
1397
1398 2017-09-04  Pedro Alves  <palves@redhat.com>
1399
1400         * eval.c (eval_skip_value): New function.
1401         (evaluate_subexp_standard): Use it.
1402
1403 2017-09-04  Pedro Alves  <palves@redhat.com>
1404
1405         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
1406         function name from symbol/minsym and pass it to
1407         error_call_unknown_return_type.
1408
1409 2017-09-04  Pedro Alves  <palves@redhat.com>
1410
1411         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
1412         * ax-gdb.c (gen_msym_var_ref): New function.
1413         (gen_expr): Handle OP_VAR_MSYM_VALUE.
1414         * eval.c (evaluate_var_msym_value): New function.
1415         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
1416         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
1417         to call_function_by_hand.
1418         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1419         Handle OP_VAR_MSYM_VALUE.
1420         (union exp_element) <msymbol>: New field.
1421         * minsyms.h (struct type): Forward declare.
1422         (find_minsym_type_and_address): Declare.
1423         * parse.c (write_exp_elt_msym): New function.
1424         (write_exp_msymbol): Delete, refactored as ...
1425         (find_minsym_type_and_address): ... this new function.
1426         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
1427         (operator_length_standard, operator_check_standard): Handle
1428         OP_VAR_MSYM_VALUE.
1429         * std-operator.def (OP_VAR_MSYM_VALUE): New.
1430
1431 2017-09-04  Pedro Alves  <palves@redhat.com>
1432
1433         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
1434         TYPE_GNU_IFUNC specially here.  Throw error if return type is
1435         unknown.
1436         * ada-typeprint.c (print_func_type): Handle functions with unknown
1437         return type.
1438         * c-typeprint.c (c_type_print_base): Handle functions and methods
1439         with unknown return type.
1440         * compile/compile-c-symbols.c (convert_symbol_bmsym)
1441         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
1442         * compile/compile-c-types.c: Include "objfiles.h".
1443         (convert_func): For functions with unknown return type, warn and
1444         default to int.
1445         * compile/compile-object-run.c (compile_object_run): Adjust call
1446         to call_function_by_hand_dummy.
1447         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
1448         call_function_by_hand.
1449         * eval.c (evaluate_subexp_standard): Adjust calls to
1450         call_function_by_hand.  Handle functions and methods with unknown
1451         return type.  Pass expect_type to call_function_by_hand.
1452         * f-typeprint.c (f_type_print_base): Handle functions with unknown
1453         return type.
1454         * gcore.c (call_target_sbrk): Adjust call to
1455         call_function_by_hand.
1456         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
1457         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
1458         an integer address type instead of nodebug.
1459         * guile/scm-value.c (gdbscm_value_call): Adjust call to
1460         call_function_by_hand.
1461         * infcall.c (error_call_unknown_return_type): New function.
1462         (call_function_by_hand): New "default_return_type" parameter.
1463         Pass it down.
1464         (call_function_by_hand_dummy): New "default_return_type"
1465         parameter.  Use it instead of defaulting to int.  If there's no
1466         default and the return type is unknown, throw an error.  If
1467         there's a default return type, and the called function has no
1468         debug info, then assume the function is prototyped.
1469         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
1470         New "default_return_type" parameter.
1471         (error_call_unknown_return_type): New declaration.
1472         * linux-fork.c (call_lseek): Cast return type of lseek.
1473         (inferior_call_waitpid, checkpoint_command): Adjust calls to
1474         call_function_by_hand.
1475         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
1476         calls to call_function_by_hand.
1477         * m2-typeprint.c (m2_procedure): Handle functions with unknown
1478         return type.
1479         * objc-lang.c (lookup_objc_class, lookup_child_selector)
1480         (value_nsstring, print_object_command): Adjust calls to
1481         call_function_by_hand.
1482         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
1483         functions with unknown return type.
1484         (pascal_type_print_func_varspec_suffix): New function.
1485         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
1486         TYPE_CODE_METHOD>: Use it.
1487         * python/py-value.c (valpy_call): Adjust call to
1488         call_function_by_hand.
1489         * rust-lang.c (rust_evaluate_funcall): Adjust call to
1490         call_function_by_hand.
1491         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
1492         call_function_by_hand.
1493         * valops.c (value_allocate_space_in_inferior): Adjust call to
1494         call_function_by_hand.
1495         * typeprint.c (type_print_unknown_return_type): New function.
1496         * typeprint.h (type_print_unknown_return_type): New declaration.
1497
1498 2017-09-04  Pedro Alves  <palves@redhat.com>
1499
1500         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
1501         types with more than one parameter as prototyped.
1502
1503 2017-09-04  Pedro Alves  <palves@redhat.com>
1504
1505         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
1506         (disassemble_command): Use gdb_disassembly_flags instead of bare
1507         int.
1508         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
1509         (dump_insns, do_mixed_source_and_assembly_deprecated)
1510         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
1511         Use gdb_disassembly_flags instead of bare int.
1512         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
1513         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
1514         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
1515         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
1516         (enum gdb_disassembly_flag): ... values of this new enumeration.
1517         (gdb_disassembly_flags): Define.
1518         (gdb_disassembly)
1519         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
1520         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
1521         gdb_disassembly_flags instead of bare int.
1522         * record-btrace.c (btrace_insn_history)
1523         (record_btrace_insn_history, record_btrace_insn_history_range)
1524         (record_btrace_insn_history_from): Use gdb_disassembly_flags
1525         instead of bare int.
1526         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
1527         Use gdb_disassembly_flags instead of bare int.
1528         * target-debug.h (target_debug_print_gdb_disassembly_flags):
1529         Define.
1530         * target-delegates.c: Regenerate.
1531         * target.c (target_insn_history, target_insn_history_from)
1532         (target_insn_history_range): Use gdb_disassembly_flags instead of
1533         bare int.
1534         * target.h: Include "disasm.h".
1535         (struct target_ops) <to_insn_history, to_insn_history_from,
1536         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
1537         int.
1538         (target_insn_history, target_insn_history_from)
1539         (target_insn_history_range): Use gdb_disassembly_flags instead of
1540         bare int.
1541
1542 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
1543
1544         * cli/cli-script.c (build_command_line): For if/while commands,
1545         check whether args is empty.
1546
1547 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
1548
1549         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
1550         (enum command_control_type): Likewise.
1551         (struct command_line): Likewise.
1552         (free_command_lines): Likewise.
1553         (struct command_lines_deleter): Likewise.
1554         (command_line_up): Likewise.
1555         (read_command_lines): Likewise.
1556         (read_command_lines_1): Likewise.
1557         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
1558         (enum command_control_type): Likewise.
1559         (struct command_line): Likewise.
1560         (free_command_lines): Likewise.
1561         (struct command_lines_deleter): Likewise.
1562         (command_line_up): Likewise.
1563         (read_command_lines): Likewise.
1564         (read_command_lines_1): Likewise.
1565         * breakpoint.h: Include cli/cli-script.h.
1566         * extension-priv.h: Likewise.
1567         * gdbcmd.h: Likewise.
1568
1569 2017-09-04  Pedro Alves  <palves@redhat.com>
1570
1571         * ada-lang.c (is_known_support_routine): Move sal declaration to
1572         where it is initialized.
1573         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
1574         (parse_breakpoint_sals, decode_static_tracepoint_spec)
1575         (clear_command, update_static_tracepoint): Remove init_sal
1576         references.  Move declarations closer to initializations.
1577         * cli/cli-cmds.c (list_command): Move sal declarations closer to
1578         initializations.
1579         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
1580         references.  Move sal declarations closer to initializations.
1581         * frame.c (find_frame_sal): Return a symtab_and_line via function
1582         return instead of output parameter.  Remove init_sal references.
1583         * frame.h (find_frame_sal): Return a symtab_and_line via function
1584         return instead of output parameter.
1585         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
1586         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
1587         instead of memset.
1588         (gdbscm_find_pc_line): Remove init_sal reference.
1589         * infcall.c (call_function_by_hand_dummy): Remove init_sal
1590         references.  Move declarations closer to initializations.
1591         * infcmd.c (set_step_frame): Update.  Move declarations closer to
1592         initializations.
1593         (finish_backward): Remove init_sal references.  Move declarations
1594         closer to initializations.
1595         * infrun.c (process_event_stop_test, handle_step_into_function)
1596         (insert_hp_step_resume_breakpoint_at_frame)
1597         (insert_step_resume_breakpoint_at_caller): Likewise.
1598         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
1599         (symbol_to_sal): Likewise.
1600         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
1601         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
1602         to its initialization.
1603         * reverse.c (save_bookmark_command): Use new/delete.  Remove
1604         init_sal references.  Move declarations closer to initializations.
1605         * source.c (get_current_source_symtab_and_line): Remove brace
1606         initialization.
1607         (set_current_source_symtab_and_line): Now takes the sal by const
1608         reference.  Remove brace initialization.
1609         (line_info): Remove init_sal reference.
1610         * source.h (set_current_source_symtab_and_line): Now takes a
1611         symtab_and_line via const reference.
1612         * stack.c (set_current_sal_from_frame): Adjust.
1613         (print_frame_info): Adjust.
1614         (get_last_displayed_sal): Return the sal via function return
1615         instead of via output parameter.  Simplify.
1616         (frame_info): Adjust.
1617         * stack.h (get_last_displayed_sal): Return the sal via function
1618         return instead of via output parameter.
1619         * symtab.c (init_sal): Delete.
1620         (find_pc_sect_line): Remove init_sal references.  Move
1621         declarations closer to initializations.
1622         (find_function_start_sal): Remove init_sal references.  Move
1623         declarations closer to initializations.
1624         * symtab.h (struct symtab_and_line): In-class initialize all
1625         fields.
1626         * tracepoint.c (set_traceframe_context)
1627         (print_one_static_tracepoint_marker): Remove init_sal references.
1628         Move declarations closer to initializations.
1629         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
1630         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
1631         declarations closer to initializations.
1632         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
1633         init_sal references.  Adjust.
1634
1635 2017-09-04  Pedro Alves  <palves@redhat.com>
1636
1637         * ax-gdb.c (agent_command_1): Use range-for.
1638         * break-catch-throw.c (re_set_exception_catchpoint): Update.
1639         * breakpoint.c: Include "common/array-view.h".
1640         (init_breakpoint_sal, create_breakpoint_sal): Change sals
1641         parameter from struct symtabs_and_lines to
1642         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
1643         (breakpoint_sals_to_pc): Change sals parameter from struct
1644         symtabs_and_lines to std::vector reference.
1645         (check_fast_tracepoint_sals): Change sals parameter from struct
1646         symtabs_and_lines to std::array_view.  Use range-for.
1647         (decode_static_tracepoint_spec): Return a std::vector instead of
1648         symtabs_and_lines.  Update.
1649         (create_breakpoint): Update.
1650         (break_range_command, until_break_command, clear_command): Update.
1651         (base_breakpoint_decode_location, bkpt_decode_location)
1652         (bkpt_probe_create_sals_from_location)
1653         (bkpt_probe_decode_location, tracepoint_decode_location)
1654         (tracepoint_probe_decode_location)
1655         (strace_marker_create_sals_from_location): Return a std::vector
1656         instead of symtabs_and_lines.
1657         (strace_marker_create_breakpoints_sal): Update.
1658         (strace_marker_decode_location): Return a std::vector instead of
1659         symtabs_and_lines.  Update.
1660         (update_breakpoint_locations): Change struct symtabs_and_lines
1661         parameters to gdb::array_view.  Adjust.
1662         (location_to_sals): Return a std::vector instead of
1663         symtabs_and_lines.  Update.
1664         (breakpoint_re_set_default): Use std::vector instead of struct
1665         symtabs_and_lines.
1666         (decode_location_default): Return a std::vector instead of
1667         symtabs_and_lines.  Update.
1668         * breakpoint.h: Include "common/array-view.h".
1669         (struct breakpoint_ops) <decode_location>: Now returns a
1670         std::vector instead of returning a symtabs_and_lines via output
1671         parameter.
1672         (update_breakpoint_locations): Change sals parameters to use
1673         gdb::array_view.
1674         * cli/cli-cmds.c (edit_command, list_command): Update to use
1675         std::vector and gdb::array_view.
1676         (ambiguous_line_spec): Adjust to use gdb::array_view and
1677         range-for.
1678         (compare_symtabs): Rename to ...
1679         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
1680         const reference and adjust.
1681         (filter_sals): Rewrite using std::vector and standard algorithms.
1682         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
1683         (jump_command): Update to use std::vector.
1684         * linespec.c (struct linespec_state) <canonical_names>: Update
1685         comment.
1686         (add_sal_to_sals_basic): Delete.
1687         (add_sal_to_sals, filter_results, convert_results_to_lsals)
1688         (decode_line_2, create_sals_line_offset)
1689         (convert_address_location_to_sals, convert_linespec_to_sals)
1690         (convert_explicit_location_to_sals, parse_linespec)
1691         (event_location_to_sals, decode_line_full, decode_line_1)
1692         (decode_line_with_current_source)
1693         (decode_line_with_last_displayed, decode_objc)
1694         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
1695         (linespec_result::~linespec_result): Adjust to use std::vector
1696         instead of symtabs_and_lines.
1697         * linespec.h (linespec_sals::sals): Now a std::vector.
1698         (struct linespec_result): Use std::vector, bool, and in-class
1699         initialization.
1700         (decode_line_1, decode_line_with_current_source)
1701         (decode_line_with_last_displayed): Return std::vector.
1702         * macrocmd.c (info_macros_command): Use std::vector.
1703         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
1704         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
1705         std::vector.
1706         * probe.h (parse_probes): Return a std::vector.
1707         * python/python.c (gdbpy_decode_line): Use std::vector and
1708         gdb::array_view.
1709         * source.c (select_source_symtab, line_info): Use std::vector.
1710         * stack.c (func_command): Use std::vector.
1711         * symtab.h (struct symtabs_and_lines): Delete.
1712         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
1713
1714 2017-09-04  Pedro Alves  <palves@redhat.com>
1715
1716         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1717         unittests/array-view-selftests.c.
1718         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
1719         * common/array-view.h: New file.
1720         * unittests/array-view-selftests.c: New file.
1721
1722 2017-09-04  Pedro Alves  <palves@redhat.com>
1723
1724         * cli/cli-cmds.c (edit_command): Pass message to
1725         ambiguous_line_spec.
1726         (list_command): Pass message to ambiguous_line_spec.  Say
1727         "first"/"last" instead of "start" and "end" to be consistent with
1728         the manual.
1729         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
1730         them to print formatted message.
1731
1732 2017-09-04  Pedro Alves  <palves@redhat.com>
1733
1734         * btrace.c (ftrace_add_pt): Pass btrace_insn to
1735         ftrace_update_insns by reference instead of pointer.
1736
1737 2017-09-04  Yao Qi  <yao.qi@linaro.org>
1738
1739         * i386-go32-tdep.c: Include x86-xstate.h.
1740         (i386_go32_init_abi): Call i386_target_description.
1741         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
1742         if xcr0 is X86_XSTATE_X87_MASK.
1743         * i386-tdep.h (tdesc_i386): Remove the declaration.
1744         (tdesc_i386_mmx): Likewise.
1745
1746 2017-09-04  Yao Qi  <yao.qi@linaro.org>
1747
1748         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
1749         X86_XSTATE_SSE_MASK instead of 0.
1750
1751 2017-09-04  Yao Qi  <yao.qi@linaro.org>
1752
1753         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
1754         i386_target_description.
1755         * i386-fbsd-nat.c (i386fbsd_read_description): Call
1756         i386_target_description.
1757         * i386-tdep.c (i386_gdbarch_init): Likewise.
1758
1759 2017-09-04  Yao Qi  <yao.qi@linaro.org>
1760
1761         * amd64-darwin-tdep.c: Include "x86-xstate.h".
1762         (x86_darwin_init_abi_64): Call amd64_target_description.
1763         * amd64-dicos-tdep.c: Likewise.
1764         * amd64-fbsd-nat.c: Likewise.
1765         * amd64-fbsd-tdep.c: Likewise.
1766         * amd64-nbsd-tdep.c: Likewise.
1767         * amd64-obsd-tdep.c: Likewise.
1768         * amd64-sol2-tdep.c: Likewise.
1769         * amd64-windows-tdep.c: Likewise.
1770         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
1771
1772 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
1773
1774         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
1775         (btrace_function) <insn>: Change type to use std::vector.
1776         * btrace.c (ftrace_debug, ftrace_call_num_insn,
1777         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
1778         ftrace_update_insns, ftrace_compute_global_level_offset,
1779         btrace_stitch_bts, btrace_clear, btrace_insn_get,
1780         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
1781         change to std::vector.
1782         (ftrace_update_insns): Adjust to change to std::vector, change
1783         type of INSN parameter.
1784         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
1785         * record-btrace.c (btrace_call_history_insn_range,
1786         btrace_compute_src_line_range,
1787         record_btrace_frame_prev_register): Adjust to change to
1788         std::vector.
1789         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
1790         to change to std::vector.
1791
1792 2017-09-03  Tom Tromey  <tom@tromey.com>
1793
1794         * corefile.c (reopen_exec_file): Use std::string.
1795
1796 2017-09-03  Tom Tromey  <tom@tromey.com>
1797
1798         * compile/compile.c (compile_register_name_mangled): Return
1799         std::string.
1800         * compile/compile-loc2c.c (pushf_register_address): Update.
1801         (pushf_register): Update.
1802         * compile/compile-c-types.c (convert_array): Update.
1803         * compile/compile-c-symbols.c (generate_vla_size): Update.
1804         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
1805         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
1806         (convert_one_symbol): Update.
1807         (generate_c_for_for_one_variable): Update.
1808         * compile/compile-c-support.c (c_get_range_decl_name): Return a
1809         std::string.
1810         (generate_register_struct): Update.
1811         * compile/compile-internal.h (c_get_range_decl_name): Return a
1812         std::string.
1813         (compile_register_name_mangled): Return std::string.
1814
1815 2017-09-03  Tom Tromey  <tom@tromey.com>
1816
1817         * utils.c (perror_string): Return a std::string.
1818         (throw_perror_with_name, perror_warning_with_name): Update.
1819
1820 2017-09-03  Tom Tromey  <tom@tromey.com>
1821
1822         * demangle.c (demangle_command): Use std::string,
1823         unique_xmalloc_ptr.
1824
1825 2017-09-03  Tom Tromey  <tom@tromey.com>
1826
1827         * cli/cli-setshow.c (do_set_command): Use std::string.
1828
1829 2017-09-03  Tom Tromey  <tom@tromey.com>
1830
1831         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
1832
1833 2017-09-03  Tom Tromey  <tom@tromey.com>
1834
1835         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
1836
1837 2017-09-03  Tom Tromey  <tom@tromey.com>
1838
1839         * mi/mi-cmd-env.c (env_execute_cli_command): Use
1840         gdb::unique_xmalloc_ptr.
1841
1842 2017-09-03  Tom Tromey  <tom@tromey.com>
1843
1844         * thread.c (print_thread_info_1): Use string_printf.
1845         (thread_apply_command, thread_apply_all_command): Use
1846         std::string.
1847
1848 2017-09-03  Tom Tromey  <tom@tromey.com>
1849
1850         * valprint.c (val_print_string): Update.
1851         * gdbcore.h (memory_error_message): Return std::string.
1852         * corefile.c (memory_error_message): Return std::string.
1853         (memory_error): Update.
1854         * breakpoint.c (insert_bp_location): Update.
1855
1856 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
1857
1858         * target/waitstatus.h (target_waitstatus_to_string): Change
1859         return type to std::string.
1860         * target/waitstatus.c (target_waitstatus_to_string): Return
1861         std::string.
1862         * target.h (target_waitstatus_to_string): Remove declaration.
1863         * infrun.c (resume, clear_proceed_status_thread,
1864         print_target_wait_results, do_target_wait, save_waitstatus,
1865         stop_all_threads): Adjust.
1866         * record-btrace.c (record_btrace_wait): Adjust.
1867         * target-debug.h
1868         (target_debug_print_struct_target_waitstatus_p): Adjust.
1869
1870 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
1871
1872         PR gdb/22046
1873         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
1874         detection.
1875
1876 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1877
1878         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
1879         for setting/unsetting environment variables on the remote target.
1880         (New remote packets): Add entries for QEnvironmentHexEncoded,
1881         QEnvironmentUnset and QEnvironmentReset.
1882         * common/environ.c (gdb_environ::operator=): Extend method to
1883         handle m_user_set_env_list and m_user_unset_env_list.
1884         (gdb_environ::clear): Likewise.
1885         (match_var_in_string): Change type of first parameter from 'char
1886         *' to 'const char *'.
1887         (gdb_environ::set): Extend method to handle
1888         m_user_set_env_list and m_user_unset_env_list.
1889         (gdb_environ::unset): Likewise.
1890         (gdb_environ::clear_user_set_env): New method.
1891         (gdb_environ::user_set_envp): Likewise.
1892         (gdb_environ::user_unset_envp): Likewise.
1893         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
1894         m_user_unset_env_list on move constructor/assignment.
1895         (unset): Add new default parameter 'update_unset_list = true'.
1896         (clear_user_set_env): New method.
1897         (user_set_envp): Likewise.
1898         (user_unset_envp): Likewise.
1899         (m_user_set_env_list): New std::set.
1900         (m_user_unset_env_list): Likewise.
1901         * common/rsp-low.c (hex2str): New function.
1902         (bin2hex): New overload for bin2hex function.
1903         * common/rsp-low.c (hex2str): New prototype.
1904         (str2hex): New overload prototype.
1905         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
1906         QEnvironmentUnset and QEnvironmentReset.
1907         (remote_protocol_features): Add QEnvironmentHexEncoded,
1908         QEnvironmentUnset and QEnvironmentReset packets.
1909         (send_environment_packet): New function.
1910         (extended_remote_environment_support): Likewise.
1911         (extended_remote_create_inferior): Call
1912         extended_remote_environment_support.
1913         (_initialize_remote): Add QEnvironmentHexEncoded,
1914         QEnvironmentUnset and QEnvironmentReset packet configs.
1915         * unittests/environ-selftests.c (gdb_selftest_env_var):
1916         New variable.
1917         (test_vector_initialization): New function.
1918         (test_init_from_host_environ): Likewise.
1919         (test_reinit_from_host_environ): Likewise.
1920         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
1921         Likewise.
1922         (test_unset_set_empty_vector): Likewise.
1923         (test_vector_clear): Likewise.
1924         (test_std_move): Likewise.
1925         (test_move_constructor):
1926         (test_self_move): Likewise.
1927         (test_set_unset_reset): Likewise.
1928         (run_tests): Rewrite in terms of the functions above.
1929
1930 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
1931
1932         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
1933         (adi_available): Use a temp variable of type CORE_ADDR as argument
1934         3 when calling target_auxv_search.
1935         (adi_normalize_address): Use masks and xor operators to calculate
1936         normalized address.
1937         (adi_read_versions, adi_write_versions, adi_print_versions)
1938         (do_examine, do_assign): Use paddress.
1939
1940 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
1941
1942         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
1943         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
1944         out of loop and add supply of FIR.
1945         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
1946         add collect of FIR.
1947
1948 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
1949
1950         PR gdb/21827
1951         * cli/cli-script.c (define_command): Don't convert command name
1952         to lower case.
1953
1954 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
1955
1956         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
1957         Update all callers accordingly. Remove all code blocks handling
1958         the case where DISPP is not NULL.
1959
1960 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
1961
1962         PR symtab/22003
1963         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
1964         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
1965         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
1966
1967 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
1968
1969         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
1970         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
1971         (read_comp_units_from_section): New parameter abbrev_section, use
1972         read_and_check_comp_unit_head, allocate signatured_type if needed.
1973         (create_all_comp_units): Update read_comp_units_from_section caller.
1974
1975 2017-08-23  Pedro Alves  <palves@redhat.com>
1976
1977         PR remote/21852
1978         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
1979         to null_ptid and switch to thread without reading the registers
1980         after adding the inferior.
1981
1982 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
1983
1984         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
1985         compile-gcc.
1986         * compile/compile.c (compile_gcc, show_compile_gcc): New.
1987         (compile_to_object): Implement compile_gcc.
1988         (_initialize_compile): Install "set compile-gcc".  Initialize
1989         compile_gcc.
1990
1991 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
1992
1993         * compile/compile.c (compile_to_object): Conditionally call
1994         set_verbose.  Conditionally call compile or compile_v0.
1995
1996 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
1997
1998         * sparc64-tdep.h: (adi_normalize_address): New export.
1999         * sparc-nat.h: (open_adi_tag_fd): New export.
2000         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
2001         * sparc64-linux-tdep.c:
2002         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
2003         (sparc64_linux_handle_segmentation_fault): New function.
2004         (sparc64_linux_init_abi): Register
2005         sparc64_linux_handle_segmentation_fault
2006         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
2007         (sparc64_addr_bits_remove): New function.
2008         (sparc64_init_abi): Register sparc64_addr_bits_remove.
2009         (MAX_PROC_NAME_SIZE): New macro.
2010         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
2011         (sparc64adilist): New variable.
2012         (adi_proc_list): New variable.
2013         (find_adi_info): New function.
2014         (add_adi_info): New function.
2015         (get_adi_info_proc): New function.
2016         (get_adi_info): New function.
2017         (info_adi_command): New function.
2018         (read_maps_entry): New function.
2019         (adi_available): New function.
2020         (adi_normalize_address): New function.
2021         (adi_align_address): New function.
2022         (adi_convert_byte_count): New function.
2023         (adi_tag_fd): New function.
2024         (adi_is_addr_mapped): New function.
2025         (adi_read_versions): New function.
2026         (adi_write_versions): New function.
2027         (adi_print_versions): New function.
2028         (do_examine): New function.
2029         (do_assign): New function.
2030         (adi_examine_command): New function.
2031         (adi_assign_command): New function.
2032         (_initialize_sparc64_adi_tdep): New function.
2033
2034 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
2035
2036         * breakpoint.c (breakpoints_info): Rename to ...
2037         (info_breakpoints_command): ... this.
2038         (watchpoints_info): Rename to ...
2039         (info_watchpoints_command): ... this.
2040         (tracepoints_info): Rename to ...
2041         (info_tracepoints_command): ... this.
2042         (_initialize_breakpoint): Adjust.
2043         * dcache.c (dcache_info): Rename to ...
2044         (info_display_command): ... this.
2045         (_initialize_dcache): Adjust.
2046         * frame.h (args_info): Rename to ...
2047         (info_args_command): ... this.
2048         (locals_info): Rename to ...
2049         (info_locals_command): ... this.
2050         * infcmd.c (nofp_registers_info): Rename to ...
2051         (info_registers_command): ... this.
2052         (float_info): Rename to ...
2053         (info_float_command): ... this.
2054         (program_info): Rename to ...
2055         (info_program_command): ... this.
2056         (all_registers_info): Rename to ...
2057         (info_all_registers_command): ... this.
2058         (vector_info): Rename to ...
2059         (info_vector_command): ... this.
2060         (float_info): Rename to ...
2061         (info_float_command): ... this.
2062         (_initialize_infcmd): Adjust.
2063         * inferior.h (term_info): Rename to ...
2064         (info_terminal_command): ... this.
2065         * inflow.c (term_info): Rename to ...
2066         (info_terminal_command): ... this.
2067         (_initialize_inflow): Adjust.
2068         * infrun.c (signals_info): Rename to ...
2069         (info_signals_command): ... this.
2070         (_initialize_infrun): Adjust.
2071         * objc-lang.c (classes_info): Rename to ...
2072         (info_classes_command): ... this.
2073         (selectors_info): Rename to ...
2074         (info_selectors_command): ... this.
2075         (_initialize_objc_language): Adjust.
2076         * printcmd.c (sym_info): Rename to ...
2077         (info_symbol_command): ... this.
2078         (address_info): Rename to ...
2079         (info_address_command): ... this.
2080         (display_info): Rename to ...
2081         (info_display_command): ... this.
2082         (_initialize_printcmd): Adjust.
2083         * reverse.c (bookmarks_info): Rename to ...
2084         (info_breakpoints_command): ... this.
2085         (_initialize_reverse): Adjust.
2086         * ser-go32.c (dos_info): Rename to ...
2087         (info_serial_command): ... this.
2088         (_initialize_ser_dos): Adjust.
2089         * skip.c (skip_info): Rename to ...
2090         (info_skip_command): ... this.
2091         (_initialize_step_skip): Adjust.
2092         * source.c (line_info): Rename to ...
2093         (info_line_command): ... this.
2094         (source_info): Rename to ...
2095         (info_source_command)
2096         * stack.c (frame_info): Rename to ...
2097         (info_frame_command): ... this.
2098         (locals_info): Rename to ...
2099         (info_locals_command): ... this.
2100         (args_info): Rename to ...
2101         (info_args_command): ... this.
2102         (_initialize_stack): Adjust.
2103         * symtab.c (sources_info): Rename to ...
2104         (info_sources_command): ... this.
2105         (variables_info): Rename to ...
2106         (info_variables_command): ... this.
2107         (functions_info): Rename to ...
2108         (info_functions_command): ... this.
2109         (types_info): Rename to ...
2110         (info_types_command): ... this.
2111         (_initialize_symtab): Adjust.
2112         * target.c (target_info): Rename to ...
2113         (info_target_command): ... this.
2114         (initialize_targets): Adjust.
2115         * tracepoint.c (tvariables_info): Rename to ...
2116         (info_tvariables_command): ... this.
2117         (scope_info): Rename to ...
2118         (info_scope_command): ... this.
2119         (trace_dump_actions): Adjust.
2120         (_initialize_tracepoint): Adjust.
2121
2122 2017-08-22  Tom Tromey  <tom@tromey.com>
2123
2124         * breakpoint.h (install_breakpoint): Update.
2125         * breakpoint.c (add_solib_catchpoint): Update.
2126         (install_breakpoint): Change argument to a std::unique_ptr.
2127         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
2128         (create_breakpoint_sal, create_breakpoint): Update.
2129         (watch_command_1, catch_exec_command_1)
2130         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
2131         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
2132         Return the breakpoint.
2133         (set_raw_breakpoint_without_location, set_raw_breakpoint)
2134         (new_single_step_breakpoint): Update.
2135         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
2136         std::unique_ptr.
2137         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2138         std::unique_ptr.
2139         * break-catch-sig.c (create_signal_catchpoint): Use
2140         std::unique_ptr.
2141         * ada-lang.c (create_ada_exception_catchpoint): Use
2142         std::unique_ptr.
2143
2144 2017-08-22  Tom Tromey  <tom@tromey.com>
2145
2146         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
2147
2148 2017-08-22  Tom Tromey  <tom@tromey.com>
2149
2150         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
2151         (lookup_partial_symbol): Update.
2152
2153 2017-08-22  Tom Tromey  <tom@tromey.com>
2154
2155         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
2156         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
2157         (find_and_open_source, symtab_to_fullname): Update.
2158         * psymtab.c (psymtab_to_fullname): Update.
2159
2160 2017-08-22  Tom Tromey  <tom@tromey.com>
2161
2162         * exec.c (exec_file_attach): Update.
2163         * linux-thread-db.c (try_thread_db_load): Update.
2164         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
2165         * utils.c (gdb_realpath): Change return type.
2166         (gdb_realpath_keepfile): Update.
2167         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
2168         (_initialize_utils): Register the new self test.
2169         * source.c (openp): Update.
2170         (find_and_open_source): Update.
2171         * nto-tdep.c (nto_find_and_open_solib): Update.
2172         * main.c (set_gdb_data_directory): Update.
2173         (captured_main_1): Update.
2174         * dwarf2read.c (dwarf2_get_dwz_file): Update
2175         (dw2_map_symbol_filenames): Update.
2176         * auto-load.c (auto_load_safe_path_vec_update): Update.
2177         (filename_is_in_auto_load_safe_path_vec): Change type of
2178         "filename_realp".
2179         (auto_load_objfile_script): Update.
2180         (file_is_auto_load_safe): Update.  Use std::string.
2181         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
2182
2183 2017-08-22  Tom Tromey  <tom@tromey.com>
2184
2185         * utils.c (gdb_realpath_keepfile): Return a
2186         gdb::unique_xmalloc_ptr.
2187         * exec.c (exec_file_attach): Update.
2188         * utils.h (gdb_realpath_keepfile): Return a
2189         gdb::unique_xmalloc_ptr.
2190
2191 2017-08-22  Tom Tromey  <tom@tromey.com>
2192
2193         * compile/compile.c (compile_file_command): Use
2194         gdb::unique_xmalloc_ptr, std::string.
2195         * utils.c (gdb_abspath): Change return type.
2196         * source.c (openp): Update.
2197         * objfiles.c (allocate_objfile): Update.
2198         * main.c (set_gdb_data_directory): Update.
2199         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
2200
2201 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
2202
2203         * cli-cmds.c (list_commands): List actual code around more than
2204         one location.
2205
2206 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
2207
2208         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
2209
2210 2017-08-21  Pedro Alves  <palves@redhat.com>
2211
2212         PR gdb/19487
2213         * c-exp.y (variable production): Handle function aliases.
2214         * minsyms.c (msymbol_is_text): New function.
2215         * minsyms.h (msymbol_is_text): Declare.
2216         * symtab.c (find_function_alias_target): New function.
2217         * symtab.h (find_function_alias_target): Declare.
2218
2219 2017-08-21  Pedro Alves  <palves@redhat.com>
2220
2221         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
2222         typedefs.
2223         * typeprint.c (whatis_exp): If handling "whatis", and expression
2224         is OP_TYPE, strip one typedef level.  Otherwise don't strip
2225         typedefs here.
2226         * valops.c (value_cast): Save "to" type before resolving
2227         stubs/typedefs.  Use that type as resulting value's type.
2228
2229 2017-08-18  Tom Tromey  <tom@tromey.com>
2230             Pedro Alves  <palves@redhat.com>
2231
2232         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
2233         * sol-thread.c (sol_thread_resume, sol_thread_wait)
2234         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
2235         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
2236         * proc-service.c (ps_xfer_memory): Use scoped_restore.
2237         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
2238         (linux_get_siginfo_data): Add "thread" argument.  Use
2239         scoped_restore.
2240         * linux-nat.c (linux_child_follow_fork)
2241         (check_stopped_by_watchpoint): Use scoped_restore.
2242         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
2243         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
2244         (restore_inferior_ptid, save_inferior_ptid): Remove.
2245         * btrace.c (btrace_fetch): Use scoped_restore.
2246         * bsd-uthread.c (bsd_uthread_fetch_registers)
2247         (bsd_uthread_store_registers): Use scoped_restore.
2248         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
2249         scoped_restore.
2250         * aix-thread.c (aix_thread_resume, aix_thread_wait)
2251         (aix_thread_xfer_partial): Use scoped_restore.
2252         * inferior.h (save_inferior_ptid): Remove.
2253
2254 2017-08-18  Yao Qi  <yao.qi@linaro.org>
2255
2256         PR tdep/21818
2257         * arm-tdep.c (gdb_print_insn_arm): Mark
2258         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
2259
2260 2017-08-18  Yao Qi  <yao.qi@linaro.org>
2261
2262         * NEWS: Mention GDBserver's new option "--selftest".
2263         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
2264         * selftest.c: Move it to common/selftest.c.
2265         * selftest.h: Move it to common/selftest.h.
2266         * selftest-arch.c (reset): New function.
2267         (tests_with_arch): Call reset.
2268
2269 2017-08-18  Yao Qi  <yao.qi@linaro.org>
2270
2271         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
2272         instead of exception_fprintf and printf_filtered.
2273
2274 2017-08-18  Yao Qi  <yao.qi@linaro.org>
2275
2276         * selftest.c (register_self_test): Rename it to
2277         selftests::register_test.
2278         (run_self_tests): selftest::run_tests.
2279         * selftest.h: Update declarations.
2280         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
2281         selftests::register_test_foreach_arch.
2282         * selftest-arch.h: Update declaration.
2283         * aarch64-tdep.c: Update.
2284         * arm-tdep.c: Likewise.
2285         * disasm-selftests.c: Likewise.
2286         * dwarf2loc.c: Likewise.
2287         * dwarf2-frame.c: Likewise.
2288         * findvar.c: Likewise.
2289         * gdbarch-selftests.c: Likewise.
2290         * maint.c (maintenance_selftest): Likewise.
2291         * regcache.c: Likewise.
2292         * rust-exp.y: Likewise.
2293         * selftest-arch.c: Likewise.
2294         * unittests/environ-selftests.c: Likewise.
2295         * unittests/function-view-selftests.c: Likewise.
2296         * unittests/offset-type-selftests.c: Likewise.
2297         * unittests/optional-selftests.c: Likewise.
2298         * unittests/scoped_restore-selftests.c: Likewise.
2299         * utils-selftests.c: Likewise.
2300
2301 2017-08-17  Pedro Alves  <palves@redhat.com>
2302
2303         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
2304         local.
2305
2306 2017-08-17  Pedro Alves  <palves@redhat.com>
2307
2308         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
2309         field.
2310         (reset_die_in_process): Delete, replaced by ...
2311         (process_die_scope): ... this new class.  Make it responsible for
2312         freeing cu->line_header too.
2313         (process_die): Use process_die_scope.
2314         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
2315         cu->line_header_die_owner.  Don't release the line header if it's
2316         owned by the CU.
2317         (setup_type_unit_groups): Make the CU/DIE own the line header.
2318         Don't release the line header here.
2319
2320 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
2321
2322         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
2323
2324 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
2325
2326         * NEWS: Mention new shortcuts for nexti and stepi in TUI
2327         Single-Key mode
2328
2329 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
2330
2331         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
2332         mode command list.
2333
2334 2017-08-15  Stafford Horne  <shorne@gmail.com>
2335
2336         * MAINTAINERS (Write After Approval): Add Stafford Horne.
2337
2338 2017-08-15  Stafford Horne  <shorne@gmail.com>
2339
2340         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
2341
2342 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
2343
2344         PR gdb/21954
2345         * infcmd.c (unset_environment_command): Use the 'clear' method on
2346         the environment instead of resetting it.
2347
2348 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
2349
2350         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
2351         platforms.
2352
2353 2017-08-14  Tom Tromey  <tom@tromey.com>
2354
2355         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
2356         (print_binary_chars): Likewise.
2357         (BITS_IN_BYTES): Remove.
2358
2359 2017-08-14  Tom Tromey  <tom@tromey.com>
2360
2361         PR gdb/21675
2362         * valprint.c (LOW_ZERO): Change value to 034.
2363         (print_octal_chars): Add static_asserts for octal constants.
2364         * printcmd.c (print_scalar_formatted): Add 'd' case.
2365
2366 2017-08-11  Tom Tromey  <tom@tromey.com>
2367
2368         * symfile.c (add_symbol_file_command): Use std::vector.
2369
2370 2017-08-14  Tom Tromey  <tom@tromey.com>
2371
2372         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
2373         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2374         std::move.
2375         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
2376
2377 2017-08-11  Pedro Alves  <palves@redhat.com>
2378
2379         * infrun.c (process_event_stop_test): Adjust
2380         function_name_is_marked_for_skip call.
2381         * skip.c: Include <list>.
2382         (skiplist_entry): Make it a class with private fields, and
2383         getters/setters.
2384         (skiplist_entry_chain): Delete.
2385         (skiplist_entries): New.
2386         (skiplist_entry_count): Delete.
2387         (highest_skiplist_entry_num): New.
2388         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
2389         (add_skiplist_entry): Delete.
2390         (skiplist_entry::skiplist_entry): New.
2391         (skiplist_entry::add_entry): New.
2392         (skip_file_command, skip_function): Adjust.
2393         (compile_skip_regexp): Delete.
2394         (skip_command): Don't compile regexp here.  Adjust to use
2395         skiplist_entry::add_entry.
2396         (skip_info): Adjust to use range-for and getters.
2397         (skip_enable_command, skip_disable_command): Adjust to use
2398         range-for and setters.
2399         (skip_delete_command): Adjust to use std::list.
2400         (add_skiplist_entry): Delete.
2401         (skip_file_p): Delete, refactored as ...
2402         (skiplist_entry::do_skip_file_p): ... this new method.
2403         (skip_gfile_p): Delete, refactored as ...
2404         (skiplist_entry::do_gskip_file_p): ... this new method.
2405         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
2406         (skiplist_entry::skip_function_p): ... this new method.
2407         (function_name_is_marked_for_skip): Now returns bool, and takes
2408         the function sal by const reference.  Adjust to use range-for and
2409         skiplist_entry methods.
2410         (_initialize_step_skip): Remove references to
2411         skiplist_entry_chain, skiplist_entry_count.
2412         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
2413         takes the function sal by const reference.
2414
2415 2017-08-11  Yao Qi  <yao.qi@linaro.org>
2416
2417         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
2418         (dwarf2_frame_cache): Remove reset_cache_cleanup.
2419         (dwarf2_frame_cache):
2420         * frame-unwind.c (frame_unwind_try_unwinder): Catch
2421         RETURN_MASK_ALL and set *this_case to NULL.
2422         * frame-unwind.h: Update comments.
2423
2424 2017-08-11  Yao Qi  <yao.qi@linaro.org>
2425
2426         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
2427         (dwarf2_frame_state_copy_regs): Remove.
2428         (dwarf2_frame_state_free_regs): Remove.
2429         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
2430         (dwarf2_restore_rule): Call method .alloc_regs instead of
2431         dwarf2_frame_state_alloc_regs.
2432         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
2433         constructor.  Call std::move.
2434         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
2435         (dwarf2_frame_cache): Likewise.
2436
2437         [GDB_SELF_TEST]: Include selftest.h and
2438         selftest-arch.h.
2439         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
2440         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
2441         execute_cfa_program_test.
2442
2443         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
2444         copy ctor, assignment operator, move assignment.
2445         <alloc_regs>: New method.
2446         <swap>: New method.
2447         (struct dwarf2_frame_state): Delete dtor.
2448         (dwarf2_frame_state_alloc_regs): Remove declaration.
2449         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
2450         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
2451
2452 2017-08-11  Yao Qi  <yao.qi@linaro.org>
2453
2454         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
2455         (dwarf2_frame_state::dwarf2_frame_state): New.
2456         (dwarf2_frame_state::~dwarf2_frame_state): New.
2457         (dwarf2_fetch_cfa_info): Update.
2458         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
2459         rather than a pointer.  Update code.
2460         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
2461         dtor.
2462         <data_align, code_align, retaddr_column>: Change them to const.
2463         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
2464         to bool.
2465
2466 2017-08-11  Yao Qi  <yao.qi@linaro.org>
2467
2468         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
2469         <loc.exp>: New field.
2470         * dwarf2-frame.c (execute_cfa_program): Update.
2471         (dwarf2_frame_prev_register): Update.
2472
2473 2017-08-10  Pedro Alves  <palves@redhat.com>
2474
2475         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
2476
2477 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
2478
2479         * fbsd-nat.c (struct fbsd_fork_info): Remove.
2480         (fbsd_pending_children): Use std::list.
2481         (fbsd_remember_child): Likewise.
2482         (fbsd_is_child_pending): Likewise.
2483         (fbsd_pending_vfork_done): Use std::forward_list.
2484         (fbsd_add_vfork_done): Likewise.
2485         (fbsd_is_vfork_done_pending): Likewise.
2486         (fbsd_next_vfork_done): Likewise.
2487
2488 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
2489
2490         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
2491         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
2492         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
2493         for `mapfilename'.
2494         (fbsd_xfer_partial): Use gdb::byte_vector.
2495         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
2496
2497 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
2498
2499         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
2500         "filestuff.h".
2501         (fbsd_find_memory_regions): Fix `mapfile' initialization.
2502
2503 2017-08-09  Tom Tromey  <tom@tromey.com>
2504
2505         * skip.c (skiplist_entry): New constructor.
2506         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
2507         (skiplist_entry::file_is_glob): Now bool.
2508         (skiplist_entry::file, skiplist_entry::function): Now
2509         std::string.
2510         (make_skip_entry): Return a unique_ptr.  Use new.
2511         (free_skiplist_entry, free_skiplist_entry_cleanup)
2512         (make_free_skiplist_entry_cleanup): Remove.
2513         (skip_command, skip_disable_command, add_skiplist_entry)
2514         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
2515         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
2516         (function_name_is_marked_for_skip): Update.
2517         (skip_delete_command): Update.  Use delete.
2518
2519 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
2520
2521         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
2522         (aarch64_linux_core_read_description): New function.
2523         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
2524
2525 2017-08-09  Pedro Alves  <palves@redhat.com>
2526
2527         * cp-name-parser.y (cp_comp_to_string): Return a
2528         gdb::unique_xmalloc_ptr<char>.
2529         * cp-support.c (replace_typedefs_qualified_name)
2530         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
2531         (cp_canonicalize_string_full): Use op= instead of explicit
2532         convertion.
2533         (cp_class_name_from_physname, method_name_from_physname)
2534         (cp_func_name, cp_remove_params): Adjust to use
2535         gdb::unique_xmalloc_ptr<char>.
2536         * cp-support.h (cp_comp_to_string): Return a
2537         gdb::unique_xmalloc_ptr<char>.
2538         * python/py-type.c (typy_lookup_type): Adjust to use
2539         gdb::unique_xmalloc_ptr<char>.
2540
2541 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
2542
2543         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
2544
2545 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
2546             Yao Qi  <yao.qi@linaro.org>
2547
2548         * cp-support.c (cp_canonicalize_string_full): Use
2549         gdb::unique_xmalloc_ptr<char>.
2550         (cp_canonicalize_string): Likewise.
2551
2552 2017-08-09  Yao Qi  <yao.qi@linaro.org>
2553
2554         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
2555         * regformats/i386/amd64-avx-avx512.dat: Remove.
2556         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
2557         * regformats/i386/amd64-avx-mpx.dat:Remove.
2558         * regformats/i386/amd64-avx.dat: Remove.
2559         * regformats/i386/amd64-mpx.dat: Remove.
2560         * regformats/i386/i386-avx-avx512.dat: Remove.
2561         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
2562         * regformats/i386/i386-avx-mpx.dat: Remove.
2563         * regformats/i386/i386-mmx.dat: Remove.
2564         * regformats/i386/i386-mpx.dat: Remove.
2565
2566 2017-08-09  Yao Qi  <yao.qi@linaro.org>
2567
2568         * amd64-tdep.h (tdesc_x32): Remove the declaration.
2569         * amd64-tdep.c: Don't include features/i386/x32*.c.
2570         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
2571         functions.
2572         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
2573         and i386/x32-avx-avx512.
2574         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
2575         and i386/x32.xml.
2576         * features/i386/x32-avx-avx512.c: Removed.
2577         * features/i386/x32-avx-avx512.xml: Removed.
2578         * features/i386/x32-avx.c: Removed.
2579         * features/i386/x32-avx.xml: Removed.
2580         * features/i386/x32.c: Removed.
2581         * features/i386/x32.xml: Removed.
2582         * regformats/i386/x32-avx-avx512.dat: Removed.
2583         * regformats/i386/x32-avx.dat: Removed.
2584         * regformats/i386/x32.dat: Removed.
2585
2586 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
2587
2588         PR breakpoints/21886
2589         * mem-break.c (default_memory_insert_breakpoint): Use
2590         `->placed_address' rather than `->reqstd_address' for the
2591         breakpoint location.
2592
2593 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
2594
2595         * arch-utils.c (default_print_insn): Remove arch/mach/endian
2596         assertions.
2597
2598 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
2599
2600         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
2601         a union of `tdep_info', `tdesc_data' and `id'.
2602         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
2603         rather than `info.tdep_info'.
2604         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
2605         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
2606         * i386-tdep.c (i386_gdbarch_init): Likewise.
2607         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
2608         * mips-tdep.c (mips_gdbarch_init): Likewise.
2609         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2610         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
2611         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
2612         `info.tdep_info'.
2613         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
2614         `info.tdep_info'.
2615         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
2616         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
2617         `info.tdep_info'.
2618         * spu-tdep.c (spu_gdbarch_init): Likewise.
2619         * gdbarch.h: Regenerate.
2620
2621 2017-08-07  Leszek Swirski  <leszeks@google.com>
2622
2623         PR symtab/20899
2624         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
2625
2626 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2627
2628         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
2629         (gdbsim_open): Rename gdb_argv args object to argv.
2630
2631 2017-08-05  Tom Tromey  <tom@tromey.com>
2632
2633         * compile/compile-object-load.c (compile_object_load): Use
2634         gdb::unique_xmalloc_ptr.
2635         * cli/cli-dump.c (scan_filename): Rename from
2636         scan_filename_with_cleanup.  Change return type.
2637         (scan_expression): Rename from scan_expression_with_cleanup.
2638         Change return type.
2639         (dump_memory_to_file, dump_value_to_file, restore_command):
2640         Use gdb::unique_xmalloc_ptr.  Update.
2641         * cli/cli-cmds.c (find_and_open_script): Use
2642         gdb::unique_xmalloc_ptr.
2643         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
2644         * symmisc.c (maintenance_print_symbols)
2645         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
2646         * symfile.c (symfile_bfd_open, generic_load)
2647         (add_symbol_file_command, remove_symbol_file_command): Use
2648         gdb::unique_xmalloc_ptr.
2649         * source.c (openp): Use gdb::unique_xmalloc_ptr.
2650         * psymtab.c (maintenance_print_psymbols): Use
2651         gdb::unique_xmalloc_ptr.
2652         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
2653         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
2654         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
2655         (reload_shared_libraries_1): Likewise.
2656
2657 2017-08-05  Tom Tromey  <tom@tromey.com>
2658
2659         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
2660         (rust_op_vector, rust_set_vector): New typedefs.
2661         (current_parser): New global.
2662         (work_obstack): Change to pointer type.  Update all users.
2663         (rust_ast, pstate): Remove globals.
2664         (struct rust_parser): New.
2665         (%union) <params, field_inits>: Change type.
2666         (start, tuple_expr, unit_expr, struct_expr_list, literal)
2667         (field_expr, expr_list, maybe_expr_list, type_list): Update.
2668         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
2669         (convert_params_to_types, convert_params_to_expression): Change
2670         type of "params".
2671         (ast_string): Change type of "fields".
2672         (rust_parse): Make a rust_parser.  Remove cleanups.
2673         (rust_lex_tests): Make and install an auto_obstack.
2674
2675 2017-08-04  Yao Qi  <yao.qi@linaro.org>
2676
2677         * configure.srv (ipa_x32_linux_regobj): New.
2678         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
2679         instead of X86_TDESC_AVX512.
2680         (initialize_low_tracepoint): Call
2681         init_registers_x32_avx_avx512_linux.
2682
2683 2017-08-04  Yao Qi  <yao.qi@linaro.org>
2684
2685         * utils.h (gdb_argv): Add namespace std for nullptr_t.
2686
2687 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
2688
2689         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
2690
2691 2017-08-03  Tom Tromey  <tom@tromey.com>
2692
2693         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
2694         Remove.
2695         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
2696
2697 2017-08-03  Tom Tromey  <tom@tromey.com>
2698
2699         * python/py-param.c (compute_enum_values): Use gdb_argv.
2700
2701 2017-08-03  Tom Tromey  <tom@tromey.com>
2702
2703         * utils.h (struct gdb_argv_deleter): New.
2704         (gdb_argv): New class.
2705         * utils.c (gdb_argv::reset): New method.
2706         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
2707         * tracefile.c (tsave_command): Use gdb_argv.
2708         * top.c (new_ui_command): Use gdb_argv.
2709         * symmisc.c (maintenance_print_symbols)
2710         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
2711         * symfile.c (symbol_file_command, generic_load)
2712         (remove_symbol_file_command): Use gdb_argv.
2713         * stack.c (backtrace_command): Use gdb_argv.
2714         * source.c (add_path, show_substitute_path_command)
2715         (unset_substitute_path_command, set_substitute_path_command):
2716         Use gdb_argv.
2717         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
2718         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
2719         * remote.c (extended_remote_run, remote_put_command)
2720         (remote_get_command, remote_delete_command): Use gdb_argv.
2721         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
2722         (gdbsim_open): Use gdb_argv.
2723         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
2724         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
2725         * procfs.c (procfs_info_proc): Use gdb_argv.
2726         * interps.c (interpreter_exec_cmd): Use gdb_argv.
2727         * infrun.c (handle_command): Use gdb_argv.
2728         * inferior.c (add_inferior_command, clone_inferior_command):
2729         Use gdb_argv.
2730         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
2731         * exec.c (exec_file_command): Use gdb_argv.
2732         * cli/cli-cmds.c (alias_command): Use gdb_argv.
2733         * compile/compile.c (build_argc_argv): Use gdb_argv.
2734
2735 2017-08-03  Tom Tromey  <tom@tromey.com>
2736
2737         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
2738
2739 2017-08-03  Tom Tromey  <tom@tromey.com>
2740
2741         * python/python.c (compute_python_string): Return std::string.
2742         (gdbpy_eval_from_control_command): Update.
2743         (do_start_initialization): Use std::string.
2744         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
2745         xstrprintf.
2746         * python/py-breakpoint.c (local_setattro): Use string_printf, not
2747         xstrprintf.
2748
2749 2017-08-03  Tom Tromey  <tom@tromey.com>
2750
2751         * top.h (do_restore_instream_cleanup): Remove.
2752         * top.c (do_restore_instream_cleanup): Remove.
2753         (read_command_file): Use scoped_restore.
2754         * cli/cli-script.c (execute_user_command): Use scoped_restore.
2755
2756 2017-08-03  Tom Tromey  <tom@tromey.com>
2757
2758         * cli/cli-script.c (execute_user_command)
2759         (execute_control_command): Use scoped_restore.
2760
2761 2017-08-03  Tom Tromey  <tom@tromey.com>
2762
2763         * cli/cli-script.c (do_restore_user_call_depth): Remove.
2764         (execute_user_command): Remove user_call_depth; use
2765         user_args_stack's size instead.
2766
2767 2017-08-03  Tom Tromey  <tom@tromey.com>
2768
2769         * top.h (in_user_command): Remove.
2770         * top.c (in_user_command): Remove.
2771         * cli/cli-script.c (do_restore_user_call_depth)
2772         (execute_user_command): Update.
2773
2774 2017-08-03  Tom Tromey  <tom@tromey.com>
2775
2776         * valops.c (search_struct_method): Use gdb::byte_vector.
2777         * valarith.c (value_concat): Use std::vector.
2778         * target.c (memory_xfer_partial): Use gdb::byte_vector.
2779         (simple_search_memory): Likewise.
2780         * printcmd.c (find_string_backward): Use gdb::byte_vector.
2781         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
2782         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
2783         * elfread.c (elf_rel_plt_read): Use std::string.
2784         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
2785         * cli/cli-dump.c (restore_section_callback): Use
2786         gdb::byte_vector.
2787
2788 2017-08-03  Tom Tromey  <tom@tromey.com>
2789
2790         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
2791
2792 2017-08-03  Tom Tromey  <tom@tromey.com>
2793
2794         * tui/tui-regs.c (tui_restore_gdbout): Remove.
2795         (tui_register_format): Use scoped_restore.
2796
2797 2017-08-03  Tom Tromey  <tom@tromey.com>
2798
2799         * reverse.c (exec_direction_default): Remove.
2800         (exec_reverse_once): Use scoped_restore.
2801         * remote.c (restore_remote_timeout): Remove.
2802         (remote_flash_erase, remote_flash_write, remote_flash_done)
2803         (readchar, remote_serial_write): Use scoped_restore.
2804         * cli/cli-script.c (struct source_cleanup_lines_args)
2805         (source_cleanup_lines): Remove.
2806         (script_from_file): Use scoped_restore.
2807         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
2808         (source_command): Use scoped_restore.
2809
2810 2017-08-03  Tom Tromey  <tom@tromey.com>
2811
2812         * utils.h (make_cleanup_free_so): Remove.
2813         * utils.c (do_free_so, make_cleanup_free_so): Remove.
2814         * solist.h (struct so_deleter): New.
2815         (so_list_up): New typedef.
2816         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
2817
2818 2017-08-03  Tom Tromey  <tom@tromey.com>
2819
2820         * utils.h (make_cleanup_restore_current_language): Remove.
2821         * utils.c (do_restore_current_language)
2822         (make_cleanup_restore_current_language): Remove.
2823         * parse.c (parse_exp_in_context_1)
2824         (parse_expression_with_language): Use
2825         scoped_restore_current_language.
2826         * mi/mi-main.c (mi_cmd_execute): Use
2827         scoped_restore_current_language.
2828         * language.h (scoped_restore_current_language): New class.
2829
2830 2017-08-03  Tom Tromey  <tom@tromey.com>
2831
2832         * compile/compile.c (cleanup_unlink_file): Remove.
2833         (compile_to_object): Use gdb::unlinker.
2834         (eval_compile_command): Likewise.
2835
2836 2017-08-03  Tom Tromey  <tom@tromey.com>
2837
2838         * utils.h (make_cleanup_fclose): Remove.
2839         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
2840
2841 2017-08-03  Tom Tromey  <tom@tromey.com>
2842
2843         * top.c (open_terminal_stream): Return gdb_file_up.
2844         (new_ui_command): Update.
2845
2846 2017-08-03  Tom Tromey  <tom@tromey.com>
2847
2848         * source.c (print_source_lines_base, forward_search_command)
2849         (reverse_search_command): Use gdb_file_up.
2850
2851 2017-08-03  Tom Tromey  <tom@tromey.com>
2852
2853         * fbsd-nat.c (fbsd_find_memory_regions): Update.
2854
2855 2017-08-03  Tom Tromey  <tom@tromey.com>
2856
2857         * cli/cli-cmds.c (find_and_open_script): Change return type.
2858         Remove "streamp" and "full_path" parameters.
2859         (source_script_with_search): Update.
2860         * auto-load.c (source_script_file): Update.
2861         * cli/cli-cmds.h (find_and_open_script): Change type.
2862         (open_script): New struct.
2863
2864 2017-08-03  Tom Tromey  <tom@tromey.com>
2865
2866         * xml-support.c (xml_fetch_content_from_file): Update.
2867         * ui-file.c (stdio_file::open): Update.
2868         * tracefile-tfile.c (tfile_start): Update.
2869         * remote.c (remote_file_put, remote_file_get): Update.
2870         * nat/linux-procfs.c (linux_proc_get_int)
2871         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
2872         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
2873         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
2874         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
2875         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
2876         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
2877         * linux-nat.c (linux_proc_pending_signals): Update.
2878         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
2879         (file_closer): Remove.
2880         * compile/compile.c (compile_to_object): Update.
2881         * common/filestuff.h (struct gdb_file_deleter): New.
2882         (gdb_file_up): New typedef.
2883         (gdb_fopen_cloexec): Change return type.
2884         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
2885         * cli/cli-dump.c (fopen_with_cleanup): Remove.
2886         (dump_binary_file, restore_binary_file): Update.
2887         * auto-load.c (auto_load_objfile_script_1): Update.
2888
2889 2017-08-03  Tom Tromey  <tom@tromey.com>
2890
2891         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
2892         (info_static_tracepoint_markers_command): Likewise.
2893         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
2894         * skip.c (skip_info): Use ui_out_emit_table.
2895         * progspace.c (print_program_space): Use ui_out_emit_table.
2896         * osdata.c (info_osdata): Use ui_out_emit_table.
2897         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
2898         ui_out_emit_table.
2899         * linux-thread-db.c (info_auto_load_libthread_db): Use
2900         ui_out_emit_table.
2901         * inferior.c (print_inferior): Use ui_out_emit_table.
2902         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
2903         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
2904         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
2905         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
2906         * ui-out.h (class ui_out_emit_table): New.
2907
2908 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
2909
2910         * mips-tdep.c (mips_fpu_type_str): New function.
2911         (mips_dump_tdep): Call it.
2912
2913 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
2914
2915         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
2916         `->mips_fpu_type'.
2917
2918 2017-07-31  Xavier Roirand  <roirand@adacore.com>
2919
2920         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
2921
2922 2017-07-27  Xavier Roirand  <roirand@adacore.com>
2923
2924         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
2925
2926 2017-07-26  Yao Qi  <yao.qi@linaro.org>
2927
2928         * cli/cli-cmds.c (maintenancechecklist): New variable.
2929         * gdbcmd.h (maintenancechecklist): Declare it.
2930         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
2931         Call i386_linux_read_description with different masks.
2932         * maint.c (maintenance_check_command): New function.
2933         (_initialize_maint_cmds): Call add_prefix_cmd.
2934         * target-descriptions.c (tdesc_reg): override operator != and ==.
2935         (tdesc_type): Likewise.
2936         (tdesc_feature): Likewise.
2937         (target_desc): Likewise.
2938         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
2939         (maintenance_check_xml_descriptions): New function.
2940         (_initialize_target_descriptions) Add command "xml-descriptions".
2941         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
2942
2943 2017-07-26  Yao Qi  <yao.qi@linaro.org>
2944
2945         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
2946         Include features/i386/32bit-*.c.
2947         (i386_linux_read_description): Generate target description if it
2948         doesn't exist.
2949         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
2950         functions.
2951         * features/i386/32bit-linux.c: Re-generated.
2952         * features/i386/32bit-sse.c: Likewise.
2953         * target-descriptions.c (print_c_feature::visit): Print code to
2954         set register number if needed.
2955         (print_c_feature) <m_next_regnum>: New field.
2956
2957 2017-07-26  Yao Qi  <yao.qi@linaro.org>
2958
2959         * features/Makefile (CFILES): Rename with TDESC_CFILES.
2960         (FEATURE_XMLFILES): New.
2961         (FEATURE_CFILES): New.
2962         New rules.
2963         (clean-cfiles): Remove generated c files.
2964         * features/i386/32bit-avx.c: Generated.
2965         * features/i386/32bit-avx512.c: Generated.
2966         * features/i386/32bit-core.c: Generated.
2967         * features/i386/32bit-linux.c: Generated.
2968         * features/i386/32bit-mpx.c: Generated.
2969         * features/i386/32bit-pkeys.c: Generated.
2970         * features/i386/32bit-sse.c: Generated.
2971         * target-descriptions.c: Include algorithm.
2972         (tdesc_element_visitor): Add method visit_end.
2973         (print_c_tdesc): Implement visit_end.
2974         (print_c_tdesc:: m_filename_after_features): Move it to
2975         protected.
2976         (print_c_feature): New class.
2977         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
2978         name starts with "i386/32bit-".
2979
2980 2017-07-26  Yao Qi  <yao.qi@linaro.org>
2981
2982         * target-descriptions.c (tdesc_element_visitor): New class.
2983         (tdesc_element): New class.
2984         (tdesc_reg): Inherit from tdesc_element.
2985         (tdesc_reg::accept): New function.
2986         (tdesc_type): Inherit from tdesc_element.
2987         (tdesc_type::accept): New function.
2988         (tdesc_feature): Inherit from tdesc_element.
2989         (tdesc_feature::accept): New function.
2990         (target_desc): Inherit from tdesc_element.
2991         (target_desc::target_desc): New.
2992         (target_desc::~target_desc): New.
2993         (target_desc::accept): New.
2994         (allocate_target_description): Use new.
2995         (free_target_description): Use delete.
2996         (print_c_tdesc): New class.
2997         (maint_print_c_tdesc_cmd): Adjust.
2998
2999         * features/aarch64.c: Re-generated.
3000         * features/arc-arcompact.c: Re-generated.
3001         * features/arc-v2.c: Re-generated.
3002         * features/arm/arm-with-iwmmxt.c: Re-generated.
3003         * features/arm/arm-with-m.c: Re-generated.
3004         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
3005         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
3006         * features/arm/arm-with-neon.c: Re-generated.
3007         * features/arm/arm-with-vfpv2.c: Re-generated.
3008         * features/arm/arm-with-vfpv3.c: Re-generated.
3009         * features/i386/amd64-avx-avx512.c: Re-generated.
3010         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
3011         * features/i386/amd64-avx.c: Re-generated.
3012         * features/i386/amd64-avx-linux.c: Re-generated.
3013         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
3014         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
3015         * features/i386/amd64-avx-mpx.c: Re-generated.
3016         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
3017         * features/i386/amd64.c: Re-generated.
3018         * features/i386/amd64-linux.c: Re-generated.
3019         * features/i386/amd64-mpx.c: Re-generated.
3020         * features/i386/amd64-mpx-linux.c: Re-generated.
3021         * features/i386/i386-avx-avx512.c: Re-generated.
3022         * features/i386/i386-avx-avx512-linux.c: Re-generated.
3023         * features/i386/i386-avx.c: Re-generated.
3024         * features/i386/i386-avx-linux.c: Re-generated.
3025         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
3026         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
3027         * features/i386/i386-avx-mpx.c: Re-generated.
3028         * features/i386/i386-avx-mpx-linux.c: Re-generated.
3029         * features/i386/i386.c: Re-generated.
3030         * features/i386/i386-linux.c: Re-generated.
3031         * features/i386/i386-mmx.c: Re-generated.
3032         * features/i386/i386-mmx-linux.c: Re-generated.
3033         * features/i386/i386-mpx.c: Re-generated.
3034         * features/i386/i386-mpx-linux.c: Re-generated.
3035         * features/i386/x32-avx-avx512.c: Re-generated.
3036         * features/i386/x32-avx-avx512-linux.c: Re-generated.
3037         * features/i386/x32-avx.c: Re-generated.
3038         * features/i386/x32-avx-linux.c: Re-generated.
3039         * features/i386/x32.c: Re-generated.
3040         * features/i386/x32-linux.c: Re-generated.
3041         * features/microblaze.c: Re-generated.
3042         * features/microblaze-with-stack-protect.c: Re-generated.
3043         * features/mips64-dsp-linux.c: Re-generated.
3044         * features/mips64-linux.c: Re-generated.
3045         * features/mips-dsp-linux.c: Re-generated.
3046         * features/mips-linux.c: Re-generated.
3047         * features/nds32.c: Re-generated.
3048         * features/nios2.c: Re-generated.
3049         * features/nios2-linux.c: Re-generated.
3050         * features/rs6000/powerpc-32.c: Re-generated.
3051         * features/rs6000/powerpc-32l.c: Re-generated.
3052         * features/rs6000/powerpc-403.c: Re-generated.
3053         * features/rs6000/powerpc-403gc.c : Re-generated.
3054         * features/rs6000/powerpc-405.c: Re-generated.
3055         * features/rs6000/powerpc-505.c: Re-generated.
3056         * features/rs6000/powerpc-601.c: Re-generated.
3057         * features/rs6000/powerpc-602.c: Re-generated.
3058         * features/rs6000/powerpc-603.c: Re-generated.
3059         * features/rs6000/powerpc-604.c: Re-generated.
3060         * features/rs6000/powerpc-64.c: Re-generated.
3061         * features/rs6000/powerpc-64l.c: Re-generated.
3062         * features/rs6000/powerpc-7400.c: Re-generated.
3063         * features/rs6000/powerpc-750.c: Re-generated.
3064         * features/rs6000/powerpc-860.c: Re-generated.
3065         * features/rs6000/powerpc-altivec32.c: Re-generated.
3066         * features/rs6000/powerpc-altivec32l.c: Re-generated.
3067         * features/rs6000/powerpc-altivec64.c: Re-generated.
3068         * features/rs6000/powerpc-altivec64l.c: Re-generated.
3069         * features/rs6000/powerpc-cell32l.c: Re-generated.
3070         * features/rs6000/powerpc-cell64l.c: Re-generated.
3071         * features/rs6000/powerpc-e500.c: Re-generated.
3072         * features/rs6000/powerpc-e500l.c: Re-generated.
3073         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
3074         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
3075         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
3076         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
3077         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
3078         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
3079         * features/rs6000/powerpc-vsx32.c: Re-generated.
3080         * features/rs6000/powerpc-vsx32l.c: Re-generated.
3081         * features/rs6000/powerpc-vsx64.c: Re-generated.
3082         * features/rs6000/powerpc-vsx64l.c: Re-generated.
3083         * features/rs6000/rs6000.c: Re-generated.
3084         * features/s390-linux32.c: Re-generated.
3085         * features/s390-linux32v1.c: Re-generated.
3086         * features/s390-linux32v2.c: Re-generated.
3087         * features/s390-linux64.c: Re-generated.
3088         * features/s390-linux64v1.c: Re-generated.
3089         * features/s390-linux64v2.c: Re-generated.
3090         * features/s390-te-linux64.c: Re-generated.
3091         * features/s390-tevx-linux64.c: Re-generated.
3092         * features/s390-vx-linux64.c: Re-generated.
3093         * features/s390x-linux64.c: Re-generated.
3094         * features/s390x-linux64v1.c: Re-generated.
3095         * features/s390x-linux64v2.c: Re-generated.
3096         * features/s390x-te-linux64.c: Re-generated.
3097         * features/s390x-tevx-linux64.c: Re-generated.
3098         * features/s390x-vx-linux64.c: Re-generated.
3099         * features/sparc/sparc32-solaris.c: Re-generated.
3100         * features/sparc/sparc64-solaris.c: Re-generated.
3101         * features/tic6x-c62x.c: Re-generated.
3102         * features/tic6x-c62x-linux.c: Re-generated.
3103         * features/tic6x-c64x.c: Re-generated.
3104         * features/tic6x-c64x-linux.c: Re-generated.
3105         * features/tic6x-c64xp.c: Re-generated.
3106         * features/tic6x-c64xp-linux.c: Re-generated.
3107
3108 2017-07-26  Yao Qi  <yao.qi@linaro.org>
3109
3110         * i386-linux-tdep.c (i386_linux_read_description): New function.
3111         (i386_linux_core_read_description): Call
3112         i386_linux_read_description.
3113         * i386-linux-tdep.h (i386_linux_read_description): Declare.
3114         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
3115         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
3116         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
3117         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
3118         * x86-linux-nat.c (x86_linux_read_description): Call
3119         i386_linux_read_description.
3120
3121 2017-07-26  Yao Qi  <yao.qi@linaro.org>
3122
3123         * NEWS: Mention it.
3124         * features/Makefile (%.c: %.xml): Pass the xml file name to
3125         command "maint print c-tdesc".
3126         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
3127         name from 'arg'.
3128
3129 2017-07-26  Yao Qi  <yao.qi@linaro.org>
3130
3131         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
3132         in-class initialization.
3133         (tdesc_create_feature): Call new instead of XCNEW.
3134         (free_target_description): Ue delete.
3135
3136 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
3137
3138         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
3139
3140 2017-07-25  Yao Qi  <yao.qi@linaro.org>
3141
3142         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
3143         constant.
3144         (amd64_x32_init_abi): Likewise.
3145         * amd64-tdep.h (amd64_init_abi): Update declaration.
3146         (amd64_x32_init_abi): Likewise.
3147
3148 2017-07-25  Yao Qi  <yao.qi@linaro.org>
3149
3150         PR tdep/21717
3151         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
3152         condition for FPSCR.
3153         (arm_linux_store_inferior_registers): Likewise.
3154
3155 2017-07-22  Tom Tromey  <tom@tromey.com>
3156
3157         * break-catch-syscall.c (struct catch_syscall_inferior_data)
3158         <syscalls_counts>: Now a std::vector.
3159         (get_catch_syscall_inferior_data): Use "new".
3160         (catch_syscall_inferior_data_cleanup): Use "delete".
3161         (insert_catch_syscall, remove_catch_syscall)
3162         (clear_syscall_counts): Update.
3163
3164 2017-07-22  Tom Tromey  <tom@tromey.com>
3165
3166         * break-catch-syscall.c (syscall_catchpoint)
3167         <syscalls_to_be_caught>: Now a std::vector<int>
3168         (~syscall_catchpoint): Remove.
3169         (insert_catch_syscall, remove_catch_syscall)
3170         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
3171         (print_mention_catch_syscall, print_recreate_catch_syscall):
3172         Update.
3173         (create_syscall_event_catchpoint): Change type of "filter"
3174         parameter.
3175         (catch_syscall_split_args): Return a std::vector.
3176         (catch_syscall_command_1, catching_syscall_number_1): Update.
3177
3178 2017-07-22  Tom Tromey  <tom@tromey.com>
3179
3180         * break-catch-throw.c (struct exception_catchpoint)
3181         <exception_rx>: Now a std::string.
3182         (~exception_catchpoint): Remove.
3183         (print_one_detail_exception_catchpoint): Update.
3184         (handle_gnu_v3_exceptions): Change type of except_rx.
3185         (extract_exception_regexp): Return a std::string.
3186         (catch_exception_command_1): Update.
3187
3188 2017-07-22  Tom Tromey  <tom@tromey.com>
3189
3190         * break-catch-sig.c (gdb_signal_type): Remove typedef.
3191         (struct signal_catchpoint) <signals_to_be_caught>: Now a
3192         std::vector.
3193         <catch_all>: Now a bool.
3194         (~signal_catchpoint): Remove.
3195         (signal_catchpoint_insert_location)
3196         (signal_catchpoint_remove_location)
3197         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
3198         (signal_catchpoint_print_mention)
3199         (signal_catchpoint_print_recreate)
3200         (signal_catchpoint_explains_signal): Update.
3201         (create_signal_catchpoint): Change type of "filter" and
3202         "catch_all".
3203         (catch_signal_split_args): Return a std::vector.  Change type of
3204         "catch_all".
3205         (catch_signal_command): Update.
3206
3207 2017-07-20  Pedro Alves  <palves@redhat.com>
3208
3209         * ada-lang.c (ada_language_defn): Make extern.
3210         (_initialize_ada_language): Remove add_language call.
3211         * c-lang.c (c_language_defn, cplus_language_defn)
3212         (asm_language_defn, minimal_language_defn): Make extern.
3213         (_initialize_c_language): Delete.
3214         * completer.c (compare_cstrings): Delete, moved to utils.h.
3215         * d-lang.c (d_language_defn): Make extern.
3216         (_initialize_d_language): Remove add_language calls.
3217         * defs.h (enum language): Add comment.
3218         * f-lang.c (f_language_defn): Make extern.
3219         (_initialize_f_language): Remove add_language call.
3220         * go-lang.c (go_language_defn): Make extern.
3221         (_initialize_go_language): Remove add_language call.
3222         * language.c: Include <algorithm>.
3223         (languages): Redefine as const array.
3224         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
3225         (set_language_command): Handle "local".  Use for-range loop.
3226         (set_language): Remove loop.
3227         (language_enum): Rewrite.
3228         (language_def, language_str): Remove loops.
3229         (add_language): Delete.
3230         (add_set_language_command): New, based on add_languages.
3231         (skip_language_trampoline): Adjust.
3232         (local_language_defn): Delete.
3233         (language_gdbarch_post_init): Adjust.
3234         (_initialize_language): Remove add_language calls.  Call
3235         add_set_language_command.
3236         * language.h (add_language): Delete.
3237         (auto_language_defn)
3238         (unknown_language_defn, minimal_language_defn, ada_language_defn)
3239         (asm_language_defn, c_language_defn, cplus_language_defn)
3240         (d_language_defn, f_language_defn, go_language_defn)
3241         (m2_language_defn, objc_language_defn, opencl_language_defn)
3242         (pascal_language_defn, rust_language_defn): Declare.
3243         * m2-lang.c (m2_language_defn): Make extern.
3244         (_initialize_m2_language): Remove add_language call.
3245         * objc-lang.c (objc_language_defn): Make extern.
3246         (_initialize_objc_language): Remove add_language call.
3247         * opencl-lang.c (opencl_language_defn): Make extern.
3248         (_initialize_opencl_language): Remove add_language call.
3249         * p-lang.c (pascal_language_defn): Make extern.
3250         (_initialize_pascal_language): Delete.
3251         * rust-lang.c (rust_language_defn): Make extern.
3252         (_initialize_rust_language): Delete.
3253         * utils.h (compare_cstrings): New static inline function.
3254
3255 2017-07-20  Pedro Alves  <palves@redhat.com>
3256
3257         * ada-lang.c (ada_to_fixed_type_1): Adjust.
3258         (get_var_value): Constify parameters.
3259         (get_int_var_value): Change prototype.
3260         (to_fixed_range_type): Adjust.
3261         * ada-lang.h (get_int_var_value): Change prototype.
3262
3263 2017-07-20  Pedro Alves  <palves@redhat.com>
3264
3265         * dwarf2read.c (dw2_lookup_symbol): Use
3266         SYMBOL_MATCHES_SEARCH_NAME.
3267         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
3268
3269 2017-07-20  Pedro Alves  <palves@redhat.com>
3270
3271         * block.c (block_iter_name_step, block_iter_name_first)
3272         (block_iter_name_next): Delete.
3273         (block_lookup_symbol_primary): Adjust to use
3274         dict_iter_match_first/dict_iter_match_next.
3275         * block.h (block_iter_name_first, block_iter_name_next): Delete
3276         declarations.
3277         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
3278         dict_iter_match_first/dict_iter_match_next.
3279
3280 2017-07-20  Pedro Alves  <palves@redhat.com>
3281
3282         * cp-support.c (cp_find_first_component_aux): Add missing case for
3283         end of string.
3284
3285 2017-07-18  David Blaikie  <dblaikie@gmail.com>
3286
3287         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
3288         of dwo_cu's dwo_file.
3289
3290 2017-07-18  Yao Qi  <yao.qi@linaro.org>
3291
3292         * remote.c (store_registers_using_G): Remove one line comment.
3293
3294 2017-07-18  Yao Qi  <yao.qi@linaro.org>
3295
3296         * regcache.c (regcache_cpy): Simplify it.
3297         (regcache::cpy_no_passthrough): Remove it.
3298         * regcache.h (cpy_no_passthrough): Remove it.
3299         (regcache_dup, regcache_cpy): Update comments.
3300
3301 2017-07-18  Pedro Alves  <palves@redhat.com>
3302
3303         * remote-sim.c (sim_command_completer): Adjust to work with a
3304         completion_tracker instead of a VEC.
3305
3306 2017-07-17  Pedro Alves  <palves@redhat.com>
3307
3308         * completer.c (complete_source_filenames): New function.
3309         (complete_address_and_linespec_locations): New function.
3310         (location_completer): Use complete_address_and_linespec_locations.
3311         (completion_tracker::build_completion_result): Honor the tracker's
3312         request to suppress append.
3313         * completer.h (completion_tracker::suppress_append_ws)
3314         (completion_tracker::set_suppress_append_ws): New methods.
3315         (completion_tracker::m_suppress_append_ws): New field.
3316         (complete_source_filenames): New declaration.
3317         * linespec.c (linespec_complete_what): New.
3318         (struct ls_parser) <complete_what, completion_word,
3319         completion_quote_char, completion_quote_end, completion_tracker>:
3320         New fields.
3321         (string_find_incomplete_keyword_at_end): New.
3322         (linespec_lexer_lex_string): Record quote char.  If in completion
3323         mode, don't throw.
3324         (linespec_lexer_consume_token): Advance the completion word point.
3325         (linespec_lexer_peek_token): Save/restore completion info.
3326         (save_stream_and_consume_token): New.
3327         (set_completion_after_number): New.
3328         (linespec_parse_basic): Set what to complete next depending on
3329         token.  Handle function and label completions specially.
3330         (parse_linespec): Disable objc shortcut in completion mode.  Set
3331         what to complete next depending on token type.  Skip keyword if in
3332         completion mode.
3333         (complete_linespec_component, linespec_complete): New.
3334         * linespec.h (linespec_complete): Declare.
3335
3336 2017-07-17  Pedro Alves  <palves@redhat.com>
3337
3338         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
3339         Handle 'operator<' / 'operator<<'.
3340
3341 2017-07-17  Pedro Alves  <palves@redhat.com>
3342
3343         * completer.c (collect_explicit_location_matches): Handle
3344         MATCH_LABEL.
3345         (convert_explicit_location_to_linespec): New, factored out from
3346         ...
3347         (convert_explicit_location_to_sals): ... this.
3348         (complete_label): New.
3349         (linespec_complete_label, find_label_symbols_in_block): New.
3350         (find_label_symbols): Add completion_mode parameter and adjust to
3351         call find_label_symbols_in_block.
3352         * linespec.h (linespec_complete_label): Declare.
3353
3354 2017-07-17  Pedro Alves  <palves@redhat.com>
3355
3356         * ada-lang.c (ada_collect_symbol_completion_matches): Add
3357         complete_symbol_mode parameter.
3358         * cli/cli-cmds.c (complete_command): Get the completion result out
3359         of the handle_brkchars tracker if used a custom word point.
3360         * completer.c: Include "linespec.h".
3361         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
3362         (advance_to_expression_complete_word_point): New.
3363         (completion_tracker::completes_to_completion_word): New.
3364         (complete_files_symbols): Pass down
3365         complete_symbol_mode::EXPRESSION.
3366         (explicit_options, probe_options): New.
3367         (collect_explicit_location_matches): Complete on the
3368         explictit_loc->foo instead of word.  Use
3369         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
3370         keyword and options completions.
3371         (backup_text_ptr): Delete.
3372         (skip_keyword): New.
3373         (complete_explicit_location): Remove 'word' parameter.  Add
3374         language, quoted_arg_start and quoted_arg_end parameters.
3375         Rewrite, parsing left to right.
3376         (location_completer): Rewrite.
3377         (location_completer_handle_brkchars): New function.
3378         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
3379         (enum complete_line_internal_reason): Adjust comments.
3380         (completion_tracker::discard_completions): New.
3381         (completer_handle_brkchars_func_for_completer): Handle
3382         location_completer.
3383         (gdb_custom_word_point_brkchars)
3384         (gdb_org_rl_basic_quote_characters): New.
3385         (gdb_completion_word_break_characters_throw)
3386         (completion_find_completion_word): Handle trackers that use a
3387         custom word point.
3388         (completion_tracker::advance_custom_word_point_by): New.
3389         (completion_tracker::build_completion_result): Don't rely on
3390         readline appending the quote char.
3391         (gdb_rl_attempted_completion_function_throw): Handle trackers that
3392         use a custom word point.
3393         (gdb_rl_attempted_completion_function): Restore
3394         rl_basic_quote_characters.
3395         * completer.h (class completion_tracker): Extend intro comment.
3396         (completion_tracker::set_quote_char)
3397         (completion_tracker::quote_char)
3398         (completion_tracker::set_use_custom_word_point)
3399         (completion_tracker::use_custom_word_point)
3400         (completion_tracker::custom_word_point)
3401         (completion_tracker::set_custom_word_point)
3402         (completion_tracker::advance_custom_word_point_by)
3403         (completion_tracker::completes_to_completion_word)
3404         (completion_tracker::discard_completions): New methods.
3405         (completion_tracker::m_quote_char)
3406         (completion_tracker::m_use_custom_word_point)
3407         (completion_tracker::m_custom_word_point): New fields.
3408         (advance_to_expression_complete_word_point): Declare.
3409         * f-lang.c (f_collect_symbol_completion_matches): Add
3410         complete_symbol_mode parameter.
3411         * language.h (struct language_defn)
3412         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
3413         parameter.
3414         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
3415         (linespec_complete_function): New function.
3416         (linespec_lexer_lex_keyword): Adjust.
3417         * linespec.h (linespec_keywords, linespec_complete_function): New
3418         declarations.
3419         * location.c (find_end_quote): New function.
3420         (explicit_location_lex_one): Add explicit_completion_info
3421         parameter.  Save quoting info.  Don't throw if being called for
3422         completion.  Don't handle Ada operators here.
3423         (is_cp_operator, skip_op_false_positives, first_of)
3424         (explicit_location_lex_one_function): New function.
3425         (string_to_explicit_location): Replace 'dont_throw' parameter with
3426         an explicit_completion_info pointer parameter.  Handle it.  Don't
3427         use explicit_location_lex_one to lex function names.  Use
3428         explicit_location_lex_one_function instead.
3429         * location.h (struct explicit_completion_info): New.
3430         (string_to_explicit_location): Replace 'dont_throw' parameter with
3431         an explicit_completion_info pointer parameter.
3432         * symtab.c (default_collect_symbol_completion_matches_break_on):
3433         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
3434         (default_collect_symbol_completion_matches)
3435         (collect_symbol_completion_matches): Add complete_symbol_mode
3436         parameter.
3437         (collect_symbol_completion_matches_type): Pass down
3438         complete_symbol_mode::EXPRESSION.
3439         (collect_file_symbol_completion_matches): Add complete_symbol_mode
3440         parameter.  Handle LINESPEC mode.
3441         * symtab.h (complete_symbol_mode): New.
3442         (default_collect_symbol_completion_matches_break_on)
3443         (default_collect_symbol_completion_matches)
3444         (collect_symbol_completion_matches)
3445         (collect_file_symbol_completion_matches): Add complete_symbol_mode
3446         parameter.
3447
3448 2017-07-17  Pedro Alves  <palves@redhat.com>
3449
3450         * utils.c (enum class strncmp_iw_mode): New.
3451         (strcmp_iw): Rename to ...
3452         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
3453         parameters.  Handle them.
3454         (strncmp_iw): New.
3455         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
3456         * utils.h (strncmp_iw): Declare.
3457         (strcmp_iw): Move describing comments here.
3458
3459 2017-07-17  Pedro Alves  <palves@redhat.com>
3460
3461         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
3462         CP_OPERATOR_STR.
3463         * c-typeprint.c (is_type_conversion_operator): Use
3464         CP_OPERATOR_STR.
3465         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
3466         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
3467         CP_OPERATOR_LEN.
3468         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
3469         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
3470         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
3471         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
3472         CP_OPERATOR_STR.
3473         * location.c: Include "cp-support.h".
3474         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
3475         CP_OPERATOR_STR.
3476         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
3477         CP_OPERATOR_LEN.
3478
3479 2017-07-17  Pedro Alves  <palves@redhat.com>
3480
3481         * cli/cli-cmds.c (complete_command): Use a completion tracker
3482         along with completion_find_completion_word for handle_brkchars
3483         phase.
3484         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
3485         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
3486         (struct gdb_rl_completion_word_info): New.
3487         (gdb_rl_find_completion_word): New.
3488         (completion_find_completion_word): New.
3489         * completer.h (completion_find_completion_word): Declare.
3490
3491 2017-07-17  Pedro Alves  <palves@redhat.com>
3492
3493         * ada-lang.c (symbol_completion_match): Adjust comments.
3494         (symbol_completion_add): Replace vector parameter with
3495         completion_tracker parameter.  Use it.
3496         (ada_make_symbol_completion_list): Rename to...
3497         (ada_collect_symbol_completion_matches): ... this.  Add
3498         completion_tracker parameter and use it.
3499         (ada_language_defn): Adjust.
3500         * break-catch-syscall.c (catch_syscall_completer): Adjust
3501         prototype and work with completion_tracker instead of VEC.
3502         * breakpoint.c (condition_completer): Adjust prototype and work
3503         with completion_tracker instead of VEC.
3504         * c-lang.c (c_language_defn, cplus_language_defn)
3505         (asm_language_defn, minimal_language_defn): Adjust to renames.
3506         * cli/cli-cmds.c (complete_command): Rework using
3507         completion_tracker.  Catch exceptions when completing.
3508         * cli/cli-decode.c (integer_unlimited_completer)
3509         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
3510         with completion_tracker instead of VEC.
3511         * command.h (struct completion_tracker): Forward declare.
3512         (completer_ftype, completer_handle_brkchars_ftype): Change
3513         types.
3514         (complete_on_cmdlist, complete_on_enum): Adjust.
3515         * completer.c: Include <algorithm>.
3516         (struct gdb_completer_state): New.
3517         (current_completion): New global.
3518         (readline_line_completion_function): Delete.
3519         (noop_completer, filename_completer)
3520         (filename_completer_handle_brkchars, complete_files_symbols)
3521         (linespec_location_completer): Adjust to work with a
3522         completion_tracker instead of a VEC.
3523         (string_or_empty): New.
3524         (collect_explicit_location_matches): Adjust to work with a
3525         completion_tracker instead of a VEC.
3526         (explicit_location_completer): Rename to ...
3527         (complete_explicit_location): ... this and adjust to work with a
3528         completion_tracker instead of a VEC.
3529         (location_completer): Adjust to work with a completion_tracker
3530         instead of a VEC.
3531         (add_struct_fields): Adjust to work with a completion_list instead
3532         of VEC.
3533         (expression_completer): Rename to ...
3534         (complete_expression): ... this and adjust to work with a
3535         completion_tracker instead of a VEC.  Use complete_files_symbols.
3536         (expression_completer): Reimplement on top of complete_expression.
3537         (symbol_completer): Adjust to work with a completion_tracker
3538         instead of a VEC.
3539         (enum complete_line_internal_reason): Add describing comments.
3540         (complete_line_internal_normal_command): Adjust to work with a
3541         completion_tracker instead of a VEC.
3542         (complete_line_internal): Rename to ...
3543         (complete_line_internal_1): ... this and adjust to work with a
3544         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
3545         handle_brkchars phase.
3546         (new_completion_tracker): Delete.
3547         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
3548         complete_line_internal_1.
3549         (free_completion_tracker): Delete.
3550         (INITIAL_COMPLETION_HTAB_SIZE): New.
3551         (completion_tracker::completion_tracker)
3552         (completion_tracker::~completion_tracker): New.
3553         (maybe_add_completion): Delete.
3554         (completion_tracker::maybe_add_completion)
3555         (completion_tracker::add_completion)
3556         (completion_tracker::add_completions): New.
3557         (throw_max_completions_reached_error): Delete.
3558         (complete_line): Adjust to work with a completion_tracker instead
3559         of a VEC.  Don't create a completion_tracker_t or check for max
3560         completions here.
3561         (command_completer, command_completer_handle_brkchars)
3562         (signal_completer, reg_or_group_completer_1)
3563         (reg_or_group_completer, default_completer_handle_brkchars):
3564         Adjust to work with a completion_tracker.
3565         (gdb_completion_word_break_characters_throw): New.
3566         (gdb_completion_word_break_characters): Reimplement.
3567         (line_completion_function): Delete.
3568         (completion_tracker::recompute_lowest_common_denominator)
3569         (expand_preserving_ws)
3570         (completion_tracker::build_completion_result)
3571         (completion_result::completion_result)
3572         (completion_result::completion_result)
3573         (completion_result::~completion_result)
3574         (completion_result::completion_result)
3575         (completion_result::release_match_list, compare_cstrings)
3576         (completion_result::sort_match_list)
3577         (completion_result::reset_match_list)
3578         (gdb_rl_attempted_completion_function_throw)
3579         (gdb_rl_attempted_completion_function): New.
3580         * completer.h (completion_list, struct completion_result)
3581         (class completion_tracker): New.
3582         (complete_line): Add completion_tracker parameter.
3583         (readline_line_completion_function): Delete.
3584         (gdb_rl_attempted_completion_function): New.
3585         (noop_completer, filename_completer, expression_completer)
3586         (location_completer, symbol_completer, command_completer)
3587         (signal_completer, reg_or_group_completer): Update prototypes.
3588         (completion_tracker_t, new_completion_tracker)
3589         (make_cleanup_free_completion_tracker): Delete.
3590         (enum maybe_add_completion_enum): Delete.
3591         (maybe_add_completion): Delete.
3592         (throw_max_completions_reached_error): Delete.
3593         * corefile.c (complete_set_gnutarget): Adjust to work with a
3594         completion_tracker instead of a VEC.
3595         * cp-abi.c (cp_abi_completer): Adjust to work with a
3596         completion_tracker instead of a VEC.
3597         * d-lang.c (d_language_defn): Adjust.
3598         * disasm.c (disassembler_options_completer): Adjust to work with a
3599         completion_tracker instead of a VEC.
3600         * f-lang.c (f_make_symbol_completion_list): Rename to ...
3601         (f_collect_symbol_completion_matches): ... this.  Adjust to work
3602         with a completion_tracker instead of a VEC.
3603         (f_language_defn): Adjust.
3604         * go-lang.c (go_language_defn): Adjust.
3605         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
3606         Adjust to work with a completion_tracker instead of a VEC.
3607         * infrun.c (handle_completer): Likewise.
3608         * interps.c (interpreter_completer): Likewise.
3609         * interps.h (interpreter_completer): Likewise.
3610         * language.c (unknown_language_defn, auto_language_defn)
3611         (local_language_defn): Adjust.
3612         * language.h (language_defn::la_make_symbol_completion_list):
3613         Rename to ...
3614         (language_defn::la_collect_symbol_completion_matches): ... this
3615         and adjust to work with a completion_tracker instead of a VEC.
3616         * m2-lang.c (m2_language_defn): Adjust.
3617         * objc-lang.c (objc_language_defn): Adjust.
3618         * opencl-lang.c (opencl_language_defn): Adjust.
3619         * p-lang.c (pascal_language_defn): Adjust.
3620         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
3621         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
3622         with a completion_tracker.
3623         * rust-lang.c (rust_language_defn): Adjust.
3624         * symtab.c (free_completion_list, do_free_completion_list)
3625         (return_val, completion_tracker): Delete.
3626         (completion_list_add_name, completion_list_add_symbol)
3627         (completion_list_add_msymbol, completion_list_objc_symbol)
3628         (completion_list_add_fields, add_symtab_completions): Add
3629         completion_tracker parameter and use it.
3630         (default_make_symbol_completion_list_break_on_1): Rename to...
3631         (default_collect_symbol_completion_matches_break_on): ... this.
3632         Add completion_tracker parameter and use it instead of allocating
3633         a completion tracker here.
3634         (default_make_symbol_completion_list_break_on): Delete old
3635         implementation.
3636         (default_make_symbol_completion_list): Delete.
3637         (default_collect_symbol_completion_matches): New.
3638         (make_symbol_completion_list): Delete.
3639         (collect_symbol_completion_matches): New.
3640         (make_symbol_completion_type): Rename to ...
3641         (collect_symbol_completion_matches_type): ... this.  Add
3642         completion_tracker parameter and use it instead of VEC.
3643         (make_file_symbol_completion_list_1): Rename to...
3644         (collect_file_symbol_completion_matches): ... this.  Add
3645         completion_tracker parameter and use it instead of VEC.
3646         (make_file_symbol_completion_list): Delete.
3647         (add_filename_to_list): Use completion_list instead of a VEC.
3648         (add_partial_filename_data::list): Now a completion_list.
3649         (make_source_files_completion_list): Work with a completion_list
3650         instead of a VEC.
3651         * symtab.h: Include "completer.h".
3652         (default_make_symbol_completion_list_break_on)
3653         (default_make_symbol_completion_list, make_symbol_completion_list)
3654         (make_symbol_completion_type, make_file_symbol_completion_list)
3655         (make_source_files_completion_list): Delete.
3656         (default_collect_symbol_completion_matches_break_on)
3657         (default_collect_symbol_completion_matches)
3658         (collect_symbol_completion_matches)
3659         (collect_symbol_completion_matches_type)
3660         (collect_file_symbol_completion_matches)
3661         (make_source_files_completion_list): New.
3662         * top.c (init_main): Don't install a rl_completion_entry_function
3663         hook.  Install a rl_attempted_completion_function hook instead.
3664         * tui/tui-layout.c (layout_completer): Adjust to work with a
3665         completion_tracker.
3666         * tui/tui-regs.c (tui_reggroup_completer):
3667         * tui/tui-win.c (window_name_completer, focus_completer)
3668         (winheight_completer): Adjust to work with a completion_tracker.
3669         * value.c: Include "completer.h".
3670         (complete_internalvar): Adjust to work with a completion_tracker.
3671         * value.h (complete_internalvar): Likewise.
3672
3673 2017-07-17  Pedro Alves  <palves@redhat.com>
3674
3675         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
3676         renames.
3677         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
3678         comments to completer_ftype's declaration.
3679         <completer_handle_brkchars>: Change type to
3680         completer_handle_brkchars_ftype.
3681         * command.h (completer_ftype): Add describing comment and give
3682         names to parameters.
3683         (completer_ftype_void): Rename to ...
3684         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
3685         (set_cmd_completer_handle_brkchars): Adjust.
3686         * completer.c (filename_completer_handle_brkchars): New function.
3687         (complete_line_internal_normal_command): New function, factored
3688         out from ...
3689         (complete_line_internal): ... here.
3690         (command_completer_handle_brkchars)
3691         (default_completer_handle_brkchars)
3692         (completer_handle_brkchars_func_for_completer): New functions.
3693         * completer.h (set_gdb_completion_word_break_characters): Delete
3694         declaration.
3695         (completer_handle_brkchars_func_for_completer): New declaration.
3696         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
3697         completer_handle_brkchars_func_for_completer.
3698
3699 2017-07-17  Pedro Alves  <palves@redhat.com>
3700
3701         * completer.c (symbol_completer): New function, based on
3702         make_symbol_completion_list_fn.
3703         * completer.h (symbol_completer): New declaration.
3704         * guile/scm-cmd.c (cmdscm_completers): Adjust.
3705         * python/py-cmd.c (completers): Adjust.
3706         * symtab.c (make_symbol_completion_list_fn): Delete.
3707         * symtab.h (make_symbol_completion_list_fn): Delete.
3708         * cli/cli-decode.c (add_cmd): Adjust.
3709
3710 2017-07-17  Pedro Alves  <palves@redhat.com>
3711
3712         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
3713         * dwarf2read.c: Include "filename-seen-cache.h".
3714         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
3715         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
3716         * filename-seen-cache.c: New file.
3717         * filename-seen-cache.h: New file.
3718         * symtab.c: Include "filename-seen-cache.h".
3719         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
3720         (create_filename_seen_cache, clear_filename_seen_cache)
3721         (delete_filename_seen_cache, filename_seen): Delete, parts moved
3722         to filename-seen-cache.h/filename-seen-cache.c.
3723         (output_source_filename, sources_info)
3724         (maybe_add_partial_symtab_filename)
3725         (make_source_files_completion_list): Adjust to use
3726         filename_seen_cache.
3727
3728 2017-07-17  Pedro Alves  <palves@redhat.com>
3729
3730         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
3731         fields.
3732         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
3733         dwarf2_debug_sections*)): New.
3734         (dwarf2_per_objfile::dwarf2_per_objfile(const
3735         dwarf2_per_objfile&)): Declare as deleted.
3736         (dwarf2_per_objfile::operator=): Declare as deleted.
3737         (dwarf2_per_objfile::dwarf2_per_objfile)
3738         (dwarf2_per_objfile::~dwarf2_per_objfile)
3739         (dwarf2_per_objfile::free_cached_comp_units): New.
3740         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
3741         ctor.  Call dwarf2_per_objfile's ctor manually.
3742         (dwarf2_locate_sections): Deleted/refactored as ...
3743         (dwarf2_per_objfile::locate_sections): ... this new method.
3744         (free_cached_comp_units): Defer to
3745         dwarf2_per_objfile::free_cached_comp_units.
3746         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
3747
3748 2017-07-14  Tom Tromey  <tom@tromey.com>
3749
3750         PR rust/21764:
3751         * rust-exp.y (convert_ast_to_expression): Add "want_type"
3752         parameter.
3753         <UNOP_SIZEOF>: Split into separate case.
3754         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
3755
3756 2017-07-14  Tom Tromey  <tom@tromey.com>
3757
3758         PR rust/21763:
3759         * symtab.c (symbol_matches_domain): Add language_rust to special
3760         case.
3761         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
3762         treat LOC_TYPEDEF symbols as variables.
3763
3764 2017-07-14  Pedro Alves  <palves@redhat.com>
3765
3766         * symtab.c (make_file_symbol_completion_list_1): Iterate over
3767         symtabs matching all symtabs with SRCFILE as file name instead of
3768         only considering the first hit, with lookup_symtab.
3769
3770 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
3771
3772         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
3773         operator_name parameters.
3774         (gen_expr): Update function call.
3775
3776 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
3777
3778         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
3779         parameter.
3780         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
3781         Likewise.
3782         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
3783         parameter, use agent_expr::gdbarch instead, update function
3784         calls.
3785         (locexpr_tracepoint_var_ref): Likewise.
3786         (loclist_tracepoint_var_ref): Likewise.
3787         * ax-gdb.c (gen_trace_static_fields): Likewise.
3788         (gen_traced_pop): Likewise.
3789         (gen_frame_args_address): Likewise.
3790         (gen_frame_locals_address): Likewise.
3791         (gen_var_ref): Likewise.
3792         (gen_struct_ref_recursive): Likewise.
3793         (gen_static_field): Likewise.
3794         (gen_maybe_namespace_elt): Likewise.
3795         (gen_expr): Likewise.
3796         (gen_trace_for_var): Likewise.
3797         (gen_trace_for_expr): Likewise.
3798         (gen_trace_for_return_address): Likewise.
3799
3800 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
3801
3802         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
3803         parameter.
3804         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
3805
3806 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
3807
3808         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
3809         from ax, update calls.
3810         (gen_usual_arithmetic): Likewise.
3811         (gen_integral_promotions): Likewise.
3812         (gen_bitfield_ref): Likewise.
3813         (gen_primitive_field): Likewise.
3814         (gen_struct_ref_recursive): Likewise.
3815         (gen_struct_ref): Likewise.
3816         (gen_maybe_namespace_elt): Likewise.
3817         (gen_struct_elt_for_reference): Likewise.
3818         (gen_namespace_elt): Likewise.
3819         (gen_aggregate_elt_ref): Likewise.
3820         (gen_expr): Get gdbarch from ax, update calls.
3821         (gen_expr_binop_rest): Likewise.
3822
3823 2017-07-13  Pedro Alves  <palves@redhat.com>
3824
3825         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
3826         as default tdesc.
3827         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
3828         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
3829         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
3830         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
3831         tdep.
3832         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
3833         Get final tdesc from the tdep.
3834         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
3835         default tdesc.
3836         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3837         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3838         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
3839         Use it as default tdesc.
3840         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
3841         down to amd_init_abi.  No longer handle fallback tdesc here.
3842         * amd64-tdep.h (tdesc_x32): Declare.
3843         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
3844         parameter.
3845         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
3846         as default tdesc.
3847
3848 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3849
3850         * s390-linux-tdep.c (s390_process_record): Add support for
3851         instructions new in arch12.
3852
3853 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
3854
3855         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
3856         PT_GETFSBASE and PT_GETGSBASE.
3857         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
3858         PT_SETGSBASE.
3859
3860 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
3861
3862         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
3863         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
3864         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
3865         those rules.
3866         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
3867         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
3868         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
3869         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
3870         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
3871         * features/i386/amd64.xml: Add 64bit-segments.xml.
3872         * features/i386/amd64-avx-avx512.c: Regenerated.
3873         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
3874         * features/i386/amd64-avx-mpx.c: Regenerated.
3875         * features/i386/amd64-avx.c: Regenerated.
3876         * features/i386/amd64-mpx.c: Regenerated.
3877         * features/i386/amd64.c: Regenerated.
3878         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
3879         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
3880         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
3881         * regformats/i386/amd64-avx.dat: Regenerated.
3882         * regformats/i386/amd64-mpx.dat: Regenerated.
3883         * regformats/i386/amd64.dat: Regenerated.
3884
3885 2017-07-10  Yao Qi  <yao.qi@linaro.org>
3886
3887         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
3888         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
3889
3890 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
3891
3892         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
3893         unsetenv.
3894         * gnulib/aclocal.m4: Regenerate.
3895         * gnulib/config.in: Regenerate.
3896         * gnulib/configure: Regenerate.
3897         * gnulib/import/Makefile.am: Regenerate.
3898         * gnulib/import/Makefile.in: Regenerate.
3899         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3900         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3901         * gnulib/import/m4/environ.m4: New file.
3902         * gnulib/import/m4/setenv.m4: New file.
3903         * gnulib/import/setenv.c: New file.
3904         * gnulib/import/unsetenv.c: New file.
3905
3906 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
3907
3908         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
3909         address when op is DW_OP_addr.
3910
3911 2017-07-09  Tom Tromey  <tom@tromey.com>
3912
3913         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
3914         check and apply to outer type.
3915
3916 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
3917
3918         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
3919         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
3920         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
3921         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
3922
3923 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
3924
3925         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
3926
3927 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
3928
3929         * corelow.c (get_core_siginfo): Remove.
3930         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
3931         instead of get_core_siginfo.
3932         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
3933         * gdbarch.h: Re-generate.
3934         * gdbarch.c: Re-generate.
3935         * linux-tdep.c (linux_core_xfer_siginfo): New.
3936         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
3937
3938 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
3939
3940         * corelow.c (thread_section_name): Move to ...
3941         * gdbcore.h (thread_section_name): ... here.
3942
3943 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
3944
3945         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
3946         (struct siginfo32): New.
3947         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
3948         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
3949         via ptrace(PT_LWPINFO).
3950
3951 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
3952
3953         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
3954         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
3955         (fbsd_get_siginfo_type): New.
3956         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
3957         (_initialize_fbsd_tdep): New.
3958
3959 2017-07-06  David Blaikie  <dblaikie@gmail.com>
3960
3961         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
3962         a singular dwo_unit*) to support multiple CUs in the same way that
3963         multiple TUs are supported.
3964         (create_cus_hash_table): Replace create_dwo_cu with a function for
3965         parsing multiple CUs from a DWO file.
3966         (open_and_init_dwo_file): Use create_cus_hash_table rather than
3967         create_dwo_cu.
3968         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
3969         htab_find, rather than comparing the signature to a singleton CU in
3970         the dwo_file.
3971
3972 2017-07-06  Pedro Alves  <palves@redhat.com>
3973
3974         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
3975
3976 2017-07-04  Pedro Alves  <palves@redhat.com>
3977
3978         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
3979         * gdbtypes.h (TYPE_STATIC): Delete.
3980         (struct fn_field) <is_public, is_abstract, is_static, is_final,
3981         is_synchronized, is_native>: Delete.
3982         <dummy>: Bump.
3983         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
3984         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
3985         (TYPE_FN_FIELD_ABSTRACT): Delete.
3986
3987 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
3988
3989         * buffer.h (buffer_finish): Fix spelling mistakes.
3990
3991 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
3992
3993         * .dir-locals.el: Automatically switch to C-style comments in
3994         versions of Emacs that support the feature.
3995
3996 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
3997             Pedro Alves  <palves@redhat.com>
3998
3999         PR cli/21688
4000         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
4001         (process_next_line): New variable 'inline_cmd'.
4002         Adjust 'if' clauses for "python", "compile" and "guile" to use
4003         'command_name_equals' and check for '!inline_cmd'.
4004
4005 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
4006
4007         PR cli/21688
4008         * cli/cli-script.c (command_name_equals_not_inline): New function.
4009         (process_next_line): Adjust 'if' clauses for "python", "compile"
4010         and "guile" to use command_name_equals_not_inline.
4011
4012 2017-06-29  Pedro Alves  <palves@redhat.com>
4013
4014         * completer.c (expression_completer): Call
4015         linespec_location_completer instead of location_completer.
4016
4017 2017-06-29  Pedro Alves  <palves@redhat.com>
4018
4019         * completer.c (expression_completer): Remove code that recomputes
4020         'text' from 'word'.
4021
4022 2017-06-29  Yao Qi  <yao.qi@linaro.org>
4023
4024         * regformats/regdat.sh: Generate code with
4025         "ifndef IN_PROCESS_AGENT".
4026
4027 2017-06-28  Pedro Alves  <palves@redhat.com>
4028
4029         * command.h: Include "common/scoped_restore.h".
4030
4031 2017-06-28  Yao Qi  <yao.qi@linaro.org>
4032
4033         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
4034         instead of obstack_grow.
4035
4036 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
4037
4038         PR gdb/21337
4039         * symfile.c (reread_symbols): Call objfiles_changed just before
4040         read_symbols.
4041
4042 2017-06-27  Pedro Alves  <palves@redhat.com>
4043
4044         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
4045         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
4046         (completion_list_add_symbol, completion_list_add_msymbol):
4047         ... these new functions.
4048         (add_symtab_completions)
4049         (default_make_symbol_completion_list_break_on_1): Adjust.
4050
4051 2017-06-27  Pedro Alves  <palves@redhat.com>
4052
4053         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
4054         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
4055         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
4056         dtor.
4057         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
4058         'storage_obstack' field an auto_obstack.  In-class initialize all
4059         non-bitfield fields.  Make minsyms_read bool.
4060         * symfile.c (read_symbols): Adjust.
4061
4062 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
4063
4064         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
4065         (gdbsim_store_register): Likewise.
4066
4067 2017-06-27  Pedro Alves  <palves@redhat.com>
4068
4069         * c-exp.y (name_obstack): Now an auto_obstack.
4070         (yylex): Use auto_obstack::clear.
4071         (c_parse): Use auto_obstack::clear instead of reinitializing and
4072         freeing the obstack.
4073         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
4074         * d-exp.y (name_obstack): Now an auto_obstack.
4075         (yylex): Use auto_obstack::clear.
4076         (d_parse): Use auto_obstack::clear instead of reinitializing and
4077         freeing the obstack.
4078         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
4079         auto_obstack.
4080         * dwarf2read.c (create_addrmap_from_index)
4081         (dwarf2_build_psymtabs_hard)
4082         (update_enumeration_type_from_children): Likewise.
4083         * gdb_obstack.h (auto_obstack): New type.
4084         * go-exp.y (name_obstack): Now an auto_obstack.
4085         (build_packaged_name): Use auto_obstack::clear.
4086         (go_parse): Use auto_obstack::clear instead of reinitializing and
4087         freeing the obstack.
4088         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
4089         auto_obstack.
4090         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
4091         * rust-exp.y (work_obstack): Now an auto_obstack.
4092         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
4093         reinitializing and freeing the obstack.
4094         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
4095         (host_char_to_target): Use auto_obstack.
4096         * utils.h (make_cleanup_obstack_free): Delete declaration.
4097         * valprint.c (generic_emit_char, generic_printstr): Use
4098         auto_obstack.
4099
4100 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4101
4102         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
4103         thread.
4104         (darwin_init_thread_list): Don't update dummy thread.
4105         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
4106
4107 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
4108
4109         * record-full.c (netorder16): Remove.
4110
4111 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
4112
4113         * common/diagnostics.h: Define macros for GCC.
4114         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
4115         * common/vec.h: Include diagnostics.h.
4116         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
4117         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
4118         warning.
4119
4120 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
4121
4122         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
4123         New macro.
4124         * ada-lex.l: Ignore deprecated register warnings.
4125
4126 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
4127
4128         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
4129         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
4130
4131 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
4132
4133         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
4134         its own line.
4135
4136 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
4137
4138         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
4139
4140 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
4141
4142         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
4143         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
4144         (xtensa_register_read_masked): Likewise.
4145
4146 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4147
4148         * common/environ.c (gdb_environ::unset): Update comment.
4149
4150 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
4151
4152         * python/py-unwind.c (pyuw_sniffer): Allocate space for
4153         registers.
4154
4155 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
4156
4157         * record-full.c (record_full_exec_insn): Use byte_vector.
4158
4159 2017-06-22  Yao Qi  <yao.qi@linaro.org>
4160
4161         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
4162         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4163
4164 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
4165
4166         * remote.c (cached_reg): Move from here...
4167         * regcache.h (cached_reg): ...to here.
4168         * python/py-unwind.c (struct reg_info): Remove.
4169         (cached_frame_info): Use cached_reg_t.
4170         (pyuw_prev_register): Likewise.
4171         (pyuw_sniffer): Use cached_reg_t and allocate registers.
4172         (pyuw_dealloc_cache): Free all registers.
4173
4174 2017-06-22  Pedro Alves  <palves@redhat.com>
4175             Simon Marchi  <simon.marchi@ericsson.com>
4176
4177         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
4178         warning.
4179         * common/diagnostics.h: New file.
4180
4181 2017-06-22  Pedro Alves  <palves@redhat.com>
4182
4183         * common/agent.h: Add include guards.
4184
4185 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
4186
4187         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
4188         talk about addressable units instead of bytes.
4189
4190 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
4191
4192         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
4193         of '::const_iterator'.
4194
4195 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
4196
4197         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4198         'unittests/environ-selftests.c'.
4199         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
4200         * charset.c (find_charset_names): Declare object 'iconv_env'.
4201         Update code to use 'iconv_env' object.  Remove call to
4202         'free_environ'.
4203         * common/environ.c: Include <utility>.
4204         (make_environ): Delete function.
4205         (free_environ): Delete function.
4206         (gdb_environ::clear): New function.
4207         (gdb_environ::operator=): New function.
4208         (gdb_environ::get): Likewise.
4209         (environ_vector): Delete function.
4210         (set_in_environ): Delete function.
4211         (gdb_environ::set): New function.
4212         (unset_in_environ): Delete function.
4213         (gdb_environ::unset): New function.
4214         (gdb_environ::envp): Likewise.
4215         * common/environ.h: Include <vector>.
4216         (struct gdb_environ): Delete; transform into...
4217         (class gdb_environ): ... this class.
4218         (free_environ): Delete prototype.
4219         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
4220         environ_vector): Likewise.
4221         * infcmd.c (run_command_1): Update code to call
4222         'envp' from 'gdb_environ' class.
4223         (environment_info): Update code to call methods from 'gdb_environ'
4224         class.
4225         (unset_environment_command): Likewise.
4226         (path_info): Likewise.
4227         (path_command): Likewise.
4228         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
4229         (inferior::inferior): Initialize 'environment' using the host's
4230         information.
4231         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
4232         Include "environ.h".
4233         (class inferior) <environment>: Change type from 'struct
4234         gdb_environ' to 'gdb_environ'.
4235         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
4236         methods from 'gdb_environ' class.
4237         * solib.c (solib_find_1): Likewise
4238         * unittests/environ-selftests.c: New file.
4239
4240 2017-06-20  Yao Qi  <yao.qi@linaro.org>
4241
4242         * features/i386/i386-linux.xml: Exchange the order of including
4243         32bit-linux.xml and 32bit-sse.xml.
4244         * features/i386/i386-linux.c: Regenerated.
4245
4246 2017-06-20  Yao Qi  <yao.qi@linaro.org>
4247
4248         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
4249         Delete copy ctor and assignment operator.
4250         (tdesc_type): Likewise.
4251         (tdesc_feature): Likewise.
4252         (tdesc_free_reg): Remove.
4253         (tdesc_create_reg): Use new.
4254         (tdesc_free_type): Remove.
4255         (tdesc_create_vector): Use new.
4256         (tdesc_create_union): Likewise.
4257         (tdesc_create_flags): Likewise.
4258         (tdesc_create_enum): Likewise.
4259         (tdesc_free_feature): Delete.
4260         (free_target_description): Use delete.
4261
4262 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
4263
4264         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
4265         registers.
4266
4267 2017-06-19  Pedro Alves  <palves@redhat.com>
4268
4269         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
4270         after gdb::unlinker.
4271
4272 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
4273
4274         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
4275         gdb_environ to access an environment variable.
4276
4277 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
4278
4279         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
4280         gdb_byte*.
4281
4282 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
4283
4284         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
4285
4286 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
4287
4288         * configure: Re-generate.
4289         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
4290
4291 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
4292
4293         * configure: Re-generate.
4294         * warning.m4: Pass -Werror to compiler when checking for
4295         supported warning flags.
4296
4297 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
4298
4299         * Makefile.in (COMPILE.pre): Add "-x c++".
4300
4301 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
4302             Pedro Alves  <palves@redhat.com>
4303             Yao Qi  <yao.qi@linaro.org>
4304
4305         * defs.h (RequireLongest): New.
4306         (extract_integer): Declare function template.
4307         (extract_signed_integer): Remove the declaration, but define it
4308         static inline.
4309         (extract_unsigned_integer): Likewise.
4310         (store_integer): Declare function template.
4311         (store_signed_integer): Remove the declaration, but define it
4312         static inline.
4313         (store_unsigned_integer): Likewise.
4314         * findvar.c (extract_integer): New function template.
4315         (extract_signed_integer): Remove.
4316         (extract_unsigned_integer): Remove.
4317         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
4318         instantiations.
4319         (store_integer): New function template.
4320         (store_signed_integer): Remove.
4321         (store_unsigned_integer): Remove.
4322         (store_integer): Explicit instantiations.
4323         * regcache.c (regcache_raw_read_signed): Update.
4324         (regcache::raw_read): New function.
4325         (regcache::raw_read_signed): Remove.
4326         (regcache::raw_read_unsigned): Remove.
4327         (regcache_raw_read_unsigned): Update.
4328         (regcache_raw_write_unsigned): Update.
4329         (regcache::raw_write_signed): Remove.
4330         (regcache::raw_write): New function.
4331         (regcache_cooked_read_signed): Update.
4332         (regcache::raw_write_unsigned): Remove.
4333         (regcache::cooked_read_signed): Remove.
4334         (regcache_cooked_read_unsigned): Update.
4335         (regcache::cooked_read_unsigned): Remove.
4336         (regcache_cooked_write_signed): Update.
4337         (regcache_cooked_write_unsigned): Update.
4338         * regcache.h (regcache) <raw_read_signed>: Remove.
4339         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
4340         <raw_read, raw_write>: New.
4341         <cooked_read_signed, cooked_write_signed>: Remove.
4342         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
4343         <cooked_read, cooked_write>: New.
4344         * sh64-tdep.c (sh64_pseudo_register_read): Update.
4345         (sh64_pseudo_register_write): Update.
4346
4347 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
4348
4349         * arc-tdep.c (arc_disassembler_options): New variable.
4350         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
4351         of default_print_insn.
4352         (arc_delayed_print_insn): Set info->section when needed,
4353         use default_print_insn to retrieve a disassembler.
4354
4355 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
4356
4357         PR gdb/21574
4358         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
4359         to mention $SHELL and startup-with-shell.
4360
4361 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
4362
4363         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
4364
4365 2017-06-14  Yao Qi  <yao.qi@linaro.org>
4366
4367         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
4368         default_print_insn instead of print_insn_aarch64.
4369         * arm-tdep.c (gdb_print_insn_arm): Call
4370         default_print_insn instead of print_insn_big_arm
4371         and print_insn_little_arm.
4372         * i386-tdep.c (i386_print_insn): Call default_print_insn
4373         instead of print_insn_i386.
4374         * ia64-tdep.c (ia64_print_insn): Call
4375         default_print_insn instead of print_insn_ia64.
4376         * mips-tdep.c (gdb_print_insn_mips): Call
4377         default_print_insn instead of print_insn_big_mips
4378         and print_insn_little_mips.
4379         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
4380         instead of print_insn_spu.
4381
4382 2017-06-14  Pedro Alves  <palves@redhat.com>
4383
4384         * ada-lang.c: Include "common/byte-vector.h".
4385         (ada_value_primitive_packed_val): Use gdb::byte_vector.
4386         * charset.c (wchar_iterator::iterate): Resize the vector instead
4387         of reserving it.
4388         * common/byte-vector.h: Include "common/def-vector.h".
4389         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
4390         * cli/cli-dump.c: Include "common/byte-vector.h".
4391         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
4392         * common/byte-vector.h: New file.
4393         * common/def-vector.h: New file.
4394         * common/default-init-alloc.h: New file.
4395         * dwarf2loc.c: Include "common/byte-vector.h".
4396         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
4397         instead of reserving it.
4398         * dwarf2read.c: Include "common/byte-vector.h".
4399         (data_buf::m_vec): Now a gdb::byte_vector.
4400         * gdb_regex.c: Include "common/def-vector.h".
4401         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
4402         * mi/mi-main.c: Include "common/byte-vector.h".
4403         (mi_cmd_data_read_memory): Use gdb::byte_vector.
4404         * printcmd.c: Include "common/byte-vector.h".
4405         (print_scalar_formatted): Use gdb::byte_vector.
4406         * valprint.c: Include "common/byte-vector.h".
4407         (maybe_negate_by_bytes, print_decimal_chars): Use
4408         gdb::byte_vector.
4409
4410 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4411
4412         * darwin-nat.c: Include "nat/fork-inferior.h".
4413
4414 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4415
4416         * configure.nat: Factor out Darwin bits that are not
4417         architecture-specific.  Add fork-inferior.o.
4418
4419 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4420
4421         * configure.nat: Factor out AIX bits that are not
4422         architecture-specific.  Add fork-inferior.o.
4423
4424 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4425
4426         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
4427         (read_pieced_value, write_pieced_value): ...here.  Reduce to
4428         wrappers that just call rw_pieced_value.
4429
4430 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4431
4432         * dwarf2loc.c (write_pieced_value): When writing the data for a
4433         memory piece, use write_memory_with_notification instead of
4434         write_memory.
4435
4436 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4437
4438         * valops.c (read_value_memory): Change embedded_offset to
4439         represent a bit offset instead of a byte offset.
4440         * value.h (read_value_memory): Adjust comment.
4441
4442 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4443
4444         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
4445         dest_offset_bits and source_offset_bits.
4446         (write_pieced_value): Likewise.
4447
4448 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4449
4450         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
4451         given by DW_OP_bit_piece.
4452         (write_pieced_value): Likewise.
4453
4454 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4455
4456         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
4457         some other preparations to the places where sufficient information
4458         is available.
4459         (write_pieced_value): Likewise.
4460
4461 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4462
4463         * dwarf2loc.c (bits_to_bytes): New function.
4464         (read_pieced_value): Fix offset calculations for register pieces
4465         on big-endian targets.
4466         (write_pieced_value): Likewise.
4467
4468 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4469
4470         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
4471         (write_pieced_value): Likewise.
4472
4473 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4474
4475         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
4476         transfer the source value's least significant bits, instead of its
4477         lowest-addressed ones.  Rename type_len to max_offset.
4478         (read_pieced_value): Mirror above changes to write_pieced_value as
4479         applicable.
4480
4481 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4482
4483         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
4484         truncate full bytes from dest_offset_bits before using it as an
4485         offset into the buffer.
4486
4487 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4488
4489         * dwarf2loc.c (write_pieced_value): Include transfer size in
4490         byte-wise check.
4491
4492 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4493
4494         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
4495         calculation of this_size.
4496
4497 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4498
4499         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
4500         when targeting a bit-field.
4501         (write_pieced_value): Likewise.
4502
4503 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4504
4505         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
4506         (allocate_piece_closure): Drop addr_size parameter.
4507         (dwarf2_evaluate_loc_desc_full): Adjust call to
4508         allocate_piece_closure.
4509
4510 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4511
4512         PR gdb/21226
4513         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
4514         the LSB end, independent of endianness.
4515
4516 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4517
4518         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
4519         size capping.
4520
4521 2017-06-13  Yao Qi  <yao.qi@linaro.org>
4522
4523         * mips-linux-nat.c: Move include features/mips*-linux.c to
4524         mips-linux-tdep.c.
4525         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
4526         to mips-linux-tdep.c.
4527         * mips-linux-tdep.c: Include features/mips*-linux.c
4528         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
4529         functions.
4530         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
4531         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
4532         (tdesc_mips64_dsp_linux): Declare.
4533
4534 2017-06-12  Tom Tromey  <tom@tromey.com>
4535
4536         * valprint.h (val_print_type_code_int): Remove.
4537         * valprint.c (generic_val_print_int): Always call
4538         val_print_scalar_formatted.
4539         (val_print_type_code_int): Remove.
4540         * printcmd.c (print_scalar_formatted): Handle options->format==0.
4541         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
4542         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
4543         * ada-valprint.c (ada_val_print_num): Use
4544         val_print_scalar_formatted.
4545
4546 2017-06-12  Tom Tromey  <tom@tromey.com>
4547
4548         * printcmd.c (print_scalar_formatted): Unify the two switches.
4549         Don't convert scalars to LONGEST.
4550
4551 2017-06-12  Tom Tromey  <tom@tromey.com>
4552
4553         PR exp/16225:
4554         * valprint.h (print_decimal_chars): Update.
4555         * valprint.c (maybe_negate_by_bytes): New function.
4556         (print_decimal_chars): Add "is_signed" argument.
4557         * printcmd.c (print_scalar_formatted): Update.
4558
4559 2017-06-12  Tom Tromey  <tom@tromey.com>
4560
4561         PR exp/16225:
4562         * valprint.h (print_binary_chars, print_hex_chars): Update.
4563         * valprint.c (val_print_type_code_int): Update.
4564         (print_binary_chars): Add "zero_pad" argument.
4565         (emit_octal_digit): New function.
4566         (print_octal_chars): Don't zero-pad.
4567         (print_decimal_chars): Likewise.
4568         (print_hex_chars): Add "zero_pad" argument.
4569         * sh64-tdep.c (sh64_do_fp_register): Update.
4570         * regcache.c (regcache::dump): Update.
4571         * printcmd.c (print_scalar_formatted): Update.
4572         * infcmd.c (default_print_one_register_info): Update.
4573
4574 2017-06-12  Pedro Alves  <palves@redhat.com>
4575             Alan Hayward  <alan.hayward@arm.com>
4576
4577         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
4578         (mips_eabi_push_dummy_call): Rename local 'regsize' to
4579         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
4580         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
4581         Assert that abi_regsize bytes fit in 'ref_valbuf'.
4582
4583 2017-06-12  Pedro Alves  <palves@redhat.com>
4584
4585         * dwarf2read.c (mapped_symtab::data): Now a vector of
4586         symtab_index_entry instead of vector of
4587         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
4588         whether an element's name is NULL instead of checking whether the
4589         element itself is NULL.
4590         (find_slot): Change return type.  Adjust.
4591         (hash_expand, , add_index_entry, uniquify_cu_indices)
4592         (write_hash_table): Adjust.
4593
4594 2017-06-12  Pedro Alves  <palves@redhat.com>
4595
4596         * dwarf2read.c (recursively_count_psymbols): New function.
4597         (write_psymtabs_to_index): Call it to compute number of psyms and
4598         pass estimate size of psyms_seen to unordered_set's ctor.
4599
4600 2017-06-12  Pedro Alves  <palves@redhat.com>
4601
4602         * dwarf2read.c (write_hash_table): Check if key already exists
4603         before emplacing.
4604
4605 2017-06-12  Pedro Alves  <palves@redhat.com>
4606
4607         * dwarf2read.c (data_buf::append_space): Rename to...
4608         (data_buf::grow): ... this, and make private.  Adjust all callers.
4609         (data_buf::append_uint): New method.
4610         (add_address_entry, write_one_signatured_type)
4611         (write_psymtabs_to_index): Use it.
4612
4613 2017-06-12  Pedro Alves  <palves@redhat.com>
4614
4615         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
4616         (file_write (FILE *, const std::vector<Elem>&)): Delete.
4617         (data_buf::file_write): Call ::fwrite directly.
4618
4619 2017-06-12  Pedro Alves  <palves@redhat.com>
4620
4621         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
4622         std::vector::erase.
4623
4624 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
4625
4626         Code cleanup: C++ify .gdb_index producer.
4627         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
4628         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
4629         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
4630         (create_strtab, add_string): Remove.
4631         (file_write, data_buf): New.
4632         (struct symtab_index_entry): Use std::vector for cu_indices.
4633         (struct mapped_symtab): Use std::vector for data.
4634         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
4635         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
4636         Remove.
4637         (find_slot): Change return type.  Update it to the new data structures.
4638         (hash_expand, add_index_entry): Update it to the new data structures.
4639         (offset_type_compare): Remove.
4640         (uniquify_cu_indices): Update it to the new data structures.
4641         (c_str_view, c_str_view_hasher, vector_hasher): New.
4642         (add_indices_to_cpool): Remove.
4643         (write_hash_table): Update it to the new data structures.
4644         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
4645         (eq_psymtab_cu_index): Remove.
4646         (psym_index_map): New typedef.
4647         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
4648         reference and std::unordered_map for cu_index_htab.
4649         (add_address_entry, add_address_entry_worker, write_address_map)
4650         (write_psymbols): Update it to the new data structures.
4651         (write_obstack): Remove.
4652         (struct signatured_type_index_data): Change types_list to a data_buf
4653         reference and psyms_seen to a std::unordered_set reference.
4654         (write_one_signatured_type, recursively_write_psymbols)
4655         (write_psymtabs_to_index): Update it to the new data structures.
4656
4657 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
4658
4659         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
4660         separate-debug-file commands.
4661         * symfile.h (separate_debug_file_debug): New global.
4662         * symfile.c (separate_debug_file_debug): New global.
4663         (separate_debug_file_exists, find_separate_debug_file): Add
4664         debug output.
4665         (_initialize_symfile): Add "set debug separate-debug-file"
4666         command.
4667         * build-id.c (build_id_to_debug_bfd,
4668         find_separate_debug_file_by_buildid): Add debug output.
4669
4670 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
4671
4672         * gdbarch.sh (displaced_step_free_closure): Remove.
4673         * gdbarch.h, gdbarch.c: Re-generate.
4674         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
4675         displaced_step_free_closure.
4676         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
4677         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
4678         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4679         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
4680         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
4681         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
4682         * arch-utils.h (simple_displaced_step_free_closure): Remove.
4683         * arch-utils.c (simple_displaced_step_free_closure): Remove.
4684         * infrun.c (displaced_step_clear): Call xfree instead of
4685         gdbarch_displaced_step_free_closure.
4686
4687 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
4688
4689         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
4690         NULL".
4691
4692 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
4693
4694         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
4695         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
4696         (mn10300_push_dummy_call): Likewise.
4697
4698 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
4699
4700         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
4701
4702 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
4703
4704         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
4705
4706 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
4707
4708         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
4709         able to start inferiors using a shell.
4710         (New remote packets): Announce new packet "QStartupWithShell".
4711         * remote.c: Add PACKET_QStartupWithShell.
4712         (extended_remote_create_inferior): Handle new
4713         PACKET_QStartupWithShell.
4714         (remote_protocol_features) <QStartupWithShell>: New entry for
4715         PACKET_QStartupWithShell.
4716         (_initialize_remote): Call "add_packet_config_cmd" for
4717         QStartupShell.
4718
4719 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
4720             Pedro Alves  <palves@redhat.com>
4721
4722         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
4723         and "nat/fork-inferior.h".
4724         * common/common-inferior.h: New file, with contents from
4725         "gdb/inferior.h".
4726         * commom/common-utils.c: Include "common-utils.h".
4727         (stringify_argv): New function.
4728         * common/common-utils.h (stringify_argv): New prototype.
4729         * configure.nat: Add "fork-inferior.o" as a dependency for
4730         "*linux*", "fbsd*" and "nbsd*" hosts.
4731         * corefile.c (get_exec_file): Update comment.
4732         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
4733         instead of "startup_inferior".
4734         (darwin_create_inferior): Call "add_thread_silent" after
4735         "fork_inferior".
4736         * fork-child.c: Cleanup unnecessary includes.
4737         (SHELL_FILE): Move to "common/common-fork-child.c".
4738         (environ): Likewise.
4739         (exec_wrapper): Initialize.
4740         (get_exec_wrapper): New function.
4741         (breakup_args): Move to "common/common-fork-child.c"; rename to
4742         "breakup_args_for_exec".
4743         (escape_bang_in_quoted_argument): Move to
4744         "common/common-fork-child.c".
4745         (saved_ui): New variable.
4746         (prefork_hook): New function.
4747         (postfork_hook): Likewise.
4748         (postfork_child_hook): Likewise.
4749         (gdb_startup_inferior): Likewise.
4750         (fork_inferior): Move to "common/common-fork-child.c".  Update
4751         function to support gdbserver.
4752         (startup_inferior): Likewise.
4753         * gdbcore.h (get_exec_file): Remove declaration.
4754         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
4755         instead of "startup_inferior".  Call "add_thread_silent" after
4756         "fork_inferior".
4757         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
4758         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
4759         instead of "startup_inferior".  Call "add_thread_silent" after
4760         "fork_inferior".
4761         * inferior.h: Include "common-inferior.h".
4762         (trace_start_error): Move to "common/common-utils.h".
4763         (trace_start_error_with_name): Likewise.
4764         (fork_inferior): Move prototype to "nat/fork-inferior.h".
4765         (startup_inferior): Likewise.
4766         (gdb_startup_inferior): New prototype.
4767         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
4768         * nat/fork-inferior.h: New file.
4769         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
4770         instead of "startup_inferior".  Call "add_thread_silent" after
4771         "fork_inferior".
4772         * target.h (target_terminal_init): Move prototype to
4773         "target/target.h".
4774         (target_terminal_inferior): Likewise.
4775         (target_terminal_ours): Likewise.
4776         * target/target.h (target_terminal_init): New prototype, moved
4777         from "target.h".
4778         (target_terminal_inferior): Likewise.
4779         (target_terminal_ours): Likewise.
4780         * utils.c (gdb_flush_out_err): New function.
4781
4782 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
4783
4784         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
4785         * common/common-gdbthread.h: New file, with parts from
4786         "gdb/gdbthread.h".
4787         * gdbthread.h: Include "common-gdbthread.h".
4788         (switch_to_thread): Moved to "common/common-gdbthread.h".
4789
4790 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
4791
4792         * Makefile.in (SFILES): Add "common/job-control.c".
4793         (HFILES_NO_SRCDIR): Add "common/job-control.h".
4794         (COMMON_OBS): Add "job-control.o".
4795         * common/job-control.c: New file, with contents from
4796         "gdb/inflow.c".
4797         * common/job-control.h: New file, with contents from "terminal.h".
4798         * fork-child.c: Include "job-control.h".
4799         * inflow.c: Include "job-control.h".
4800         (gdb_setpgid): Move to "common/common-inflow.c".
4801         (_initialize_inflow): Move setting of "job_control" to
4802         "handle_job_control".
4803         * terminal.h (job_control): Moved to "common/common-terminal.h".
4804         (gdb_setpgid): Likewise.
4805         * top.c: Include "job_control.h".
4806         * utils.c: Likewise.
4807         (job_control): Moved to "job-control.c".
4808
4809 2017-06-07  Pedro Alves  <palves@redhat.com>
4810
4811         * Makefile.in (SFILES): Add gdb_regex.c.
4812         (COMMON_OBS): Add gdb_regex.o.
4813         * ada-lang.c (ada_add_standard_exceptions)
4814         (ada_add_exceptions_from_frame, name_matches_regex)
4815         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
4816         parameter type to compiled_regex.  Adjust.
4817         (ada_exceptions_list): Use compiled_regex.
4818         * break-catch-throw.c (exception_catchpoint::pattern): Now a
4819         std::unique_ptr<compiled_regex>.
4820         (exception_catchpoint::~exception_catchpoint): Remove regfree
4821         call.
4822         (check_status_exception_catchpoint): Adjust to use compiled_regex.
4823         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
4824         * breakpoint.c (solib_catchpoint::compiled): Now a
4825         std::unique_ptr<compiled_regex>.
4826         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
4827         (check_status_catch_solib): Adjust to use compiled_regex.
4828         (add_solib_catchpoint): Adjust to use compiled_regex.
4829         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
4830         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
4831         compiled_regex reference.  Adjust to use it.
4832         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
4833         declaration.  Include "gdb_regex.h".
4834         (apropos_cmd): Change regex parameter to compiled_regex reference.
4835         * gdb_regex.c: New file.
4836         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
4837         declarations.
4838         (class compiled_regex): New.
4839         * linux-tdep.c: Include "common/gdb_optional.h".
4840         (struct mapping_regexes): New, factored out from
4841         mapping_is_anonymous_p, and adjusted to use compiled_regex.
4842         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
4843         gdb::optional and remove cleanups.  Adjust to compiled_regex.
4844         * probe.c: Include "common/gdb_optional.h".
4845         (collect_probes): Use compiled_regex and gdb::optional and remove
4846         cleanups.
4847         * skip.c: Include "common/gdb_optional.h".
4848         (skiplist_entry::compiled_function_regexp): Now a
4849         gdb::optional<compiled_regex>.
4850         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
4851         (free_skiplist_entry): Remove regfree call.
4852         (compile_skip_regexp, skip_rfunction_p): Adjust to use
4853         compiled_regex and gdb::optional.
4854         * symtab.c: Include "common/gdb_optional.h".
4855         (search_symbols): Use compiled_regex and gdb::optional.
4856         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
4857         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
4858         to gdb_regex.c.
4859
4860 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
4861
4862         * regcache.c (regcache::save): Avoid buffer use.
4863         (regcache::dump): Likewise.
4864
4865 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
4866
4867         * sh-tdep.c (sh_pseudo_register_read): Remove
4868         MAX_REGISTER_SIZE.
4869         (sh_pseudo_register_write): Likewise.
4870         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
4871         (sh64_pseudo_register_write): Likewise
4872
4873 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
4874
4875         * aarch64-tdep.c (aarch64_store_return_value): Use
4876         V_REGISTER_SIZE.
4877         (aarch64_pseudo_read_value): Likewise.
4878         (aarch64_pseudo_write): Likewise.
4879
4880 2017-06-06  Yao Qi  <yao.qi@linaro.org>
4881
4882         * regformats/regdef.h (set_register_cache): Remove the
4883         declaration.
4884
4885 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
4886
4887         * frame.c (frame_unwind_register_signed): Use
4888         frame_unwind_register_value.
4889
4890 2017-06-06  Pedro Alves  <palves@redhat.com>
4891
4892         PR breakpoints/21553
4893         * breakpoint.c (create_breakpoints_sal_default)
4894         (init_breakpoint_sal, create_breakpoint_sal): Use
4895         gdb::unique_xmalloc_ptr for string parameters.
4896         (create_breakpoint): Constify 'extra_string' and 'cond_string'
4897         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
4898         (base_breakpoint_create_breakpoints_sal)
4899         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
4900         (strace_marker_create_breakpoints_sal)
4901         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
4902         string parameters.
4903         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
4904         gdb::unique_xmalloc_ptr for string parameters.
4905         (create_breakpoint): Constify 'extra_string' and 'cond_string'
4906         parameters.
4907
4908 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
4909
4910         * alpha-tdep.c (alpha_register_to_value): Use
4911         get_frame_register_value.
4912         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
4913
4914 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
4915
4916         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
4917         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
4918         (ia64_value_to_register): Likewise.
4919         (ia64_extract_return_value): Likewise.
4920         (ia64_store_return_value): Likewise.
4921         (ia64_push_dummy_call): Likewise.
4922
4923 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
4924
4925         GDB 8.0 released.
4926
4927 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
4928
4929         * x86-linux-nat.c (struct arch_lwp_info): Remove.
4930
4931 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
4932
4933         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
4934         parameter.
4935         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
4936
4937 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
4938
4939         * event-loop.c (poll_timers): Unallocate timer using delete
4940         instead of xfree.
4941
4942 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
4943
4944         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
4945         (struct breakpoint) <~breakpoint>: New.
4946         (struct watchpoint): Inherit from breakpoint.
4947         <~watchpoint>: New.
4948         <base>: Remove.
4949         (struct tracepoint): Inherit from breakpoint.
4950         <base>: Remove.
4951         * breakpoint.c (longjmp_breakpoint_ops): Remove.
4952         (struct longjmp_breakpoint): Inherit from breakpoint.
4953         <~longjmp_breakpoint>: New.
4954         <base>: Remove.
4955         (new_breakpoint_from_type): Remove casts.
4956         (watchpoint_in_thread_scope): Remove reference to base field.
4957         (watchpoint_del_at_next_stop): Likewise.
4958         (update_watchpoint): Likewise.
4959         (watchpoint_check): Likewise.
4960         (bpstat_check_watchpoint): Likewise.
4961         (set_longjmp_breakpoint): Likewise.
4962         (struct fork_catchpoint): Inherit from breakpoint.
4963         <base>: Remove.
4964         (struct solib_catchpoint): Inherit from breakpoint.
4965         <~solib_catchpoint>: New.
4966         <base>: Remove.
4967         (dtor_catch_solib): Change to ...
4968         (solib_catchpoint::~solib_catchpoint): ... this.
4969         (breakpoint_hit_catch_solib): Remove reference to base field.
4970         (add_solib_catchpoint): Likewise.
4971         (create_fork_vfork_event_catchpoint): Likewise.
4972         (struct exec_catchpoint): Inherit from breakpoint.
4973         <~exec_catchpoint>: New.
4974         <base>: Remove.
4975         (dtor_catch_exec): Change to ...
4976         (exec_catchpoint::~exec_catchpoint): ... this.
4977         (dtor_watchpoint): Change to ...
4978         (watchpoint::~watchpoint): ... this.
4979         (watch_command_1): Remove reference to base field.
4980         (catch_exec_command_1): Likewise.
4981         (base_breakpoint_dtor): Change to ...
4982         (breakpoint::~breakpoint): ... this.
4983         (base_breakpoint_ops): Remove dtor field value.
4984         (longjmp_bkpt_dtor): Change to ...
4985         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
4986         (strace_marker_create_breakpoints_sal): Remove reference to base
4987         field.
4988         (delete_breakpoint): Don't manually call breakpoint destructor.
4989         (create_tracepoint_from_upload): Remove reference to base field.
4990         (trace_pass_set_count): Likewise.
4991         (initialize_breakpoint_ops): Don't initialize
4992         momentary_breakpoint_ops, don't set dtors.
4993         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
4994         <~ada_catchpoint>: New.
4995         <base>: Remove.
4996         (create_excep_cond_exprs): Remove reference to base field.
4997         (dtor_exception): Change to ...
4998         (ada_catchpoint::~ada_catchpoint): ... this.
4999         (dtor_catch_exception): Remove.
5000         (dtor_catch_exception_unhandled): Remove.
5001         (dtor_catch_assert): Remove.
5002         (create_ada_exception_catchpoint): Remove reference to base
5003         field.
5004         (initialize_ada_catchpoint_ops): Don't set dtors.
5005         * break-catch-sig.c (struct signal_catchpoint): Inherit from
5006         breakpoint.
5007         <~signal_catchpoint>: New.
5008         <base>: Remove.
5009         (signal_catchpoint_dtor): Change to ...
5010         (signal_catchpoint::~signal_catchpoint): ... this.
5011         (create_signal_catchpoint): Remove reference to base field.
5012         (initialize_signal_catchpoint_ops): Don't set dtor.
5013         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
5014         from breakpoint.
5015         <~syscall_catchpoint>: New.
5016         <base>: Remove.
5017         (dtor_catch_syscall): Change to ...
5018         (syscall_catchpoint::~syscall_catchpoint): ... this.
5019         (create_syscall_event_catchpoint): Remove reference to base
5020         field.
5021         (initialize_syscall_catchpoint_ops): Don't set dtor.
5022         * break-catch-throw.c (struct exception_catchpoint): Inherit
5023         from breakpoint.
5024         <~exception_catchpoint>: New.
5025         <base>: Remove.
5026         (dtor_exception_catchpoint): Change to ...
5027         (exception_catchpoint::~exception_catchpoint): ... this.
5028         (handle_gnu_v3_exceptions): Remove reference to base field.
5029         (initialize_throw_catchpoint_ops): Don't set dtor.
5030         * ctf.c (ctf_get_traceframe_address): Remove reference to base
5031         field.
5032         * remote.c (remote_get_tracepoint_status): Likewise.
5033         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
5034         * tracefile.c (tracefile_fetch_registers): Likewise.
5035         * tracepoint.c (actions_command): Likewise.
5036         (validate_actionline): Likewise.
5037         (tfind_1): Likewise.
5038         (get_traceframe_location): Likewise.
5039         (find_matching_tracepoint_location): Likewise.
5040         (parse_tracepoint_status): Likewise.
5041         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
5042
5043 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
5044
5045         * breakpoint.c (struct longjmp_breakpoint): New struct.
5046         (is_tracepoint_type): Change return type to bool.
5047         (is_longjmp_type): New function.
5048         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
5049         (set_raw_breakpoint_without_location): Use
5050         new_breakpoint_from_type.
5051         (set_raw_breakpoint): Likewise.
5052
5053 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
5054
5055         * breakpoint.c (new_breakpoint_from_type): New function.
5056         (create_breakpoint_sal): Use new_breakpoint_from_type and
5057         unique_ptr.
5058         (create_breakpoint): Likewise.
5059
5060 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
5061
5062         * memattr.c (mem_info_command): Rename to ...
5063         (info_mem_command): ... this.
5064         (mem_enable_command): Rename to ...
5065         (enable_mem_command): ... this.
5066         (mem_disable_command): Rename to ...
5067         (disable_mem_command): ... this.
5068         (mem_delete_command): Rename to ...
5069         (delete_mem_command): ... this.
5070         (_initialize_mem): Adjust function names.
5071
5072 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
5073
5074         * btrace.c (handle_pt_insn_events): New.
5075         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
5076         STATUS.  Split into this and ...
5077         (handle_pt_insn_event_flags): ... this.
5078
5079 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
5080
5081         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
5082         and struct pt_insn.resynced.
5083         * configure: Regenerated.
5084         * config.in: Regenerated.
5085
5086 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5087
5088         * btrace.c (ftrace_find_call_by_number): New function.
5089         (ftrace_new_function): Store objects, not pointers.
5090         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
5091         ftrace_new_gap, ftrace_update_function,
5092         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
5093         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
5094         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
5095         btrace_ends_with_single_insn, btrace_call_get): Account for
5096         btrace_thread_info::functions now storing objects.
5097         * btrace.h (struct btrace_thread_info): Add constructor.
5098         (struct btrace_thread_info) <functions>: Make std::vector.
5099         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
5100         Initialize with default values.
5101         * record-btrace.c (record_btrace_frame_sniffer): Account for
5102         btrace_thread_info::functions now storing objects.
5103
5104 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5105
5106         * btrace.c: Remove typedef bfun_s.
5107         (ftrace_new_gap): Directly add gaps to the list of gaps.
5108         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
5109         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
5110         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
5111         instead of gdb VEC.
5112
5113 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5114
5115         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
5116         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
5117         with btrace_thread_info::next_segment and
5118         btrace_thread_info::prev_segment.
5119         * btrace.h: Remove struct btrace_func_link.
5120         (struct btrace_function): Replace pair of function segment pointers
5121         with pair of indices.
5122         * python/py-record-btrace.c (btpy_call_prev_sibling,
5123         btpy_call_next_sibling): Replace references to
5124         btrace_thread_info::segment with btrace_thread_info::next_segment and
5125         btrace_thread_info::prev_segment.
5126         * record-btrace.c (record_btrace_frame_this_id): Use
5127         btrace_find_call_by_number.
5128
5129 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5130
5131         * btrace.c (ftrace_new_function, ftrace_fixup_level,
5132         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
5133         btrace_insn_next, btrace_insn_prev): Remove references to
5134         btrace_thread_info::flow.
5135         * btrace.h (struct btrace_function): Remove FLOW.
5136
5137 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5138
5139         * btrace.c (ftrace_find_call_by_number): New function.
5140         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
5141         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
5142         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
5143         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
5144         index.
5145         * btrace.h (struct btrace_function): Turn UP into an index.
5146         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
5147         as an index.
5148         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
5149         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
5150         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
5151
5152 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5153
5154         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5155         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5156         ftrace_update_function, ftrace_compute_global_level_offset,
5157         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
5158         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
5159         btrace_insn_end, btrace_is_empty): Remove references to
5160         btrace_thread_info::begin and btrace_thread_info::end.
5161         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
5162         (struct btrace_thread_info) <functions>: Adjust comment.
5163         * record-btrace.c (record_btrace_start_replaying): Remove reference to
5164         btrace_thread_info::begin.
5165
5166 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5167
5168         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5169         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5170         ftrace_update_function): Remove arguments that implicitly were always
5171         BTINFO->END.
5172         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
5173         Don't pass BTINFO->END.
5174
5175 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5176
5177         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
5178         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
5179         btrace_find_insn_by_number): Replace function segment pointer with
5180         index.
5181         (btrace_insn_cmp): Simplify.
5182         * btrace.h: (struct btrace_insn_iterator) Rename index to
5183         insn_index.  Replace function segment pointer with index into function
5184         segment vector.
5185         * record-btrace.c (record_btrace_call_history): Replace function
5186         segment pointer use with index.
5187         (record_btrace_frame_sniffer): Retrieve function call segment through
5188         vector.
5189         (record_btrace_set_replay): Remove defunc't safety check.
5190
5191 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5192
5193         * btrace.c (btrace_ends_with_single_insn): New function.
5194         (btrace_call_get, btrace_call_number, btrace_call_begin,
5195         btrace_call_end, btrace_call_next, btrace_call_prev,
5196         btrace_find_call_by_number): Use index into call segment vector
5197         instead of pointer.
5198         (btrace_call_cmp): Simplify.
5199         * btrace.h (struct btrace_call_iterator): Replace function call segment
5200         pointer with index into vector.
5201         * record-btrace.c (record_btrace_call_history): Use index instead of
5202         pointer.
5203
5204 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5205
5206         * btrace.c (btrace_insn_begin, btrace_insn_end,
5207         btrace_find_insn_by_number): Add btinfo to iterator.
5208         * btrace.h (struct btrace_insn_iterator): Add btinfo.
5209
5210 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5211
5212         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
5213         and save pointers directly.
5214         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
5215         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
5216         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
5217         changed signature of functions.
5218         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
5219         (btrace_fetch): Remove code that adds btrace_function pointers to
5220         vector of btrace_functions.
5221         (btrace_clear): Simplify freeing vector of btrace_functions.
5222
5223 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5224
5225         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
5226         Replace VEC_* with std::vector functions.
5227         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
5228         (struct btrace_thread_info)<functions>: Change type to std::vector.
5229
5230 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5231
5232         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
5233         "Removed targets and native configurations" up.  Merge duplicate
5234         "New commands" sub-sections.  Add "New options" sub-sections.
5235
5236 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
5237
5238         * defs.h (copy_integer_to_size): New declaration.
5239         * findvar.c (copy_integer_to_size): New function.
5240         (do_cint_test): New selftest function.
5241         (copy_integer_to_size_test): Likewise.
5242         (_initialize_findvar): Likewise.
5243         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
5244         (mips_fbsd_collect_reg): Use raw_collect_integer.
5245         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
5246         (mips64_fill_gregset): Use raw_collect_integer
5247         (mips64_fill_fpregset): Use raw_supply_integer.
5248         * regcache.c (regcache::raw_supply_integer): New function.
5249         (regcache::raw_collect_integer): Likewise.
5250         * regcache.h: (regcache::raw_supply_integer): New declaration.
5251         (regcache::raw_collect_integer): Likewise.
5252
5253 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5254
5255         * Makefile.in (SFILES): Add gdbarch-selftests.c.
5256         (COMMON_OBS): Add gdbarch-selftests.o.
5257         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
5258         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
5259         * gdbarch-selftests.c: New file.
5260         * regcache.h (regcache) <~regcache>: Mark it virtual if
5261         GDB_SELF_TEST.
5262         <raw_write>: Likewise.
5263
5264 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5265
5266         * regcache.c (current_regcache): Change it to
5267         regcache::current_regcache.
5268         (regcache_observer_target_changed): Update.
5269         (regcache_thread_ptid_changed): Make it a regcache static
5270         method.
5271         (regcache_thread_ptid_changed): Update.
5272         (class regcache_access): New.
5273         (current_regcache_test): Update.
5274         (_initialize_regcache): Update.
5275         * regcache.h: Include forward_list.
5276         (regcache): Declare regcache_thread_ptid_changed and declare
5277         registers_changed_ptid as friend.
5278
5279 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5280
5281         * i387-tdep.c (i387_register_to_value): Use register_size
5282         instead of TYPE_LENGTH.
5283         * m68k-tdep.c (m68k_register_to_value): Likewise.
5284
5285 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5286
5287         * i387-tdep.c (i387_convert_register_p): Return false if type
5288         code isn't TYPE_CODE_FLT.
5289
5290 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5291
5292         * alpha-tdep.c (alpha_convert_register_p): Return true if type
5293         length is 4.
5294         (alpha_register_to_value): Remove type length check.
5295         (alpha_value_to_register): Likewise.
5296
5297 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5298
5299         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
5300         TYPE_CODE_FLT.
5301
5302 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5303
5304         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
5305         TYPE_CODE_FLT or not.
5306
5307 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5308
5309         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
5310         * avr-tdep.c (avr_gdbarch_init): Likewise.
5311         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5312         * cris-tdep.c (cris_gdbarch_init): Likewise.
5313         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5314         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5315         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5316         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
5317         * mep-tdep.c (mep_gdbarch_init): Likewise.
5318         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5319         * mips-tdep.c (mips_gdbarch_init): Likewise.
5320         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5321         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5322         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5323         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5324         * v850-tdep.c (v850_gdbarch_init): Likewise.
5325
5326 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5327
5328         * selftest-arch.c (tests_with_arch): Call registers_changed
5329         and reinit_frame_cache.
5330         * selftest.c (run_self_tests): Likewise.
5331
5332 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5333
5334         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
5335         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
5336
5337 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5338
5339         * rl78-tdep.c (rl78_gdbarch_init): Don't call
5340         set_gdbarch_print_insn.
5341
5342 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5343
5344         * h8300-tdep.c (h8300_gdbarch_init): Don't call
5345         set_gdbarch_print_insn.
5346
5347 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5348
5349         * alpha-tdep.c (alpha_gdbarch_init): Don't call
5350         set_gdbarch_print_insn.
5351         * arc-tdep.c (arc_gdbarch_init): Likewise.
5352         * arch-utils.c: include dis-asm.h.
5353         (default_print_insn): New function.
5354         * arch-utils.h (default_print_insn): Declare.
5355         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
5356         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5357         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
5358         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
5359         * frv-tdep.c (frv_gdbarch_init): Likewise.
5360         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5361         * gdbarch.sh (print_insn): Use default_print_insn.
5362         * gdbarch.c: Regenerated.
5363         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
5364         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
5365         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5366         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
5367         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5368         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
5369         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
5370         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
5371         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
5372         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5373         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5374         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5375         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5376         * mt-tdep.c (mt_gdbarch_init): Likewise.
5377         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5378         * nios2-tdep.c (nios2_print_insn): Remove.
5379         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
5380         * rx-tdep.c (rx_gdbarch_init): Likewise.
5381         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5382         * score-tdep.c (score_print_insn): Remove.
5383         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
5384         * sh-tdep.c (sh_gdbarch_init): Likewise.
5385         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5386         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5387         * tic6x-tdep.c (tic6x_print_insn): Remove.
5388         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
5389         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
5390         * v850-tdep.c (v850_gdbarch_init): Likewise.
5391         * vax-tdep.c (vax_gdbarch_init): Likewise.
5392         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
5393         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
5394
5395 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
5396
5397         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
5398         (MIPS_FP0_REGNUM): Remove.
5399         (MIPS_FSR_REGNUM): Remove.
5400         (mips_fbsd_supply_fpregs): Use mips_regnum.
5401         (mips_fbsd_supply_gregs): Likewise.
5402         (mips_fbsd_collect_fpregs): Likewise.
5403         (mips_fbsd_collect_gregs): Likewise.
5404
5405 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
5406
5407         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
5408         (getpfpregs_supplies): New function.
5409         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
5410         getfpregs_supplies.
5411         (mips_fbsd_store_inferior_registers): Likewise.
5412
5413 2017-05-22  Pedro Alves <palves@redhat.com>
5414
5415         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
5416         maintainer.
5417
5418 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
5419
5420         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
5421         (store_register): Likewise.
5422         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
5423         (get_decimal_float_return_value): Likewise.
5424         (do_ppc_sysv_return_value): Likewise.
5425         (ppc64_sysv_abi_push_integer): Likewise.
5426         (ppc64_sysv_abi_push_freg): Likewise.
5427         (ppc64_sysv_abi_return_value_base): Likewise.
5428         (ppc64_sysv_abi_return_value): Likewise.
5429         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
5430         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
5431         * rs6000-nat.c: Likewise.
5432         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
5433         (rs6000_value_to_register): Likewise.
5434         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
5435
5436 2017-05-21  Tom Tromey  <tom@tromey.com>
5437
5438         PR rust/21466:
5439         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
5440         arrays as "[T]", not "[T; ]".
5441
5442 2017-05-19  Tom Tromey  <tom@tromey.com>
5443
5444         PR rust/21484:
5445         * rust-lang.c (exp_descriptor_rust): New function.
5446         (rust_language_defn): Use it.
5447         * p-lang.c (pascal_language_defn): Update.
5448         * opencl-lang.c (opencl_language_defn): Update.
5449         * objc-lang.c (objc_language_defn): Update.
5450         * m2-lang.c (m2_language_defn): Update.
5451         * language.h (struct language_defn)
5452         <la_watch_location_expression>: New member.
5453         * language.c (unknown_language_defn, auto_language_defn)
5454         (local_language_defn): Update.
5455         * go-lang.c (go_language_defn): Update.
5456         * f-lang.c (f_language_defn): Update.
5457         * d-lang.c (d_language_defn): Update.
5458         * c-lang.h (c_watch_location_expression): Declare.
5459         * c-lang.c (c_watch_location_expression): New function.
5460         (c_language_defn, cplus_language_defn, asm_language_defn)
5461         (minimal_language_defn): Use it.
5462         * breakpoint.c (watch_command_1): Call
5463         la_watch_location_expression.
5464         * ada-lang.c (ada_language_defn): Update.
5465
5466 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5467
5468         PR tui/21482
5469         * gdb_curses.h (NOMACROS): Define.
5470         (NCURSES_NOMACROS): Define.
5471
5472 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5473
5474         PR tui/21482
5475         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
5476         arg to char *.
5477         * tui/tui-wingeneral.c (box_win): Likewise.
5478         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
5479         (tui_show_source_line): Likewise.
5480         (tui_show_exec_info_content): Likewise.
5481
5482 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
5483
5484         * sparc-tdep.c (sparc_structure_return_p)
5485         (sparc_arg_on_registers_p): New functions.
5486         (sparc32_store_arguments): Use them.
5487         * sparc64-tdep.c (sparc64_16_byte_align_p)
5488         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
5489         Handle TYPE_CODE_ARRAY.
5490
5491 2017-05-17  Yao Qi  <yao.qi@linaro.org>
5492
5493         * cli/cli-decode.c (add_alias_cmd): New function.
5494         * command.h (add_alias_cmd): Declare.
5495         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
5496         instead call add_alias_cmd.
5497
5498 2017-05-17  Pedro Alves  <palves@redhat.com>
5499
5500         * Makefile.in (nat_extra_makefile_frag): Rename to ...
5501         (nat_makefile_frag): ... this.  All references updated.
5502         * configure.ac: Likewise.
5503         * configure.nat: Likewise.  Enhance comments.
5504         * configure: Regenerate.
5505
5506 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5507
5508         * procfs.c (procfs_create_inferior): Change prototype to match
5509         definition.
5510
5511 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
5512
5513         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
5514         C++ compiler warning.
5515
5516 2017-05-12  Tom Tromey  <tom@tromey.com>
5517
5518         PR rust/21483:
5519         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
5520         recurse, just call value_struct_elt directly.
5521
5522 2017-05-12  Tom Tromey  <tom@tromey.com>
5523
5524         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
5525         OP_RUST_ARRAY>: Fix.
5526
5527 2017-05-12  Tom Tromey  <tom@tromey.com>
5528
5529         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
5530
5531 2017-05-09  Yao Qi  <yao.qi@linaro.org>
5532
5533         * regcache.c: Include <forward_list>.
5534         (struct regcache_list): Remove.
5535         (current_regcache): Update.
5536         (get_thread_arch_aspace_regcache): Update for std::forward_list.
5537         (regcache_thread_ptid_changed): Likewise.
5538         (registers_changed_ptid): Likewise.
5539         (current_regcache_size): Likewise.
5540
5541 2017-05-09  Yao Qi  <yao.qi@linaro.org>
5542
5543         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
5544         (current_regcache_size): New function.
5545         (current_regcache_test): New function.
5546         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
5547
5548 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
5549
5550         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
5551         (print_gp_register_row): Use get_frame_register_value.
5552
5553 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
5554
5555         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
5556         (mips_supply_fpregset): Likewise.
5557         (mips64_supply_gregset): Likewise.
5558
5559 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
5560
5561         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
5562         regcache->raw_supply_zeroed.
5563
5564 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
5565
5566         * configure.nat: Rearrange 'case' statements to match
5567         host before cpu.
5568
5569 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
5570
5571         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
5572         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
5573         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
5574         "@nat_extra_makefile_frag@".
5575         (Makefile): Remove dependency on "@frags@".
5576         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
5577         (data-directory/Makefile): Likewise.
5578         * config/aarch64/linux.mh: Deleted; moved contents to
5579         "gdb/configure.nat".
5580         * config/alpha/alpha-linux.mh: Likewise.
5581         * config/alpha/nbsd.mh: Likewise.
5582         * config/arm/linux.mh: Likewise.
5583         * config/arm/nbsdelf.mh: Likewise.
5584         * config/i386/cygwin.mh: Likewise.
5585         * config/i386/cygwin64.mh: Likewise.
5586         * config/i386/darwin.mh: Likewise.
5587         * config/i386/fbsd.mh: Likewise.
5588         * config/i386/fbsd64.mh: Likewise.
5589         * config/i386/go32.mh: Likewise.
5590         * config/i386/i386gnu.mh: Likewise.
5591         * config/i386/i386sol2.mh: Likewise.
5592         * config/i386/linux.mh: Likewise.
5593         * config/i386/linux64.mh: Likewise.
5594         * config/i386/mingw.mh: Likewise.
5595         * config/i386/mingw64.mh: Likewise.
5596         * config/i386/nbsd64.mh: Likewise.
5597         * config/i386/nbsdelf.mh: Likewise.
5598         * config/i386/nto.mh: Likewise.
5599         * config/i386/obsd.mh: Likewise.
5600         * config/i386/obsd64.mh: Likewise.
5601         * config/i386/sol2-64.mh: Likewise.
5602         * config/ia64/linux.mh: Likewise.
5603         * config/m32r/linux.mh: Likewise.
5604         * config/m68k/linux.mh: Likewise.
5605         * config/m68k/nbsdelf.mh: Likewise.
5606         * config/m68k/obsd.mh: Likewise.
5607         * config/m88k/obsd.mh: Likewise.
5608         * config/mips/fbsd.mh: Likewise.
5609         * config/mips/linux.mh: Likewise.
5610         * config/mips/nbsd.mh: Likewise.
5611         * config/mips/obsd64.mh: Likewise.
5612         * config/pa/linux.mh: Likewise.
5613         * config/pa/nbsd.mh: Likewise.
5614         * config/pa/obsd.mh: Likewise.
5615         * config/powerpc/aix.mh: Likewise.
5616         * config/powerpc/fbsd.mh: Likewise.
5617         * config/powerpc/linux.mh: Likewise.
5618         * config/powerpc/nbsd.mh: Likewise.
5619         * config/powerpc/obsd.mh: Likewise.
5620         * config/powerpc/ppc64-linux.mh: Likewise.
5621         * config/powerpc/spu-linux.mh: Likewise.
5622         * config/s390/linux.mh: Likewise.
5623         * config/sh/nbsd.mh: Likewise.
5624         * config/sparc/fbsd.mh: Likewise.
5625         * config/sparc/linux.mh: Likewise.
5626         * config/sparc/linux64.mh: Likewise.
5627         * config/sparc/nbsd64.mh: Likewise.
5628         * config/sparc/nbsdelf.mh: Likewise.
5629         * config/sparc/obsd64.mh: Likewise.
5630         * config/sparc/sol2.mh: Likewise.
5631         * config/tilegx/linux.mh: Likewise.
5632         * config/vax/nbsdelf.mh: Likewise.
5633         * config/vax/obsd.mh: Likewise.
5634         * config/xtensa/linux.mh: Likewise.
5635         * config/i386/i386gnu.mn: New file, with excerpts from
5636         "config/i386/i386gnu.mh".
5637         * configure: Regenerate.
5638         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
5639         *.mh files under "gdb/config".
5640         * configure.nat: New file, with contents from the
5641         "gdb/config/*/*.mh" files.
5642
5643 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
5644
5645         * btrace.c (btrace_clear): Free insn vector.
5646
5647 2017-05-05  Pedro Alves  <palves@redhat.com>
5648
5649         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
5650         * configure: Regenerate.
5651
5652 2017-05-04  Pedro Alves  <palves@redhat.com>
5653
5654         * Makefile.in (SFILES): Add progspace-and-thread.c.
5655         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
5656         (COMMON_OBS): Add progspace-and-thread.o.
5657         * breakpoint.c: Include "progspace-and-thread.h".
5658         (update_inserted_breakpoint_locations)
5659         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
5660         Use scoped_restore_current_pspace_and_thread.
5661         (create_std_terminate_master_breakpoint): Use
5662         scoped_restore_current_program_space.
5663         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
5664         (print_breakpoint_location): Use
5665         scoped_restore_current_program_space.
5666         (bp_loc_is_permanent): Use
5667         scoped_restore_current_pspace_and_thread.
5668         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
5669         (download_tracepoint_locations): Use
5670         scoped_restore_current_pspace_and_thread.
5671         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
5672         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
5673         (enum step_over_calls_kind): Moved from inferior.h.
5674         (class scoped_restore_current_thread): New class.
5675         * gdbthread.h (make_cleanup_restore_current_thread): Delete
5676         declaration.
5677         (scoped_restore_current_thread): New class.
5678         * infcmd.c: Include "common/gdb_optional.h".
5679         (continue_1, proceed_after_attach): Use
5680         scoped_restore_current_thread.
5681         (notice_new_inferior): Use scoped_restore_current_thread.
5682         * inferior.c: Include "progspace-and-thread.h".
5683         (restore_inferior, save_current_inferior): Delete.
5684         (add_inferior_command, clone_inferior_command): Use
5685         scoped_restore_current_pspace_and_thread.
5686         * inferior.h (scoped_restore_current_inferior): New class.
5687         * infrun.c: Include "progspace-and-thread.h" and
5688         "common/gdb_optional.h".
5689         (follow_fork_inferior): Use
5690         scoped_restore_current_pspace_and_thread.
5691         (scoped_restore_exited_inferior): New class.
5692         (handle_vfork_child_exec_or_exit): Use
5693         scoped_restore_exited_inferior,
5694         scoped_restore_current_pspace_and_thread,
5695         scoped_restore_current_thread and scoped_restore.
5696         (fetch_inferior_event): Use scoped_restore_current_thread.
5697         * linespec.c (decode_line_full, decode_line_1): Use
5698         scoped_restore_current_program_space.
5699         * mi/mi-main.c: Include "progspace-and-thread.h".
5700         (exec_continue): Use scoped_restore_current_thread.
5701         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
5702         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
5703         * proc-service.c (ps_pglobal_lookup): Use
5704         scoped_restore_current_program_space.
5705         * progspace-and-thread.c: New file.
5706         * progspace-and-thread.h: New file.
5707         * progspace.c (release_program_space, clone_program_space): Use
5708         scoped_restore_current_program_space.
5709         (restore_program_space, save_current_program_space)
5710         (save_current_space_and_thread): Delete.
5711         (switch_to_program_space_and_thread): Moved to
5712         progspace-and-thread.c.
5713         * progspace.h (save_current_program_space)
5714         (save_current_space_and_thread): Delete declarations.
5715         (scoped_restore_current_program_space): New class.
5716         * remote.c (remote_btrace_maybe_reopen): Use
5717         scoped_restore_current_thread.
5718         * symtab.c: Include "progspace-and-thread.h".
5719         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
5720         * thread.c (print_thread_info_1): Use
5721         scoped_restore_current_thread.
5722         (struct current_thread_cleanup): Delete.
5723         (do_restore_current_thread_cleanup)
5724         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
5725         (scoped_restore_current_thread::~scoped_restore_current_thread):
5726         ... this new dtor.
5727         (make_cleanup_restore_current_thread): Rename/convert to ...
5728         (scoped_restore_current_thread::scoped_restore_current_thread):
5729         ... this new ctor.
5730         (thread_apply_all_command): Use scoped_restore_current_thread.
5731         (thread_apply_command): Use scoped_restore_current_thread.
5732         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
5733         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
5734
5735 2017-05-04  Pedro Alves  <palves@redhat.com>
5736
5737         * thread.c (make_cleanup_restore_current_thread): Move
5738         find_thread_ptid call before the is_stopped call.  Assert that the
5739         thread is found.  Replace is_stopped call by checking the thread's
5740         state directly.  Remove unnecessary NULL-thread check.
5741
5742 2017-05-04  Pedro Alves  <palves@redhat.com>
5743
5744         * corelow.c (thread_section_name): New class.
5745         (get_core_register_section, get_core_siginfo): Use it.
5746
5747 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5748
5749         * corelow.c (sniff_core_bfd): Remove extra semicolon.
5750         (get_core_register_section): Remove xfree of NULL pointer.
5751
5752 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
5753
5754         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
5755         * regcache.c (regcache::raw_supply_zeroed): New function.
5756         * regcache.h (regcache::raw_supply_zeroed): New declaration.
5757
5758 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
5759
5760         * gdbarch.sh: Remove commented out definition of
5761         TARGET_CHAR_BIT.
5762         * gdbarch.h: Re-generate.
5763
5764 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
5765
5766         * configure: Regenerate.
5767
5768 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
5769
5770         * solib-target.c (solib_target_relocate_section_addresses):
5771         Remove num_section_bases, num_bases, segment_bases variables.
5772
5773 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
5774
5775         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
5776
5777 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
5778
5779         * solib-target.c: Include <vector>
5780         (struct lm_info_target) <~lm_info_target>: Remove.
5781         <segment_bases, section_bases>: Change type to
5782         std::vector<CORE_ADDR>.
5783         (library_list_start_segment, library_list_start_section,
5784         library_list_end_library,
5785         solib_target_relocate_section_addresses): Adjust.
5786
5787 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
5788
5789         * gdbarch.sh (software_single_step): Change return type to
5790         std::vector<CORE_ADDR>.
5791         * gdbarch.c, gdbarch.h: Re-generate.
5792         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
5793         Adjust.
5794         (arm_deal_with_atomic_sequence_raw): Adjust.
5795         (thumb_get_next_pcs_raw): Adjust.
5796         (arm_get_next_pcs_raw): Adjust.
5797         (arm_get_next_pcs): Adjust.
5798         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
5799         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
5800         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
5801         (alpha_software_single_step): Adjust.
5802         * alpha-tdep.h (alpha_software_single_step): Adjust.
5803         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
5804         * arm-tdep.c (arm_software_single_step): Adjust.
5805         (arm_breakpoint_kind_from_current_state): Adjust.
5806         * arm-tdep.h (arm_software_single_step): Adjust.
5807         * breakpoint.c (insert_single_step_breakpoint): Adjust.
5808         * cris-tdep.c (cris_software_single_step): Adjust.
5809         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
5810         (micromips_deal_with_atomic_sequence): Adjust.
5811         (deal_with_atomic_sequence): Adjust.
5812         (mips_software_single_step): Adjust.
5813         * mips-tdep.h (mips_software_single_step): Adjust.
5814         * moxie-tdep.c (moxie_software_single_step): Adjust.
5815         * nios2-tdep.c (nios2_software_single_step): Adjust.
5816         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
5817         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
5818         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
5819         * s390-linux-tdep.c (s390_software_single_step): Adjust.
5820         * sparc-tdep.c (sparc_software_single_step): Adjust.
5821         * spu-tdep.c (spu_software_single_step): Adjust.
5822         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
5823
5824 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
5825
5826         * gdbarch.sh: Use semi-colon as field separator instead of colon.
5827         * gdbarch.h: Re-generate.
5828
5829 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
5830
5831         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
5832         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
5833         * python/py-instruction.c, python/py-instruction.h: New file.
5834         * python/py-record.c: Add py-instruction.h include.
5835         (gdbpy_initialize_record): Make gdb.Instruction a super class of
5836         gdb.RecordInstruction.
5837         * python/python-internal.h: Add gdbpy_initialize_instruction
5838         declaration.
5839         * python/python.c (do_start_initialization): Add
5840         gdbpy_initialize_instruction.
5841
5842 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
5843
5844         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
5845         Remove.
5846         (btrace_func_from_recpy_func): New function.
5847         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
5848         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
5849         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
5850         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
5851         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
5852         Also, use new helper functions.
5853         (btpy_list_item): Use new helper functions.
5854         (recpy_bt_function_call_history): Use new type name.
5855         (btpy_call_getset): Remove.
5856         (gdbpy_initialize_btrace): Remove code to initialize
5857         gdb.BtraceFunctionCall.
5858         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
5859         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
5860         recpy_bt_func_prev, recpy_bt_func_next): New export.
5861         * python/py-record.c (recpy_func_type): New static object.
5862         (recpy_func_new, recpy_func_level, recpy_func_symbol,
5863         recpy_func_instructions, recpy_func_up, recpy_func_prev,
5864         recpy_func_next): New function.
5865         (recpy_element_hash, recpy_element_richcompare): Updated comment.
5866         (recpy_func_getset): New static object.
5867         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
5868         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
5869
5870 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
5871
5872         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
5873         (btpy_object, btpy_insn_type, btpy_new): Remove.
5874         (btpy_list_object): Use gdb.RecordInstruction type instead of
5875         gdb.BtraceInstruction type.
5876         (btrace_insn_from_recpy_insn): New function.
5877         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
5878         btpy_new.
5879         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
5880         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
5881         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
5882         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
5883         instead of btpy_object.
5884         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
5885         btpy_insn_data, btpy_insn_decode): Rename to ...
5886         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
5887         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
5888         recpy_bt_insn_decode): This.  Also, use new helper functions.
5889         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
5890         recpy_insn_type.
5891         (btpy_insn_getset): Remove.
5892         (gdbpy_initialize_btrace): Remove code to initialize
5893         gdb.BtraceInstruction.  Use recpy_element_object.
5894         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
5895         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
5896         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
5897         * python/py-record.c (recpy_insn_type): New static object.
5898         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
5899         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
5900         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
5901         New function.
5902         (recpy_insn_getset): New static object.
5903         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
5904         * python/py-record.h (recpy_element_object): New typedef.
5905         (recpy_insn_type, recpy_insn_new): New export.
5906
5907 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
5908
5909         * py-record-btrace.c (btpy_insn_new): Removed.
5910         (btpy_insn_or_gap_new): New function.
5911         (btpy_insn_error): Removed.
5912         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
5913         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
5914         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
5915         btpy_insn_or_gap_new instead of btpy_insn_new.
5916         (btpy_insn_getset): Remove btpy_insn_error.
5917         * py-record.c (recpy_gap_type): New static object.
5918         (recpy_gap_object): New typedef.
5919         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
5920         recpy_gap_reason_string): New function.
5921         (recpy_gap_getset): New static object.
5922         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
5923         * py-record.h (recpy_gap_new): New export.
5924
5925 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
5926
5927         * python/py-record.c (recpy_ptid): Remove.
5928         (recpy_record_getset): Remove recpy_ptid.
5929
5930 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
5931
5932         * btrace.c (btrace_fetch): Set inferior_ptid.
5933         * python/py-record-btrace.c: Add "py-record.h" include.
5934         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
5935         recpy_bt_end, recpy_bt_instruction_history,
5936         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
5937         in gdb.Record object instead of current ptid.
5938         * python/py-record.c: Include new "py-record.h" file.
5939         (recpy_record_object): Moved to py-record.h.
5940         * python/py-record.h: New file.
5941
5942 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
5943
5944         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
5945         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
5946         indentation.
5947
5948 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
5949
5950         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
5951         the past maintainers section.
5952
5953 2017-04-28  Yao Qi  <yao.qi@linaro.org>
5954
5955         * infcmd.c (get_return_value): Use regcache ctor, and remove
5956         cleanup.
5957
5958 2017-04-28  Yao Qi  <yao.qi@linaro.org>
5959             Pedro Alves  <palves@redhat.com>
5960
5961         * regcache.c (regcache::regcache): New tag dispatch ctor.
5962         (do_cooked_read): Moved above.
5963         (regcache_dup): Use the tag dispatch ctor..
5964         * regcache.h (regcache): Declare ctor, delete copy ctor and
5965         assignment operator, remove friend regcache_dup.
5966
5967 2017-04-28  Yao Qi  <yao.qi@linaro.org>
5968
5969         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
5970         call method save instead of regcache_cpy.
5971         * regcache.h (struct regcache): Make regcache_dup a friend.
5972
5973 2017-04-28  Yao Qi  <yao.qi@linaro.org>
5974
5975         * regcache.c (struct regcache): Move to regcache.h
5976         (regcache::arch): New method.
5977         (regcache_get_ptid): Update.
5978         (get_regcache_arch): Call arch method.
5979         (get_regcache_aspace): Call method aspace.
5980         (register_buffer): Change it to method.
5981         (regcache_save): Change it to regcache::save.
5982         (regcache_restore): Likewise.
5983         (regcache_cpy_no_passthrough): Remove the declaration.
5984         (regcache_cpy): Call methods restore and cpy_no_passthrough.
5985         (regcache_cpy_no_passthrough): Change it to method
5986         cpy_no_passthrough.
5987         (regcache_register_status): Change it to method
5988         get_register_status.
5989         (regcache_invalidate): Change it to method invalidate.
5990         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
5991         (regcache_raw_update): Change it to method raw_update.
5992         (regcache_raw_read): Likewise.
5993         (regcache_raw_read_signed): Likewise.
5994         (regcache_raw_read_unsigned): Likewise.
5995         (regcache_raw_write_signed): Likewise.
5996         (regcache_raw_write_unsigned): Likewise.
5997         (regcache_cooked_read): Likewise.
5998         (regcache_cooked_read_value): Likewise.
5999         (regcache_cooked_read_signed): Likewise.
6000         (regcache_cooked_read_unsigned): Likewise.
6001         (regcache_cooked_write_signed): Likewise.
6002         (regcache_cooked_write_unsigned): Likewise.
6003         (regcache_raw_set_cached_value): Likewise.
6004         (regcache_raw_write): Likewise.
6005         (regcache_cooked_write): Likewise.
6006         (regcache_xfer_part): Likewise.
6007         (regcache_raw_read_part): Likewise.
6008         (regcache_raw_write_part): Likewise.
6009         (regcache_cooked_read_part): Likewise.
6010         (regcache_cooked_write_part): Likewise.
6011         (regcache_raw_supply): Likewise.
6012         (regcache_raw_collect): Likewise.
6013         (regcache_transfer_regset): Likewise.
6014         (regcache_supply_regset): Likewise.
6015         (regcache_collect_regset): Likewise.
6016         (regcache_debug_print_register): Likewise.
6017         (enum regcache_dump_what): Move it to regcache.h.
6018         (regcache_dump): Change it to method dump.
6019         * regcache.h (enum regcache_dump_what): New.
6020         (class regcache): New.
6021         * target.c (target_fetch_registers): Call method
6022         debug_print_register.
6023         (target_store_registers): Likewise.
6024
6025 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
6026
6027         * windows-nat.c (struct lm_info_windows): Initialize field.
6028         (windows_make_so): Allocate lm_info_windows with new.
6029         (windows_free_so): Free lm_info_windows with delete.
6030
6031 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
6032
6033         * solib-darwin.c (struct lm_info_darwin): Initialize field.
6034         (darwin_current_sos): Allocate lm_info_darwin with new, remove
6035         cleanup.
6036         (darwin_free_so): Free lm_info_darwin with delete.
6037
6038 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
6039
6040         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
6041         <l_addr_p>: Change type to bool.
6042         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
6043         (svr4_free_so): Free lm_info_svr4 with delete.
6044         (svr4_copy_library_list): Replace memcpy with call to copy
6045         constructor.
6046         (library_list_start_library, svr4_default_sos): Allocate
6047         lm_info_svr4 with new.
6048
6049 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
6050
6051         * solib-target.c (struct lm_info_target): Add destructor,
6052         initialize fields.
6053         <name>: Change type to std::string.
6054         (library_list_start_library): Allocate lm_info_target with new.
6055         (solib_target_free_library_list): Free lm_info_target with
6056         delete.
6057         (solib_target_current_sos): Adapt to std::string.
6058         (solib_target_free_so): Free lm_info_target with delete.
6059
6060 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
6061
6062         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
6063         fields.
6064         (frv_current_sos): Allocate lm_info_frv with new.
6065         (frv_relocate_main_executable): Free lm_info_frv with delete,
6066         allocate with new.
6067         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
6068
6069 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
6070
6071         * solib-frv.c (struct lm_info_frv): Fix indentation.
6072
6073 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
6074
6075         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
6076         map field.
6077         (dsbt_current_sos): Allocate lm_info_dsbt with new.
6078         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
6079         and allocate with new.
6080         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
6081
6082 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
6083
6084         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
6085         <filename, member_name>: Change type to std::string.
6086         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
6087         (library_list_start_library): Allocate lm_info_aix with new.
6088         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
6089         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
6090         with copy constructor.
6091
6092 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
6093
6094         * solist.h (struct lm_info): Remove.
6095         (struct lm_info_base): New class.
6096         (struct so_list) <lm_info>: Change type to lm_info_base *.
6097         * nto-tdep.c (struct lm_info): Remove.
6098         (lm_addr): Adjust.
6099         * solib-aix.c (struct lm_info): Rename to ...
6100         (struct lm_info_aix): ... this.  Extend lm_info_base.
6101         (lm_info_p): Rename to ...
6102         (lm_info_aix_p): ... this, and adjust.
6103         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
6104         solib_aix_parse_libraries, library_list_start_library,
6105         solib_aix_free_library_list, solib_aix_parse_libraries,
6106         solib_aix_get_library_list,
6107         solib_aix_relocate_section_addresses, solib_aix_free_so,
6108         solib_aix_get_section_offsets,
6109         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
6110         Adjust.
6111         (struct solib_aix_inferior_data) <library_list>: Adjust.
6112         * solib-darwin.c (struct lm_info): Rename to ...
6113         (struct lm_info_darwin): ... this.  Extend lm_info_base.
6114         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
6115         * solib-dsbt.c (struct lm_info): Rename to ...
6116         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
6117         (struct dsbt_info) <main_executable_lm_info): Adjust.
6118         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
6119         dsbt_relocate_section_addresses): Adjust.
6120         * solib-frv.c (struct lm_info): Rename to ...
6121         (struct lm_info_frv): ... this.  Extend lm_info_base.
6122         (main_executable_lm_info): Adjust.
6123         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
6124         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
6125         find_canonical_descriptor_in_load_object,
6126         frv_fdpic_find_canonical_descriptor): Adjust.
6127         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
6128         to lm_info_svr4.
6129         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
6130         svr4_clear_so, svr4_copy_library_list,
6131         library_list_start_library, svr4_default_sos, svr4_read_so_list,
6132         svr4_current_sos, svr4_fetch_objfile_link_map,
6133         solist_update_incremental): Adjust.
6134         * solib-svr4.h (struct lm_info_svr4): Move here from
6135         solib-svr4.c.
6136         * solib-target.c (struct lm_info): Rename to ...
6137         (struct lm_info_target): ... this.  Extend lm_info_base.
6138         (lm_info_p): Rename to ...
6139         (lm_info_target_p): ... this.
6140         (solib_target_parse_libraries, library_list_start_segment,
6141         library_list_start_section, library_list_start_library,
6142         library_list_end_library, solib_target_free_library_list,
6143         solib_target_current_sos, solib_target_free_so,
6144         solib_target_relocate_section_addresses): Adjust.
6145         * windows-nat.c (struct lm_info): Rename to ...
6146         (struct lm_info_windows): ... this.  Extend lm_info_base.
6147         (windows_make_so, handle_load_dll, handle_unload_dll,
6148         windows_xfer_shared_libraries): Adjust.
6149
6150 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
6151
6152         * solib-darwin.c (struct darwin_so_list): Remove.
6153         (darwin_current_sos): Allocate an so_list object instead of a
6154         darwin_so_list, separately allocate an lm_info object.
6155         (darwin_free_so): Free lm_info.
6156
6157 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
6158
6159         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
6160         with fprintf_filtered.
6161
6162 2017-04-28  Yao Qi  <yao.qi@linaro.org>
6163
6164         * regcache.c (regcache::regcache): New function.
6165         (regcache::~regcache): New function.
6166         (regcache_xmalloc_1): Remove.
6167         (regcache_xmalloc): Call new regcache.
6168         (regcache_xfree): Call delete regcache.
6169         (get_thread_arch_aspace_regcache): Call new regcache.
6170
6171 2017-04-28  Yao Qi  <yao.qi@linaro.org>
6172
6173         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
6174         lwp instead of ptid_get_lwp.
6175
6176 2017-04-28  Yao Qi  <yao.qi@linaro.org>
6177
6178         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
6179         lwp_info instead of getting from inferior_ptid.
6180
6181 2017-04-27  Keith Seitz  <keiths@redhat.com>
6182
6183         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
6184         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
6185         (CV_CONVERSION_BADNESS): Define.
6186         (rank_one_type): Remove overly restrictive rvalue reference
6187         rank checks.
6188         Add cv-qualifier checks and subranks for type equality.
6189         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
6190         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
6191         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
6192
6193 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
6194
6195         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
6196         count when creating the object.
6197
6198 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
6199             Ulrich Weigand  <uweigand@de.ibm.com>
6200
6201         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
6202         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
6203         is used in AIX.
6204         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
6205         (process_xcoff_symbol): Likewise.
6206         (scan_xcoff_symtab): Likewise.
6207
6208 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
6209
6210         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
6211         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
6212         (ia64_access_reg): Use get_frame_register_unsigned.
6213         (ia64_access_rse_reg): Likewise.
6214         (ia64_libunwind_frame_prev_register): Likewise.
6215
6216 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
6217
6218         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
6219         * gdbarch.c: Regenerated.
6220         * gdbarch.h: Regenerated.
6221         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
6222         visibility external.
6223         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
6224         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
6225         (enum cfa_how_kind): Move to ...
6226         (struct dwarf2_frame_state_reg_info): Likewise.
6227         (struct dwarf2_frame_state): Likewise.
6228         * dwarf2-frame.h: ... here.
6229         (dwarf2_frame_state_alloc_regs): New declaration.
6230         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
6231         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
6232
6233 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
6234
6235         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
6236         regcache_raw_read_unsigned.
6237         (xtensa_pseudo_register_write): Likewise.
6238
6239 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
6240
6241         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
6242         (nds32_pseudo_register_write): Likewise.
6243
6244 2017-04-25  Yao Qi  <yao.qi@linaro.org>
6245
6246         * regcache.c (struct regcache) <readonly_p>: Change its type
6247         to bool.
6248         (regcache_xmalloc_1): Update parameter type and callers update.
6249
6250 2017-04-25  Yao Qi  <yao.qi@linaro.org>
6251
6252         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
6253         set_gdbarch_wchar_bit.
6254         * arm-tdep.c (arm_gdbarch_init): Likewise.
6255
6256 2017-04-25  Pedro Alves  <palves@redhat.com>
6257
6258         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
6259         (BothAreRelocatable, memcopy, memmove): Don't define.
6260         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
6261         macros.
6262
6263 2017-04-25  Pedro Alves  <palves@redhat.com>
6264
6265         * common/common-defs.h: Include "common/poison.h".
6266         * common/function-view.h: (Not, Or, Requires): Move to traits.h
6267         and adjust.
6268         * common/poison.h: New file.
6269         * common/traits.h: Include <type_traits>.
6270         (Not, Or, Requires): New, moved from common/function-view.h.
6271
6272 2017-04-25  Pedro Alves  <palves@redhat.com>
6273
6274         * breakpoint.h (struct breakpoint): In-class initialize all
6275         fields.  Make boolean fields "bool".
6276         * breakpoint.c (init_raw_breakpoint_without_location): Remove
6277         memset call and initializations no longer necessary.
6278
6279 2017-04-25  Pedro Alves  <palves@redhat.com>
6280
6281         * btrace.c (pt_btrace_insn_flags): Change parameter type to
6282         reference.
6283         (pt_btrace_insn): New function.
6284         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
6285
6286 2017-04-25  Pedro Alves  <palves@redhat.com>
6287
6288         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
6289         "base" field and inherit from "bp_location" instead.  Add
6290         non-default ctor.
6291         (allocate_location_exception): Use new non-default ctor.
6292         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
6293         (init_bp_location): Convert to ...
6294         (bp_location::bp_location): ... this new ctor, and remove memset
6295         call.
6296         (base_breakpoint_allocate_location): Use the new non-default ctor.
6297         * breakpoint.h (bp_location): Now a class.  Declare default and
6298         non-default ctors.  In-class initialize all members.
6299         (init_bp_location): Remove declaration.
6300
6301 2017-04-25  Pedro Alves  <palves@redhat.com>
6302
6303         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
6304         assignment operator.
6305
6306 2017-04-24  Yao Qi  <yao.qi@linaro.org>
6307
6308         * doublest.c (convert_doublest_to_floatformat): Call
6309         floatformat_totalsize_bytes.
6310
6311 2017-04-22  Tom Tromey  <tom@tromey.com>
6312
6313         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6314         ui_out_emit_list.
6315         * stack.c (print_frame): Use ui_out_emit_list.
6316         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6317         ui_out_emit_list.
6318         * mi/mi-main.c (print_one_inferior)
6319         (mi_cmd_data_list_register_names)
6320         (mi_cmd_data_list_register_values, mi_cmd_list_features)
6321         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
6322         ui_out_emit_list.
6323         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
6324         (mi_output_solib_attribs): Use ui_out_emit_list,
6325         ui_out_emit_tuple.
6326         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
6327         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
6328         (mi_cmd_stack_list_args, list_args_or_locals): Use
6329         ui_out_emit_list.
6330         * disasm.c (do_assembly_only): Use ui_out_emit_list.
6331         * breakpoint.c (print_solib_event, output_thread_groups): Use
6332         ui_out_emit_list.
6333
6334 2017-04-22  Tom Tromey  <tom@tromey.com>
6335
6336         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
6337         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
6338         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
6339
6340 2017-04-22  Tom Tromey  <tom@tromey.com>
6341
6342         * tracepoint.c (tvariables_info_1)
6343         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
6344
6345 2017-04-22  Tom Tromey  <tom@tromey.com>
6346
6347         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
6348         annotate_arg_emitter.
6349         * breakpoint.c (print_mention_watchpoint)
6350         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
6351         * annotate.h (struct annotate_arg_emitter): New.
6352
6353 2017-04-22  Tom Tromey  <tom@tromey.com>
6354
6355         * record-btrace.c (record_btrace_insn_history)
6356         (record_btrace_insn_history_range, record_btrace_call_history)
6357         (record_btrace_call_history_range): Use ui_out_emit_tuple.
6358         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
6359         ui_out_emit_tuple.
6360         * stack.c (print_frame_info): Use ui_out_emit_tuple.
6361         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
6362         * skip.c (skip_info): Use ui_out_emit_tuple.
6363         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
6364         * progspace.c (print_program_space): Use ui_out_emit_tuple.
6365         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
6366         * osdata.c (info_osdata): Use ui_out_emit_tuple.
6367         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6368         ui_out_emit_tuple.
6369         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
6370         (output_register, mi_cmd_data_read_memory)
6371         (mi_cmd_data_read_memory_bytes, mi_load_progress)
6372         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
6373         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
6374         Use ui_out_emit_tuple.
6375         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
6376         ui_out_emit_tuple.
6377         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
6378         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
6379         * linux-thread-db.c (info_auto_load_libthread_db): Use
6380         ui_out_emit_tuple.
6381         * inferior.c (print_inferior): Use ui_out_emit_tuple.
6382         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
6383         * disasm.c (do_mixed_source_and_assembly_deprecated)
6384         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
6385         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
6386         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
6387         * breakpoint.c (print_one_breakpoint_location)
6388         (print_one_breakpoint): Use ui_out_emit_tuple.
6389         * auto-load.c (print_script, info_auto_load_cmd): Use
6390         ui_out_emit_tuple.
6391         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
6392
6393 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
6394
6395         * thread.c (print_thread_info_1): Remove dead code.
6396
6397 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
6398
6399         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
6400         GDB_SELF_TEST.
6401         * arm-tdep.c (selftests::arm_record_test): Likewise.
6402
6403 2017-04-21  Yao Qi  <yao.qi@linaro.org>
6404
6405         * regcache.c (regcache_restore): Remove argument 2.  Replace
6406         argument 3 with regcache.  Get register status from
6407         src->register_status and get register contents from
6408         register_buffer (src, regnum).
6409         (regcache_cpy): Update.
6410
6411 2017-04-19  Pedro Alves  <palves@redhat.com>
6412
6413         * gdbthread.h (thread): Add missing closing parenthesis in
6414         comment.
6415
6416 2017-04-19  Pedro Alves  <palves@redhat.com>
6417
6418         * common/refcounted-object.h: New file.
6419         * gdbthread.h: Include "common/refcounted-object.h".
6420         (thread_info): Inherit from refcounted_object and add comments.
6421         (thread_info::incref, thread_info::decref)
6422         (thread_info::m_refcount): Delete.
6423         (thread_info::deletable): Use the refcounted_object::refcount()
6424         method.
6425         * inferior.c (current_inferior_): Add comment.
6426         (set_current_inferior): Increment/decrement refcounts.
6427         (prune_inferiors, remove_inferior_command): Skip inferiors marked
6428         not-deletable instead of comparing with the current inferior.
6429         (initialize_inferiors): Increment the initial inferior's refcount.
6430         * inferior.h (struct inferior): Forward declare.
6431         Include "common/refcounted-object.h".
6432         (current_inferior, set_current_inferior): Move declaration to
6433         before struct inferior's definition, and fix comment.
6434         (inferior): Inherit from refcounted_object.  Add comments.
6435         * thread.c (switch_to_thread_no_regs): Reference the thread's
6436         inferior pointer directly instead of doing a ptid lookup.
6437         (switch_to_no_thread): New function.
6438         (switch_to_thread(thread_info *)): New function, factored out
6439         from ...
6440         (switch_to_thread(ptid_t)): ... this.
6441         (restore_current_thread): Delete.
6442         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
6443         fields, and add 'inf' field.
6444         (do_restore_current_thread_cleanup): Check whether old->inf is
6445         alive instead of looking up an inferior by ptid.  Use
6446         switch_to_thread and switch_to_no_thread.
6447         (restore_current_thread_cleanup_dtor): Use old->inf directly
6448         instead of lookup up an inferior by id.  Decref the inferior.
6449         Don't restore 'removable'.
6450         (make_cleanup_restore_current_thread): Same the inferior pointer
6451         in old, instead of the inferior number.  Incref the inferior.
6452         Don't save/clear 'removable'.
6453
6454 2017-04-19  Pedro Alves  <palves@redhat.com>
6455
6456         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6457         unittests/scoped_restore-selftests.c.
6458         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
6459         * common/scoped_restore.h (scoped_restore_base): Make "class".
6460         (scoped_restore_base::release): New public method.
6461         (scoped_restore_base::scoped_restore_base): New protected ctor.
6462         (scoped_restore_base::m_saved_var): New protected field.
6463         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
6464         scoped_restore_base base class instead of m_saved_var directly.
6465         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
6466         (scoped_restore_tmpl::scoped_restore_tmpl(const
6467         scoped_restore_tmpl<T>&)): Likewise.
6468         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
6469         method.
6470         (scoped_restore_tmpl::saved_var): New method.
6471         (scoped_restore_tmpl::m_saved_var): Delete.
6472         * inferior.h (inferior::detaching): Now a bool.
6473         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
6474         cleanup.
6475         * unittests/scoped_restore-selftests.c: New file.
6476
6477 2017-04-19  Pedro Alves  <palves@redhat.com>
6478
6479         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
6480         Re-sort in alphabetic order.
6481
6482 2017-04-18  Pedro Alves  <palves@redhat.com>
6483
6484         * xml-support.c (obstack_xml_printf): Delete.
6485         * xml-support.h (obstack_xml_printf): Delete.
6486
6487 2017-04-18  Pedro Alves  <palves@redhat.com>
6488
6489         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
6490         vdebug, verror, body_text, start_element, end_element, name,
6491         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
6492         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
6493         is_xinclude>: Make private and add m_ prefix.
6494         (gdb_xml_parser::body_text): New method, based on ...
6495         (gdb_xml_body_text): ... this.  Adjust.
6496         (gdb_xml_parser::vdebug): New method, based on ...
6497         (gdb_xml_debug): ... this.  Adjust.
6498         (gdb_xml_parser::verror): New method, based on ...
6499         (gdb_xml_error): ... this.  Adjust.
6500         (gdb_xml_parser::start_element): New method, based on ...
6501         (gdb_xml_start_element): ... this.  Adjust.
6502         (gdb_xml_start_element_wrapper): Defer to
6503         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
6504         (gdb_xml_parser::end_element): New method, based on ...
6505         (gdb_xml_end_element_wrapper): ... this.  Adjust.
6506         (gdb_xml_parser::~gdb_xml_parser): Adjust.
6507         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
6508         (gdb_xml_parser::use_dtd): New method, based on ...
6509         (gdb_xml_use_dtd): ... this.  Adjust.
6510         (gdb_xml_parser::parse): New method, based on ...
6511         (gdb_xml_parse): ... this.  Adjust.
6512         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
6513         (xinclude_start_include): Adjust to call the parser's name method.
6514         (xml_xinclude_default, xml_xinclude_start_doctype)
6515         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
6516         method.
6517         (xml_process_xincludes): Adjust to call parser methods.
6518         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
6519         declarations.
6520
6521 2017-04-18  Pedro Alves  <palves@redhat.com>
6522
6523         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
6524         gdb::optional<std::string>.
6525         * xml-support.c: Include <string>.
6526         (scope_level::scope_level(scope_level &&))
6527         (scope_level::~scope_level): Delete.
6528         (scope_level::body): Now a std::string.
6529         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
6530         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
6531         parameter.
6532         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
6533         (xinclude_parsing_data::output): Now a std::string reference.
6534         (xinclude_start_include): Adjust.
6535         (xml_xinclude_default): Adjust.
6536         (xml_process_xincludes): Add 'output' parameter, and return bool.
6537         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
6538         and return bool.
6539         * xml-tdesc.c: Include <unordered_map> and <string>.
6540         (tdesc_xml_cache): Delete.
6541         (tdesc_xml_cache_s): Delete.
6542         (xml_cache): Now an std::unordered_map.
6543         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
6544         (target_fetch_description_xml): Change return type to
6545         gdb::optional<std::string>, and adjust.
6546         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
6547         (target_fetch_description_xml): Change return type to
6548         gdb::optional<std::string>.
6549
6550 2017-04-18  Pedro Alves  <palves@redhat.com>
6551
6552         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6553         unittests/optional-selftests.c.
6554         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
6555         * unittests/optional-selftests.c: New file.
6556         * unittests/optional/assignment/1.cc: New file.
6557         * unittests/optional/assignment/2.cc: New file.
6558         * unittests/optional/assignment/3.cc: New file.
6559         * unittests/optional/assignment/4.cc: New file.
6560         * unittests/optional/assignment/5.cc: New file.
6561         * unittests/optional/assignment/6.cc: New file.
6562         * unittests/optional/assignment/7.cc: New file.
6563         * unittests/optional/cons/copy.cc: New file.
6564         * unittests/optional/cons/default.cc: New file.
6565         * unittests/optional/cons/move.cc: New file.
6566         * unittests/optional/cons/value.cc: New file.
6567         * unittests/optional/in_place.cc: New file.
6568         * unittests/optional/observers/1.cc: New file.
6569         * unittests/optional/observers/2.cc: New file.
6570
6571 2017-04-18  Pedro Alves  <palves@redhat.com>
6572
6573         * common/gdb_optional.h: Include common/traits.h.
6574         (in_place_t): New type.
6575         (in_place): New constexpr variable.
6576         (optional::optional): Remove member initialization of
6577         m_instantiated.
6578         (optional::optional(in_place_t...)): New constructor.
6579         (optional::~optional): Use reset.
6580         (optional::optional(const optional&)): New.
6581         (optional::optional(const optional&&)): New.
6582         (optional::optional(T &)): New.
6583         (optional::optional(T &&)): New.
6584         (operator::operator=(const optional &)): New.
6585         (operator::operator=(optional &&)): New.
6586         (operator::operator= (const T &))
6587         (operator::operator= (T &&))
6588         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
6589         (operator::reset): New.
6590         (operator::m_instantiated):: Add in-class initializer.
6591         * common/traits.h: Include <type_traits>.
6592         (struct And): New types.
6593
6594 2017-04-18  Pedro Alves  <palves@redhat.com>
6595
6596         * xml-support.c: Include <vector>.
6597         (scope_level::scope_level(const gdb_xml_element *))
6598         (scope_level::scope_level(scope_level&&)): New.
6599         (scope_level::~scope_level): New.
6600         (scope_level_s): Delete.
6601         (gdb_xml_parser::scopes): Now a std::vector.
6602         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
6603         Use std::vector.
6604         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
6605         scope cleanup code.
6606         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
6607         of the scopes member.  Use std::vector::emplace_back.
6608
6609 2017-04-18  Pedro Alves  <palves@redhat.com>
6610
6611         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
6612         a bool.
6613         (gdb_xml_end_element): Change type of first parameter.
6614         (gdb_xml_cleanup): Rename to ...
6615         (gdb_xml_parser::~gdb_xml_parser): ... this.
6616         (gdb_xml_create_parser_and_cleanup): Delete with ...
6617         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
6618         to this new ctor.
6619         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
6620         using gdb_xml_create_parser_and_cleanup.
6621         (xinclude_parsing_data): Add ctor/dtor.
6622         (xml_xinclude_cleanup): Delete.
6623         (xml_process_xincludes): Create a local xinclude_parsing_data
6624         instead of heap-allocating one.  Create a local gdb_xml_parser
6625         instead of heap-allocating one with
6626         gdb_xml_create_parser_and_cleanup.
6627
6628 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
6629
6630         PR threads/20743
6631         * fbsd-nat.c (resume_one_thread_cb): Remove.
6632         (resume_all_threads_cb): Remove.
6633         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
6634         iterate_over_threads.
6635
6636 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
6637
6638         * NEWS: Create a new section for the next release branch.
6639         Rename the section of the current branch, now that it has
6640         been cut.
6641
6642 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
6643
6644         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
6645         * version.in: Bump version to 8.0.50.DATE-git.
6646
6647 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
6648
6649         PR gdb/21385
6650         * windows-nat.c (windows_create_inferior): Declare 'allargs'
6651         independently of the host, and fix build breakage on Cygwin.
6652
6653 2017-04-13  Pedro Alves  <palves@redhat.com>
6654
6655         * inferior.c (free_inferior): Convert to ...
6656         (inferior::~inferior): ... this dtor.
6657         (inferior::inferior): New ctor, factored out from ...
6658         (add_inferior_silent): ... here.  Allocate the inferior with a new
6659         expression.
6660         (delete_inferior): Call delete instead of free_inferior.
6661         * inferior.h (gdb_environ, continuation): Forward declare.
6662         (inferior): Now a class.  Add in-class initialization to all
6663         members.  Make boolean fields bool, except 'detaching'.
6664         (inferior::inferior): New explicit ctor.
6665         (inferior::~inferior): New.
6666
6667 2017-04-13  Pedro Alves  <palves@redhat.com>
6668
6669         * inferior.c (init_inferior_list): Delete.
6670         * inferior.h (init_inferior_list): Delete.
6671
6672 2017-04-13  Pedro Alves  <palves@redhat.com>
6673
6674         PR threads/13217
6675         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
6676         (top level): Call it twice, with different thread sets.
6677
6678 2017-04-13  Pedro Alves  <palves@redhat.com>
6679
6680         * thread.c: Include <algorithm>.
6681         (thread_array_cleanup): Delete.
6682         (scoped_inc_dec_ref): New class.
6683         (live_threads_count): New function.
6684         (set_thread_refcount): Delete.
6685         (tp_array_compar_ascending): Now a bool.
6686         (tp_array_compar): Convert to a std::sort comparison function.
6687         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
6688         and live_threads_count.
6689
6690 2017-04-13  Pedro Alves  <palves@redhat.com>
6691
6692         * infrun.c (follow_fork_inferior): Also switch the current
6693         inferior.
6694
6695 2017-04-13  Pedro Alves  <palves@redhat.com>
6696
6697         * breakpoint.c (watch_command_1): Save watchpoint-frame info
6698         before calling create_internal_breakpoint.
6699
6700 2017-04-13  Pedro Alves  <palves@redhat.com>
6701
6702         * fork-child.c (execv_argv): New class.
6703         (breakup_args): Refactored as ...
6704         (execv_argv::init_for_no_shell): .. this method of execv_argv.
6705         Copy arguments to storage and replace separators with NULL
6706         terminators in place.
6707         (escape_bang_in_quoted_argument): Adjust to return bool.
6708         (execv_argv::execv_argv): New ctor.
6709         (execv_argv::init_for_shell): New method, factored out from
6710         fork_inferior.  Don't strdup strings into the vector.
6711         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
6712         Remove free_vector_argv call.
6713
6714 2017-04-13  Yao Qi  <yao.qi@linaro.org>
6715
6716         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
6717         tdep->rx_psw_type.
6718
6719 2017-04-13  Yao Qi  <yao.qi@linaro.org>
6720
6721         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
6722         * rx-tdep.c (rx_gdbarch_init): Likewise.
6723
6724 2017-04-13  Pedro Alves  <palves@redhat.com>
6725
6726         * breakpoint.h (struct breakpoint): Reindent.
6727
6728 2017-04-13  Pedro Alves  <palves@redhat.com>
6729
6730         * breakpoint.c (bp_location): Rename to ...
6731         (bp_locations): ... this.  All references updated.
6732         (bp_location_count): Rename to ...
6733         (bp_locations_count): ... this.  All references updated.
6734         (bp_location_placed_address_before_address_max): Rename to ...
6735         (bp_locations_placed_address_before_address_max): ... this.  All
6736         references updated.
6737         (bp_location_shadow_len_after_address_max): Rename to ...
6738         (bp_locations_shadow_len_after_address_max): ... this.  All
6739         references updated.
6740         (bp_location_compare_addrs): Rename to ...
6741         (bp_locations_compare_addrs): ... this.  All references updated.
6742         (bp_location_compare):Rename to ...
6743         (bp_locations_compare): ... this.  All references updated.
6744         (bp_location_target_extensions_update): Rename to ...
6745         (bp_locations_target_extensions_update): ... this.  All references
6746         updated.
6747
6748 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
6749
6750         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
6751         * common/common.m4: Check headers 'termios.h', 'termio.h' and
6752         'sgtty.h'.
6753         * common/gdb_termios.h: New file, with parts of "terminal.h".
6754         * inflow.c: Include "gdb_termios.h".
6755         * ser-unix.c: Include "gdb_termios.h".
6756         * terminal.h: Move terminal-related defines to
6757         "common/gdb_termios.h".
6758
6759 2017-04-12  Tom Tromey  <tom@tromey.com>
6760
6761         * probe.c (parse_probes): Update.
6762         * location.h (delete_event_location): Don't declare.
6763         (event_location_deleter::operator()): Update.
6764         * location.c (event_location_deleter::operator()): Rename from
6765         delete_event_location.
6766         * linespec.h (linespec_result) <location>: Change type to
6767         event_location_up.
6768         * linespec.c (canonicalize_linespec, event_location_to_sals)
6769         (decode_objc): Update.
6770         (linespec_result): Don't call delete_event_location.
6771         * breakpoint.c (create_breakpoints_sal)
6772         (bkpt_probe_create_sals_from_location)
6773         (strace_marker_create_sals_from_location): Update.
6774
6775 2017-04-12  Tom Tromey  <tom@tromey.com>
6776
6777         * linespec.h (struct linespec_result): Add constructor and
6778         destructor.
6779         (init_linespec_result, destroy_linespec_result)
6780         (make_cleanup_destroy_linespec_result): Don't declare.
6781         * linespec.c (init_linespec_result): Remove.
6782         (linespec_result::~linespec_result): Rename from
6783         destroy_linespec_result.  Update.
6784         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
6785         Remove.
6786         * breakpoint.c (create_breakpoint, break_range_command)
6787         (decode_location_default): Update.
6788         * ax-gdb.c (agent_command_1): Update.
6789
6790 2017-04-12  Tom Tromey  <tom@tromey.com>
6791
6792         * remote.c (remote_download_tracepoint): Update.
6793         * python/py-breakpoint.c (bppy_get_location): Update.
6794         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
6795         (gdbscm_breakpoint_location): Update.
6796         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
6797         * breakpoint.h (struct breakpoint) <location, location_range_end>:
6798         Change type to event_location_up.
6799         * breakpoint.c (create_overlay_event_breakpoint)
6800         (create_longjmp_master_breakpoint)
6801         (create_std_terminate_master_breakpoint)
6802         (create_exception_master_breakpoint)
6803         (breakpoint_event_location_empty_p, print_breakpoint_location)
6804         (print_one_breakpoint_location, create_thread_event_breakpoint)
6805         (init_breakpoint_sal, create_breakpoint)
6806         (print_recreate_ranged_breakpoint, break_range_command)
6807         (init_ada_exception_breakpoint, say_where): Update.
6808         (base_breakpoint_dtor): Don't call delete_event_location.
6809         (bkpt_print_recreate, tracepoint_print_recreate)
6810         (dprintf_print_recreate, update_static_tracepoint)
6811         (breakpoint_re_set_default): Update.
6812
6813 2017-04-12  Tom Tromey  <tom@tromey.com>
6814
6815         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
6816         type of "to_do".  Update.
6817         (compute_stack_depth): Use std::vector.
6818
6819 2017-04-12  Tom Tromey  <tom@tromey.com>
6820
6821         * printcmd.c (find_instruction_backward): Use std::vector.
6822
6823 2017-04-12  Tom Tromey  <tom@tromey.com>
6824
6825         * symfile.c (objfilep): Remove typedef.
6826         (reread_symbols): Use a std::vector.
6827
6828 2017-04-12  Tom Tromey  <tom@tromey.com>
6829
6830         * mi/mi-main.c (exec_direction_forward): Remove.
6831         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
6832         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6833         scoped_restore.
6834         * guile/guile.c (guile_repl_command, guile_command)
6835         (gdbscm_execute_gdb_command): Use scoped_restore.
6836         * go-exp.y (go_parse): Use scoped_restore.
6837         * d-exp.y (d_parse): Use scoped_restore.
6838         * cli/cli-decode.c (cmd_func): Use scoped_restore.
6839         * c-exp.y (c_parse): Use scoped_restore.
6840
6841 2017-04-12  Tom Tromey  <tom@tromey.com>
6842
6843         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
6844         (mi_parse): Update return type.
6845         (mi_parse_free): Remove.
6846         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
6847         (mi_parse::~mi_parse): Rename from mi_parse_free.
6848         (mi_parse_cleanup): Remove.
6849         (mi_parse): Return a unique_ptr.  Use new.
6850         * mi/mi-main.c (mi_execute_command): Update.
6851
6852 2017-04-12  Tom Tromey  <tom@tromey.com>
6853
6854         * location.c (explicit_location_lex_one): Return a
6855         unique_xmalloc_ptr.
6856         (string_to_explicit_location): Update.  Remove cleanups.
6857
6858 2017-04-12  Tom Tromey  <tom@tromey.com>
6859
6860         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
6861         (compare_value_and_voffset): Change type.  Update.
6862         (compute_vtable_size): Change type of "offset_vec".
6863         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
6864         (gnuv3_get_typeid): Remove extraneous declaration.
6865
6866 2017-04-12  Tom Tromey  <tom@tromey.com>
6867
6868         * charset.h (wchar_iterator): Fix comment.
6869
6870 2017-04-12  Tom Tromey  <tom@tromey.com>
6871
6872         * charset.c (iconv_wrapper): New class.
6873         (cleanup_iconv): Remove.
6874         (convert_between_encodings): Use it.
6875
6876 2017-04-12  Tom Tromey  <tom@tromey.com>
6877
6878         * symfile.h (increment_reading_symtab): Update type.
6879         * symfile.c (decrement_reading_symtab): Remove.
6880         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
6881         * psymtab.c (psymtab_to_symtab): Update.
6882         * dwarf2read.c (dw2_instantiate_symtab): Update.
6883
6884 2017-04-12  Tom Tromey  <tom@tromey.com>
6885
6886         * jit.c (struct jit_reader): Declare separately.  Add constructor
6887         and destructor.  Change type of "handle".
6888         (loaded_jit_reader): Define separately.
6889         (jit_reader_load): Update.  New "new".
6890         (jit_reader_unload_command): Use "delete".
6891         * gdb-dlfcn.h (struct dlclose_deleter): New.
6892         (gdb_dlhandle_up): New typedef.
6893         (gdb_dlopen, gdb_dlsym): Update types.
6894         (gdb_dlclose): Remove.
6895         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
6896         (gdb_dlsym): Change type of "handle".
6897         (make_cleanup_dlclose): Remove.
6898         (dlclose_deleter::operator()): Rename from gdb_dlclose.
6899         * compile/compile-c-support.c (load_libcc): Update.
6900
6901 2017-04-12  Tom Tromey  <tom@tromey.com>
6902
6903         * symtab.h (find_pcs_for_symtab_line): Change return type.
6904         * symtab.c (find_pcs_for_symtab_line): Change return type.
6905         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
6906         type of "vec".  Update.
6907         (ltpy_get_pcs_for_line): Update.
6908         * linespec.c (decode_digits_ordinary): Update.
6909
6910 2017-04-12  Tom Tromey  <tom@tromey.com>
6911
6912         * tracepoint.c (actions_command): Update.
6913         * python/python.c (python_command, python_interactive_command):
6914         Update.
6915         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6916         * guile/guile.c (guile_command): Update.
6917         * defs.h (read_command_lines, read_command_lines_1): Return
6918         command_line_up.
6919         (command_lines_deleter): New struct.
6920         (command_line_up): New typedef.
6921         * compile/compile.c (compile_code_command)
6922         (compile_print_command): Update.
6923         * cli/cli-script.h (get_command_line, copy_command_lines): Return
6924         command_line_up.
6925         (make_cleanup_free_command_lines): Remove.
6926         * cli/cli-script.c (get_command_line, read_command_lines_1)
6927         (copy_command_lines): Return command_line_up.
6928         (while_command, if_command, read_command_lines, define_command)
6929         (document_command): Update.
6930         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
6931         Remove.
6932         * breakpoint.h (breakpoint_set_commands): Change type of
6933         "commands".
6934         * breakpoint.c (breakpoint_set_commands): Change type of
6935         "commands".  Update.
6936         (do_map_commands_command, update_dprintf_command_list)
6937         (create_tracepoint_from_upload): Update.
6938
6939 2017-04-12  Tom Tromey  <tom@tromey.com>
6940
6941         * tracepoint.c (scope_info): Update.
6942         * spu-tdep.c (spu_catch_start): Update.
6943         * python/python.c (gdbpy_decode_line): Update.
6944         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
6945         * python/py-breakpoint.c (bppy_init): Update.
6946         * probe.c (parse_probes): Update.
6947         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
6948         * location.h (event_location_deleter): New struct.
6949         (event_location_up): New typedef.
6950         (new_linespec_location, new_address_location, new_probe_location)
6951         (new_explicit_location, copy_event_location)
6952         (string_to_event_location, string_to_event_location_basic)
6953         (string_to_explicit_location): Update return type.
6954         (make_cleanup_delete_event_location): Remove.
6955         * location.c (new_linespec_location, new_address_location)
6956         (new_probe_location, new_explicit_location, copy_event_location):
6957         Return event_location_up.
6958         (delete_event_location_cleanup)
6959         (make_cleanup_delete_event_location): Remove.
6960         (string_to_explicit_location, string_to_event_location_basic)
6961         (string_to_event_location): Return event_location_up.
6962         * linespec.c (canonicalize_linespec, event_location_to_sals)
6963         (decode_line_with_current_source)
6964         (decode_line_with_last_displayed, decode_objc): Update.
6965         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
6966         * completer.c (location_completer): Update.
6967         * cli/cli-cmds.c (edit_command, list_command): Update.
6968         * breakpoint.c (create_overlay_event_breakpoint)
6969         (create_longjmp_master_breakpoint)
6970         (create_std_terminate_master_breakpoint)
6971         (create_exception_master_breakpoint)
6972         (create_thread_event_breakpoint): Update.
6973         (init_breakpoint_sal): Update.  Remove some dead code.
6974         (create_breakpoint_sal): Change type of "location".  Update.
6975         (create_breakpoints_sal, create_breakpoint, break_command_1)
6976         (dprintf_command, break_range_command, until_break_command)
6977         (init_ada_exception_breakpoint)
6978         (strace_marker_create_sals_from_location)
6979         (update_static_tracepoint, trace_command, ftrace_command)
6980         (strace_command, create_tracepoint_from_upload): Update.
6981         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6982         * ax-gdb.c (agent_command_1): Update.
6983
6984 2017-04-12  Pedro Alves  <palves@redhat.com>
6985
6986         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
6987         * configure.tgt: Handle i[34567]86-*-go32* and
6988         i[34567]86-*-msdosdjgpp*.
6989         * i386-tdep.c (i386_svr4_reg_to_regnum):
6990         Make extern.
6991         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
6992         i386-go32-tdep.c.
6993         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
6994         * i386-go32-tdep.c: New file.
6995         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
6996         declarations.
6997
6998 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
6999
7000         * aix-thread.c (pd_status2str): Change return type to const char *.
7001
7002 2017-04-12  Pedro Alves  <palves@redhat.com>
7003
7004         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
7005         calls to set_gdbarch_gnu_triplet_regexp.
7006
7007 2017-04-12  Pedro Alves  <palves@redhat.com>
7008
7009         PR gdb/21323
7010         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
7011         New enum value.
7012         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
7013         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
7014         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
7015         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
7016         * gdbarch.h, gdbarch.c: Regenerate.
7017         * aarch64-tdep.c (aarch64_gdbarch_init): Override
7018         gdbarch_wchar_bit and gdbarch_wchar_signed.
7019         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
7020         * arm-tdep.c (arm_gdbarch_init): Likewise.
7021         * avr-tdep.c (avr_gdbarch_init): Likewise.
7022         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
7023         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
7024         * i386-tdep.c (i386_go32_init_abi): Likewise.
7025         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7026         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7027         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7028         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7029         * sh-tdep.c (sh_gdbarch_init): Likewise.
7030         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7031         * sparc64-tdep.c (sparc64_init_abi): Likewise.
7032         * windows-tdep.c (windows_init_abi): Likewise.
7033         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7034
7035 2017-04-12  Pedro Alves  <palves@redhat.com>
7036
7037         PR c++/21323
7038         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
7039         cplus_primitive_type_char32_t>: New enum values.
7040         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
7041         and cplus_primitive_type_char32_t.
7042         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
7043         32, use the archtecture's built-in type for char16_t and char32_t,
7044         respectively.  Otherwise, fallback to init_integer_type as before,
7045         but make the type unsigned, and issue a complaint.
7046         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
7047
7048 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
7049
7050         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
7051         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
7052
7053 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
7054
7055         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
7056         'const char *'.
7057
7058 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
7059
7060         * common/common-utils.c (free_vector_argv): New function.
7061         * common/common-utils.h: Include <vector>.
7062         (free_vector_argv): New prototype.
7063         * darwin-nat.c (darwin_create_inferior): Rewrite function
7064         prototype in order to constify "exec_file" and accept a
7065         "std::string" for "allargs".
7066         * fork-child.c: Include <vector>.
7067         (breakup_args): Rewrite function, using C++.
7068         (fork_inferior): Rewrite function header, constify "exec_file_arg"
7069         and accept "std::string" for "allargs".  Update the code to
7070         calculate "argv" based on "allargs".  Update calls to "exec_fun"
7071         and "execvp".
7072         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
7073         order to constify "exec_file" and accept a "std::string" for
7074         "allargs".
7075         * go32-nat.c (go32_create_inferior): Likewise.
7076         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
7077         * infcmd.c (run_command_1): Constify "exec_file".  Use
7078         "std::string" for inferior arguments.
7079         * inferior.h (fork_inferior): Update prototype.
7080         * linux-nat.c (linux_nat_create_inferior): Rewrite function
7081         prototype in order to constify "exec_file" and accept a
7082         "std::string" for "allargs".
7083         * nto-procfs.c (procfs_create_inferior): Likewise.
7084         * procfs.c (procfs_create_inferior): Likewise.
7085         * remote-sim.c (gdbsim_create_inferior): Likewise.
7086         * remote.c (extended_remote_run): Update code to accept
7087         "std::string" as argument.
7088         (extended_remote_create_inferior): Rewrite function prototype in
7089         order to constify "exec_file" and accept a "std::string" for
7090         "allargs".
7091         * rs6000-nat.c (super_create_inferior): Likewise.
7092         (rs6000_create_inferior): Likewise.
7093         * target.h (struct target_ops) <to_create_inferior>: Likewise.
7094         * windows-nat.c (windows_create_inferior): Likewise.
7095
7096 2017-04-11  Pedro Alves  <palves@redhat.com>
7097
7098         * thread.c: Fix whitespace throughout.
7099
7100 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
7101
7102         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
7103
7104 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
7105
7106         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
7107
7108 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
7109
7110         PR gdb/21364
7111         * osdata.c (info_osdata): Check if 'type' is an empty string
7112         instead of NULL.
7113
7114 2017-04-10  Pedro Alves  <palves@redhat.com>
7115
7116         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
7117         (ptid_to_global_thread_id, in_thread_list)
7118         (do_captured_list_thread_ids, set_resumed, set_running)
7119         (set_executing, set_stop_requested, finish_thread_state)
7120         (validate_registers_access, can_access_registers_ptid)
7121         (print_thread_info_1, switch_to_thread)
7122         (do_restore_current_thread_cleanup)
7123         (make_cleanup_restore_current_thread, thread_command)
7124         (thread_name_command): Use operator== instead of ptid_equal.
7125
7126 2017-04-10  Pedro Alves  <palves@redhat.com>
7127
7128         * thread.c (struct current_thread_cleanup) <next>: Delete field.
7129         (current_thread_cleanup_chain): Delete.
7130         (restore_current_thread_cleanup_dtor)
7131         (make_cleanup_restore_current_thread): Remove references to
7132         current_thread_cleanup_chain.
7133
7134 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
7135
7136         * msp430-tdep.c (msp430_pseudo_register_read): Never return
7137         REG_UNKNOWN.
7138
7139 2017-04-10  Yao Qi  <yao.qi@linaro.org>
7140
7141         PR gdb/19942
7142         * gdbthread.h (thread_info::deletable): New method.
7143         (thread_info::incref): New method.
7144         (thread_info::decref): New method.
7145         (thread_info::refcount): Move it to private.
7146         * infrun.c (save_stop_context): Call inc_refcount.
7147         (release_stop_context_cleanup): Likewise.
7148         * thread.c (set_thread_exited): New function.
7149         (init_thread_list): Delete "tp" only it is deletable, otherwise
7150         call set_thread_exited.
7151         (delete_thread_1): Call set_thread_exited.
7152         (current_thread_cleanup) <inferior_pid>: Remove.
7153         <thread>: New field.
7154         (restore_current_thread_ptid_changed): Removed.
7155         (do_restore_current_thread_cleanup): Adjust.
7156         (restore_current_thread_cleanup_dtor): Don't call
7157         find_thread_ptid.
7158         (set_thread_refcount): Use dec_refcount.
7159         (make_cleanup_restore_current_thread): Adjust.
7160         (thread_apply_all_command): Call inc_refcount.
7161         (_initialize_thread): Don't call
7162         observer_attach_thread_ptid_changed.
7163
7164 2017-04-10  Yao Qi  <yao.qi@linaro.org>
7165
7166         * thread.c (delete_thread_1): Hoist code on marking thread as
7167         exited.
7168
7169 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7170
7171         * windows-nat.c (windows_detach): Initialize ptid with
7172         minus_one_ptid.
7173
7174 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7175
7176         * unittests/ptid-selftests.c: Fix erroneous assert messages.
7177
7178 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
7179
7180         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
7181         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
7182         (bfin_pseudo_register_write): Likewise
7183
7184 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
7185
7186         * common/ptid.h (struct ptid): Change to...
7187         (class ptid_t): ... this.
7188         <ptid_t>: New constructors.
7189         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
7190         matches>: New methods.
7191         <make_null, make_minus_one>: New static methods.
7192         <pid>: Rename to...
7193         <m_pid>: ...this.
7194         <lwp>: Rename to...
7195         <m_lwp>: ...this.
7196         <tid>: Rename to...
7197         <m_tid>: ...this.
7198         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
7199         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
7200         as references, move comment to class ptid_t.
7201         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
7202         ptid_t static methods.
7203         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
7204         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
7205         Take ptid arguments as references, implement using ptid_t methods.
7206         * unittests/ptid-selftests.c: New file.
7207         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7208         unittests/ptid-selftests.c.
7209         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
7210
7211 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7212
7213         * python/python.c (python_run_simple_file): Cast mode literal to
7214         non-const char pointer as expected by PyFile_FromString.
7215
7216 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
7217
7218         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
7219         minus_one_ptid and null_ptid.
7220
7221 2017-04-05  Pedro Alves  <palves@redhat.com>
7222
7223         * warning.m4 (build_warnings): Remove -Wno-write-strings.
7224         * configure: Regenerate.
7225
7226 2017-04-05  Pedro Alves  <palves@redhat.com>
7227
7228         * ada-exp.y (yyerror): Constify.
7229         * ada-lang.c (bound_name, get_selections)
7230         (ada_variant_discrim_type)
7231         (ada_variant_discrim_name, ada_value_struct_elt)
7232         (ada_lookup_struct_elt_type, is_unchecked_variant)
7233         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
7234         (catch_ada_exception_command_split)
7235         (catch_ada_assert_command_split, catch_assert_command)
7236         (ada_op_name): Constify.
7237         * ada-lang.h (ada_yyerror, get_selections)
7238         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
7239         * arc-tdep.c (arc_print_frame_cache): Constify.
7240         * arm-tdep.c (arm_skip_stub): Constify.
7241         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
7242         (gen_aggregate_elt_ref): Constify.
7243         * bcache.c (print_bcache_statistics): Constify.
7244         * bcache.h (print_bcache_statistics): Constify.
7245         * break-catch-throw.c (catch_exception_command_1):
7246         * breakpoint.c (struct ep_type_description::description):
7247         Constify.
7248         (add_solib_catchpoint): Constify.
7249         (catch_fork_command_1): Add cast.
7250         (add_catch_command): Constify.
7251         * breakpoint.h (add_catch_command, add_solib_catchpoint):
7252         Constify.
7253         * bsd-uthread.c (bsd_uthread_state): Constify.
7254         * buildsym.c (patch_subfile_names): Constify.
7255         * buildsym.h (next_symbol_text_func, patch_subfile_names):
7256         Constify.
7257         * c-exp.y (yyerror): Constify.
7258         (token::oper): Constify.
7259         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
7260         * c-varobj.c (cplus_describe_child): Constify.
7261         * charset.c (find_charset_names): Add cast.
7262         (find_charset_names): Constify array and add const_cast.
7263         * cli/cli-cmds.c (complete_command, cd_command): Constify.
7264         (edit_command): Constify.
7265         * cli/cli-decode.c (lookup_cmd): Constify.
7266         * cli/cli-dump.c (dump_memory_command, dump_value_command):
7267         Constify.
7268         (struct dump_context): Constify.
7269         (add_dump_command, restore_command): Constify.
7270         * cli/cli-script.c (get_command_line): Constify.
7271         * cli/cli-script.h (get_command_line): Constify.
7272         * cli/cli-utils.c (check_for_argument): Constify.
7273         * cli/cli-utils.h (check_for_argument): Constify.
7274         * coff-pe-read.c (struct read_pe_section_data): Constify.
7275         * command.h (lookup_cmd): Constify.
7276         * common/print-utils.c (decimal2str): Constify.
7277         * completer.c (gdb_print_filename): Constify.
7278         * corefile.c (set_gnutarget): Constify.
7279         * cp-name-parser.y (yyerror): Constify.
7280         * cp-valprint.c (cp_print_class_member): Constify.
7281         * cris-tdep.c (cris_register_name, crisv32_register_name):
7282         Constify.
7283         * d-exp.y (yyerror): Constify.
7284         (struct token::oper): Constify.
7285         * d-lang.h (d_yyerror): Constify.
7286         * dbxread.c (struct header_file_location::name): Constify.
7287         (add_old_header_file, add_new_header_file, last_function_name)
7288         (dbx_next_symbol_text, add_bincl_to_list)
7289         (find_corresponding_bincl_psymtab, set_namestring)
7290         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
7291         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
7292         * defs.h (command_line_input, print_address_symbolic)
7293         (deprecated_readline_begin_hook): Constify.
7294         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
7295         Constify.
7296         * event-top.c (handle_line_of_input): Constify and add cast.
7297         * exceptions.c (catch_errors): Constify.
7298         * exceptions.h (catch_errors): Constify.
7299         * expprint.c (print_subexp_standard, op_string, op_name)
7300         (op_name_standard, dump_raw_expression, dump_raw_expression):
7301         * expression.h (op_name, op_string, dump_raw_expression):
7302         Constify.
7303         * f-exp.y (yyerror): Constify.
7304         (struct token::oper): Constify.
7305         (struct f77_boolean_val::name): Constify.
7306         * f-lang.c (f_word_break_characters): Constify.
7307         * f-lang.h (f_yyerror): Constify.
7308         * fork-child.c (fork_inferior): Add cast.
7309         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
7310         (new_variant): Constify.
7311         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
7312         * gdbarch.c: Regenerate.
7313         * gdbcore.h (set_gnutarget): Constify.
7314         * go-exp.y (yyerror): Constify.
7315         (token::oper): Constify.
7316         * go-lang.h (go_yyerror): Constify.
7317         * go32-nat.c (go32_sysinfo): Constify.
7318         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
7319         * guile/scm-cmd.c (cmdscm_function): Constify.
7320         * guile/scm-param.c (pascm_param_value): Constify.
7321         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
7322         (h8300sx_register_name): Constify.
7323         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
7324         Constify.
7325         * ia64-tdep.c (ia64_register_names): Constify.
7326         * infcmd.c (construct_inferior_arguments): Constify.
7327         (path_command, attach_post_wait): Constify.
7328         * language.c (show_range_command, show_case_command)
7329         (unk_lang_error): Constify.
7330         * language.h (language_defn::la_error)
7331         (language_defn::la_name_of_this): Constify.
7332         * linespec.c (decode_line_2): Constify.
7333         * linux-thread-db.c (thread_db_err_str): Constify.
7334         * lm32-tdep.c (lm32_register_name): Constify.
7335         * m2-exp.y (yyerror): Constify.
7336         * m2-lang.h (m2_yyerror): Constify.
7337         * m32r-tdep.c (m32r_register_names): Constify and make static.
7338         * m68hc11-tdep.c (m68hc11_register_names): Constify.
7339         * m88k-tdep.c (m88k_register_name): Constify.
7340         * macroexp.c (appendmem): Constify.
7341         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
7342         (upgrade_type, parse_external, parse_partial_symbols)
7343         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
7344         (new_symbol): Constify.
7345         * memattr.c (mem_info_command): Constify.
7346         * mep-tdep.c (register_name_from_keyword): Constify.
7347         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
7348         Constify.
7349         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
7350         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
7351         * mi/mi-main.c (captured_mi_execute_command): Constify and add
7352         cast.
7353         (mi_execute_async_cli_command): Constify.
7354         * mips-tdep.c (mips_register_name): Constify.
7355         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
7356         (am33_register_name, am33_2_register_name)
7357         * moxie-tdep.c (moxie_register_names): Constify.
7358         * nat/linux-osdata.c (osdata_type): Constify fields.
7359         * nto-tdep.c (nto_parse_redirection): Constify.
7360         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
7361         (lookup_child_selector): Constify.
7362         (objc_methcall::name): Constify.
7363         * objc-lang.h (lookup_objc_class, lookup_child_selector)
7364         (lookup_struct_typedef): Constify.
7365         * objfiles.c (pc_in_section): Constify.
7366         * objfiles.h (pc_in_section): Constify.
7367         * p-exp.y (struct token::oper): Constify.
7368         (yyerror): Constify.
7369         * p-lang.h (pascal_yyerror): Constify.
7370         * parser-defs.h (op_name_standard): Constify.
7371         (op_print::string): Constify.
7372         (exp_descriptor::op_name): Constify.
7373         * printcmd.c (print_address_symbolic): Constify.
7374         * psymtab.c (print_partial_symbols): Constify.
7375         * python/py-breakpoint.c (stop_func): Constify.
7376         (bppy_get_expression): Constify.
7377         * python/py-cmd.c (cmdpy_completer::name): Constify.
7378         (cmdpy_function): Constify.
7379         * python/py-event.c (evpy_add_attribute)
7380         (gdbpy_initialize_event_generic): Constify.
7381         * python/py-event.h (evpy_add_attribute)
7382         (gdbpy_initialize_event_generic): Constify.
7383         * python/py-evts.c (add_new_registry): Constify.
7384         * python/py-finishbreakpoint.c (outofscope_func): Constify.
7385         * python/py-framefilter.c (get_py_iter_from_func): Constify.
7386         * python/py-inferior.c (get_buffer): Add cast.
7387         * python/py-param.c (parm_constant::name): Constify.
7388         * python/py-unwind.c (fprint_frame_id): Constify.
7389         * python/python.c (gdbpy_parameter_value): Constify.
7390         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
7391         * remote.c (memory_packet_config::name): Constify.
7392         (show_packet_config_cmd, remote_write_bytes)
7393         (remote_buffer_add_string):
7394         * reverse.c (exec_reverse_once): Constify.
7395         * rs6000-tdep.c (variant::name, variant::description): Constify.
7396         * rust-exp.y (rustyyerror): Constify.
7397         * rust-lang.c (rust_op_name): Constify.
7398         * rust-lang.h (rustyyerror): Constify.
7399         * serial.h (serial_ops::name): Constify.
7400         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
7401         (sh_sh3e_register_name, sh_sh2e_register_name)
7402         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
7403         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
7404         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
7405         (sh_sh4al_dsp_register_name): Constify.
7406         * sh64-tdep.c (sh64_register_name): Constify.
7407         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
7408         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
7409         * stabsread.c (patch_block_stabs, read_type_number)
7410         (ref_map::stabs, ref_add, process_reference)
7411         (symbol_reference_defined, define_symbol, define_symbol)
7412         (error_type, read_type, read_member_functions, read_cpp_abbrev)
7413         (read_one_struct_field, read_struct_fields, read_baseclasses)
7414         (read_tilde_fields, read_struct_type, read_array_type)
7415         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
7416         (read_huge_number, read_range_type, read_args, common_block_start)
7417         (find_name_end): Constify.
7418         * stabsread.h (common_block_start, define_symbol)
7419         (process_one_symbol, symbol_reference_defined, ref_add):
7420         * symfile.c (get_section_index, add_symbol_file_command):
7421         * symfile.h (get_section_index): Constify.
7422         * target-descriptions.c (tdesc_type::name): Constify.
7423         (tdesc_free_type): Add cast.
7424         * target.c (find_default_run_target):
7425         (add_deprecated_target_alias, find_default_run_target)
7426         (target_announce_detach): Constify.
7427         (do_option): Constify.
7428         * target.h (add_deprecated_target_alias): Constify.
7429         * thread.c (print_thread_info_1): Constify.
7430         * top.c (deprecated_readline_begin_hook, command_line_input):
7431         Constify.
7432         (init_main): Add casts.
7433         * top.h (handle_line_of_input): Constify.
7434         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
7435         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
7436         (tfind_command): Rename to ...
7437         (tfind_command_1): ... this and constify.
7438         (tfind_command): New function.
7439         (tfind_end_command, tfind_start_command): Adjust.
7440         (encode_source_string): Constify.
7441         * tracepoint.h (encode_source_string): Constify.
7442         * tui/tui-data.c (tui_partial_win_by_name): Constify.
7443         * tui/tui-data.h (tui_partial_win_by_name): Constify.
7444         * tui/tui-source.c (tui_set_source_content_nil): Constify.
7445         * tui/tui-source.h (tui_set_source_content_nil): Constify.
7446         * tui/tui-win.c (parse_scrolling_args): Constify.
7447         * tui/tui-windata.c (tui_erase_data_content): Constify.
7448         * tui/tui-windata.h (tui_erase_data_content): Constify.
7449         * tui/tui-winsource.c (tui_erase_source_content): Constify.
7450         * tui/tui.c (tui_enable): Add cast.
7451         * utils.c (defaulted_query): Constify.
7452         (init_page_info): Add cast.
7453         (puts_debug, subset_compare): Constify.
7454         * utils.h (subset_compare): Constify.
7455         * varobj.c (varobj_format_string): Constify.
7456         * varobj.h (varobj_format_string): Constify.
7457         * vax-tdep.c (vax_register_name): Constify.
7458         * windows-nat.c (windows_detach): Constify.
7459         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
7460         * xml-support.c (gdb_xml_end_element): Constify.
7461         * xml-tdesc.c (tdesc_start_reg): Constify.
7462         * xstormy16-tdep.c (xstormy16_register_name): Constify.
7463         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
7464         * xtensa-tdep.h (xtensa_register_t::name): Constify.
7465
7466 2017-04-05  Pedro Alves  <palves@redhat.com>
7467
7468         * proc-api.c (struct trans): Constify.
7469         (procfs_note): Constify.
7470         * proc-events.c (struct trans, syscall_table):
7471         * proc-flags.c (struct trans): Constify.
7472         * proc-utils.h (procfs_note): Constify.
7473         * proc-why.c (struct trans): Constify.
7474         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
7475         (procfs_detach): Constify.
7476         * sol-thread.c (struct string_map): Constify.
7477         (td_err_string, td_state_string): Constify.
7478
7479 2017-04-05  Pedro Alves  <palves@redhat.com>
7480
7481         * proc-api.c (procfs_filename): Don't initialize
7482         procfs_filename.
7483         (prepare_to_trace): Assume procfs_filename is non-NULL.
7484         (_initialize_proc_api): Give procfs_filename a default value here.
7485
7486 2017-04-05  Pedro Alves  <palves@redhat.com>
7487
7488         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
7489         'cond_string' parameter.
7490         (extract_exception_regexp): Constify 'string' parameter.
7491         (catch_exception_command_1): Constify.
7492         * breakpoint.c (init_catchpoint)
7493         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
7494         parameter.
7495         (ep_parse_optional_if_clause, catch_fork_command_1)
7496         (catch_exec_command_1): Constify.
7497         * breakpoint.h (init_catchpoint): Constify 'cond_string'
7498         parameter.
7499         (ep_parse_optional_if_clause): Constify.
7500         * cli/cli-utils.c (remove_trailing_whitespace)
7501         (check_for_argument): Constify.
7502         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
7503         non-const overload.
7504         (check_for_argument): Likewise.
7505
7506 2017-04-05  Pedro Alves  <palves@redhat.com>
7507
7508         * event-top.c (command_line_handler): Add cast to execute_command
7509         call.
7510         * record-btrace.c (cmd_record_btrace_bts_start)
7511         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
7512         (cmd_record_btrace_start): Add cast to execute_command call.
7513         * record-full.c (record_full_goto_insn):
7514         * record.c (record_start, record_stop): Add cast to
7515         execute_command_to_string calls.
7516         (cmd_record_start): Add cast to execute_command calls.
7517
7518 2017-04-05  Pedro Alves  <palves@redhat.com>
7519
7520         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
7521         static inline function.
7522         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
7523         array and use gdb_PyArg_ParseTupleAndKeywords.
7524         * python/py-cmd.c (cmdpy_init): Likewise.
7525         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
7526         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
7527         (infpy_search_memory): Likewise.
7528         * python/py-objfile.c (objfpy_add_separate_debug_file)
7529         (gdbpy_lookup_objfile): Likewise.
7530         * python/py-symbol.c (gdbpy_lookup_symbol)
7531         (gdbpy_lookup_global_symbol): Likewise.
7532         * python/py-type.c (gdbpy_lookup_type): Likewise.
7533         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
7534         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
7535         Likewise.
7536
7537 2017-04-05  Pedro Alves  <palves@redhat.com>
7538
7539         * python/python-internal.h (gdb_PyGetSetDef): New type.
7540         * python/py-block.c (block_object_getset)
7541         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
7542         * python/py-event.c (event_object_getset)
7543         (finish_breakpoint_object_getset): Likewise.
7544         * python/py-inferior.c (inferior_object_getset): Likewise.
7545         * python/py-infthread.c (thread_object_getset): Likewise.
7546         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
7547         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
7548         * python/py-objfile.c (objfile_getset): Likewise.
7549         * python/py-progspace.c (pspace_getset): Likewise.
7550         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
7551         Likewise.
7552         * python/py-record.c (recpy_record_getset): Likewise.
7553         * python/py-symbol.c (symbol_object_getset): Likewise.
7554         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
7555         Likewise.
7556         * python/py-type.c (type_object_getset, field_object_getset):
7557         Likewise.
7558         * python/py-value.c (value_object_getset): Likewise.
7559
7560 2017-04-05  Pedro Alves  <palves@redhat.com>
7561
7562         * python/python-internal.h (gdb_PyObject_CallMethod)
7563         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
7564         New functions.
7565         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
7566         (PySys_GetObject, PySys_SetPath): New macros.
7567
7568 2017-04-05  Pedro Alves  <palves@redhat.com>
7569
7570         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
7571         info_osdata_command.
7572         * osdata.c (info_osdata_command): Rename to ...
7573         (info_osdata): ... this.  Constify 'type' parameter, and remove
7574         the 'from_tty' parameter.  Accept NULL TYPE.
7575         (info_osdata_command): New function.
7576         * osdata.h (info_osdata_command): Remove declaration.
7577         (info_osdata): New declaration.
7578
7579 2017-04-05  Pedro Alves  <palves@redhat.com>
7580
7581         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
7582         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
7583         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
7584         parameter.
7585         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
7586         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
7587         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
7588         parameter.
7589         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
7590         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
7591         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
7592         (mi_cmd_file_list_exec_source_files)
7593         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
7594         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7595         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
7596         parameter.
7597         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
7598         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
7599         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
7600         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
7601         (mi_cmd_stack_info_frame): Constify 'command' parameter.
7602         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
7603         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
7604         'command' parameter.
7605         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
7606         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
7607         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
7608         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
7609         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
7610         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
7611         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
7612         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
7613         (mi_cmd_var_set_update_range): Constify 'command' parameter.
7614         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
7615         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
7616         parameter.
7617         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
7618         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
7619         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
7620         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
7621         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
7622         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
7623         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
7624         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
7625         (mi_cmd_data_list_changed_registers)
7626         (mi_cmd_data_write_register_values)
7627         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
7628         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
7629         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
7630         (mi_cmd_list_features, mi_cmd_list_target_features)
7631         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
7632         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
7633         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
7634         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
7635         (mi_cmd_trace_frame_collected): Constify 'command'
7636         parameter.
7637         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
7638         'command' parameter.
7639
7640 2017-04-05  Pedro Alves  <palves@redhat.com>
7641
7642         * ada-lang.c (ada_completer_word_break_characters): Now a const
7643         array.
7644         (ada_get_gdb_completer_word_break_characters): Constify.
7645         * completer.c (gdb_completer_command_word_break_characters)
7646         (gdb_completer_file_name_break_characters)
7647         (gdb_completer_quote_characters): Now const arrays.
7648         (get_gdb_completer_quote_characters): Constify.
7649         (set_rl_completer_word_break_characters): New function.
7650         (set_gdb_completion_word_break_characters)
7651         (complete_line_internal): Use it.
7652         * completer.h (get_gdb_completer_quote_characters): Constify.
7653         (set_rl_completer_word_break_characters): Declare.
7654         * f-lang.c (f_word_break_characters): Constify.
7655         * language.c (default_word_break_characters): Constify.
7656         * language.h (language_defn::la_word_break_characters): Constify.
7657         (default_word_break_characters): Constify.
7658         * top.c (init_main): Use set_rl_completer_word_break_characters.
7659
7660 2017-04-05  Pedro Alves  <palves@redhat.com>
7661
7662         * aix-thread.c (aix_thread_pid_to_str)
7663         (aix_thread_extra_thread_info): Constify.
7664         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
7665         * bsd-uthread.c (bsd_uthread_extra_thread_info)
7666         (bsd_uthread_pid_to_str): Constify.
7667         * corelow.c (core_pid_to_str): Constify.
7668         * darwin-nat.c (darwin_pid_to_str): Constify.
7669         * fbsd-nat.c (fbsd_pid_to_str): Constify.
7670         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
7671         Constify.
7672         * gnu-nat.c (gnu_pid_to_str): Constify.
7673         * go32-nat.c (go32_pid_to_str): Constify.
7674         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
7675         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
7676         * inferior.c (inferior_pid_to_str): Constify.
7677         * linux-nat.c (linux_nat_pid_to_str): Constify.
7678         * linux-tdep.c (linux_core_pid_to_str): Constify.
7679         * linux-thread-db.c (thread_db_pid_to_str)
7680         (thread_db_extra_thread_info): Constify.
7681         * nto-tdep.c (nto_extra_thread_info): Constify.
7682         * nto-tdep.h (nto_extra_thread_info): Constify.
7683         * obsd-nat.c (obsd_pid_to_str): Constify.
7684         * procfs.c (procfs_pid_to_str): Constify.
7685         * ravenscar-thread.c (ravenscar_extra_thread_info)
7686         (ravenscar_pid_to_str): Constify.
7687         * remote-sim.c (gdbsim_pid_to_str): Constify.
7688         * remote.c (remote_threads_extra_info, remote_pid_to_str):
7689         Constify.
7690         * sol-thread.c (solaris_pid_to_str): Constify.
7691         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
7692         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
7693         * target.c (default_pid_to_str, target_pid_to_str)
7694         (normal_pid_to_str, default_pid_to_str): Constify.
7695         * target.h (target_ops::to_pid_to_str)
7696         (target_ops::to_extra_thread_info): Constify.
7697         (target_pid_to_str, normal_pid_to_str): Constify.
7698         * windows-nat.c (windows_pid_to_str): Constify.
7699         * gdbarch.sh (core_pid_to_str): Constify.
7700         * target-delegates.c: Regenerate.
7701         * gdbarch.h, gdbarch.c: Regenerate.
7702
7703 2017-04-05  Pedro Alves  <palves@redhat.com>
7704
7705         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
7706         the memory of the temporary warning_pre_print override.
7707         * utils.c (warning_pre_print): Constify.
7708         * utils.h (warning_pre_print): Constify.
7709
7710 2017-04-05  Pedro Alves  <palves@redhat.com>
7711
7712         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
7713         (shell_command): New function.
7714         (make_command): Use std::string.
7715         (init_cli_cmds): Register shell_command instead of shell_escape.
7716
7717 2017-04-05  Pedro Alves  <palves@redhat.com>
7718
7719         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
7720         * tracepoint.c (default_collect): Don't initialize.
7721
7722 2017-04-05  Pedro Alves  <palves@redhat.com>
7723
7724         * macroexp.c (macro_buffer::shared): Now a bool.
7725         (init_buffer): Update.
7726         (init_shared_buffer): Constify 'addr' parameter.
7727         (substitute_args, expand, macro_expand, macro_expand_next): Remove
7728         casts.
7729
7730 2017-04-05  Pedro Alves  <palves@redhat.com>
7731
7732         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
7733         * disasm.c (set_disassembler_options): Constify local.
7734         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
7735
7736 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
7737
7738         PR gdb/21352
7739         * tracefile.c (tsave_command): Fix argument parsing for '-r'
7740         option.
7741
7742 2017-04-05  Yao Qi  <yao.qi@linaro.org>
7743
7744         * frame.c (frame_unwind_register_unsigned): Call
7745         frame_unwind_register_value.
7746
7747 2017-04-05  Yao Qi  <yao.qi@linaro.org>
7748
7749         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
7750         Use gdb_test_multiple, and don't match anchor.
7751
7752 2017-04-05  Pedro Alves  <palves@redhat.com>
7753
7754         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
7755         (Write After Approval): Remove Simon Marchi.
7756
7757 2017-04-05  Pedro Alves  <palves@redhat.com>
7758
7759         * common/gdb_optional.h (optional::optional): Make constexpr and
7760         initialize m_dummy.
7761
7762 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
7763
7764         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
7765         (amd64fbsd_jmp_buf_reg_offset): Remove.
7766         (amd64fbsd_supply_uthread): Remove function.
7767         (amd64fbsd_collect_uthread): Remove function.
7768         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
7769         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
7770         (x86_64-*-freebsd*): Remove bsd-uthread.o.
7771         (fbsd-nat.c): Update comment.
7772         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
7773         (i386fbsd_jmp_buf_reg_offset): Remove.
7774         (i386fbsd_supply_uthread): Remove function.
7775         (i386fbsd_collect_uthread): Remove function.
7776         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
7777
7778 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
7779
7780         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
7781         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
7782         * NEWS: Mention that support for FreeBSD/alpha was removed.
7783         * alpha-fbsd-tdep.c: Delete file.
7784         * config/alpha/fbsd.mh: Delete file.
7785         * configure.host: Delete alpha*-*-freebsd* and
7786         alpha*-*-kfreebsd*-gnu.
7787         * configure.tgt: Delete alpha*-*-freebsd* and
7788         alpha*-*-kfreebsd*-gnu.
7789
7790 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
7791
7792         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
7793         amd64bsd_store_inferior_registers): Use ptid from regcache.
7794
7795 2017-04-04  Pedro Alves  <palves@redhat.com>
7796
7797         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
7798         data fields, make them private and add "m_" prefixes.
7799         (lnp_state_machine::lnp_state_machine): New ctor.
7800         (record_line, check_line_address, handle_set_discriminator)
7801         (handle_set_address, handle_advance_pc, handle_special_opcode)
7802         (handle_advance_line, handle_set_file, handle_negate_stmt)
7803         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
7804         (end_sequence, advance_line): New methods.
7805         (m_gdbarch, m_record_lines_p): New fields.
7806         (lnp_reader_state): Delete.
7807         (dwarf_record_line): Rename to ...
7808         (lnp_state_machine::record_line): ... adjust.
7809         (init_lnp_state_machine): Delete.
7810         (lnp_state_machine::lnp_state_machine): New.
7811         (check_line_address): Rename to ...
7812         (lnp_state_machine::check_line_address): This.
7813         (dwarf_decode_lines_1): Remove reference to "reader_state".
7814         Adjust lnp_state_machine having a non-default ctor.  Use bool.
7815         State machine internal state manipulation moved to
7816         lnp_state_machine methods.
7817
7818 2017-04-04  Pedro Alves  <palves@redhat.com>
7819
7820         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7821         unittests/offset-type-selftests.c.
7822         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
7823         * common/offset-type.h: New file.
7824         * common/preprocessor.h: New file.
7825         * common/traits.h: New file.
7826         * common/valid-expr.h: New file.
7827         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
7828         sect_offset and cu_offset strong typedefs throughout.
7829         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
7830         typedefs throughout.
7831         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
7832         sect_offset and cu_offset strong typedefs throughout.
7833         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
7834         typedefs throughout.
7835         * gdbtypes.h: Include "common/offset-type.h".
7836         (cu_offset): Now an offset type (strong typedef) instead of a
7837         struct.
7838         (sect_offset): Likewise.
7839         (union call_site_parameter_u): Rename "param_offset" field to
7840         "param_cu_off".
7841         * unittests/offset-type-selftests.c: New file.
7842
7843 2017-04-04  Pedro Alves  <palves@redhat.com>
7844
7845         * common/underlying.h: New file.
7846         * dwarf2read.c: Include "common/gdb_optional.h" and
7847         "common/underlying.h".
7848         (dir_index, file_name_index): New types.
7849         (file_entry): Use them.
7850         (file_entry::include): Use to_underlying.
7851         (line_header::add_file_name): Use dir_index.
7852         (read_formatted_entries): Use gdb::optional.  Read form before
7853         writting to file_entry.
7854         (dwarf_decode_line_header): Use dir_index.
7855         (lnp_state_machine::current_file): Use to_underlying.
7856         (lnp_state_machine::file): Change type to file_name_index.
7857         (dwarf_record_line): Use to_underlying.
7858         (init_lnp_state_machine): Use file_name_index.
7859         (dwarf_decode_lines_1): Use dir_index and file_name_index.
7860
7861 2017-04-04  Pedro Alves  <palves@redhat.com>
7862
7863         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
7864         operator bool, has_value and get methods.
7865
7866 2017-04-04  Pedro Alves  <palves@redhat.com>
7867
7868         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
7869         fields.
7870         (line_header): Initialize all data fields.  Change type of
7871         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
7872         Change type of include_dirs to std::vector<const char *>.  Remove
7873         num_include_dirs, include_dirs_size.  Change type of file_names to
7874         std::vector<file_entry>.  Remove num_file_names, file_names_size.
7875         (line_header::line_header): New.
7876         (line_header::add_include_dir, line_header::add_file_name): New
7877         methods.
7878         (line_header::include_dir_at): Remove NULL check.
7879         (line_header::file_name_at): Add const overload.
7880         (line_header_up): New unique_ptr typedef.
7881         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
7882         std::vector.  Remove free_line_header call.
7883         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
7884         free_line_header call.
7885         (free_cu_line_header): Delete.
7886         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
7887         (setup_type_unit_groups): Use line_header_up instead of cleanups.
7888         Adjust to use std::vector.
7889         (free_line_header): Delete.
7890         (free_line_header_voidp): Use delete.
7891         (add_include_dir): Replace with ...
7892         (line_header::add_include_dir): ... this method.  Use std::vector.
7893         (add_file_name): Replace with ...
7894         (line_header::add_file_name): ... this method.  Use std::vector.
7895         (add_include_dir_stub): Delete.
7896         (read_formatted_entries): Remove memset.
7897         (dwarf_decode_line_header): Return a line_header_up instead of a
7898         raw pointer.  Remove cleanup handling.  Pass lambdas to
7899         read_formatted_entries.  Adjust to use line_header methods.
7900         (dwarf_decode_lines_1): Adjust to use line_header methods.
7901         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
7902         use std::vector.
7903
7904 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
7905
7906         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
7907         instead of struct ptid.
7908
7909 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
7910
7911         * frame.c (get_frame_register_bytes): Unwind using value.
7912         (put_frame_register_bytes): Likewise.
7913
7914 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
7915
7916         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
7917         aggregate-like.
7918
7919 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
7920
7921         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
7922
7923 2017-03-29  Yao Qi  <yao.qi@linaro.org>
7924
7925         * gdbthread.h (struct thread_info): Declare constructor and
7926         destructor.  Add some in-class member initializers.
7927         * thread.c (free_thread): Remove.
7928         (init_thread_list): Call delete instead of free_thread.
7929         (new_thread): Call thread_info constructor.
7930         (thread_info::thread_info): New function.
7931         (thread_info::~thread_info): New function.
7932         (delete_thread_1): Call delete instead of free_thread.
7933         (make_cleanup_restore_current_thread): Move tp and frame to
7934         inner block.
7935
7936 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
7937
7938         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
7939         (arc_skip_prologue): Likewise.
7940         (arc_make_frame_cache): Likewise.
7941         (arc_pv_get_operand): New function.
7942         (arc_is_in_prologue): Likewise.
7943         (arc_analyze_prologue): Likewise.
7944         (arc_print_frame_cache): Likewise.
7945         (MAX_PROLOGUE_LENGTH): New constant.
7946
7947 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
7948
7949         * configure.tgt: Add arc-insn.o.
7950         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
7951         (dump_arc_instruction_command): New function.
7952         (arc_fprintf_disasm): Likewise.
7953         (arc_disassemble_info): Likewise.
7954         (arc_insn_get_operand_value): Likewise.
7955         (arc_insn_get_operand_value_signed): Likewise.
7956         (arc_insn_get_memory_base_reg): Likewise.
7957         (arc_insn_get_memory_offset): Likewise.
7958         (arc_insn_get_branch_target): Likewise.
7959         (arc_insn_dump): Likewise.
7960         (arc_insn_get_linear_next_pc): Likewise.
7961         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
7962         (arc_disassemble_info): Likewise.
7963         (arc_insn_get_branch_target): Likewise.
7964         (arc_insn_get_linear_next_pc): Likewise.
7965         * NEWS: Mention new "maint print arc arc-instruction".
7966
7967 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
7968
7969         * arc-tdep (maintenance_print_arc_list): New variable.
7970         (maintenance_print_arc_command): New function.
7971
7972 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
7973
7974         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
7975         Add "limm" and "reserved".
7976         (arc_cannot_fetch_register, arc_cannot_store_register): Add
7977         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
7978         * arc-tdep.h (arc_regnum): Likewise.
7979
7980 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
7981
7982         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
7983         for THREADPTR register.
7984         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
7985         register.
7986         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
7987         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
7988         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
7989
7990 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
7991
7992         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
7993         registers above gdbarch_num_regs (gdbarch) as privileged in
7994         call0 ABI.
7995
7996 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
7997
7998         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
7999         for a single specified register or for all registers in
8000         a0_base..a0_base + C0_NREGS range.
8001         (supply_gregset_reg): Call regcache_raw_supply for a single
8002         specified register or for all registers in a0_base..a0_base +
8003         C0_NREGS range.
8004
8005 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
8006
8007         * arch/xtensa.h (C0_NREGS): Add definition.
8008         * xtensa-tdep.c (C0_NREGS): Remove definition.
8009
8010 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
8011
8012         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
8013         Drop xtensa_default_isa initialization.
8014         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
8015
8016 2017-03-27  Pedro Alves  <palves@redhat.com>
8017
8018         * dwarf2read.c (file_entry) <dir_index>: Add comment.
8019         (file_entry::include_dir): New method.
8020         (line_header::include_dir_at, line_header::file_name_at): New
8021         methods.
8022         (setup_type_unit_groups, setup_type_unit_groups)
8023         (psymtab_include_file_name): Simplify using the new methods.
8024         (lnp_state_machine) <the_line_header>: New field.
8025         <file>: Add comment.
8026         (lnp_state_machine::current_file): New method.
8027         (dwarf_record_line): Simplify using the new methods.
8028         (init_lnp_state_machine): Initialize the "the_line_header" field.
8029         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
8030         Simplify using the new methods.
8031
8032 2017-03-27  Pedro Alves  <palves@redhat.com>
8033
8034         * cp-name-parser.y (make_empty): Delete.
8035         (demangler_special, nested_name, ptr_operator, array_indicator)
8036         (direct_declarator, declarator_1): Use fill_comp instead of
8037         make_empty.
8038
8039 2017-03-27  Pedro Alves  <palves@redhat.com>
8040
8041         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
8042         to ATTRIBUTE_PRINTF.
8043         * solib-target.c (library_list_start_list): Print "string" not
8044         "version".
8045         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
8046         gdb_xml_error call.
8047
8048 2017-03-27  Pedro Alves  <palves@redhat.com>
8049
8050         * dwarf2read.c (struct file_and_directory): New.
8051         (dwarf2_get_dwz_file): Adjust to use std::string.
8052         (dw2_get_file_names_reader): Adjust to use file_and_directory.
8053         (find_file_and_directory): Adjust to return a file_and_directory
8054         object.
8055         (read_file_scope): Adjust to use file_and_directory.  Remove
8056         make_cleanup/do_cleanups calls.
8057         (open_and_init_dwp_file): Adjust to use std::string.  Remove
8058         make_cleanup/do_cleanups calls.
8059         * python/python.c (do_start_initialization): Adjust to ldirname
8060         returning a std::string.
8061         * utils.c (ldirname): Now returns a std::string.
8062         * utils.h (ldirname): Change return type to std::string.
8063         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
8064         returning a std::string.
8065         * xml-tdesc.c (file_read_description_xml): Likewise.
8066
8067 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
8068
8069         * regcache.c (regcache_debug_print_register): New function.
8070         * regcache.h (regcache_debug_print_register): New declaration.
8071         * target.c (debug_print_register): Remove.
8072         (target_fetch_registers): Call regcache_debug_print_register.
8073         (target_store_registers): Likewise.
8074
8075 2017-03-24  Pádraig Brady  <pbrady@fb.com>
8076
8077         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
8078         reference beyond the 'lh->include_dirs' array before accessing to
8079         it.
8080         (psymtab_include_file_name): Likewise.
8081         (dwarf_decode_lines_1): Likewise.
8082         (dwarf_decode_lines): Likewise.
8083         (file_file_name): Likewise.
8084
8085 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
8086
8087         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
8088         inferior_ptid.
8089         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8090         ps_lsetfpregs): Likewise.
8091         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
8092         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8093         ps_lsetfpregs): Likewise.
8094         * target.c (target_fetch_registers, target_store_registers):
8095         Remove asserts.
8096
8097 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
8098
8099         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
8100
8101 2017-03-23  Yao Qi  <yao.qi@linaro.org>
8102
8103         * aarch64-tdep.c (aarch64_process_record_test): Declare.
8104         (_initialize_aarch64_tdep): Register it.
8105         (aarch64_record_load_store): Handle PRFM instruction.
8106         (aarch64_process_record_test): New function.
8107
8108 2017-03-23  Yao Qi  <yao.qi@linaro.org>
8109
8110         * aarch64-tdep.c (aarch64_record_load_store): Fix code
8111         indentation.
8112
8113 2017-03-23  Yao Qi  <yao.qi@linaro.org>
8114
8115         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
8116
8117 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
8118
8119         python/python.c (do_start_initialization): Fix memory leak.
8120
8121 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
8122
8123         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
8124         using get_ptrace_pid.
8125         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
8126         inferior_ptid.
8127         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
8128         inferior_ptid instead of pid.
8129
8130 2017-03-22  Yao Qi  <yao.qi@linaro.org>
8131
8132         * aarch64-tdep.c: Wrap locally used classes in anonymous
8133         namespace.
8134         * arm-tdep.c: Likewise.
8135         * linespec.c: Likewise.
8136         * ui-out.c: Likewise.
8137
8138 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
8139
8140         PR gdb/19637
8141         * python/lib/gdb/printer/bound_registers.py: Import sys.
8142
8143 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
8144
8145         * windows-nat.c (do_windows_fetch_inferior_registers): Add
8146         windows_thread_info parameter and use it instead of
8147         current_thread.
8148         (windows_fetch_inferior_registers): Don't set current_thread,
8149         pass the thread to do_windows_fetch_inferior_registers.  Use
8150         ptid from regcache instead of inferior_ptid.
8151         (do_windows_store_inferior_registers): Add windows_thread_info
8152         parameter and use it instead of current_thread.
8153         (windows_store_inferior_registers): Don't set current_thread,
8154         pass the thread to do_windows_store_inferior_registers.  Use
8155         ptid from regcache instead of inferior_ptid.
8156
8157 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
8158
8159         * ser-mingw.c (ser_windows_raw): Remove reference to
8160         struct serial::current_timeout.
8161
8162 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
8163
8164         PR tdep/20928
8165         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
8166         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
8167         (sparc64_fsr_type): Fix %fsr decoding.
8168
8169 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
8170
8171         * python/py-record-btrace.c (btpy_insn_data): Change return type
8172         for Python 2.
8173
8174 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
8175
8176         * spu-linux-nat.c (spu_fetch_inferior_registers,
8177         spu_store_inferior_registers): Use ptid from regcache, set and
8178         restore inferior_ptid.
8179         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
8180         Likewise.
8181
8182 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
8183
8184         * i386-linux-nat.c (fetch_register, store_register,
8185         i386_linux_fetch_inferior_registers,
8186         i386_linux_store_inferior_registers): Use ptid from regcache.
8187         * ia64-linux-nat.c (ia64_linux_fetch_register,
8188         ia64_linux_store_register): Likewise.
8189         * inf-ptrace.c (inf_ptrace_fetch_register,
8190         inf_ptrace_store_register): Likewise.
8191         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
8192         m32r_linux_store_inferior_registers): Likewise.
8193         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
8194         m68kbsd_store_inferior_registers): Likewise.
8195         * m68k-linux-nat.c (fetch_register, store_register,
8196         m68k_linux_fetch_inferior_registers,
8197         m68k_linux_store_inferior_registers): Likewise.
8198         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
8199         m88kbsd_store_inferior_registers): Likewise.
8200         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
8201         mips_fbsd_store_inferior_registers): Likewise.
8202         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
8203         mips64_linux_regsets_store_registers): Likewise.
8204         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
8205         mipsnbsd_store_inferior_registers): Likewise.
8206         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
8207         mips64obsd_store_inferior_registers): Likewise.
8208         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
8209         Likewise.
8210         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
8211         ppcfbsd_store_inferior_registers): Likewise.
8212         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
8213         ppc_linux_store_inferior_registers): Likewise.
8214         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
8215         ppcnbsd_store_inferior_registers): Likewise.
8216         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
8217         ppcobsd_store_registers): Likewise.
8218         * procfs.c (procfs_fetch_registers, procfs_store_registers):
8219         Likewise.
8220         * ravenscar-thread.c (ravenscar_fetch_registers,
8221         ravenscar_store_registers, ravenscar_prepare_to_store):
8222         Likewise.
8223         * record-btrace.c (record_btrace_fetch_registers,
8224         record_btrace_store_registers, record_btrace_prepare_to_store):
8225         Likewise.
8226         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
8227         Lookup inferior using ptid from regcache, instead of
8228         current_inferior.
8229         * remote.c (remote_fetch_registers, remote_store_registers): Use
8230         ptid from regcache.
8231         * rs6000-nat.c (fetch_register, store_register): Likewise.
8232         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
8233         s390_linux_store_inferior_registers): Likewise.
8234         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
8235         shnbsd_store_inferior_registers): Likewise.
8236         * sol-thread.c (sol_thread_fetch_registers,
8237         sol_thread_store_registers): Likewise.
8238         * sparc-nat.c (sparc_fetch_inferior_registers,
8239         sparc_store_inferior_registers): Likewise.
8240         * tilegx-linux-nat.c (fetch_inferior_registers,
8241         store_inferior_registers): Likewise.
8242         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
8243         vaxbsd_store_inferior_registers): Likewise.
8244         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
8245         store_xtregs): Likewise.
8246
8247 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8248
8249         PR gdb/14441
8250         * NEWS: Mention support for rvalue references in GDB and python.
8251         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
8252         supports both lvalue and rvalue references.
8253
8254 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8255
8256         PR gdb/14441
8257         * gdbtypes.c (rank_one_type): Implement overloading
8258         resolution rules regarding rvalue references.
8259
8260 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8261
8262         PR gdb/14441
8263         * aarch64-tdep.c (aarch64_type_align)
8264         (aarch64_extract_return_value, aarch64_store_return_value): Change
8265         lvalue reference type checks to general reference type checks.
8266         * amd64-tdep.c (amd64_classify): Likewise.
8267         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
8268         Likewise.
8269         * arm-tdep.c (arm_type_align, arm_extract_return_value)
8270         (arm_store_return_value): Likewise.
8271         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
8272         * c-typeprint.c (c_print_type): Likewise.
8273         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
8274         (cplus_number_of_children, cplus_describe_child): Likewise.
8275         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
8276         * completer.c (expression_completer): Likewise.
8277         * cp-support.c (make_symbol_overload_list_adl_namespace):
8278         Likewise.
8279         * darwin-nat-info.c (info_mach_region_command): Likewise.
8280         * dwarf2loc.c (entry_data_value_coerce_ref)
8281         (value_of_dwarf_reg_entry): Likewise.
8282         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
8283         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
8284         Likewise.
8285         * findvar.c (extract_typed_address, store_typed_address):
8286         Likewise.
8287         * gdbtypes.c (rank_one_type): Likewise.
8288         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
8289         * infcall.c (value_arg_coerce): Likewise.
8290         * language.c (pointer_type): Likewise.
8291         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
8292         Likewise.
8293         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
8294         * mn10300-tdep.c (mn10300_type_align): Likewise.
8295         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
8296         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
8297         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
8298         Likewise.
8299         * printcmd.c (print_formatted, x_command): Likewise.
8300         * python/py-type.c (typy_get_composite, typy_template_argument):
8301         Likewise.
8302         * python/py-value.c (valpy_referenced_value)
8303         (valpy_get_dynamic_type, value_has_field): Likewise.
8304         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
8305         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
8306         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
8307         * spu-tdep.c (spu_scalar_value_p): Likewise.
8308         * symtab.c (lookup_symbol_aux): Likewise.
8309         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
8310         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
8311         Likewise.
8312         * valops.c (value_cast_pointers, value_cast)
8313         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
8314         (value_struct_elt, value_struct_elt_bitpos)
8315         (value_find_oload_method_list, find_overload_match)
8316         (value_rtti_indirect_type): Likewise.
8317         * valprint.c (val_print_scalar_type_p, generic_val_print):
8318         Likewise.
8319         * value.c (value_actual_type, value_as_address, unpack_long)
8320         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
8321         (coerce_ref): Likewise.
8322         * varobj.c (varobj_get_value_type): Likewise.
8323
8324 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8325
8326         PR gdb/14441
8327         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
8328         table of constants.
8329         * python/lib/gdb/command/explore.py: Support exploring values
8330         of rvalue reference types.
8331         * python/lib/gdb/types.py: Implement get_basic_type() for
8332         rvalue reference types.
8333         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
8334         constant.
8335         * python/py-value.c (valpy_getitem): Add an rvalue reference
8336         check.
8337         (valpy_reference_value): Add new parameter "refcode".
8338         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
8339         New wrappers for valpy_reference_value().
8340         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
8341         (gdbpy_invoke_xmethod): Likewise.
8342
8343 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8344
8345         PR gdb/14441
8346         * dwarf2read.c (process_die, read_type_die_1): Handle the
8347         DW_TAG_rvalue_reference_type DIE.
8348         (read_tag_reference_type): Add new parameter "refcode".
8349
8350 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8351
8352         PR gdb/14441
8353         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
8354         (c_type_print_modifier, c_type_print_varspec_suffix)
8355         (c_type_print_base): Support printing rvalue reference types.
8356         * c-valprint.c (c_val_print, c_value_print): Support printing
8357         rvalue reference values.
8358
8359 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8360
8361         PR gdb/14441
8362         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
8363         typename.
8364         * cp-support.c (replace_typedefs): Handle
8365         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
8366         * python/py-type.c (typy_lookup_type): Likewise.
8367
8368 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8369
8370         PR gdb/14441
8371         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
8372         * parse.c (insert_type): Change assert statement.
8373         (follow_types): Handle rvalue reference types.
8374         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
8375         constant.
8376
8377 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8378
8379         PR gdb/14441
8380         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
8381         value_ref() interface.
8382         * c-valprint.c (c_value_print): Likewise.
8383         * infcall.c (value_arg_coerce): Likewise.
8384         * python/py-value.c (valpy_reference_value): Likewise.
8385         * valops.c (value_cast, value_reinterpret_cast)
8386         (value_dynamic_cast, typecmp): Likewise.
8387         (value_ref): Parameterize by kind of return value reference type.
8388         * value.h (value_ref): Add new parameter "refcode".
8389
8390 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8391
8392         PR gdb/14441
8393         * dwarf2read.c (read_tag_reference_type): Use
8394         lookup_lvalue_reference_type() instead of lookup_reference_type().
8395         * eval.c (evaluate_subexp_standard): Likewise.
8396         * f-exp.y: Likewise.
8397         * gdbtypes.c (make_reference_type, lookup_reference_type):
8398         Generalize with rvalue reference types.
8399         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
8400         convenience wrappers for lookup_reference_type().
8401         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
8402         reference kind parameter.
8403         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
8404         wrappers for lookup_reference_type().
8405         * guile/scm-type.c (gdbscm_type_reference): Use
8406         lookup_lvalue_reference_type() instead of lookup_reference_type().
8407         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
8408         * parse.c (follow_types): Likewise.
8409         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
8410         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
8411         Likewise.
8412         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
8413         (gdbpy_invoke_xmethod): Likewise.
8414         * stabsread.c: Provide extra argument to make_reference_type()
8415         call.
8416         * valops.c (value_ref, value_rtti_indirect_type): Use
8417         lookup_lvalue_reference_type() instead of lookup_reference_type().
8418
8419 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8420
8421         PR gdb/14441
8422         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
8423         (TYPE_IS_REFERENCE): New macro.
8424         (struct type): Add rvalue_reference_type field.
8425         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
8426
8427 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
8428
8429         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
8430         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
8431         New function definition.
8432         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
8433         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
8434         New function declaration.
8435         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
8436         * mi/mi-interp.h: New file.
8437         * solib.c (info_sharedlibrary_command): Replace for loop with
8438         ALL_SO_LIBS macro
8439         * solib.h (update_solib_list): New function declaration.
8440         (so_list_head): Move macro.
8441         * solist.h (ALL_SO_LIBS): New macro.
8442
8443 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
8444
8445         * infcmd.c (post_create_inferior): Remove unused argument in
8446         call to solib_add.
8447         * remote.c (remote_start_remote): Likewise.
8448         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
8449         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
8450         (enable_break): Likewise.
8451         * solib.c (update_solib_list): Remove unused target argument
8452         and its documentation.
8453         (solib_add): Remove unused target argument.  Remove unused
8454         argument in call to update_solib_list.
8455         (info_sharedlibrary_command): Remove unused argument in call
8456         to update_solib_list.
8457         (sharedlibrary_command): Remove unused argument in call to
8458         solib_add.
8459         (handle_solib_event): Likewise.
8460         (reload_shared_libraries): Likewise.
8461         * solib.h (solib_add): Remove unused target argument.
8462
8463 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8464
8465         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
8466         (s390_displaced_step_fixup): Cover relative branches with the
8467         default fixup handling.  This fixes lack of support for some
8468         relative branch instructions.
8469
8470 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8471
8472         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
8473         ptid from regcache.
8474
8475 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8476
8477         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
8478         i386_darwin_store_inferior_registers): Use ptid from regcache.
8479
8480 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8481
8482         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
8483         i386bsd_store_inferior_registers): Use ptid from regcache.
8484
8485 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8486
8487         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
8488         hppaobsd_store_registers): Use ptid from regcache.
8489
8490 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8491
8492         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
8493         hppanbsd_store_registers): Use ptid from regcache.
8494
8495 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8496
8497         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
8498         from regcache.  Use get_ptrace_pid.
8499
8500 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8501
8502         * corelow.c (get_core_register_section): Use ptid from regcache,
8503         update doc.
8504
8505 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8506
8507         * bsd-uthread.c (bsd_uthread_fetch_registers,
8508         bsd_uthread_store_registers): Use ptid from regcache, set and
8509         restore inferior_ptid.
8510
8511 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8512
8513         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
8514         fetch_fp_regs, store_register, store_regs, store_fp_register,
8515         store_fp_regs): Use ptid from regcache.
8516
8517 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8518
8519         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
8520         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
8521         store_vfp_regs): Use ptid from regcache.
8522
8523 2017-03-17  Pedro Alves  <palves@redhat.com>
8524
8525         PR remote/21188
8526         * ser-base.c (ser_base_wait_for): Add comment.
8527         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
8528         version.
8529         * ser-unix.c (hardwire_raw): Remove reference to
8530         scb->current_timeout.
8531         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
8532         (hardwire_ops): Install ser_base_readchar instead of
8533         hardwire_readchar.
8534         * serial.h (struct serial) <current_timeout, timeout_remaining>:
8535         Remove fields.
8536
8537 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
8538
8539         PR gdb/19637
8540         * python/lib/gdb/printer/bound_registers.py: Add support for
8541         Python 3.
8542
8543 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8544
8545         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
8546         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
8547         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
8548         byte_offset to subobj_byte_offset.  Fix the handling of
8549         DWARF_VALUE_STACK on big-endian targets when coming via an
8550         implicit pointer.
8551         (dwarf2_evaluate_loc_desc): Adjust call to
8552         dwarf2_evaluate_loc_desc_full.
8553         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
8554         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
8555
8556 2017-03-16  Yao Qi  <yao.qi@linaro.org>
8557
8558         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
8559         and REVSH instructions.
8560
8561 2017-03-16  Yao Qi  <yao.qi@linaro.org>
8562
8563         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
8564         (arm_record_test): Declare.
8565         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
8566         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
8567         align with the manual.
8568         (thumb_record_misc): Adjust the code order to align with the
8569         manual.
8570         (thumb2_record_decode_insn_handler): Fix instruction matching.
8571         (instruction_reader_thumb): New class.
8572         (arm_record_test): New function.
8573
8574 2017-03-16  Yao Qi  <yao.qi@linaro.org>
8575
8576         * arm-tdep.c (abstract_memory_reader): New class.
8577         (instruction_reader): New class.
8578         (extract_arm_insn): Add argument 'reader'.  Callers updated.
8579         (decode_insn): Likewise.
8580
8581 2017-03-16  Doug Evans  <dje@google.com>
8582
8583         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
8584         member.  Change type of TYPE member to SCM.  All uses updated.
8585         (lsscm_make_lazy_string_smob): Add assert.
8586         (lsscm_make_lazy_string): Flag bad length values.
8587         (lsscm_elt_type): New function.
8588         (gdbscm_lazy_string_to_value): Rewrite to use
8589         lsscm_safe_lazy_string_to_value.
8590         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
8591         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
8592         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
8593         in incoming type.
8594         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
8595         * guile/scm-type.c (tyscm_scm_to_type): New function.
8596
8597 2017-03-15  Doug Evans  <dje@google.com>
8598
8599         PR python/17728, python/18439, python/18779
8600         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
8601         member.  Change type of TYPE member to PyObject *.  All uses updated.
8602         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
8603         (gdbpy_create_lazy_string_object): Flag bad length values.
8604         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
8605         Handle typedefs in incoming type.
8606         (stpy_lazy_string_elt_type): New function.
8607         (gdbpy_extract_lazy_string): Call it.
8608         * python/py-value.c (valpy_lazy_string): Flag bad length values.
8609         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
8610         typedefs in incoming type.
8611
8612 2017-03-16  Doug Evans  <dje@google.com>
8613
8614         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
8615         * guile/scm-type.c (tyscm_scm_to_type): New function.
8616
8617 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
8618
8619         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
8620         "ULONGEST" for "skip".
8621
8622 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8623
8624         PR gdb/21220
8625         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
8626         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
8627         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
8628         over ptrace peek/poke until end of buffer or error.
8629
8630 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
8631
8632         * parse.c (length_of_subexp): Make static.
8633         * parser-defs.h (length_of_subexp): Remove.
8634
8635 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8636
8637         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
8638         as well.
8639
8640 2017-03-14  Pedro Alves  <palves@redhat.com>
8641
8642         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
8643         (main): Use std::unique_ptr.  Remove calls to
8644         cp_demangled_name_parse_free.
8645
8646 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
8647
8648         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
8649         alphabsd_store_inferior_registers): Use regcache->ptid instead
8650         of inferior_ptid.
8651
8652 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
8653
8654         * aix-thread.c (aix_thread_fetch_registers,
8655         aix_thread_store_registers): Use regcache->ptid instead of
8656         inferior_ptid.
8657
8658 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
8659
8660         * aarch64-linux-nat.c (fetch_gregs_from_thread,
8661         store_gregs_to_thread, fetch_fpregs_from_thread,
8662         store_fpregs_to_thread): Use regcache->ptid instead of
8663         inferior_ptid.
8664
8665 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
8666
8667         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
8668         amd64_linux_fetch_inferior_registers): Use regcache->ptid
8669         instead of inferior_ptid.
8670
8671 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
8672
8673         * target.c (target_fetch_registers, target_store_registers): Add
8674         assert.
8675
8676 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
8677
8678         * regcache.h (regcache_get_ptid): New function.
8679         * regcache.c (regcache_get_ptid): New function.
8680
8681 2017-03-13  Mark Wielaard  <mark@klomp.org>
8682
8683         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
8684
8685 2017-03-10  Keith Seitz  <keiths@redhat.com>
8686
8687         PR c++/8218
8688         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
8689
8690 2017-03-08  Pedro Alves  <palves@redhat.com>
8691
8692         PR gdb/18360
8693         * infrun.c (start_step_over, do_target_resume, resume)
8694         (restart_threads): Assert we're not resuming a thread that is
8695         meant to be stopped.
8696         (infrun_thread_stop_requested_callback): Delete.
8697         (infrun_thread_stop_requested): If the thread is internally
8698         stopped, queue a pending stop event and clear the thread's
8699         inline-frame state.
8700         (handle_stop_requested): New function.
8701         (handle_syscall_event, handle_inferior_event_1): Use
8702         handle_stop_requested.
8703         (handle_stop_requested): New function.
8704         (handle_signal_stop): Set the thread's stop_signal here instead of
8705         at caller.
8706         (finish_step_over): Clear step over info unconditionally.
8707         (handle_signal_stop): If the user had interrupted the event
8708         thread, consider the stop a random signal.
8709         (handle_signal_stop) <signal arrived while stepping over
8710         breakpoint>: Don't restart threads here.
8711         (stop_waiting): Don't clear step-over info here.
8712
8713 2017-03-08  Pedro Alves  <palves@redhat.com>
8714
8715         PR 21206
8716         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
8717         goes to argument 2, not 1.
8718
8719 2017-03-08  Pedro Alves  <palves@redhat.com>
8720
8721         PR cli/21218
8722         * top.c (gdb_readline_wrapper): Avoid passing NULL to
8723         display_gdb_prompt.
8724         (command_line_input): Add comment.
8725
8726 2017-03-08  Pedro Alves  <palves@redhat.com>
8727
8728         PR tui/21216
8729         * tui/tui-file.c (tui_file::write): New.
8730         * tui/tui-file.h (tui_file): Override "write".
8731         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
8732         factored out from ...
8733         (tui_puts): ... here.
8734         (tui_putc): Use them.
8735         (tui_write): New function.
8736         * tui/tui-io.h (tui_write): Declare.
8737
8738 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8739
8740         * Makefile.in (SFILES): Replace "environ.c" with
8741         "common/environ.c".
8742         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
8743         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
8744         to...
8745         * common/environ.c: ... here.
8746         * environ.h: Moved to...
8747         * common/environ.h: ... here.
8748
8749 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
8750
8751         * gdbarch.sh (pstring_ptr): New static function.
8752         (gdbarch_disassembler_options): Use it.
8753         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
8754         not valid_disassembler_option->name.
8755         * gdbarch.c: Regenerate.
8756
8757 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
8758
8759         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
8760
8761 2017-03-07  Pedro Alves  <palves@redhat.com>
8762
8763         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
8764
8765 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
8766
8767         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
8768         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
8769         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
8770         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
8771
8772 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
8773
8774         * xtensa-linux-nat.c (fetch_gregs): Remove const.
8775
8776 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
8777
8778         * remote.c (remote_add_target_side_commands): Use range-based
8779         for loop.
8780
8781 2017-03-03  Yao Qi  <yao.qi@linaro.org>
8782
8783         PR gdb/21165
8784         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
8785         value is lazy.
8786         * valprint.c (common_val_print): Likewise.
8787
8788 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
8789
8790         * NEWS: Mention new set/show disassembler-options commands.
8791         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
8792         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
8793         (prospective_options): New static variable.
8794         (gdb_disassembler::gdb_disassembler): Initialize
8795         m_di.disassembler_options.
8796         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
8797         (get_disassembler_options): New function.
8798         (set_disassembler_options): Likewise.
8799         (set_disassembler_options_sfunc): Likewise.
8800         (show_disassembler_options_sfunc): Likewise.
8801         (disassembler_options_completer): Likewise.
8802         (_initialize_disasm): Likewise.
8803         * disasm.h (get_disassembler_options): New prototype.
8804         (set_disassembler_options): Likewise.
8805         * gdbarch.sh (gdbarch_disassembler_options): New variable.
8806         (gdbarch_verify_disassembler_options): Likewise.
8807         * gdbarch.c: Regenerate.
8808         * gdbarch.h: Likewise.
8809         * arm-tdep.c (num_disassembly_options): Delete.
8810         (set_disassembly_style): Likewise.
8811         (arm_disassembler_options): New static variable.
8812         (set_disassembly_style_sfunc): Convert short style name into long
8813         option name.  Call set_disassembler_options.
8814         (show_disassembly_style_sfunc): New function.
8815         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
8816         set_gdbarch_verify_disassembler_options.
8817         (_initialize_arm_tdep): Delete regnames variable and update callers.
8818         (arm_disassembler_options): Initialize.
8819         (disasm_options): New variable.
8820         (num_disassembly_options): Rename from this...
8821         (num_disassembly_styles): ...to this.  Compute by scanning through
8822         disasm_options.
8823         (valid_disassembly_styles): Initialize using disasm_options.
8824         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
8825         set_arm_regname_option.
8826         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
8827         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
8828         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
8829         set_gdbarch_verify_disassembler_options.
8830         * s390-tdep.c (s390_disassembler_options): New static variable.
8831         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
8832         set_gdbarch_verify_disassembler_options.
8833
8834 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
8835
8836         * remote.c (remote_add_target_side_condition): Remove "struct"
8837         keyword from range-based for loop.
8838
8839 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
8840
8841         * remote.c (remote_add_target_side_condition): Use range-based
8842         for loop.  Update comment.
8843
8844 2017-02-27  Yao Qi  <yao.qi@linaro.org>
8845
8846         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
8847
8848 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
8849
8850         * regcache.c (regcache_raw_update): New function.
8851         (regcache_raw_read): Move code to regcache_raw_update.
8852         * regcache.h (regcache_raw_update): New declaration.
8853         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
8854
8855 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
8856
8857         * dwarf2read.c (create_debug_type_hash_table): Initialize
8858         header.signature and header.type_offset_in_tu.
8859
8860 2017-02-24  Pedro Alves  <palves@redhat.com>
8861
8862         * symtab.c (make_file_symbol_completion_list_1): Use
8863         add_symtab_completions.
8864
8865 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
8866
8867         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
8868
8869 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
8870
8871         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
8872         I386_MAX_REGISTER_SIZE.
8873         (i386_pseudo_register_write): Likewise.
8874         (i386_process_record): Likewise.
8875         * i387-tdep.c (i387_supply_xsave): Likewise.
8876         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
8877         (store_register): Likewise.
8878
8879 2017-02-23  Pedro Alves  <palves@redhat.com>
8880
8881         * ada-lang.c: Include "common/function-view.h".
8882         (ada_iterate_over_symbols): Adjust to use function_view as
8883         callback type.
8884         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
8885         (ada_make_symbol_completion_list): Use a lambda.
8886         (ada_exc_search_name_matches): Delete.
8887         (name_matches_regex): New.
8888         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
8889         * compile/compile-c-support.c: Include "common/function-view.h".
8890         (print_one_macro): Change prototype to accept a ui_file pointer.
8891         (write_macro_definitions): Use a lambda.
8892         * dwarf2read.c: Include "common/function-view.h".
8893         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
8894         (dw2_expand_symtabs_matching): Adjust to use function_view as
8895         callback type.
8896         * language.h: Include "common/function-view.h".
8897         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
8898         function_view as callback type.
8899         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
8900         * linespec.c: Include "common/function-view.h".
8901         (collect_info::add_symbol): New method.
8902         (struct symbol_and_data_callback, iterate_inline_only, struct
8903         symbol_matcher_data, iterate_name_matcher): Delete.
8904         (iterate_over_all_matching_symtabs): Adjust to use function_view
8905         as callback type and lambdas.
8906         (iterate_over_file_blocks): Adjust to use function_view as
8907         callback type.
8908         (decode_compound_collector): Now a class with private fields.
8909         (decode_compound_collector::release_symbols): New method.
8910         (collect_one_symbol): Rename to...
8911         (decode_compound_collector::operator()): ... this and adjust.
8912         (lookup_prefix_sym): decode_compound_collector construction bits
8913         move to decode_compound_collector ctor.  Pass the
8914         decode_compound_collector object directly as callback.  Remove
8915         cleanups and use decode_compound_collector::release_symbols
8916         instead.
8917         (symtab_collector): Now a class with private fields.
8918         (symtab_collector::release_symtabs): New method.
8919         (add_symtabs_to_list): Rename to...
8920         (symtab_collector::operator()): ... this and adjust.
8921         (collect_symtabs_from_filename): symtab_collector construction
8922         bits move to symtab_collector ctor.  Pass the symtab_collector
8923         object directly as callback.  Remove cleanups and use
8924         symtab_collector::release_symtabs instead.
8925         (collect_symbols): Delete.
8926         (add_matching_symbols_to_info): Use lambdas.
8927         * macrocmd.c (print_macro_callback): Delete.
8928         (info_macro_command): Use a lambda.
8929         (info_macros_command): Pass print_macro_definition as callable
8930         directly.
8931         (print_one_macro): Remove 'ignore' parameter.
8932         (macro_list_command): Adjust.
8933         * macrotab.c (macro_for_each_data::fn): Now a function_view.
8934         (macro_for_each_data::user_data): Delete field.
8935         (foreach_macro): Adjust to call the function_view.
8936         (macro_for_each): Adjust to use function_view as callback type.
8937         (foreach_macro_in_scope): Adjust to call the function_view.
8938         (macro_for_each_in_scope): Adjust to use function_view as callback
8939         type.
8940         * macrotab.h: Include "common/function-view.h".
8941         (macro_callback_fn): Declare a prototype instead of a pointer.
8942         Remove "user_data" parameter.
8943         (macro_for_each, macro_for_each_in_scope): Adjust to use
8944         function_view as callback type.
8945         * psymtab.c (partial_map_expand_apply)
8946         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
8947         Adjust to use function_view as callback type and to return bool.
8948         (psym_expand_symtabs_matching): Adjust to use function_view as
8949         callback types.
8950         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
8951         to use function_view as callback type and to return bool.
8952         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
8953         callback types.
8954         * symfile.c (expand_symtabs_matching): Adjust to use function_view
8955         as callback types.
8956         * symfile.h: Include "common/function-view.h".
8957         (expand_symtabs_file_matcher_ftype)
8958         (expand_symtabs_symbol_matcher_ftype)
8959         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
8960         return bool.
8961         (quick_symbol_functions::map_symtabs_matching_filename)
8962         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
8963         function_view as callback type and return bool.
8964         (expand_symtabs_matching): Adjust to use function_view as callback
8965         type.
8966         (maintenance_expand_name_matcher)
8967         (maintenance_expand_file_matcher): Delete.
8968         (maintenance_expand_symtabs): Use lambdas.
8969         * symtab.c (iterate_over_some_symtabs): Adjust to use
8970         function_view as callback types and return bool.
8971         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
8972         of a cleanup.
8973         (lookup_symtab_callback): Delete.
8974         (lookup_symtab): Use a lambda.
8975         (iterate_over_symbols): Adjust to use function_view as callback
8976         type.
8977         (struct search_symbols_data, search_symbols_file_matches)
8978         (search_symbols_name_matches): Delete.
8979         (search_symbols): Use a pair of lambdas.
8980         (struct add_name_data, add_macro_name, symbol_completion_matcher)
8981         (symtab_expansion_callback): Delete.
8982         (default_make_symbol_completion_list_break_on_1): Use lambdas.
8983         * symtab.h: Include "common/function-view.h".
8984         (iterate_over_some_symtabs): Adjust to use function_view as
8985         callback type and return bool.
8986         (iterate_over_symtabs): Adjust to use function_view as callback
8987         type.
8988         (symbol_found_callback_ftype): Remove 'data' parameter and return
8989         bool.
8990         (iterate_over_symbols): Adjust to use function_view as callback
8991         type.
8992
8993 2017-02-23  Pedro Alves  <palves@redhat.com>
8994
8995         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
8996         (%.o) <unittests/%.c>: New pattern.
8997         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
8998         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
8999         * common/function-view.h: New file.
9000         * unittests/function-view-selftests.c: New file.
9001         * configure: Regenerate.
9002
9003 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
9004
9005         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
9006         inferior_ptid.
9007         * go32-nat.c (go32_thread_alive): Likewise.
9008
9009 2017-02-23  Yao Qi  <yao.qi@linaro.org>
9010
9011         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
9012         delete.
9013
9014 2017-02-23  Yao Qi  <yao.qi@linaro.org>
9015
9016         * varobj.c (varobj_clear_saved_item): Use delete instead of
9017         xfree.
9018         (update_dynamic_varobj_children): Likewise.
9019
9020 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9021
9022         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
9023
9024 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
9025
9026         * common/enum-flags.h (enum_flags::enum_flags): Initialize
9027         m_enum_value to 0 in default constructor.
9028
9029 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
9030
9031         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
9032         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
9033         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
9034         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
9035         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
9036         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
9037         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
9038         IS_STORE_CONDITIONAL_INSN.
9039
9040 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9041
9042         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
9043
9044 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
9045
9046         * NEWS (Changes since GDB 7.12): Add DWARF-5.
9047
9048 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
9049
9050         * dwarf2read.c (skip_one_die, read_attribute_value)
9051         (dwarf2_const_value_attr, dump_die_shallow)
9052         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9053         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
9054
9055 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
9056
9057         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
9058         (dwarf_parse_macro_header): Accept DWARF version 5.
9059         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
9060
9061 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
9062
9063         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
9064         DW_AT_GNU_*.
9065         * common/common-exceptions.h (enum errors): Likewise.
9066         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
9067         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
9068         (dwarf_expr_context::execute_stack_op): Likewise.
9069         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
9070         Likewise.
9071         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
9072         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
9073         (show_entry_values_debug, call_site_to_target_addr)
9074         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
9075         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
9076         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
9077         (value_of_dwarf_block_entry, indirect_pieced_value)
9078         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
9079         (disassemble_dwarf_expression): Likewise.
9080         * dwarf2read.c (process_die, inherit_abstract_dies)
9081         (read_call_site_scope): Likewise.
9082         * gdbtypes.h (struct func_type, struct call_site_parameter)
9083         (struct call_site): Likewise.
9084         * stack.c (read_frame_arg): Likewise.
9085         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
9086
9087 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
9088
9089         * defs.h (read_unsigned_leb128): New declaration.
9090         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
9091         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
9092         (dwarf2_find_location_expression): Call also
9093         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
9094         * dwarf2loc.h (dwarf2_version): New declaration.
9095         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
9096         rnglists.
9097         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
9098         .debug_rnglists.
9099         (struct dwop_section_names): Add loclists_dwo.
9100         (dwop_section_names): Add .debug_loclists.dwo.
9101         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
9102         (struct dwarf2_per_cu_data): Add dwarf_version.
9103         (struct dwo_sections): Add loclists.
9104         (struct attr_abbrev): Add implicit_const.
9105         (read_indirect_line_string): New declaration.
9106         (read_unsigned_leb128): Delete declaration.
9107         (rcuh_kind): New definition.
9108         (read_and_check_comp_unit_head): Change parameter
9109         is_debug_types_section to section_kind.
9110         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
9111         (read_comp_unit_head): Change parameter abfd to section, add parameter
9112         section_kind.  Handle DWARF-5.
9113         (error_check_comp_unit_head): Accept also DWARF version 5.
9114         (read_and_check_comp_unit_head): Change parameter
9115         is_debug_types_section to section_kind.
9116         (read_and_check_type_unit_head): Delete function.
9117         (read_abbrev_offset): Handle DWARF-5.
9118         (create_debug_type_hash_table): Add parameter section_kind.  Process
9119         only DW_UT_type.  Use signature and type_offset_in_tu from struct
9120         comp_unit_head.
9121         (create_debug_types_hash_table): Update create_debug_type_hash_table
9122         caller.
9123         (create_all_type_units): Call create_debug_type_hash_table.
9124         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
9125         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
9126         caller.
9127         (skip_one_die): Handle DW_FORM_implicit_const.
9128         (dwarf2_rnglists_process): New function.
9129         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
9130         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
9131         (read_attribute_value): Handle DW_FORM_implicit_const,
9132         DW_FORM_line_strp.
9133         (read_attribute): Handle DW_FORM_implicit_const.
9134         (read_indirect_string_at_offset_from): New function from
9135         read_indirect_string_at_offset.
9136         (read_indirect_string_at_offset): Call
9137         read_indirect_string_at_offset_from.
9138         (read_indirect_line_string_at_offset): New function.
9139         (read_indirect_string): New function comment.
9140         (read_indirect_line_string): New function.
9141         (read_unsigned_leb128): Make it global.
9142         (dwarf2_string_attr): Handle DWARF-5.
9143         (add_include_dir_stub, read_formatted_entries): New functions.
9144         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
9145         Handle DWARF-5.
9146         (per_cu_header_read_in): Update read_comp_unit_head caller.
9147         (dwarf2_version): New function.
9148         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
9149         rnglists.
9150         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
9151         fields.
9152
9153 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
9154
9155         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
9156
9157 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
9158
9159         * dwarf2read.c (dwarf2_ranges_process): New function from
9160         dwarf2_ranges_read.
9161         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
9162         dwarf2_ranges_process.
9163
9164 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
9165
9166         * dwarf2read.c (create_debug_type_hash_table): New function from
9167         create_debug_types_hash_table.
9168         (create_debug_types_hash_table): Call create_debug_type_hash_table.
9169         (create_all_type_units, open_and_init_dwo_file): Update
9170         create_debug_types_hash_table callers.
9171
9172 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9173
9174         PR gdb/16188
9175         * fork-child.c (trace_start_error): Fix thinko.  va_end should
9176         refer to 'ap', not 'args'.
9177
9178 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9179             Pedro Alves  <palves@redhat.com>
9180
9181         PR gdb/16188
9182         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
9183         calls succeeded.
9184         * fork-child.c (trace_start_error): New function.
9185         (trace_start_error_with_name): Likewise.
9186         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
9187         * inf-ptrace.c (inf_ptrace_me): Likewise.
9188         * inferior.h (trace_start_error): New prototype.
9189         (trace_start_error_with_name): Likewise.
9190
9191 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
9192
9193         PR gdb/21164
9194         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
9195         NULL before using it.
9196         * symmisc.c (maintenance_print_symbols): Likewise.
9197         (maintenance_print_msymbols): Likewise.
9198
9199 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
9200
9201         * NEWS: Add record Python bindings entry.
9202
9203 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
9204
9205         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
9206         py-record-full.o.
9207         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
9208         * python/py-record-btrace.c, python/py-record-btrace.h,
9209         python/py-record-full.c, python/py-record-full.h: New file.
9210         * python/py-record.c: Add include for py-record-btrace.h and
9211         py-record-full.h.
9212         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
9213         recpy_instruction_history, recpy_function_call_history, recpy_begin,
9214         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
9215         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
9216         New definition.
9217         (gdbpy_initialize_btrace): New export.
9218         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
9219
9220 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
9221
9222         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
9223         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
9224         * python/py-record.c: New file.
9225         * python/python-internal.h (gdbpy_start_recording,
9226         gdbpy_current_recording, gdpy_stop_recording,
9227         gdbpy_initialize_record): New export.
9228         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
9229         (python_GdbMethods): Add gdbpy_start_recording,
9230         gdbpy_current_recording and gdbpy_stop_recording.
9231
9232 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
9233
9234         * record-btrace.c (record_btrace_record_method): New function.
9235         (init_record_btrace_ops): Initialize to_record_method.
9236         * record-full.c (record_full_record_method): New function.
9237         (init_record_full_ops, init_record_full_core_ops): Add
9238         record_full_record_method.
9239         * record.h (enum record_method): New enum.
9240         * target-debug.h (target_debug_print_enum_record_method: New define.
9241         * target-delegates.c: Regenerate.
9242         * target.c (target_record_method): New function.
9243         * target.h: Include record.h.
9244         (struct target_ops) <to_record_method>: New field.
9245         (target_record_method): New export.
9246
9247 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
9248
9249         * record.h (record_start, record_stop): New export.
9250         * record.c (record_start, record_stop): New function.
9251
9252 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
9253
9254         * btrace.c (btrace_fetch): Copy function call segments pointer
9255         into a vector.
9256         (btrace_clear): Clear the vector.
9257         (btrace_find_insn_by_number): Use binary search to find the correct
9258         function call segment.
9259         * btrace.h (brace_fun_p): New typedef.
9260         (struct btrace_thread_info) <functions>: New field.
9261
9262 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
9263
9264         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
9265         * btrace.c (btrace_decode_error): ... here.  New function.
9266         * btrace.h (btrace_decode_error): New export.
9267
9268 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
9269
9270         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
9271         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
9272         btrace_find_insn_by_number): Remove special case for gaps.
9273         * btrace.h (btrace_insn_get_error): New export.
9274         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
9275         * record-btrace.c (btrace_insn_history): Print number for gaps.
9276         (record_btrace_info, record_btrace_goto): Handle gaps.
9277
9278 2017-02-14  Tom Tromey  <tom@tromey.com>
9279
9280         PR python/13598:
9281         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
9282         event.
9283         * python/py-evts.c (gdbpy_initialize_py_events): Add
9284         before_prompt registry.
9285         * python/py-events.h (events_object) <before_prompt>: New field.
9286
9287 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
9288
9289         * btrace.c (ftrace_new_switch): Preserve up link and flags.
9290
9291 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
9292
9293         * symfile (_initialize_symfile): Add usage text to the load command's
9294         help text.
9295
9296 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
9297
9298         * utils.c (defaulted_query): Don't query on secondary UIs.
9299
9300 2017-02-10  Tom Tromey  <tom@tromey.com>
9301
9302         * rust-lang.c (rust_get_disr_info): Remove unused variable.
9303
9304 2017-02-10  Tom Tromey  <tom@tromey.com>
9305
9306         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
9307         "cleanup" local.
9308         * python/py-type.c (typy_legacy_template_argument): Remove
9309         unnecessary "cleanup" local.
9310
9311 2017-02-10  Tom Tromey  <tom@tromey.com>
9312
9313         * python/python.c (do_start_initialization): New function, from
9314         _initialize_python.
9315         (_initialize_python): Call do_start_initialization.
9316         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
9317         goto.
9318
9319 2017-02-10  Tom Tromey  <tom@tromey.com>
9320
9321         * python/py-prettyprint.c (pretty_print_one_value): Use
9322         gdbpy_ref.
9323
9324 2017-02-10  Tom Tromey  <tom@tromey.com>
9325
9326         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
9327         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
9328         gdbpy_ref.
9329         * python/py-type.c (field_new): Use gdbpy_ref.
9330         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
9331         gdbpy_ref.
9332         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
9333         (py_free_pspace): Likewise.
9334         (pspace_to_pspace_object): Likewise.
9335         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
9336         (py_free_objfile): Likewise.
9337         (objfile_to_objfile_object): Likewise.
9338         * python/py-inferior.c (delete_thread_object): Use
9339         gdbpy_ref.
9340         (infpy_read_memory): Likewise.
9341         (py_free_inferior): Likewise.
9342         * python/py-evtregistry.c (create_eventregistry_object): Use
9343         gdbpy_ref.
9344         * python/py-event.c (create_event_object): Use gdbpy_ref.
9345
9346 2017-02-10  Tom Tromey  <tom@tromey.com>
9347
9348         * python/py-ref.h (gdbpy_ref_policy): Now a template.
9349         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
9350         used.
9351         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
9352         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
9353         python/py-exitedevent.c, python/py-finishbreakpoint.c,
9354         python/py-framefilter.c, python/py-function.c,
9355         python/py-inferior.c, python/py-infevents.c,
9356         python/py-linetable.c, python/py-newobjfileevent.c,
9357         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
9358         python/py-signalevent.c, python/py-stopevent.c,
9359         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
9360         python/py-unwind.c, python/py-utils.c, python/py-value.c,
9361         python/py-varobj.c, python/py-xmethods.c, python/python.c,
9362         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
9363
9364 2017-02-10  Tom Tromey  <tom@tromey.com>
9365
9366         * ui-out.h (ui_out_emit_type): New class.
9367         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
9368         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
9369         and ui_out_emit_tuple.
9370         (enumerate_locals): Likewise.
9371         (py_mi_print_variables, py_print_locals, py_print_args): Use
9372         ui_out_emit_list.
9373         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
9374         ui_out_emit_list.
9375         * common/gdb_optional.h: New file.
9376
9377 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
9378
9379         * MAINTAINERS (Write After Approval): Update my e-mail address.
9380
9381 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
9382
9383         PR gdb/21122
9384         * breakpoint.c (_initialize_breakpoint): Update the help description
9385         of the 'commands' command to indicate that it takes a list argument.
9386
9387 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
9388
9389         * interps.c (current_interp_set_logging): Remove "return".
9390
9391 2017-02-09  Gary Benson  <gbenson@redhat.com>
9392
9393         * symtab.c (add_symtab_completions): Prevent NULL pointer
9394         dereference.
9395
9396 2017-02-08  Pedro Alves  <palves@redhat.com>
9397
9398         * interps.c (interp::interp): Remove reference to quiet_p.
9399         (interp_set): Make static.  Remove dead "Switching to" output
9400         code.
9401         (interp_quiet_p, interp_set_quiet): Delete.
9402         (interpreter_exec_cmd): Don't set the interpreter quiet.
9403         * interps.h (interp_quiet_p): Make static.
9404         (class interp) <quiet_p>: Remove field
9405
9406 2017-02-08  Jerome Guitton  <guitton@adacore.com>
9407
9408         * cli/cli-decode.c (find_command_name_length): Make it extern.
9409         * cli/cli-decode.h (find_command_name_length): Declare.
9410         * cli/cli-script.c (command_name_equals, line_first_arg):
9411         New functions.
9412         (process_next_line): Use cli-decode to parse command names.
9413         (build_command_line): Make args a constant pointer.
9414
9415 2017-02-08  Jerome Guitton  <guitton@adacore.com>
9416
9417         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
9418         Remove case-insensitive search.
9419
9420 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
9421
9422         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
9423         at the end of the line.  Avoids an ARI warning.
9424
9425 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
9426
9427         * NEWS: Mention support for record/replay of Intel 64 rdrand and
9428         rdseed instructions.
9429         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
9430
9431 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
9432
9433         PR tdep/20936
9434         Provide and use sparc32 and sparc64 target description XML files.
9435         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
9436         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
9437         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
9438         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
9439         * features/sparc/sparc32-solaris.xml: New file.
9440         * features/sparc/sparc64-solaris.xml: New file.
9441         * features/sparc/sparc32-solaris.c: Generated.
9442         * features/sparc/sparc64-solaris.c: Generated.
9443         * sparc-tdep.h: Account for differences in target descriptions.
9444         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
9445         (sparc32_register_type): Use target provided registers.
9446         (validate_tdesc_registers): New function.
9447         (sparc32_gdbarch_init): Use tdesc_has_registers.
9448         Set pseudoregister functions.
9449         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
9450         (sparc64_register_type): Use target provided registers.
9451         (sparc64_init_abi): Set pseudoregister functions.
9452
9453 2017-02-03  Tom Tromey  <tom@tromey.com>
9454
9455         PR rust/21097:
9456         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
9457         with a single member.
9458
9459 2017-02-03  Pedro Alves  <palves@redhat.com>
9460
9461         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
9462         (cli_interp_base::~cli_interp_base): New.
9463         (cli_interp): New struct.
9464         (as_cli_interp): Cast the interp itself to cli_interp.
9465         (cli_interpreter_pre_command_loop): Rename to ...
9466         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
9467         parameter.
9468         (cli_interpreter_init): Rename to ...
9469         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
9470         boolean.  Make extern.
9471         (cli_interpreter_resume): Rename to ...
9472         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
9473         extern.
9474         (cli_interpreter_suspend): Rename to ...
9475         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
9476         extern.
9477         (cli_interpreter_exec): Rename to ...
9478         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
9479         extern.
9480         (cli_interpreter_supports_command_editing): Rename to ...
9481         (cli_interp_base::supports_command_editing): ... this.  Remove
9482         'interp' parameter.  Make extern.
9483         (cli_ui_out): Rename to ...
9484         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
9485         Make extern.
9486         (cli_set_logging): Rename to ...
9487         (cli_interp_base::set_logging): ... this.  Remove 'interp'
9488         parameter.  Make extern.
9489         (cli_interp_procs): Delete.
9490         (cli_interp_factory): Adjust to use "new".
9491         * cli/cli-interp.h: Include "interps.h".
9492         (struct cli_interp_base): New struct.
9493         * interps.c (struct interp): Delete.  Fields moved to interps.h.
9494         (interp_new): Delete.
9495         (interp::interp, interp::~interp): New.
9496         (interp_set): Use bool, and return void.  Assume the interpreter
9497         has suspend, init and resume methods, and that the all return
9498         void.
9499         (set_top_level_interpreter): interp_set returns void.
9500         (interp_ui_out): Adapt.
9501         (current_interp_set_logging): Adapt.
9502         (interp_data): Delete.
9503         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
9504         (interp_exec): Adapt.
9505         (top_level_interpreter_data): Delete.
9506         * interps.h (interp_init_ftype, interp_resume_ftype)
9507         (interp_suspend_ftype, interp_exec_ftype)
9508         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
9509         (class interp): New.
9510         (interp_new): Delete.
9511         (interp_set): Now returns void.  Use bool.
9512         (interp_data, top_level_interpreter_data): Delete.
9513         * mi/mi-common.h: Include interps.h.
9514         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
9515         init, resume, suspect, exec, interp_ui_out, set_logging and
9516         pre_command_loop methods.
9517         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
9518         (mi_interpreter_init): Rename to ...
9519         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
9520         bool, return void and make extern.  Adjust.
9521         (mi_interpreter_resume): ... Rename to ...
9522         (mi_interp::resume): ... this.  Remove the 'data' parameter,
9523         return void and make extern.  Adjust.
9524         (mi_interpreter_suspend): ... Rename to ...
9525         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
9526         return void and make extern.  Adjust.
9527         (mi_interpreter_exec): ... Rename to ...
9528         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
9529         extern.  Adjust.
9530         (mi_interpreter_pre_command_loop): ... Rename to ...
9531         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
9532         parameter and make extern.
9533         (mi_on_normal_stop_1): Adjust.
9534         (mi_ui_out): Rename to ...
9535         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
9536         parameter and make extern.  Adjust.
9537         (mi_set_logging): Rename to ...
9538         (mi_interp::set_logging): ... this.  Remove the 'interp'
9539         parameter and make extern.  Adjust.
9540         (mi_interp_procs): Delete.
9541         (mi_interp_factory): Adjust to use 'new'.
9542         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
9543         (mi_print_exception, mi_execute_command, mi_load_progress):
9544         Adjust.
9545         * tui/tui-interp.c (tui_interp): New class.
9546         (as_tui_interp): Return a tui_interp pointer.
9547         (tui_on_normal_stop, tui_on_signal_received)
9548         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
9549         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
9550         to use interp::interp_ui_out.
9551         (tui_init): Rename to ...
9552         (tui_interp::init): ... this.  Remove the 'self' parameter, use
9553         bool, return void and make extern.  Adjust.
9554         (tui_resume): Rename to ...
9555         (tui_interp::resume): ... this.  Remove the 'data' parameter,
9556         return void and make extern.  Adjust.
9557         (tui_suspend): Rename to ...
9558         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
9559         return void and make extern.  Adjust.
9560         (tui_ui_out): Rename to ...
9561         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
9562         parameter, and make extern.  Adjust.
9563         (tui_exec): Rename to ...
9564         (tui_interp::exec): ... this.  Remove the 'data' parameter and
9565         make extern.
9566         (tui_interp_procs): Delete.
9567         (tui_interp_factory): Use "new".
9568
9569 2017-02-02  Tom Tromey  <tom@tromey.com>
9570
9571         * rust-exp.y (ends_raw_string, space_then_number)
9572         (rust_identifier_start_p): Return bool.
9573         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
9574         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
9575         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
9576         (rust_chartype_p): Return bool.
9577         (val_print_struct, rust_print_struct_def, rust_print_type):
9578         Update.
9579         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
9580         Return bool.
9581
9582 2017-02-02  Tom Tromey  <tom@tromey.com>
9583
9584         * rust-lang.c: Reindent.
9585
9586 2017-02-02  Tom Tromey  <tom@tromey.com>
9587
9588         * rust-lang.h (rust_crate_for_block): Update.
9589         * rust-lang.c (rust_crate_for_block): Return std::string.
9590         (rust_get_disr_info): Use std:;string, not
9591         gdb::unique_xmalloc_ptr.
9592         * rust-exp.y (crate_name): Update.
9593
9594 2017-02-02  Pedro Alves  <palves@redhat.com>
9595
9596         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
9597         field out of gdb_disassembler_test and make it static.
9598
9599 2017-02-02  Pedro Alves  <palves@redhat.com>
9600
9601         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
9602         mi1_interp and mi_interp fields.
9603
9604 2017-02-02  Pedro Alves  <palves@redhat.com>
9605
9606         * cli/cli-interp.c (struct saved_output_files, saved_output):
9607         Moved from cli/cli-logging.c.
9608         (cli_set_logging): New function.
9609         (cli_interp_procs): Install cli_set_logging.
9610         * cli/cli-interp.h (make_logging_output, cli_set_logging):
9611         Declare.
9612         * cli/cli-logging.c (struct saved_output_files, saved_output):
9613         Moved to cli/cli-interp.c.
9614         (pop_output_files): Don't save outputs here.
9615         (make_logging_output): New function.
9616         (handle_redirections): Don't build tee nor save previous outputs
9617         here.
9618         * interps.c (current_interp_set_logging): Change prototype.
9619         Assume there's always a set_logging_proc method installed.
9620         * interps.h (interp_set_logging_ftype): Change prototype.
9621         (current_interp_set_logging): Change prototype and adjust comment.
9622         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
9623         use make_logging_output.
9624         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
9625 2017-02-02  Pedro Alves  <palves@redhat.com>
9626
9627         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
9628         from ...
9629         (set_logging_overwrite): ... here.
9630         (logging_no_redirect_file): Delete.
9631         (set_logging_redirect): Don't handle redirection on the fly.
9632         Instead warn that "logging off" / "logging on" is necessary.
9633         (pop_output_files): Delete references to logging_no_redirect_file.
9634         (show_logging_command): Always speak in terms of what will happen
9635         once logging is reenabled.
9636
9637 2017-02-02  Pedro Alves  <palves@redhat.com>
9638
9639         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
9640
9641 2017-02-02  Pedro Alves  <palves@redhat.com>
9642
9643         * disasm.c (gdb_pretty_print_insn): Rename to ...
9644         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
9645         Remove gdbarch parameter.  Adapt to clear the object's buffers
9646         instead of allocating new buffers, and to print using the object's
9647         gdb_disassembler instead of calling gdb_print_insn.
9648         (dump_insns): Use gdb_pretty_print_disassembler.
9649         * disasm.h (gdb_pretty_print_insn): Delete declaration.
9650         (gdb_pretty_print_disassembler): New class.
9651         * record-btrace.c (btrace_insn_history): Use
9652         gdb_pretty_print_disassembler.
9653
9654 2017-02-02  Pedro Alves  <palves@redhat.com>
9655
9656         * ada-lang.c (type_as_string): Use string_file.
9657         * ada-valprint.c (ada_print_floating): Use string_file.
9658         * ada-varobj.c (ada_varobj_scalar_image)
9659         (ada_varobj_get_value_image): Use string_file.
9660         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
9661         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
9662         * breakpoint.c (update_inserted_breakpoint_locations)
9663         (insert_breakpoint_locations, reattach_breakpoints)
9664         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
9665         (print_it_watchpoint): Use string_file.
9666         (save_breakpoints): Use stdio_file.
9667         * c-exp.y (oper): Use string_file.
9668         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
9669         tee_file.
9670         (pop_output_files): Use delete.
9671         (handle_redirections): Use stdio_file and tee_file.
9672         * cli/cli-setshow.c (do_show_command): Use string_file.
9673         * compile/compile-c-support.c (c_compute_program): Use
9674         string_file.
9675         * compile/compile-c-symbols.c (generate_vla_size): Take a
9676         'string_file &' instead of a 'ui_file *'.
9677         (generate_c_for_for_one_variable): Take a 'string_file &' instead
9678         of a 'ui_file *'.  Use string_file.
9679         (generate_c_for_variable_locations): Take a 'string_file &'
9680         instead of a 'ui_file *'.
9681         * compile/compile-internal.h (generate_c_for_for_one_variable):
9682         Take a 'string_file &' instead of a 'ui_file *'.
9683         * compile/compile-loc2c.c (push, pushf, unary, binary)
9684         (print_label, pushf_register_address, pushf_register)
9685         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
9686         'ui_file *'.  Adjust.
9687         * compile/compile.c (compile_to_object): Use string_file.
9688         * compile/compile.h (compile_dwarf_expr_to_c)
9689         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
9690         'ui_file *'.
9691         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
9692         (replace_typedefs_qualified_name): Use string_file and
9693         obstack_copy0.
9694         * disasm.c (gdb_pretty_print_insn): Use string_file.
9695         (gdb_disassembly): Adjust reference the null_stream global.
9696         (do_ui_file_delete): Delete.
9697         (gdb_insn_length): Use null_stream.
9698         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
9699         * dwarf2loc.c (dwarf2_compile_property_to_c)
9700         (locexpr_generate_c_location, loclist_generate_c_location): Take a
9701         'string_file &' instead of a 'ui_file *'.
9702         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
9703         * dwarf2read.c (do_ui_file_peek_last): Delete.
9704         (dwarf2_compute_name): Use string_file.
9705         * event-top.c (gdb_setup_readline): Use stdio_file.
9706         * gdbarch.sh (verify_gdbarch): Use string_file.
9707         * gdbtypes.c (safe_parse_type): Use null_stream.
9708         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
9709         string_file.
9710         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
9711         'string_file *' instead of a 'ui_file *'.
9712         (gdbscm_arch_disassemble): Use string_file.
9713         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
9714         * guile/scm-ports.c (class ioscm_file_port): Now a class that
9715         inherits from ui_file.
9716         (ioscm_file_port_delete, ioscm_file_port_rewind)
9717         (ioscm_file_port_put): Delete.
9718         (ioscm_file_port_write): Rename to ...
9719         (ioscm_file_port::write): ... this.  Remove file_port_magic
9720         checks.
9721         (ioscm_file_port_new): Delete.
9722         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
9723         ui_file_up.
9724         * guile/scm-type.c (tyscm_type_name): Use string_file.
9725         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
9726         Use string_file.
9727         * infcmd.c (print_return_value_1): Use string_file.
9728         * infrun.c (print_target_wait_results): Use string_file.
9729         * language.c (add_language): Use string_file.
9730         * location.c (explicit_to_string_internal): Use string_file.
9731         * main.c (captured_main_1): Use null_file.
9732         * maint.c (maintenance_print_architecture): Use stdio_file.
9733         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
9734         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
9735         event_channel>: Change type to mi_console_file pointer.
9736         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
9737         (mi_console_file_delete): Delete.
9738         (struct mi_console_file): Delete.
9739         (mi_console_file_magic): Delete.
9740         (mi_console_file_new): Delete.
9741         (mi_console_file::mi_console_file): New.
9742         (mi_console_file_delete): Delete.
9743         (mi_console_file_fputs): Delete.
9744         (mi_console_file::write): New.
9745         (mi_console_raw_packet): Delete.
9746         (mi_console_file::flush): New.
9747         (mi_console_file_flush): Delete.
9748         (mi_console_set_raw): Rename to ...
9749         (mi_console_file::set_raw): ... this.
9750         * mi/mi-console.h (class mi_console_file): New class.
9751         (mi_console_file_new, mi_console_set_raw): Delete.
9752         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
9753         (mi_set_logging): Use delete and tee_file.  Adjust.
9754         * mi/mi-main.c (output_register): Use string_file.
9755         (mi_cmd_data_evaluate_expression): Use string_file.
9756         (mi_cmd_data_read_memory): Use string_file.
9757         (mi_cmd_execute, print_variable_or_computed): Use string_file.
9758         * mi/mi-out.c (mi_ui_out::main_stream): New.
9759         (mi_ui_out::rewind): Use main_stream and
9760         string_file.
9761         (mi_ui_out::put): Use main_stream and string_file.
9762         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
9763         Allocate a 'string_file' instead.
9764         (mi_out_new): Don't allocate a mem_fileopen stream here.
9765         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
9766         (mi_ui_out::main_stream): Declare method.
9767         * printcmd.c (eval_command): Use string_file.
9768         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
9769         * python/py-arch.c (archpy_disassemble): Use string_file.
9770         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
9771         * python/py-frame.c (frapy_str): Use string_file.
9772         * python/py-framefilter.c (py_print_type, py_print_single_arg):
9773         Use string_file.
9774         * python/py-type.c (typy_str): Use string_file.
9775         * python/py-unwind.c (unwind_infopy_str): Use string_file.
9776         * python/py-value.c (valpy_str): Use string_file.
9777         * record-btrace.c (btrace_insn_history): Use string_file.
9778         * regcache.c (regcache_print): Use stdio_file.
9779         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
9780         * remote.c (escape_buffer): Use string_file.
9781         * rust-lang.c (rust_get_disr_info): Use string_file.
9782         * serial.c (serial_open_ops_1): Use stdio_file.
9783         (do_serial_close): Use delete.
9784         * stack.c (print_frame_arg): Use string_file.
9785         (print_frame_args): Remove local mem_fileopen stream, not used.
9786         (print_frame): Use string_file.
9787         * symmisc.c (maintenance_print_symbols): Use stdio_file.
9788         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
9789         Take a 'string_file *' instead of a 'ui_file *'.
9790         * top.c (new_ui): Use stdio_file and stderr_file.
9791         (free_ui): Use delete.
9792         (execute_command_to_string): Use string_file.
9793         (quit_confirm): Use string_file.
9794         * tracepoint.c (collection_list::append_exp): Use string_file.
9795         * tui/tui-disasm.c (tui_disassemble): Use string_file.
9796         * tui/tui-file.c: Don't include "ui-file.h".
9797         (enum streamtype, struct tui_stream): Delete.
9798         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
9799         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
9800         (tui_file::tui_file): New method.
9801         (tui_file_fputs): Delete.
9802         (tui_file_get_strbuf): Delete.
9803         (tui_file::puts): New method.
9804         (tui_file_adjust_strbuf): Delete.
9805         (tui_file_flush): Delete.
9806         (tui_file::flush): New method.
9807         * tui/tui-file.h: Tweak intro comment.
9808         Include ui-file.h.
9809         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
9810         (tui_file_adjust_strbuf): Delete declarations.
9811         (class tui_file): New class.
9812         * tui/tui-io.c (tui_initialize_io): Use tui_file.
9813         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
9814         (tui_register_format): Use string_stream.
9815         * tui/tui-stack.c (tui_make_status_line): Use string_file.
9816         (tui_get_function_from_frame): Use string_file.
9817         * typeprint.c (type_to_string): Use string_file.
9818         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
9819         (null_stream): New global.
9820         (ui_file_delete): Delete.
9821         (ui_file::ui_file): New.
9822         (null_file_isatty): Delete.
9823         (ui_file::~ui_file): New.
9824         (null_file_rewind): Delete.
9825         (ui_file::printf): New.
9826         (null_file_put): Delete.
9827         (null_file_flush): Delete.
9828         (ui_file::putstr): New.
9829         (null_file_write): Delete.
9830         (ui_file::putstrn): New.
9831         (null_file_read): Delete.
9832         (ui_file::putc): New.
9833         (null_file_fputs): Delete.
9834         (null_file_write_async_safe): Delete.
9835         (ui_file::vprintf): New.
9836         (null_file_delete): Delete.
9837         (null_file::write): New.
9838         (null_file_fseek): Delete.
9839         (null_file::puts): New.
9840         (ui_file_data): Delete.
9841         (null_file::write_async_safe): New.
9842         (gdb_flush, ui_file_isatty): Adjust.
9843         (ui_file_put, ui_file_rewind): Delete.
9844         (ui_file_write): Adjust.
9845         (ui_file_write_for_put): Delete.
9846         (ui_file_write_async_safe, ui_file_read): Adjust.
9847         (ui_file_fseek): Delete.
9848         (fputs_unfiltered): Adjust.
9849         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
9850         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
9851         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
9852         (set_ui_file_data): Delete.
9853         (string_file::~string_file, string_file::write)
9854         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
9855         (do_ui_file_as_string, ui_file_as_string): Delete.
9856         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
9857         (struct mem_file): Delete.
9858         (mem_file_new): Delete.
9859         (stdio_file::stdio_file): New.
9860         (mem_file_delete): Delete.
9861         (stdio_file::stdio_file): New.
9862         (mem_fileopen): Delete.
9863         (stdio_file::~stdio_file): New.
9864         (mem_file_rewind): Delete.
9865         (stdio_file::set_stream): New.
9866         (mem_file_put): Delete.
9867         (stdio_file::open): New.
9868         (mem_file_write): Delete.
9869         (stdio_file_magic, struct stdio_file): Delete.
9870         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
9871         (stdio_file::flush): New.
9872         (stdio_file_read): Rename to ...
9873         (stdio_file::read): ... this.  Adjust.
9874         (stdio_file_write): Rename to ...
9875         (stdio_file::write): ... this.  Adjust.
9876         (stdio_file_write_async_safe): Rename to ...
9877         (stdio_file::write_async_safe) ... this.  Adjust.
9878         (stdio_file_fputs): Rename to ...
9879         (stdio_file::puts) ... this.  Adjust.
9880         (stdio_file_isatty): Delete.
9881         (stdio_file_fseek): Delete.
9882         (stdio_file::isatty): New.
9883         (stderr_file_write): Rename to ...
9884         (stderr_file::write) ... this.  Adjust.
9885         (stderr_file_fputs): Rename to ...
9886         (stderr_file::puts) ... this.  Adjust.
9887         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
9888         (stderr_file::stderr_file): New.
9889         (tee_file_magic): Delete.
9890         (struct tee_file): Delete.
9891         (tee_file::tee_file): New.
9892         (tee_file_new): Delete.
9893         (tee_file::~tee_file): New.
9894         (tee_file_delete): Delete.
9895         (tee_file_flush): Rename to ...
9896         (tee_file::flush): ... this.  Adjust.
9897         (tee_file_write): Rename to ...
9898         (tee_file::write): ... this.  Adjust.
9899         (tee_file::write_async_safe): New.
9900         (tee_file_fputs): Rename to ...
9901         (tee_file::puts): ... this.  Adjust.
9902         (tee_file_isatty): Rename to ...
9903         (tee_file::isatty): ... this.  Adjust.
9904         * ui-file.h (struct obstack, struct ui_file): Don't
9905         forward-declare.
9906         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
9907         (ui_file_write_ftype)
9908         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
9909         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
9910         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
9911         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
9912         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
9913         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
9914         (set_ui_file_fseek): Delete.
9915         (ui_file_data, ui_file_delete, ui_file_rewind)
9916         (struct ui_file): New.
9917         (ui_file_up): New.
9918         (class null_file): New.
9919         (null_stream): Declare.
9920         (ui_file_write_for_put, ui_file_put): Delete.
9921         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
9922         Delete.
9923         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
9924         (gdb_fopen, tee_file_new): Delete.
9925         (struct string_file): New.
9926         (struct stdio_file): New.
9927         (stdio_file_up): New.
9928         (struct stderr_file): New.
9929         (class tee_file): New.
9930         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
9931         of a 'ui_file *'.  Adjust.
9932         * ui-out.h (class ui_out) <field_stream>: Likewise.
9933         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
9934         (null_stream): Delete.
9935         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
9936         Adjust.
9937         * utils.h (struct ui_file): Delete forward declaration..
9938         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
9939         (error_stream): Take a 'string_file &' instead of a
9940         'ui_file *'.
9941         * varobj.c (varobj_value_get_print_value): Use string_file.
9942         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
9943         * gdbarch.c: Regenerate.
9944
9945 2017-02-02  Pedro Alves  <palves@redhat.com>
9946
9947         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
9948         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
9949         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
9950         Adjust to call gdb_print_insn instead of
9951         gdb_disassembler::print_insn.
9952         (dump_insns, do_mixed_source_and_assembly_deprecated)
9953         (do_mixed_source_and_assembly, do_assembly_only): Add back a
9954         'gdbarch' parameter.  Remove gdb_disassembler parameter.
9955         (gdb_disassembly): Don't allocate a gdb_disassembler here.
9956         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
9957         declaration.
9958         (gdb_pretty_print_insn): Re-add declaration.
9959         * record-btrace.c (btrace_insn_history): Don't allocate a
9960         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
9961
9962 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
9963
9964         * disasm.h (gdb_disassembly): Remove file_string parameter.
9965         * disasm.c (gdb_disassembly): Likewise.
9966         * cli/cli-cmds.c (print_disassembly): Adapt.
9967         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
9968         * stack.c (do_gdb_disassembly): Likewise.
9969
9970 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9971
9972         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
9973         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
9974         targets.  And if the implicit value is longer than needed, extract
9975         the first bytes instead of the "least significant" ones.
9976
9977 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
9978
9979         * btrace.c (btrace_enable): Do not call btrace_add_pc for
9980         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
9981         (btrace_fetch): Assert can_access_registers_ptid.
9982         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
9983         validate_registers_access.
9984
9985 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
9986
9987         * gdbthread.h (can_access_registers_ptid): New.
9988         * thread.c (can_access_registers_ptid): New.
9989
9990 2017-02-01  Pedro Alves  <palves@redhat.com>
9991
9992         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
9993
9994 2017-01-31  Pedro Alves  <palves@redhat.com>
9995
9996         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
9997         Fix typos.
9998
9999 2017-01-31  Pedro Alves  <palves@redhat.com>
10000
10001         * stack.c (print_frame_args): Remove local mem_fileopen stream,
10002         not used.
10003
10004 2017-01-31  Pedro Alves  <palves@redhat.com>
10005
10006         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
10007
10008 2017-01-31  Pedro Alves  <palves@redhat.com>
10009
10010         * common/scoped_restore.h
10011         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
10012         change the value's parameter type to T2.
10013         (make_scoped_restore): Likewise.
10014
10015 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
10016             Richard Henderson  <rth@redhat.com>
10017
10018         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
10019         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
10020         GS_BASE for older kernels.
10021         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
10022         GS_BASE for older kernels.
10023         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
10024         and GS_BASE to the offset table.
10025         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
10026         system register group.
10027         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
10028         for older kernels.
10029         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
10030         amd64 ABI.
10031         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
10032         AMD64_GSBASE_REGNUM.
10033         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
10034         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
10035         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
10036         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
10037         i386/64bit-segments.xml in those rules.
10038         * features/i386/64bit-segments.xml: New file.
10039         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
10040         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
10041         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
10042         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
10043         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
10044         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
10045         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
10046         * features/i386/amd64-avx-linux.c: Regenerated.
10047         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
10048         * features/i386/amd64-avx-mpx.c: Regenerated.
10049         * features/i386/amd64-avx512-linux.c: Regenerated.
10050         * features/i386/amd64-linux.c: Regenerated.
10051         * features/i386/amd64-mpx-linux.c: Regenerated.
10052         * features/i386/i386-avx-mpx-linux.c: Regenerated.
10053         * features/i386/i386-avx-mpx.c: Regenerated.
10054         * features/i386/x32-avx-linux.c: Regenerated.
10055         * features/i386/x32-avx512-linux.c: Regenerated.
10056         * regformats/i386/amd64-avx-linux.dat: Regenerated.
10057         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
10058         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
10059         * regformats/i386/amd64-linux.dat: Regenerated.
10060         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
10061         * regformats/i386/x32-avx-linux.dat: Regenerated.
10062         * regformats/i386/x32-avx512-linux.dat: Regenerated.
10063         * regformats/i386/x32-linux.dat: Regenerated.
10064
10065 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
10066
10067         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
10068         Set to AMD64_NUM_REGS.
10069
10070 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
10071
10072         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
10073         that checks validity of a register number.
10074
10075 2017-01-27  Kees Cook  <keescook@google.com>
10076
10077         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
10078         fetch_fpregs if target has fpa registers.
10079         (arm_linux_store_inferior_registers): Call store_fpregs if target
10080         has fpa registers.
10081
10082 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10083
10084         * cris-tdep.c (cris_gdbarch_init): Remove check for
10085         info.byte_order and force it to BFD_ENDIAN_LITTLE.
10086
10087 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
10088
10089         * corelow.c (get_core_register_section): Check for regset
10090         existence before checking for REGSET_VARIABLE_SIZE.
10091
10092 2017-01-26  Yao Qi  <yao.qi@linaro.org>
10093             Pedro Alves  <palves@redhat.com>
10094
10095         PR gdb/20939
10096         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
10097         call memory_error, save memaddr instead.
10098         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
10099         negative, cal memory_error.
10100         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
10101
10102 2017-01-26  Yao Qi  <yao.qi@linaro.org>
10103
10104         * disasm-selftests.c (memory_error_test): New function.
10105         (_initialize_disasm_selftests): Register memory_error_test.
10106
10107 2017-01-26  Yao Qi  <yao.qi@linaro.org>
10108
10109         * Makefile.in (SFILES): Add disasm-selftests.c and
10110         selftest-arch.c.
10111         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
10112         * disasm-selftests.c: New file.
10113         * selftest-arch.c: New file.
10114         * selftest-arch.h: New file.
10115
10116 2017-01-26  Yao Qi  <yao.qi@linaro.org>
10117
10118         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
10119         to bfd_arch_mep.  Don't return 0 if section is not
10120         found.  Call print_insn_mep.
10121
10122 2017-01-26  Pedro Alves  <palves@redhat.com>
10123             Yao Qi  <yao.qi@linaro.org>
10124
10125         * arm-tdep.c: Include "disasm.h".
10126         (gdb_print_insn_arm): Update code to get gdbarch.
10127         * disasm.c (dis_asm_read_memory): Change it to
10128         gdb_disassembler::dis_asm_read_memory.
10129         (dis_asm_memory_error): Likewise.
10130         (dis_asm_print_address): Likewise.
10131         (gdb_pretty_print_insn): Change it to
10132         gdb_disassembler::pretty_print_insn.
10133         (dump_insns): Add one argument gdb_disassemlber.  All
10134         callers updated.
10135         (do_mixed_source_and_assembly_deprecated): Likewise.
10136         (do_mixed_source_and_assembly): Likewise.
10137         (do_assembly_only): Likewise.
10138         (gdb_disassembler::gdb_disassembler): New.
10139         (gdb_disassembler::print_insn): New.
10140         * disasm.h (class gdb_disassembler): New.
10141         (gdb_pretty_print_insn): Remove declaration.
10142         (gdb_disassemble_info): Likewise.
10143         * guile/scm-disasm.c (class gdbscm_disassembler): New.
10144         (gdbscm_disasm_read_memory_worker): Update.
10145         (gdbscm_disasm_read_memory): Update.
10146         (gdbscm_disasm_memory_error): Remove.
10147         (gdbscm_disasm_print_address): Remove.
10148         (gdbscm_disassembler::gdbscm_disassembler): New.
10149         (gdbscm_print_insn_from_port): Update.
10150         * mips-tdep.c: Include disasm.h.
10151         (gdb_print_insn_mips): Update code to get gdbarch.
10152         * record-btrace.c (btrace_insn_history): Update.
10153         * spu-tdep.c: Include disasm.h.
10154         (struct spu_dis_asm_data): Remove.
10155         (struct spu_dis_asm_info): New.
10156         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
10157         SPU id.
10158         (gdb_print_insn_spu): Cast disassemble_info to
10159         spu_dis_asm_info.
10160
10161 2017-01-26  Yao Qi  <yao.qi@linaro.org>
10162
10163         * disasm.c (do_ui_file_delete): Delete.
10164         (gdb_insn_length): Move code creating stream to ...
10165         * utils.c (null_stream): ... here.  New function.
10166         * utils.h (null_stream): Declare.
10167
10168 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
10169
10170         * python/py-inferior.c (find_thread_object): Return directly
10171         from the loop.  Remove "found" variable.
10172
10173 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
10174
10175         GDB 7.12.1 released.
10176
10177 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
10178
10179         * python/py-function.c (fnpy_call): Reorder declarations to have
10180         the gdbpy_enter object declared first.
10181         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
10182
10183 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
10184
10185         PR python/21068
10186         * python/python-internal.h (PyMem_RawMalloc): Define for
10187         Python < 3.4.
10188         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
10189         PyMem_RawMalloc instead of PyMem_Malloc.
10190
10191 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
10192             Luis Machado  <lgustavo@codesourcery.com>
10193
10194         * NEWS (New commands): Mention flash-erase.
10195         (New MI commands): Mention target-flash-erase.
10196         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
10197         command.
10198         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
10199         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
10200         * target.c (flash_erase_command): New function.
10201         (initialize_targets): Add new flash-erase command.
10202         * target.h (flash_erase_command): New declaration.
10203
10204 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
10205
10206         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
10207         HAVE_SYS_PROCFS_H is defined.
10208
10209 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
10210
10211         * remote.c (struct cached_reg): Change data into a pointer.
10212         * (stop_reply_dtr): Free data pointers before deleting vector.
10213         (process_stop_reply): Likewise.
10214         (remote_parse_stop_reply): Allocate space for data
10215
10216 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
10217
10218         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
10219         MAX_REGISTER_SIZE.
10220         (amd64_pseudo_register_read_value): Likewise.
10221         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
10222         (store_register_using_P): Likewise.
10223         * regcache.c (regcache_xfer_part): Likewise.
10224
10225 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
10226
10227         Split real and pseudo registers.
10228         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
10229         (sparc32_pseudo_regnum): New enum.
10230         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
10231         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
10232         (SPARC32_CP0_REGISTERS): New macro.
10233         (sparc32_pseudo_register_name): New function.
10234         (sparc32_register_name): Use sparc32_pseudo_register_name.
10235         (sparc32_pseudo_register_type): New function.
10236         (sparc32_register_type): Use sparc32_pseudo_register_type.
10237         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
10238         pseudo register numbers.
10239         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
10240         (SPARC64_CP0_REGISTERS): New macro.
10241         (sparc64_pseudo_register_name): New function.
10242         (sparc64_register_name): Use sparc64_pseudo_register_name.
10243         (sparc64_pseudo_register_type): New function.
10244         (sparc64_register_type): Use sparc64_pseudo_register_type.
10245         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
10246         pseudo register numbers.
10247         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
10248         sparc64_store_arguments): Handle pseudo register numbers.
10249
10250 2017-01-13  Yao Qi  <yao.qi@linaro.org>
10251
10252         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
10253         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
10254         output.
10255         (getpkt_or_notif_sane_1): Likewise.
10256
10257 2017-01-13  Yao Qi  <yao.qi@linaro.org>
10258
10259         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
10260         of CC.  Pass "-x c++-header" instead of "-x c".
10261
10262 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
10263
10264         * remote.c (remote_can_async_p): Update comment.
10265
10266 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
10267
10268         * linux-nat.c (linux_nat_can_async_p): Update comment.
10269
10270 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
10271
10272         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
10273
10274 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
10275
10276         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
10277
10278 2017-01-10  Tom Tromey  <tom@tromey.com>
10279
10280         * python/py-type.c (typy_legacy_template_argument): Update.
10281         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
10282         ~demangle_parse_info): Declare new members.
10283         (cp_demangled_name_to_comp): Return unique_ptr.
10284         (cp_demangled_name_parse_free)
10285         (make_cleanup_cp_demangled_name_parse_free)
10286         (cp_new_demangle_parse_info): Remove.
10287         * cp-support.c (do_demangled_name_parse_free_cleanup)
10288         (make_cleanup_cp_demangled_name_parse_free): Remove.
10289         (inspect_type, cp_canonicalize_string_full)
10290         (cp_canonicalize_string): Update.
10291         (mangled_name_to_comp): Change return type.
10292         (cp_class_name_from_physname, method_name_from_physname)
10293         (cp_func_name, cp_remove_params): Update.
10294         * cp-name-parser.y (demangle_parse_info): New constructor, from
10295         cp_new_demangle_parse_info.
10296         (~demangle_parse_info): New destructor, from
10297         cp_demangled_name_parse_free.
10298         (cp_merge_demangle_parse_infos): Update.
10299         (cp_demangled_name_to_comp): Change return type.
10300
10301 2017-01-10  Tom Tromey  <tom@tromey.com>
10302
10303         * top.c (prevent_dont_repeat): Change return type.
10304         * python/python.c (execute_gdb_command): Use std::string.
10305         Update.
10306         * guile/guile.c (gdbscm_execute_gdb_command): Update.
10307         * command.h (prevent_dont_repeat): Change return type.
10308         * breakpoint.c (bpstat_do_actions_1): Update.
10309
10310 2017-01-10  Tom Tromey  <tom@tromey.com>
10311
10312         * value.h (scoped_value_mark::~scoped_value_mark): Call
10313         free_to_mark.
10314         (scoped_value_mark::free_to_mark): New method.
10315         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
10316         scoped_value_mark.
10317
10318 2017-01-10  Tom Tromey  <tom@tromey.com>
10319
10320         * python/py-value.c (valpy_dereference, valpy_referenced_value)
10321         (valpy_reference_value, valpy_const_value, valpy_get_address)
10322         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
10323         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
10324         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
10325         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
10326         scoped_value_mark.
10327         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
10328         * value.h (scoped_value_mark): New class.
10329
10330 2017-01-10  Tom Tromey  <tom@tromey.com>
10331
10332         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
10333         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
10334         * psymtab.c (discard_psymtabs_upto): Remove.
10335         (make_cleanup_discard_psymtabs): Remove.
10336         (struct psymtab_state): Remove.
10337
10338 2017-01-10  Tom Tromey  <tom@tromey.com>
10339
10340         * record-full.c (record_full_save_cleanups): Remove.
10341         (record_full_save): Use gdb::unlinker.
10342         * gcore.c (do_bfd_delete_cleanup): Remove.
10343         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
10344         cleanups.
10345         * dwarf2read.c (unlink_if_set): Remove.
10346         (write_psymtabs_to_index): Use gdb::unlinker.
10347         * common/gdb_unlinker.h: New file.
10348
10349 2017-01-10  Tom Tromey  <tom@tromey.com>
10350
10351         * windows-tdep.c (windows_xfer_shared_library): Update.
10352         * windows-nat.c (windows_make_so): Update.
10353         * utils.h (make_cleanup_bfd_unref): Remove.
10354         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
10355         * symfile.h (symfile_bfd_open)
10356         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
10357         * symfile.c (read_symbols, symbol_file_add)
10358         (separate_debug_file_exists): Update.
10359         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
10360         (generic_load, reread_symbols): Update.
10361         * symfile-mem.c (symbol_file_add_from_memory): Update.
10362         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
10363         (spu_symbol_file_add_from_memory): Update.
10364         * solist.h (struct target_so_ops) <bfd_open>: Return
10365         gdb_bfd_ref_ptr.
10366         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
10367         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
10368         gdb_bfd_ref_ptr.
10369         (solib_map_sections, reload_shared_libraries_1): Update.
10370         * solib-svr4.c (enable_break): Update.
10371         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
10372         * solib-frv.c (enable_break2): Update.
10373         * solib-dsbt.c (enable_break): Update.
10374         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
10375         gdb_bfd_ref_ptr.
10376         (darwin_solib_get_all_image_info_addr_at_init): Update.
10377         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
10378         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
10379         * record-full.c (record_full_save): Update.
10380         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
10381         * procfs.c (insert_dbx_link_bpt_in_file): Update.
10382         * minidebug.c (find_separate_debug_file_in_section): Return
10383         gdb_bfd_ref_ptr.
10384         * machoread.c (macho_add_oso_symfile): Change abfd to
10385         gdb_bfd_ref_ptr.
10386         (macho_symfile_read_all_oso): Update.
10387         (macho_check_dsym): Return gdb_bfd_ref_ptr.
10388         (macho_symfile_read): Update.
10389         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
10390         (jit_bfd_try_read_symtab): Update.
10391         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10392         (gdb_bfd_openw, gdb_bfd_openr_iovec)
10393         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
10394         gdb_bfd_ref_ptr.
10395         (gdb_bfd_ref_policy): New struct.
10396         (gdb_bfd_ref_ptr): New typedef.
10397         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10398         (gdb_bfd_openw, gdb_bfd_openr_iovec)
10399         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
10400         gdb_bfd_ref_ptr.
10401         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
10402         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
10403         (gcore_command): Update.
10404         * exec.c (exec_file_attach): Update.
10405         * elfread.c (elf_symfile_read): Update.
10406         * dwarf2read.c (dwarf2_get_dwz_file): Update.
10407         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
10408         (open_and_init_dwo_file): Update.
10409         (open_dwp_file): Return gdb_bfd_ref_ptr.
10410         (open_and_init_dwp_file): Update.
10411         * corelow.c (core_open): Update.
10412         * compile/compile-object-load.c (compile_object_load): Update.
10413         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
10414         * coffread.c (coff_symfile_read): Update.
10415         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
10416         gdb_bfd_ref_ptr.  Rename.
10417         (dump_bfd_file, restore_command): Update.
10418         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
10419         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
10420         (find_separate_debug_file_by_buildid): Update.
10421
10422 2017-01-10  Tom Tromey  <tom@tromey.com>
10423
10424         * common/gdb_ref_ptr.h: New file.
10425         * python/py-ref.h (struct gdbpy_ref_policy): New.
10426         (gdbpy_ref): Now a typedef.
10427
10428 2017-01-10  Tom Tromey  <tom@tromey.com>
10429
10430         * utils.h (make_cleanup_htab_delete): Don't declare.
10431         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
10432         Remove.
10433         * linespec.c (decode_compound_collector): Add constructor,
10434         destructor.
10435         (lookup_prefix_sym): Remove cleanup.
10436         (symtab_collector): Add constructor, destructor.
10437         (collect_symtabs_from_filename): Remove cleanup.
10438         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
10439         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
10440         Use htab_up.
10441         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
10442         * dwarf2read.c (dw2_expand_symtabs_matching)
10443         (dw2_map_symbol_filenames, dwarf_decode_macros)
10444         (write_psymtabs_to_index): Use htab_up.
10445         * dwarf2loc.c (func_verify_no_selftailcall)
10446         (call_site_find_chain_1, func_verify_no_selftailcall)
10447         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
10448         std::vector, gdb::unique_xmalloc_ptr.
10449         (call_sitep): Remove typedef.
10450         (dwarf2_locexpr_baton_eval): Remove unused variable.
10451
10452 2017-01-10  Tom Tromey  <tom@tromey.com>
10453
10454         * python/python-internal.h (make_cleanup_py_decref)
10455         (make_cleanup_py_xdecref): Don't declare.
10456         * python/py-utils.c (py_decref, make_cleanup_py_decref)
10457         (py_xdecref, make_cleanup_py_xdecref): Remove.
10458
10459 2017-01-10  Tom Tromey  <tom@tromey.com>
10460
10461         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
10462         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
10463
10464 2017-01-10  Tom Tromey  <tom@tromey.com>
10465
10466         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
10467
10468 2017-01-10  Tom Tromey  <tom@tromey.com>
10469
10470         * python/py-utils.c (unicode_to_encoded_string)
10471         (python_string_to_target_string)
10472         (python_string_to_target_python_string)
10473         (python_string_to_host_string, gdbpy_obj_to_string)
10474         (get_addr_from_python): Use gdbpy_ref.
10475
10476 2017-01-10  Tom Tromey  <tom@tromey.com>
10477
10478         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
10479         gdbpy_ref.
10480
10481 2017-01-10  Tom Tromey  <tom@tromey.com>
10482
10483         * python/python.c (eval_python_command, gdbpy_decode_line)
10484         (gdbpy_run_events, gdbpy_start_type_printers)
10485         (gdbpy_apply_type_printers): Use gdbpy_ref.
10486
10487 2017-01-10  Tom Tromey  <tom@tromey.com>
10488
10489         * python/py-param.c (get_doc_string, compute_enum_values): Use
10490         gdbpy_ref.
10491
10492 2017-01-10  Tom Tromey  <tom@tromey.com>
10493
10494         * python/py-inferior.c (find_thread_object, build_inferior_list):
10495         Use gdbpy_ref.
10496
10497 2017-01-10  Tom Tromey  <tom@tromey.com>
10498
10499         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
10500
10501 2017-01-10  Tom Tromey  <tom@tromey.com>
10502
10503         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
10504         gdbpy_ref.
10505
10506 2017-01-10  Tom Tromey  <tom@tromey.com>
10507
10508         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
10509         extra incref.
10510         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
10511         Use gdbpy_ref.
10512
10513 2017-01-10  Tom Tromey  <tom@tromey.com>
10514
10515         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
10516         gdbpy_ref.
10517
10518 2017-01-10  Tom Tromey  <tom@tromey.com>
10519
10520         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
10521         decref results of PyArg_ParseTupleAndKeywords.
10522
10523 2017-01-10  Tom Tromey  <tom@tromey.com>
10524
10525         * python/python.c (python_run_simple_file): Use
10526         unique_xmalloc_ptr, gdbpy_ref.
10527
10528 2017-01-10  Tom Tromey  <tom@tromey.com>
10529
10530         * python/py-prettyprint.c (print_stack_unless_memory_error)
10531         (print_string_repr, print_children): Use gdbpy_ref.
10532         (dummy_python_frame): New class.
10533         (dummy_python_frame::dummy_python_frame): Rename from
10534         push_dummy_python_frame.
10535         (py_restore_tstate): Remove.
10536
10537 2017-01-10  Tom Tromey  <tom@tromey.com>
10538
10539         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
10540
10541 2017-01-10  Tom Tromey  <tom@tromey.com>
10542
10543         * python/python.c (ensure_python_env, restore_python_env):
10544         Remove.
10545         * python/python-internal.h (ensure_python_env): Don't declare.
10546         * varobj.h (varobj_ensure_python_env): Don't declare.
10547         * varobj.c (varobj_ensure_python_env): Remove.
10548
10549 2017-01-10  Tom Tromey  <tom@tromey.com>
10550
10551         * varobj.c (varobj_value_get_print_value): Use
10552         gdbpy_enter_varobj.
10553
10554 2017-01-10  Tom Tromey  <tom@tromey.com>
10555
10556         * python/py-prettyprint.c (print_string_repr, print_children):
10557         Update.
10558         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
10559         of "encoding".
10560         * varobj.c (varobj_value_get_print_value): Update.
10561         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
10562
10563 2017-01-10  Tom Tromey  <tom@tromey.com>
10564
10565         * varobj.c (varobj_get_display_hint)
10566         (dynamic_varobj_has_child_method, install_new_value_visualizer)
10567         (varobj_set_visualizer, free_variable): Use
10568         gdbpy_enter_varobj.
10569
10570 2017-01-10  Tom Tromey  <tom@tromey.com>
10571
10572         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
10573         (do_finish_initialization): New function.  Use gdbpy_ref.
10574         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
10575         do_finish_initialization.
10576
10577 2017-01-10  Tom Tromey  <tom@tromey.com>
10578
10579         * python/py-param.c (get_set_value, get_show_value): Use
10580         gdbpy_enter, gdbpy_ref.
10581
10582 2017-01-10  Tom Tromey  <tom@tromey.com>
10583
10584         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
10585
10586 2017-01-10  Tom Tromey  <tom@tromey.com>
10587
10588         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
10589
10590 2017-01-10  Tom Tromey  <tom@tromey.com>
10591
10592         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
10593         Use gdbpy_enter_varobj.
10594
10595 2017-01-10  Tom Tromey  <tom@tromey.com>
10596
10597         * varobj.c (gdbpy_enter_varobj): New constructor.
10598         * python/python-internal.h (gdbpy_enter_varobj): New class.
10599         * python/py-varobj.c (py_varobj_get_iterator): Use
10600         gdbpy_enter_varobj.
10601
10602 2017-01-10  Tom Tromey  <tom@tromey.com>
10603
10604         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
10605         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
10606         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
10607         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
10608         unique_xmalloc_ptr.
10609         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
10610
10611 2017-01-10  Tom Tromey  <tom@tromey.com>
10612
10613         * python/py-xmethods.c (invoke_match_method): Use
10614         gdbpy_ref.
10615
10616 2017-01-10  Tom Tromey  <tom@tromey.com>
10617
10618         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
10619         gdbpy_enter, gdbpy_ref.
10620
10621 2017-01-10  Tom Tromey  <tom@tromey.com>
10622
10623         * python/python.c (python_interactive_command): Use gdbpy_enter.
10624
10625 2017-01-10  Tom Tromey  <tom@tromey.com>
10626
10627         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
10628         gdbpy_ref.
10629
10630 2017-01-10  Tom Tromey  <tom@tromey.com>
10631
10632         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
10633         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
10634
10635 2017-01-10  Tom Tromey  <tom@tromey.com>
10636
10637         * utils.h (htab_deleter): New struct.
10638         (htab_up): New typedef.
10639         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
10640         gdbpy_enter, gdbpy_ref, htab_up.
10641
10642 2017-01-10  Tom Tromey  <tom@tromey.com>
10643
10644         * python/py-unwind.c (pending_frame_invalidate): Remove.
10645         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
10646
10647 2017-01-10  Tom Tromey  <tom@tromey.com>
10648
10649         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
10650         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
10651
10652 2017-01-10  Tom Tromey  <tom@tromey.com>
10653
10654         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
10655
10656 2017-01-10  Tom Tromey  <tom@tromey.com>
10657
10658         * python/python.c (gdbpy_eval_from_control_command)
10659         (gdbpy_source_script, gdbpy_run_events)
10660         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
10661         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
10662         gdbpy_enter.
10663
10664 2017-01-10  Tom Tromey  <tom@tromey.com>
10665
10666         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
10667
10668 2017-01-10  Tom Tromey  <tom@tromey.com>
10669
10670         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
10671
10672 2017-01-10  Tom Tromey  <tom@tromey.com>
10673
10674         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
10675         (python_on_inferior_call_pre, python_on_inferior_call_post)
10676         (python_on_memory_change, python_on_register_change)
10677         (python_inferior_exit, python_new_objfile, add_thread_object)
10678         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
10679
10680 2017-01-10  Tom Tromey  <tom@tromey.com>
10681
10682         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
10683         (bpfinishpy_handle_exit): Use gdbpy_enter.
10684
10685 2017-01-10  Tom Tromey  <tom@tromey.com>
10686
10687         * python/py-cmd.c (cmdpy_destroyer)
10688         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
10689         gdbpy_enter.
10690
10691 2017-01-10  Tom Tromey  <tom@tromey.com>
10692
10693         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
10694         gdbpy_enter.
10695         (gdbpy_breakpoint_has_cond): Likewise.
10696
10697 2017-01-10  Tom Tromey  <tom@tromey.com>
10698
10699         * python/python.c (gdbpy_enter): New constructor.
10700         (~gdbpy_enter): New destructor.
10701         (restore_python_env, ensure_python_env): Rewrite.
10702         * python/python-internal.h (gdbpy_enter): New class.
10703
10704 2017-01-10  Tom Tromey  <tom@tromey.com>
10705
10706         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
10707
10708 2017-01-10  Tom Tromey  <tom@tromey.com>
10709
10710         * python/py-value.c (value_has_field, get_field_flag)
10711         (get_field_type, valpy_getitem, convert_value_from_python): Use
10712         gdbpy_ref.
10713
10714 2017-01-10  Tom Tromey  <tom@tromey.com>
10715
10716         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
10717         gdbpy_ref.
10718
10719 2017-01-10  Tom Tromey  <tom@tromey.com>
10720
10721         * python/py-prettyprint.c (search_pp_list)
10722         (find_pretty_printer_from_objfiles)
10723         (find_pretty_printer_from_progspace)
10724         (find_pretty_printer_from_gdb, find_pretty_printer)
10725         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
10726         gdbpy_ref.
10727
10728 2017-01-10  Tom Tromey  <tom@tromey.com>
10729
10730         * python/py-param.c (call_doc_function): Use gdbpy_ref.
10731
10732 2017-01-10  Tom Tromey  <tom@tromey.com>
10733
10734         * python/py-linetable.c (build_line_table_tuple_from_pcs)
10735         (ltpy_get_all_source_lines): Use gdbpy_ref.
10736
10737 2017-01-10  Tom Tromey  <tom@tromey.com>
10738
10739         * python/py-framefilter.c (extract_sym, extract_value)
10740         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
10741         gdbpy_ref.
10742
10743 2017-01-10  Tom Tromey  <tom@tromey.com>
10744
10745         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
10746
10747 2017-01-10  Tom Tromey  <tom@tromey.com>
10748
10749         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
10750
10751 2017-01-10  Tom Tromey  <tom@tromey.com>
10752
10753         * python/py-function.c (convert_values_to_python, fnpy_init): Use
10754         gdbpy_ref.
10755
10756 2017-01-10  Tom Tromey  <tom@tromey.com>
10757
10758         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
10759
10760 2017-01-10  Tom Tromey  <tom@tromey.com>
10761
10762         * python/py-type.c (convert_field, make_fielditem, typy_fields)
10763         (typy_range): Use gdbpy_ref.
10764
10765 2017-01-10  Tom Tromey  <tom@tromey.com>
10766
10767         * python/py-threadevent.c (create_thread_event_object): Use
10768         gdbpy_ref.
10769         * python/py-stopevent.c (create_stop_event_object): Simplify.
10770         (emit_stop_event): Use gdbpy_ref.
10771         * python/py-signalevent.c (create_signal_event_object): Use
10772         gdbpy_ref.
10773         * python/py-newobjfileevent.c (create_new_objfile_event_object)
10774         (emit_new_objfile_event, create_clear_objfiles_event_object)
10775         (emit_clear_objfiles_event): Use gdbpy_ref.
10776         * python/py-infevents.c (create_inferior_call_event_object)
10777         (create_register_changed_event_object)
10778         (create_memory_changed_event_object, emit_inferior_call_event)
10779         (emit_memory_changed_event, emit_register_changed_event): Use
10780         gdbpy_ref.
10781         * python/py-exitedevent.c (create_exited_event_object)
10782         (emit_exited_event): Use gdbpy_ref.
10783         * python/py-event.h (evpy_emit_event): Remove
10784         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
10785         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
10786         * python/py-continueevent.c (emit_continue_event): Use
10787         gdbpy_ref.
10788         * python/py-breakpoint.c (gdbpy_breakpoint_created)
10789         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
10790         gdbpy_ref.
10791         * python/py-bpevent.c (create_breakpoint_event_object): Use
10792         gdbpy_ref.
10793
10794 2017-01-10  Tom Tromey  <tom@tromey.com>
10795
10796         * python/py-ref.h: New file.
10797
10798 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
10799
10800         * cli-out.c (cli_ui_out::do_redirect): Change return type to
10801         void.
10802         * cli-out.h (cli_ui_out::do_redirect): Likewise.
10803         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
10804         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
10805         * ui-out.c (ui_out::redirect): Likewise.
10806         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
10807         * cli/cli-logging.c (set_logging_redirect): Update call site of
10808         ui_out::redirect.
10809         (handle_redirections): Likewise.
10810         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
10811         * top.c (execute_command_to_string): Likewise.
10812         * utils.c (do_ui_out_redirect_pop): Likewise.
10813
10814 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
10815
10816         * stack.c (_initialize_stack): Update "frame" command help message.
10817
10818 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
10819
10820         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
10821
10822 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10823
10824         * x86-linux-nat.h: Include gdb_proc_service.h.
10825
10826 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10827
10828         * ser-base.h: Include serial.h.
10829
10830 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10831
10832         * ppc-linux-tdep.h: Include ppc-tdep.h.
10833
10834 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10835
10836         * nat/amd64-linux-siginfo.h: Include signal.h.
10837
10838 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10839
10840         * nat/aarch64-linux-hw-point.h: Include break-common.h.
10841
10842 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10843
10844         * mi/mi-parse.h: Include mi-cmds.h.
10845
10846 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10847
10848         * inf-loop.c: Don't include "target.h".
10849         * inf-loop.h: Include it here.
10850
10851 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10852
10853         * dfp.h: Include "dboulest.h" and "expression.h".
10854
10855 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10856
10857         * ax-gdb.h: Include "ax.h".
10858
10859 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10860
10861         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
10862         with nat/gdb_ptrace.h.
10863
10864 2017-01-05  Yao Qi  <yao.qi@linaro.org>
10865
10866         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
10867         new line.
10868         (mips64_fbsd_sigframe_init): Likewise.
10869
10870 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
10871
10872         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
10873         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
10874
10875 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
10876
10877         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
10878         * NEWS: Mention new FreeBSD/mips native configuration.
10879         * config/mips/fbsd.mh: New file.
10880         * configure.host: Add mips*-*-freebsd*.
10881         * mips-fbsd-nat.c: New file.
10882
10883 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
10884
10885         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
10886         (ALLDEPFILES): Add mips-fbsd-tdep.c.
10887         * NEWS: Mention new FreeBSD/mips target.
10888         * configure.tgt: Add mips*-*-freebsd*.
10889         * mips-fbsd-tdep.c: New file.
10890         * mips-fbsd-tdep.h: New file.
10891
10892 2017-01-04  Yao Qi  <yao.qi@linaro.org>
10893
10894         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
10895         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
10896
10897 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
10898
10899         Update copyright year range in all GDB files.
10900
10901 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
10902
10903         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
10904
10905 For older changes see ChangeLog-2016.
10906 \f
10907 Local Variables:
10908 mode: change-log
10909 left-margin: 8
10910 fill-column: 74
10911 version-control: never
10912 coding: utf-8
10913 End: