dwarf2expr: Remove unused abort_expression label in execute_stack_op
[external/binutils.git] / gdb / ChangeLog
1 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
2
3         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
4         label abort_expression.
5
6 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
7
8         * common/buffer.c (buffer_xml_printf): Adjust.
9         * common/xml-utils.c (xml_escape_text): Change return type to
10         std::string, update code accordingly.
11         * common/xml-utils.h (xml_escape_text): Change return type to
12         std::string.
13         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
14         * windows-tdep.c (windows_xfer_shared_library): Adjust.
15         * unittests/xml-utils-selftests.c (test_xml_escape_text):
16         Adjust.
17
18 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
19
20         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
21         (SUBDIR_UNITTESTS_OBS): Add new object file.
22         * unittests/xml-utils-selftests.c: New file.
23
24 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
25
26         * common/selftest.h (selftest): New struct/interface.
27         (register_test): Add name parameter, add new overload.
28         (run_tests): Add filter parameter.
29         (for_each_selftest_ftype): New typedef.
30         (for_each_selftest): New declaration.
31         * common/selftest.c (tests): Change type to
32         map<string, unique_ptr<selftest>>.
33         (simple_selftest): New struct.
34         (register_test): New function.
35         (register_test): Add name parameter and use it.
36         (run_tests): Add filter parameter and use it.  Add prints.
37         Adjust to vector -> map change.
38         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
39         registering selftests.
40         * arm-tdep.c (_initialize_arm_tdep): Likewise.
41         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
42         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
43         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
44         * findvar.c (_initialize_findvar): Likewise.
45         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
46         * maint.c (maintenance_selftest): Update call to run_tests.
47         (maintenance_info_selftests): New function.
48         (_initialize_maint_cmds): Register "maintenance info selftests"
49         command.  Update "maintenance selftest" doc.
50         * regcache.c (_initialize_regcache): Add names when registering
51         selftests.
52         * rust-exp.y (_initialize_rust_exp): Likewise.
53         * selftest-arch.c (gdbarch_selftest): New struct.
54         (gdbarch_tests): Remove.
55         (register_test_foreach_arch): Add name parameter.  Call
56         register_test.
57         (tests_with_arch): Remove, move most content to
58         gdbarch_selftest::operator().
59         (_initialize_selftests_foreach_arch): Remove.
60         * selftest-arch.h (register_test_foreach_arch): Add name
61         parameter.
62         (run_tests_with_arch): New declaration.
63         * utils-selftests.c (_initialize_utils_selftests): Add names
64         when registering selftests.
65         * utils.c (_initialize_utils): Likewise.
66         * unittests/array-view-selftests.c
67         (_initialize_array_view_selftests): Likewise.
68         * unittests/environ-selftests.c (_initialize_environ_selftests):
69         Likewise.
70         * unittests/function-view-selftests.c
71         (_initialize_function_view_selftests): Likewise.
72         * unittests/offset-type-selftests.c
73         (_initialize_offset_type_selftests): Likewise.
74         * unittests/optional-selftests.c
75         (_initialize_optional_selftests): Likewise.
76         * unittests/scoped_restore-selftests.c
77         (_initialize_scoped_restore_selftests): Likewise.
78         * NEWS: Document "maintenance selftest" and "maint info
79         selftests".
80
81 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
82
83         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
84         scoped_restore.
85
86 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
87
88         * mi/mi-main.c (mi_load_progress): Make uiout variable
89         a unique_ptr.
90
91 2017-09-15  Pedro Alves  <palves@redhat.com>
92
93         * compile/compile-c-types.c (convert_enum, convert_int)
94         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
95
96 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
97
98         * dwarf2read.c (copy_string): Remove.
99         (parse_macro_definition): Replace copy_string with savestring.
100
101 2017-09-15  Yao Qi  <yao.qi@linaro.org>
102
103         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
104         gdb_target_obs.
105         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
106         Likewise.
107         (i[34567]86-*-linux*): Likewise.
108
109 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
110
111         * dwarf2expr.h (dwarf_stack_value): Add constructor.
112         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
113         <stack>: Change type to std::vector.
114         <stack_len, stack_allocated>: Remove.
115         <grow_stack>: Remove.
116         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
117         (dwarf_expr_context::~dwarf_expr_context): Remove.
118         (dwarf_expr_context::grow_stack): Remove.
119         (dwarf_expr_context::push): Adjust.
120         (dwarf_expr_context::pop): Adjust.
121         (dwarf_expr_context::fetch): Adjust.
122         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
123         (dwarf_expr_context::stack_empty_p): Adjust.
124         (dwarf_expr_context::execute_stack_op): Adjust.
125
126 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
127
128         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
129         return type to bool.
130         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
131
132 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
133
134         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
135         Change type to bool.
136         (dwarf_stack_value) <in_stack_memory>: Likewise.
137         (dwarf_expr_context) <push_address>: Change parameter type to
138         bool.
139         <fetch_in_stack_memory>: Change return type to bool.
140         <push>: Change parameter type to bool.
141         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
142         to bool.
143         (dwarf_expr_context::push_address): Likewise.
144         (dwarf_expr_context::fetch_in_stack_memory): Change return type
145         to bool.
146         (dwarf_expr_context::execute_stack_op): Adjust.
147         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
148
149 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
150
151         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
152         (struct dwarf_expr_context) <n_pieces>: Remove.
153         <pieces>: Change type to std::vector.
154         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
155         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
156         pieces.
157         (dwarf_expr_context::add_piece): Adjust.
158         * dwarf2loc.c (struct piece_closure): Initialize fields.
159         <n_pieces>: Remove.
160         <pieces>: Change type to std::vector.
161         (allocate_piece_closure): Adjust, change parameter to
162         std::vector rvalue and std::move it to piece_closure.
163         (rw_pieced_value): Adjust.
164         (check_pieced_synthetic_pointer): Adjust.
165         (indirect_synthetic_pointer): Adjust.
166         (coerce_pieced_ref): Adjust.
167         (free_pieced_value_closure):  Adjust.  Use delete to free
168         piece_closure.
169         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
170         to allocate_piece_closure.
171         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
172
173 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
174
175         * probe.h (probe_ops_cp): Remove typedef.
176         (DEF_VEC_P (probe_ops_cp)): Remove.
177         (all_probe_ops): Change type to std::vector.
178         * probe.c (info_probes_for_ops): Adjust to vector change.
179         (probe_linespec_to_ops): Likewise.
180         (all_probe_ops): Change type to std::vector.
181         (_initialize_probe): Adjust to vector change.
182         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
183         * elfread.c (elf_get_probes): Likewise.
184         * stap-probe.c (_initialize_stap_probe): Likewise.
185
186 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
187
188         * probe.h (struct bound_probe): Define constructors.
189         * probe.c (bound_probe_s): Remove typedef.
190         (DEF_VEC_O (bound_probe_s)): Remove VEC.
191         (collect_probes): Change return type to std::vector, remove
192         cleanup.
193         (compare_probes): Return bool, change parameter type.  Change
194         semantic to "less than".
195         (gen_ui_out_table_header_info): Change parameter to std::vector
196         and update.
197         (exists_probe_with_pops): Likewise.
198         (info_probes_for_ops): Update to std::vector change.
199         (enable_probes_command): Likewise.
200         (disable_probes_command): Likewise.
201
202 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
203
204         * probe.h (struct probe_ops) <get_probes>: Change parameter from
205         vec to std::vector.
206         * probe.c (parse_probes_in_pspace): Update.
207         (find_probes_in_objfile): Update.
208         (find_probe_by_pc): Update.
209         (collect_probes): Update.
210         (probe_any_get_probes): Update.
211         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
212         return type to reference to std::vector.
213         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
214         std::vector and update.
215         (dtrace_process_dof): Likewise.
216         (dtrace_get_probes): Likewise.
217         * elfread.c (elf_get_probes): Change return type to std::vector,
218         store an std::vector in bfd_data.
219         (probe_key_free): Update to std::vector.
220         * stap-probe.c (handle_stap_probe): Change parameter to
221         std::vector and update.
222         (stap_get_probes): Likewise.
223         * symfile-debug.c (debug_sym_get_probes): Change return type to
224         std::vector and update.
225
226 2017-09-11  Tom Tromey  <tom@tromey.com>
227
228         * breakpoint.c (program_breakpoint_here_p): Update.
229         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
230         from make_show_memory_breakpoints_cleanup.  Return a
231         scoped_restore_tmpl<int>.
232         (restore_show_memory_breakpoints): Remove.
233         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
234         * mem-break.c (memory_validate_breakpoint): Update.
235         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
236         (ia64_memory_remove_breakpoint): Update.
237         (ia64_breakpoint_from_pc): Update.
238         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
239         from make_show_memory_breakpoints_cleanup.
240
241 2017-09-11  Tom Tromey  <tom@tromey.com>
242
243         * d-namespace.c (d_lookup_symbol): Use std::string.
244         (find_symbol_in_baseclass): Likewise.
245
246 2017-09-11  Tom Tromey  <tom@tromey.com>
247
248         * ctf.c (ctf_start): Use std::string.
249
250 2017-09-11  Tom Tromey  <tom@tromey.com>
251
252         * ada-lang.c (is_known_support_routine): Update.
253         (ada_unhandled_exception_name_addr_from_raise): Update.
254         * guile/scm-frame.c (gdbscm_frame_name): Update.
255         * python/py-frame.c (frapy_name): Update.
256         (frapy_function): Update.
257         * stack.h (find_frame_funname): Update.
258         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
259         (print_frame): Update.
260
261 2017-09-11  Tom Tromey  <tom@tromey.com>
262
263         * findcmd.c (put_bits): Take a gdb::byte_vector.
264         (parse_find_args): Return gdb::byte_vector.  "args" now const.
265         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
266         cleanups.
267         (find_command): Update.
268
269 2017-09-11  Tom Tromey  <tom@tromey.com>
270
271         * cli/cli-script.c (class scoped_restore_hook_in): New.
272         (clear_hook_in_cleanup): Remove.
273         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
274         scoped_restore_hook_in.
275
276 2017-09-11  Tom Tromey  <tom@tromey.com>
277
278         * cli/cli-script.c (restore_interp): Remove.
279         (read_command_lines): Use scoped_restore_interp.
280         * interps.c (scoped_restore_interp::set_temp): Rename from
281         interp_set_temp.
282         * interps.h (class scoped_restore_interp): New.
283         (interp_set_temp): Remove.
284
285 2017-09-11  Tom Tromey  <tom@tromey.com>
286
287         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
288         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
289         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
290         scoped_restore.
291         (mi_cmd_break_insert_1): Update.
292         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
293         scoped_restore.
294
295 2017-09-11  Tom Tromey  <tom@tromey.com>
296
297         * demangle.c (demangle_command): Update.
298         * breakpoint.c (disable_command): Update.
299         (enable_command): Update.
300         (find_location_by_number): Make "number" const.  Use
301         get_number_trailer.
302         * cli/cli-utils.c (extract_arg): Return std::string.
303         * probe.c (parse_probe_linespec): Update.  Change types.
304         (collect_probes): Take string arguments.
305         (parse_probe_linespec): Likewise.
306         (info_probes_for_ops): Update.
307         (enable_probes_command): Update.
308         (disable_probes_command): Update.
309         * break-catch-sig.c (catch_signal_split_args): Update.
310         * mi/mi-parse.c (mi_parse): Update.
311
312 2017-09-11  Tom Tromey  <tom@tromey.com>
313
314         * language.h (language_enum): Make argument const.
315         * language.c (language_enum): Make argument const.
316
317 2017-09-11  Tom Tromey  <tom@tromey.com>
318
319         * common/common-utils.h (skip_to_space): Remove macro, redeclare
320         as function.
321         (skip_to_space): Rename from skip_to_space_const.
322         * common/common-utils.c (skip_to_space): New function.
323         (skip_to_space): Rename from skip_to_space_const.
324         * cli/cli-utils.h (get_number): Rename from get_number_const.
325         (extract_arg): Rename from extract_arg_const.
326         * cli/cli-utils.c (get_number): Rename from get_number_const.
327         (extract_arg): Rename from extract_arg_const.
328         (number_or_range_parser::get_number): Use ::get_number.
329         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
330         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
331         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
332         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
333         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
334         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
335         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
336         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
337
338 2017-09-11  Tom Tromey  <tom@tromey.com>
339
340         * python/python.c (do_start_initialization): Use
341         py-event-types.def to initialize types.
342         Define all object type structures.
343         * python/python-internal.h: Don't declare event initialization
344         functions.
345         * python/py-threadevent.c (thread_event_object_type): Don't
346         define.
347         * python/py-stopevent.c (stop_event_object_type): Don't define.
348         * python/py-signalevent.c (signal_event_object_type): Don't
349         declare or define.
350         * python/py-newobjfileevent.c (new_objfile_event_object_type)
351         (clear_objfiles_event_object_type): Don't declare or define.
352         * python/py-infevents.c (inferior_call_pre_event_object_type)
353         (inferior_call_post_event_object_type)
354         (register_changed_event_object_type)
355         (memory_changed_event_object_type): Don't declare or define.
356         * python/py-inferior.c (new_thread_event_object_type)
357         (new_inferior_event_object_type)
358         (inferior_deleted_event_object_type): Don't declare or define.
359         * python/py-exitedevent.c (exited_event_object_type): Don't
360         declare or define.
361         * python/py-evts.c (gdbpy_initialize_py_events): Use
362         py-all-events.def.
363         * python/py-events.h (thread_event_object_type): Don't declare.
364         (events_object): Use py-all-events.def.
365         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
366         py-event-types.def.
367         * python/py-event-types.def: New file.
368         * python/py-continueevent.c (create_continue_event_object): Don't
369         declare or define.
370         * python/py-bpevent.c (breakpoint_event_object_type): Don't
371         declare or define.
372         * python/py-all-events.def: New file.
373
374 2017-09-11  Tom Tromey  <tom@tromey.com>
375
376         * python/py-threadevent.c (create_thread_event_object): Return
377         gdbpy_ref.
378         * python/py-stopevent.h (create_stop_event_object)
379         (create_breakpoint_event_object, create_signal_event_object):
380         Update.
381         * python/py-stopevent.c (create_stop_event_object): Return
382         gdbpy_ref.
383         (emit_stop_event): Update.
384         * python/py-signalevent.c (create_signal_event_object): Return
385         gdbpy_ref.
386         * python/py-infevents.c (create_inferior_call_event_object):
387         Update.
388         * python/py-event.h (create_event_object)
389         (create_thread_event_object): Update.
390         * python/py-event.c (create_event_object): Return gdbpy_ref.
391         * python/py-continueevent.c: Return gdbpy_ref.
392         * python/py-bpevent.c (create_breakpoint_event_object): Return
393         gdbpy_ref.
394
395 2017-09-11  Tom Tromey  <tom@tromey.com>
396
397         PR python/15622:
398         * NEWS: Add entry.
399         * python/python.c (do_start_initialization): Initialize new event
400         types.
401         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
402         (gdbpy_initialize_inferior_deleted_event)
403         (gdbpy_initialize_new_thread_event): Declare.
404         * python/py-threadevent.c (create_thread_event_object): Add option
405         "thread" parameter.
406         * python/py-inferior.c (new_thread_event_object_type)
407         (new_inferior_event_object_type)
408         (inferior_deleted_event_object_type): Declare.
409         (python_new_inferior, python_inferior_deleted): New functions.
410         (add_thread_object): Emit new_thread event.
411         (gdbpy_initialize_inferior): Attach new functions to corresponding
412         observers.
413         (new_thread, new_inferior, inferior_deleted): Define new event
414         types.
415         * python/py-evts.c (gdbpy_initialize_py_events): Add new
416         registries.
417         * python/py-events.h (events_object) <new_inferior,
418         inferior_deleted, new_thread>: New fields.
419         * python/py-event.h (create_thread_event_breakpoint): Add optional
420         "thread" parameter.
421
422 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
423
424         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
425         check current_ui instead.
426         (internal_vproblem): Likewise.
427
428 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
429
430         * thread.c (print_thread_info_1): Remove unnecessary calls to
431         uiout->is_mi_like_p.
432
433 2017-09-09  Tom Tromey  <tom@tromey.com>
434
435         * namespace.h (add_using_directive): Update.
436         * namespace.c (add_using_directive): Change type of excludes to
437         std::vector.
438         * dwarf2read.c (read_import_statement): Use std::vector.
439         (read_namespace): Update.
440         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
441
442 2017-09-09  Tom Tromey  <tom@tromey.com>
443
444         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
445
446 2017-09-09  Tom Tromey  <tom@tromey.com>
447
448         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
449
450 2017-09-09  Tom Tromey  <tom@tromey.com>
451
452         * stack.c (func_command): Use gdb::def_vector.
453
454 2017-09-09  Tom Tromey  <tom@tromey.com>
455
456         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
457         ui_out_emit_list, ui_out_emit_tuple.
458         (mi_cmd_var_update): Likewise.
459
460 2017-09-09  Tom Tromey  <tom@tromey.com>
461
462         * mi/mi-interp.c (mi_user_selected_context_changed): Use
463         ui_out_redirect_pop.
464         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
465         ui_out_redirect_pop.
466         * utils.c (do_ui_out_redirect_pop)
467         (make_cleanup_ui_out_redirect_pop): Remove.
468         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
469         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
470         * ui-out.h (ui_out_redirect_pop): New class.
471
472 2017-09-09  Tom Tromey  <tom@tromey.com>
473
474         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
475         (list_available_thread_groups, mi_cmd_list_thread_groups)
476         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
477         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
478         Likewise.
479
480 2017-09-09  Tom Tromey  <tom@tromey.com>
481
482         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
483         ui_out_emit_tuple.
484
485 2017-09-09  Tom Tromey  <tom@tromey.com>
486
487         * target.c (flash_erase_command): Use ui_out_emit_tuple.
488         * stack.c (print_frame): Use ui_out_emit_tuple.
489         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
490         (info_spu_mailbox_command, info_spu_dma_command)
491         (info_spu_proxydma_command): Likewise.
492         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
493         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
494         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
495         ui_out_emit_tuple.
496         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
497
498 2017-09-09  Tom Tromey  <tom@tromey.com>
499
500         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
501         (class ui_out_emit_table): Update comment.
502         * ui-out.c (do_cleanup_table_end)
503         (make_cleanup_ui_out_table_begin_end): Remove.
504         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
505         (info_spu_dma_cmdlist): Likewise.
506         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
507         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
508         ui_out_emit_table.
509
510 2017-09-09  Tom Tromey  <tom@tromey.com>
511
512         * thread.c (print_thread_info_1): Use ui_out_emit_table,
513         ui_out_emit_list, gdb::optional.
514
515 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
516
517         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
518         prototype.
519         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
520         prototype.
521         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
522         prototype.
523         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
524         * ada-exp.y: Remove _initialize_ada_exp prototype.
525         * ada-lang.c: Remove _initialize_ada_language prototype.
526         * ada-tasks.c: Remove _initialize_tasks prototype.
527         * addrmap.c: Remove _initialize_addrmap prototype.
528         * agent.c: Remove _initialize_agent prototype.
529         * aix-thread.c: Remove _initialize_aix_thread prototype.
530         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
531         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
532         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
533         prototype.
534         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
535         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
536         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
537         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
538         prototype.
539         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
540         prototype.
541         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
542         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
543         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
544         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
545         prototype.
546         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
547         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
548         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
549         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
550         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
551         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
552         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
553         prototype.
554         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
555         prototype.
556         * annotate.c: Remove _initialize_annotate prototype.
557         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
558         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
559         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
560         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
561         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
562         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
563         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
564         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
565         prototype.
566         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
567         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
568         * auto-load.c: Remove _initialize_auto_load prototype.
569         * auxv.c: Remove _initialize_auxv prototype.
570         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
571         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
572         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
573         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
574         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
575         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
576         prototype.
577         * break-catch-throw.c: Remove _initialize_break_catch_throw
578         prototype.
579         * breakpoint.c: Remove _initialize_breakpoint prototype.
580         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
581         * btrace.c: Remove _initialize_btrace prototype.
582         * charset.c: Remove _initialize_charset prototype.
583         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
584         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
585         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
586         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
587         * cli/cli-script.c: Remove _initialize_cli_script prototype.
588         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
589         * coffread.c: Remove _initialize_coffread prototype.
590         * compile/compile.c: Remove _initialize_compile prototype.
591         * complaints.c: Remove _initialize_complaints prototype.
592         * completer.c: Remove _initialize_completer prototype.
593         * copying.awk: Remove _initialize_copying prototype.
594         * copying.c: Regenerate.
595         * core-regset.c: Remove _initialize_core_regset prototype.
596         * corefile.c: Remove _initialize_core prototype.
597         * corelow.c: Remove _initialize_corelow prototype.
598         * cp-abi.c: Remove _initialize_cp_abi prototype.
599         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
600         * cp-support.c: Remove _initialize_cp_support prototype.
601         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
602         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
603         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
604         * ctf.c: Remove _initialize_ctf prototype.
605         * d-lang.c: Remove _initialize_d_language prototype.
606         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
607         prototype.
608         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
609         * dbxread.c: Remove _initialize_dbxread prototype.
610         * dcache.c: Remove _initialize_dcache prototype.
611         * demangle.c: Remove _initialize_demangler prototype.
612         * disasm-selftests.c: Remove _initialize_disasm_selftests
613         prototype.
614         * disasm.c: Remove _initialize_disasm prototype.
615         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
616         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
617         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
618         prototype.
619         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
620         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
621         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
622         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
623         * elfread.c: Remove _initialize_elfread prototype.
624         * exec.c: Remove _initialize_exec prototype.
625         * extension.c: Remove _initialize_extension prototype.
626         * f-lang.c: Remove _initialize_f_language prototype.
627         * f-valprint.c: Remove _initialize_f_valprint prototype.
628         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
629         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
630         * filesystem.c: Remove _initialize_filesystem prototype.
631         * findcmd.c: Remove _initialize_mem_search prototype.
632         * fork-child.c: Remove _initialize_fork_child prototype.
633         * frame-base.c: Remove _initialize_frame_base prototype.
634         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
635         * frame.c: Remove _initialize_frame prototype.
636         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
637         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
638         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
639         * gcore.c: Remove _initialize_gcore prototype.
640         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
641         * gdbarch.c: Regenerate.
642         * gdbarch.sh: Remove _initialize_gdbarch prototype.
643         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
644         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
645         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
646         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
647         * go-lang.c: Remove _initialize_go_language prototype.
648         * go32-nat.c: Remove _initialize_go32_nat prototype.
649         * guile/guile.c: Remove _initialize_guile prototype.
650         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
651         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
652         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
653         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
654         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
655         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
656         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
657         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
658         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
659         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
660         prototype.
661         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
662         prototype.
663         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
664         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
665         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
666         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
667         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
668         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
669         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
670         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
671         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
672         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
673         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
674         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
675         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
676         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
677         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
678         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
679         prototype.
680         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
681         prototype.
682         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
683         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
684         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
685         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
686         * infcall.c: Remove _initialize_infcall prototype.
687         * infcmd.c: Remove _initialize_infcmd prototype.
688         * inferior.c: Remove _initialize_inferiors prototype.
689         * inflow.c: Remove _initialize_inflow prototype.
690         * infrun.c: Remove _initialize_infrun prototype.
691         * interps.c: Remove _initialize_interpreter prototype.
692         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
693         * jit.c: Remove _initialize_jit prototype.
694         * language.c: Remove _initialize_language prototype.
695         * linux-fork.c: Remove _initialize_linux_fork prototype.
696         * linux-nat.c: Remove _initialize_linux_nat prototype.
697         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
698         * linux-thread-db.c: Remove _initialize_thread_db prototype.
699         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
700         * m2-lang.c: Remove _initialize_m2_language prototype.
701         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
702         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
703         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
704         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
705         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
706         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
707         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
708         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
709         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
710         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
711         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
712         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
713         * machoread.c: Remove _initialize_machoread prototype.
714         * macrocmd.c: Remove _initialize_macrocmd prototype.
715         * macroscope.c: Remove _initialize_macroscope prototype.
716         * maint.c: Remove _initialize_maint_cmds prototype.
717         * mdebugread.c: Remove _initialize_mdebugread prototype.
718         * memattr.c: Remove _initialize_mem prototype.
719         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
720         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
721         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
722         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
723         * mi/mi-main.c: Remove _initialize_mi_main prototype.
724         * microblaze-linux-tdep.c: Remove
725         _initialize_microblaze_linux_tdep prototype.
726         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
727         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
728         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
729         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
730         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
731         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
732         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
733         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
734         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
735         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
736         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
737         prototype.
738         * mipsread.c: Remove _initialize_mipsread prototype.
739         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
740         prototype.
741         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
742         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
743         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
744         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
745         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
746         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
747         prototype.
748         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
749         * nto-procfs.c: Remove _initialize_procfs prototype.
750         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
751         * objc-lang.c: Remove _initialize_objc_language prototype.
752         * objfiles.c: Remove _initialize_objfiles prototype.
753         * observer.c: Remove observer_test_first_notification_function,
754         observer_test_second_notification_function,
755         observer_test_third_notification_function, and
756         _initialize_observer prototypes.
757         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
758         * osabi.c: Remove _initialize_gdb_osabi prototype.
759         * osdata.c: Remove _initialize_osdata prototype.
760         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
761         * parse.c: Remove _initialize_parse prototype.
762         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
763         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
764         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
765         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
766         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
767         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
768         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
769         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
770         * printcmd.c: Remove _initialize_printcmd prototype.
771         * probe.c: Remove _initialize_probe prototype.
772         * proc-api.c: Remove _initialize_proc_api prototype.
773         * proc-events.c: Remove _initialize_proc_events prototype.
774         * proc-service.c: Remove _initialize_proc_service prototype.
775         * procfs.c: Remove _initialize_procfs prototype.
776         * psymtab.c: Remove _initialize_psymtab prototype.
777         * python/python.c: Remove _initialize_python prototype.
778         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
779         * record-btrace.c: Remove _initialize_record_btrace prototype.
780         * record-full.c: Remove _initialize_record_full prototype.
781         * record.c: Remove _initialize_record prototype.
782         * regcache.c: Remove _initialize_regcache prototype.
783         * reggroups.c: Remove _initialize_reggroup prototype.
784         * remote-notif.c: Remove _initialize_notif prototype.
785         * remote-sim.c: Remove _initialize_remote_sim prototype.
786         * remote.c: Remove _initialize_remote prototype.
787         * reverse.c: Remove _initialize_reverse prototype.
788         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
789         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
790         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
791         prototype.
792         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
793         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
794         * rust-exp.y: Remove _initialize_rust_exp prototype.
795         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
796         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
797         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
798         * score-tdep.c: Remove _initialize_score_tdep prototype.
799         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
800         prototype.
801         * ser-go32.c: Remove _initialize_ser_dos prototype.
802         * ser-mingw.c: Remove _initialize_ser_windows prototype.
803         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
804         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
805         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
806         * serial.c: Remove _initialize_serial prototype.
807         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
808         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
809         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
810         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
811         * skip.c: Remove _initialize_step_skip prototype.
812         * sol-thread.c: Remove _initialize_sol_thread prototype.
813         * solib-aix.c: Remove _initialize_solib_aix prototype.
814         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
815         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
816         * solib-frv.c: Remove _initialize_frv_solib prototype.
817         * solib-spu.c: Remove _initialize_spu_solib prototype.
818         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
819         * solib-target.c: Remove _initialize_solib_target prototype.
820         * solib.c: Remove _initialize_solib prototype.
821         * source.c: Remove _initialize_source prototype.
822         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
823         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
824         prototype.
825         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
826         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
827         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
828         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
829         prototype.
830         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
831         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
832         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
833         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
834         prototype.
835         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
836         prototype.
837         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
838         prototype.
839         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
840         prototype.
841         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
842         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
843         prototype.
844         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
845         prototype.
846         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
847         prototype.
848         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
849         prototype.
850         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
851         prototype.
852         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
853         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
854         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
855         * stabsread.c: Remove _initialize_stabsread prototype.
856         * stack.c: Remove _initialize_stack prototype.
857         * stap-probe.c: Remove _initialize_stap_probe prototype.
858         * std-regs.c: Remove _initialize_frame_reg prototype.
859         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
860         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
861         * symfile.c: Remove _initialize_symfile prototype.
862         * symmisc.c: Remove _initialize_symmisc prototype.
863         * symtab.c: Remove _initialize_symtab prototype.
864         * target-dcache.c: Remove _initialize_target_dcache prototype.
865         * target-descriptions.c: Remove _initialize_target_descriptions
866         prototype.
867         * thread.c: Remove _initialize_thread prototype.
868         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
869         prototype.
870         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
871         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
872         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
873         prototype.
874         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
875         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
876         * tracefile.c: Remove _initialize_tracefile prototype.
877         * tracepoint.c: Remove _initialize_tracepoint prototype.
878         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
879         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
880         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
881         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
882         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
883         * tui/tui-win.c: Remove _initialize_tui_win prototype.
884         * tui/tui.c: Remove _initialize_tui prototype.
885         * typeprint.c: Remove _initialize_typeprint prototype.
886         * user-regs.c: Remove _initialize_user_regs prototype.
887         * utils.c: Remove _initialize_utils prototype.
888         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
889         * valarith.c: Remove _initialize_valarith prototype.
890         * valops.c: Remove _initialize_valops prototype.
891         * valprint.c: Remove _initialize_valprint prototype.
892         * value.c: Remove _initialize_values prototype.
893         * varobj.c: Remove _initialize_varobj prototype.
894         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
895         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
896         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
897         * windows-nat.c: Remove _initialize_windows_nat,
898         _initialize_check_for_gdb_ini, and _initialize_loadable
899         prototypes.
900         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
901         * xcoffread.c: Remove _initialize_xcoffread prototype.
902         * xml-support.c: Remove _initialize_xml_support prototype.
903         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
904         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
905         prototype.
906         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
907         prototype.
908         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
909
910 2017-09-08  Keith Seitz  <keiths@redhat.com>
911
912         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
913         field.
914
915 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
916
917         * f-valprint.c (f_val_print): Remove check for one byte
918         sized integers. Remove printing of character type.
919
920 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
921             Christoph Weinmann  <christoph.t.weinmann@intel.com>
922             Bernhard Heckel  <bernhard.heckel@intel.com>
923
924         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
925         to maintain proper indentation when printing pointers/refs.
926
927 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
928
929         GDB 8.0.1 released.
930
931 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
932
933         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
934
935 2017-09-05  Tom Tromey  <tom@tromey.com>
936
937         * parse.c (funcall_chain): Now a std::vector.
938         (start_arglist, end_arglist): Simplify.
939         (free_funcalls): Remove.
940         (parse_exp_in_context_1): Remove cleanup.
941
942 2017-09-05  Tom Tromey  <tom@tromey.com>
943
944         * go-exp.y (go_parse): Don't create a cleanup.
945
946 2017-09-05  Tom Tromey  <tom@tromey.com>
947
948         * d-exp.y (PrimaryExpression): Use std::string.
949         (d_parse): Don't create a cleanup.
950
951 2017-09-05  Tom Tromey  <tom@tromey.com>
952
953         * utils.c (do_clear_parser_state): Remove.
954         (make_cleanup_clear_parser_state): Remove.
955         * p-exp.y (pascal_parse): Use scoped_restore.
956         * m2-exp.y (m2_parse): Use scoped_restore.
957         * f-exp.y (f_parse): Use scoped_restore.
958         * d-exp.y (d_parse): Use scoped_restore.
959         * c-exp.y (c_parse): Use scoped_restore.
960         * ada-exp.y (ada_parse): Use scoped_restore.
961         * utils.h (make_cleanup_clear_parser_state): Remove.
962
963 2017-09-06  Keith Seitz  <keiths@redhat.com>
964
965         * dwarf2read.c (dw2_linkage_name_attr): New function.
966         (dw2_linkage_name): New function.
967         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
968         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
969         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
970
971 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
972
973         * config/djgpp/djconfig.sh: Correct shell portability issue.
974
975 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
976
977         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
978
979 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
980
981         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
982         * NEWS: Mention new FreeBSD/mips native configuration.
983         * configure.host: Add aarch64*-*-freebsd*.
984         * configure.nat: Likewise.
985         * aarch64-fbsd-nat.c: New file.
986
987 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
988
989         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
990         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
991         * NEWS: Mention new FreeBSD/aarch64 target.
992         * configure.tgt: Add aarch64*-*-freebsd*.
993         * aarch64-fbsd-tdep.c: New file.
994         * aarch64-fbsd-tdep.h: New file.
995
996 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
997
998         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
999
1000 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
1001
1002         * parse.c (find_minsym_type_and_address): Don't relocate addresses
1003         of TLS symbols.
1004
1005 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1006
1007         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
1008         call.
1009
1010 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
1011
1012         * infrun.c (follow_exec): Call add_thread after
1013         target_find_description.
1014
1015 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
1016
1017         * infrun.c (handle_inferior_event_1): When exec'ing, read
1018         stop_pc after follow_exec.
1019
1020 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
1021
1022         * remote.c (process_g_packet): Update error message.
1023
1024 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1025
1026         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
1027         targets.
1028
1029 2017-09-05  Pedro Alves  <palves@redhat.com>
1030
1031         * eval.c (eval_call, evaluate_funcall): New functions, factored
1032         out from ...
1033         (evaluate_subexp_standard): ... this.
1034
1035 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1036
1037         * amd64-tdep.c (amd64_target_description): Create target
1038         descriptions.
1039         (_initialize_amd64_tdep): Don't call functions
1040         initialize_tdesc_amd64_*.  Add self tests.
1041         * arch/amd64.c (amd64_create_target_description): Add parameter
1042         is_linux.  Call set_tdesc_osabi if is_linux is true.
1043         * arch/amd64.h (amd64_create_target_description): Update the
1044         declaration.
1045         * arch/i386.c (i386_create_target_description): Add parameter
1046         is_linux.  Call set_tdesc_osabi if is_linux is true.
1047         * arch/i386.h (i386_create_target_description): Update
1048         declaration.
1049         * configure.tgt: Add i386.o to gdb_target_obs.
1050         * features/Makefile (XMLTOC): Remove i386/*.xml.
1051         * features/i386/amd64-avx-avx512.c: Remove.
1052         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
1053         * features/i386/amd64-avx-mpx.c: Remove.
1054         * features/i386/amd64-avx.c: Remove.
1055         * features/i386/amd64-mpx.c: Remove.
1056         * features/i386/amd64.c: Remove.
1057         * features/i386/i386-avx-avx512.c: Remove.
1058         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
1059         * features/i386/i386-avx-mpx.c: Remove.
1060         * features/i386/i386-avx.c: Remove.
1061         * features/i386/i386-mmx.c: Remove.
1062         * features/i386/i386-mpx.c: Remove.
1063         * features/i386/i386.c: Remove.
1064         * i386-tdep.c: Don't include features/i386/i386*.c., include
1065         target-descriptions.h and arch/i386.h.
1066         (i386_target_description): Create target descriptions.
1067         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
1068         functions.  Do self tests.
1069
1070 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1071
1072         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
1073         * features/i386/amd64-avx-avx512-linux.c: Removed.
1074         * features/i386/amd64-avx-linux.c: Removed.
1075         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
1076         * features/i386/amd64-avx-mpx-linux.c: Removed.
1077         * features/i386/amd64-linux.c: Removed.
1078         * features/i386/amd64-mpx-linux.c: Removed.
1079         * features/i386/x32-avx-avx512-linux.c: Removed.
1080         * features/i386/x32-avx-linux.c: Removed.
1081         * features/i386/x32-linux.c: Removed.
1082
1083 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1084
1085         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
1086         features/i386/*.c.
1087         (amd64_linux_read_description): Call
1088         amd64_create_target_description.
1089         * arch/amd64.c: New file.
1090         * arch/amd64.h: New file.
1091         * configure.tgt (x86_64-*-linux*): Append amd64.o.
1092         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
1093
1094 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1095
1096         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
1097         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
1098         (amd64_linux_read_description): Create target descriptions.
1099         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
1100         functions.  Add unit tests.
1101         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
1102         x32-core.xml.
1103         * features/i386/64bit-avx.c: Generated.
1104         * features/i386/64bit-avx512.c: Generated.
1105         * features/i386/64bit-core.c: Generated.
1106         * features/i386/64bit-linux.c: Generated.
1107         * features/i386/64bit-mpx.c: Generated.
1108         * features/i386/64bit-pkeys.c: Generated.
1109         * features/i386/64bit-segments.c: Generated.
1110         * features/i386/64bit-sse.c: Generated.
1111         * features/i386/x32-core.c: Generated.
1112         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
1113         c files for amd64-linux and x32-linux.
1114
1115 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1116
1117         * amd64-linux-tdep.c (amd64_linux_read_description): New
1118         function.
1119         (amd64_linux_core_read_description): Call
1120         amd64_linux_read_description.
1121         (amd64_linux_init_abi): Likewise.
1122         (amd64_x32_linux_init_abi): Likewise.
1123         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
1124         * x86-linux-nat.c (x86_linux_read_description): Call
1125         amd64_linux_read_description.
1126
1127 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1128
1129         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
1130         comments.
1131
1132 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1133
1134         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
1135         * features/i386/i386-avx-avx512-linux.c: Remove.
1136         * features/i386/i386-avx-linux.c: Remove.
1137         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
1138         * features/i386/i386-avx-mpx-linux.c: Remove.
1139         * features/i386/i386-linux.c: Remove.
1140         * features/i386/i386-mmx-linux.c: Remove.
1141         * features/i386/i386-mpx-linux.c: Remove.
1142
1143 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1144
1145         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
1146         (SFILES): Add arch/i386.c.
1147         (HFILES_NO_SRCDIR): Add arch/i386.h.
1148         * arch/i386.c: New file.
1149         * arch/i386.h: New file.
1150         * arch/tdesc.h (allocate_target_description): Declare.
1151         (set_tdesc_architecture): Declare.
1152         (set_tdesc_osabi): Declare.
1153         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
1154         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
1155         include arch/i386.h.
1156         (i386_linux_read_description): Remove code and call
1157         i386_create_target_description.
1158         (set_tdesc_architecture): New function.
1159         (set_tdesc_osabi): New function.
1160         * target-descriptions.h (allocate_target_description): Remove.
1161
1162 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1163
1164         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
1165         * target-descriptions.c (tdesc_create_feature): Likewise, and
1166         adjust code.
1167         * features/i386/32bit-avx.c: Re-generated.
1168         * features/i386/32bit-avx512.c: Re-generated.
1169         * features/i386/32bit-core.c: Re-generated.
1170         * features/i386/32bit-linux.c: Re-generated.
1171         * features/i386/32bit-mpx.c: Re-generated.
1172         * features/i386/32bit-pkeys.c: Re-generated.
1173         * features/i386/32bit-sse.c: Re-generated.
1174
1175 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1176
1177         * regformats/regdef.h (struct reg): Override operator == and !=.
1178
1179 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1180
1181         * arch/tdesc.h: New file.
1182         * regformats/regdat.sh: Generate code using tdesc_create_reg.
1183         * target-descriptions.c: Update comments.
1184         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
1185         declarations.
1186         * features/i386/32bit-avx.c: Re-generated.
1187         * features/i386/32bit-avx512.c: Re-generated.
1188         * features/i386/32bit-core.c: Re-generated.
1189         * features/i386/32bit-linux.c: Re-generated.
1190         * features/i386/32bit-mpx.c: Re-generated.
1191         * features/i386/32bit-pkeys.c: Re-generated.
1192         * features/i386/32bit-sse.c: Re-generated.
1193
1194 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1195
1196         * regformats/regdat.sh: Update generated code.
1197
1198 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1199
1200         * regformats/regdat.sh: Adjust code order.
1201
1202 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
1203
1204         * expprint.c (dump_subexp_body_standard): Use constant format
1205         string in fprintf_filtered call.
1206
1207 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
1208
1209         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
1210         NetBSD/i386.
1211         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
1212
1213 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
1214
1215         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
1216
1217 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
1218
1219         * bsd-kvm.o: Define _KMEMUSER.
1220         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
1221         * configure: Regenerate.
1222
1223 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
1224
1225         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
1226         * i386-fbsd-nat.c: Likewise.
1227
1228 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
1229
1230         * unittests/array-view-selftests.c: Add include of <array>.
1231
1232 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
1233
1234         * spu-tdep.c (flush_ea_cache): Add missing argument to
1235         call_function_by_hand.
1236
1237 2017-09-04  Pedro Alves  <palves@redhat.com>
1238
1239         * NEWS (Safer support for debugging with no debug info): New.
1240
1241 2017-09-04  Pedro Alves  <palves@redhat.com>
1242
1243         * c-exp.y (function_method, function_method_void): Add current
1244         instance flags to TYPE_INSTANCE.
1245         * dwarf2read.c (check_modifier): New.
1246         (compute_delayed_physnames): Assert that only C++ adds delayed
1247         physnames.  Mark fn_fields as const/volatile depending on
1248         physname.
1249         * eval.c (make_params): New type_instance_flags parameter.  Use
1250         it as the new type's instance flags.
1251         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
1252         flags element and pass it to make_params.
1253         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
1254         instance flags element.
1255         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
1256         * gdbtypes.h: Include "enum-flags.h".
1257         (type_instance_flags): New enum-flags type.
1258         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
1259         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
1260         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
1261         (follow_type_instance_flags): New function.
1262         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
1263         * parser-defs.h (follow_type_instance_flags): Declare.
1264         * valops.c (value_struct_elt_for_reference): const/volatile must
1265         match too.
1266
1267 2017-09-04  Pedro Alves  <palves@redhat.com>
1268
1269         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
1270         function/method scopes; lookup the nested name as a function local
1271         static variable.
1272
1273 2017-09-04  Pedro Alves  <palves@redhat.com>
1274
1275         (%type <voidval>): Add function_method.
1276         * c-exp.y (exp): New production for calls with no arguments.
1277         (function_method, function_method_void_or_typelist): New
1278         productions.
1279         (exp): New production for "method()::static_var".
1280         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
1281         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1282         Handle OP_FUNC_STATIC_VAR.
1283         * parse.c (operator_length_standard):
1284         Handle OP_FUNC_STATIC_VAR.
1285
1286 2017-09-04  Pedro Alves  <palves@redhat.com>
1287
1288         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
1289         handling.
1290         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1291         Ditto.
1292         * parse.c (operator_length_standard, operator_check_standard):
1293         Ditto.
1294         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
1295
1296 2017-09-04  Pedro Alves  <palves@redhat.com>
1297
1298         * ax-gdb.c: Include "typeprint.h".
1299         (gen_expr_for_cast): New function.
1300         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
1301         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
1302         type is unknown.
1303         * dwarf2read.c (new_symbol_full): Fallback to int instead of
1304         nodebug_data_symbol.
1305         * eval.c: Include "typeprint.h".
1306         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
1307         Error out if symbol has unknown type.
1308         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
1309         evaluate_subexp_for_cast.
1310         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
1311         OP_VAR_MSYM_VALUE.
1312         (evaluate_subexp_for_cast): New function.
1313         * gdbtypes.c (init_nodebug_var_type): New function.
1314         (objfile_type): Use it to initialize types of variables with no
1315         debug info.
1316         * typeprint.c (error_unknown_type): New.
1317         * typeprint.h (error_unknown_type): New declaration.
1318         * compile/compile-c-types.c (convert_type_basic): Handle
1319         TYPE_CODE_ERROR; warn and fallback to int for variables with
1320         unknown type.
1321
1322 2017-09-04  Pedro Alves  <palves@redhat.com>
1323
1324         * eval.c (evaluate_var_value): New function, factored out from ...
1325         (evaluate_subexp_standard): ... here.
1326
1327 2017-09-04  Pedro Alves  <palves@redhat.com>
1328
1329         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
1330         Remove useless assignments to 'op'.
1331
1332 2017-09-04  Pedro Alves  <palves@redhat.com>
1333
1334         * eval.c (eval_skip_value): New function.
1335         (evaluate_subexp_standard): Use it.
1336
1337 2017-09-04  Pedro Alves  <palves@redhat.com>
1338
1339         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
1340         function name from symbol/minsym and pass it to
1341         error_call_unknown_return_type.
1342
1343 2017-09-04  Pedro Alves  <palves@redhat.com>
1344
1345         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
1346         * ax-gdb.c (gen_msym_var_ref): New function.
1347         (gen_expr): Handle OP_VAR_MSYM_VALUE.
1348         * eval.c (evaluate_var_msym_value): New function.
1349         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
1350         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
1351         to call_function_by_hand.
1352         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1353         Handle OP_VAR_MSYM_VALUE.
1354         (union exp_element) <msymbol>: New field.
1355         * minsyms.h (struct type): Forward declare.
1356         (find_minsym_type_and_address): Declare.
1357         * parse.c (write_exp_elt_msym): New function.
1358         (write_exp_msymbol): Delete, refactored as ...
1359         (find_minsym_type_and_address): ... this new function.
1360         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
1361         (operator_length_standard, operator_check_standard): Handle
1362         OP_VAR_MSYM_VALUE.
1363         * std-operator.def (OP_VAR_MSYM_VALUE): New.
1364
1365 2017-09-04  Pedro Alves  <palves@redhat.com>
1366
1367         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
1368         TYPE_GNU_IFUNC specially here.  Throw error if return type is
1369         unknown.
1370         * ada-typeprint.c (print_func_type): Handle functions with unknown
1371         return type.
1372         * c-typeprint.c (c_type_print_base): Handle functions and methods
1373         with unknown return type.
1374         * compile/compile-c-symbols.c (convert_symbol_bmsym)
1375         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
1376         * compile/compile-c-types.c: Include "objfiles.h".
1377         (convert_func): For functions with unknown return type, warn and
1378         default to int.
1379         * compile/compile-object-run.c (compile_object_run): Adjust call
1380         to call_function_by_hand_dummy.
1381         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
1382         call_function_by_hand.
1383         * eval.c (evaluate_subexp_standard): Adjust calls to
1384         call_function_by_hand.  Handle functions and methods with unknown
1385         return type.  Pass expect_type to call_function_by_hand.
1386         * f-typeprint.c (f_type_print_base): Handle functions with unknown
1387         return type.
1388         * gcore.c (call_target_sbrk): Adjust call to
1389         call_function_by_hand.
1390         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
1391         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
1392         an integer address type instead of nodebug.
1393         * guile/scm-value.c (gdbscm_value_call): Adjust call to
1394         call_function_by_hand.
1395         * infcall.c (error_call_unknown_return_type): New function.
1396         (call_function_by_hand): New "default_return_type" parameter.
1397         Pass it down.
1398         (call_function_by_hand_dummy): New "default_return_type"
1399         parameter.  Use it instead of defaulting to int.  If there's no
1400         default and the return type is unknown, throw an error.  If
1401         there's a default return type, and the called function has no
1402         debug info, then assume the function is prototyped.
1403         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
1404         New "default_return_type" parameter.
1405         (error_call_unknown_return_type): New declaration.
1406         * linux-fork.c (call_lseek): Cast return type of lseek.
1407         (inferior_call_waitpid, checkpoint_command): Adjust calls to
1408         call_function_by_hand.
1409         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
1410         calls to call_function_by_hand.
1411         * m2-typeprint.c (m2_procedure): Handle functions with unknown
1412         return type.
1413         * objc-lang.c (lookup_objc_class, lookup_child_selector)
1414         (value_nsstring, print_object_command): Adjust calls to
1415         call_function_by_hand.
1416         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
1417         functions with unknown return type.
1418         (pascal_type_print_func_varspec_suffix): New function.
1419         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
1420         TYPE_CODE_METHOD>: Use it.
1421         * python/py-value.c (valpy_call): Adjust call to
1422         call_function_by_hand.
1423         * rust-lang.c (rust_evaluate_funcall): Adjust call to
1424         call_function_by_hand.
1425         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
1426         call_function_by_hand.
1427         * valops.c (value_allocate_space_in_inferior): Adjust call to
1428         call_function_by_hand.
1429         * typeprint.c (type_print_unknown_return_type): New function.
1430         * typeprint.h (type_print_unknown_return_type): New declaration.
1431
1432 2017-09-04  Pedro Alves  <palves@redhat.com>
1433
1434         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
1435         types with more than one parameter as prototyped.
1436
1437 2017-09-04  Pedro Alves  <palves@redhat.com>
1438
1439         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
1440         (disassemble_command): Use gdb_disassembly_flags instead of bare
1441         int.
1442         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
1443         (dump_insns, do_mixed_source_and_assembly_deprecated)
1444         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
1445         Use gdb_disassembly_flags instead of bare int.
1446         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
1447         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
1448         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
1449         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
1450         (enum gdb_disassembly_flag): ... values of this new enumeration.
1451         (gdb_disassembly_flags): Define.
1452         (gdb_disassembly)
1453         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
1454         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
1455         gdb_disassembly_flags instead of bare int.
1456         * record-btrace.c (btrace_insn_history)
1457         (record_btrace_insn_history, record_btrace_insn_history_range)
1458         (record_btrace_insn_history_from): Use gdb_disassembly_flags
1459         instead of bare int.
1460         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
1461         Use gdb_disassembly_flags instead of bare int.
1462         * target-debug.h (target_debug_print_gdb_disassembly_flags):
1463         Define.
1464         * target-delegates.c: Regenerate.
1465         * target.c (target_insn_history, target_insn_history_from)
1466         (target_insn_history_range): Use gdb_disassembly_flags instead of
1467         bare int.
1468         * target.h: Include "disasm.h".
1469         (struct target_ops) <to_insn_history, to_insn_history_from,
1470         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
1471         int.
1472         (target_insn_history, target_insn_history_from)
1473         (target_insn_history_range): Use gdb_disassembly_flags instead of
1474         bare int.
1475
1476 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
1477
1478         * cli/cli-script.c (build_command_line): For if/while commands,
1479         check whether args is empty.
1480
1481 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
1482
1483         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
1484         (enum command_control_type): Likewise.
1485         (struct command_line): Likewise.
1486         (free_command_lines): Likewise.
1487         (struct command_lines_deleter): Likewise.
1488         (command_line_up): Likewise.
1489         (read_command_lines): Likewise.
1490         (read_command_lines_1): Likewise.
1491         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
1492         (enum command_control_type): Likewise.
1493         (struct command_line): Likewise.
1494         (free_command_lines): Likewise.
1495         (struct command_lines_deleter): Likewise.
1496         (command_line_up): Likewise.
1497         (read_command_lines): Likewise.
1498         (read_command_lines_1): Likewise.
1499         * breakpoint.h: Include cli/cli-script.h.
1500         * extension-priv.h: Likewise.
1501         * gdbcmd.h: Likewise.
1502
1503 2017-09-04  Pedro Alves  <palves@redhat.com>
1504
1505         * ada-lang.c (is_known_support_routine): Move sal declaration to
1506         where it is initialized.
1507         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
1508         (parse_breakpoint_sals, decode_static_tracepoint_spec)
1509         (clear_command, update_static_tracepoint): Remove init_sal
1510         references.  Move declarations closer to initializations.
1511         * cli/cli-cmds.c (list_command): Move sal declarations closer to
1512         initializations.
1513         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
1514         references.  Move sal declarations closer to initializations.
1515         * frame.c (find_frame_sal): Return a symtab_and_line via function
1516         return instead of output parameter.  Remove init_sal references.
1517         * frame.h (find_frame_sal): Return a symtab_and_line via function
1518         return instead of output parameter.
1519         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
1520         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
1521         instead of memset.
1522         (gdbscm_find_pc_line): Remove init_sal reference.
1523         * infcall.c (call_function_by_hand_dummy): Remove init_sal
1524         references.  Move declarations closer to initializations.
1525         * infcmd.c (set_step_frame): Update.  Move declarations closer to
1526         initializations.
1527         (finish_backward): Remove init_sal references.  Move declarations
1528         closer to initializations.
1529         * infrun.c (process_event_stop_test, handle_step_into_function)
1530         (insert_hp_step_resume_breakpoint_at_frame)
1531         (insert_step_resume_breakpoint_at_caller): Likewise.
1532         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
1533         (symbol_to_sal): Likewise.
1534         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
1535         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
1536         to its initialization.
1537         * reverse.c (save_bookmark_command): Use new/delete.  Remove
1538         init_sal references.  Move declarations closer to initializations.
1539         * source.c (get_current_source_symtab_and_line): Remove brace
1540         initialization.
1541         (set_current_source_symtab_and_line): Now takes the sal by const
1542         reference.  Remove brace initialization.
1543         (line_info): Remove init_sal reference.
1544         * source.h (set_current_source_symtab_and_line): Now takes a
1545         symtab_and_line via const reference.
1546         * stack.c (set_current_sal_from_frame): Adjust.
1547         (print_frame_info): Adjust.
1548         (get_last_displayed_sal): Return the sal via function return
1549         instead of via output parameter.  Simplify.
1550         (frame_info): Adjust.
1551         * stack.h (get_last_displayed_sal): Return the sal via function
1552         return instead of via output parameter.
1553         * symtab.c (init_sal): Delete.
1554         (find_pc_sect_line): Remove init_sal references.  Move
1555         declarations closer to initializations.
1556         (find_function_start_sal): Remove init_sal references.  Move
1557         declarations closer to initializations.
1558         * symtab.h (struct symtab_and_line): In-class initialize all
1559         fields.
1560         * tracepoint.c (set_traceframe_context)
1561         (print_one_static_tracepoint_marker): Remove init_sal references.
1562         Move declarations closer to initializations.
1563         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
1564         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
1565         declarations closer to initializations.
1566         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
1567         init_sal references.  Adjust.
1568
1569 2017-09-04  Pedro Alves  <palves@redhat.com>
1570
1571         * ax-gdb.c (agent_command_1): Use range-for.
1572         * break-catch-throw.c (re_set_exception_catchpoint): Update.
1573         * breakpoint.c: Include "common/array-view.h".
1574         (init_breakpoint_sal, create_breakpoint_sal): Change sals
1575         parameter from struct symtabs_and_lines to
1576         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
1577         (breakpoint_sals_to_pc): Change sals parameter from struct
1578         symtabs_and_lines to std::vector reference.
1579         (check_fast_tracepoint_sals): Change sals parameter from struct
1580         symtabs_and_lines to std::array_view.  Use range-for.
1581         (decode_static_tracepoint_spec): Return a std::vector instead of
1582         symtabs_and_lines.  Update.
1583         (create_breakpoint): Update.
1584         (break_range_command, until_break_command, clear_command): Update.
1585         (base_breakpoint_decode_location, bkpt_decode_location)
1586         (bkpt_probe_create_sals_from_location)
1587         (bkpt_probe_decode_location, tracepoint_decode_location)
1588         (tracepoint_probe_decode_location)
1589         (strace_marker_create_sals_from_location): Return a std::vector
1590         instead of symtabs_and_lines.
1591         (strace_marker_create_breakpoints_sal): Update.
1592         (strace_marker_decode_location): Return a std::vector instead of
1593         symtabs_and_lines.  Update.
1594         (update_breakpoint_locations): Change struct symtabs_and_lines
1595         parameters to gdb::array_view.  Adjust.
1596         (location_to_sals): Return a std::vector instead of
1597         symtabs_and_lines.  Update.
1598         (breakpoint_re_set_default): Use std::vector instead of struct
1599         symtabs_and_lines.
1600         (decode_location_default): Return a std::vector instead of
1601         symtabs_and_lines.  Update.
1602         * breakpoint.h: Include "common/array-view.h".
1603         (struct breakpoint_ops) <decode_location>: Now returns a
1604         std::vector instead of returning a symtabs_and_lines via output
1605         parameter.
1606         (update_breakpoint_locations): Change sals parameters to use
1607         gdb::array_view.
1608         * cli/cli-cmds.c (edit_command, list_command): Update to use
1609         std::vector and gdb::array_view.
1610         (ambiguous_line_spec): Adjust to use gdb::array_view and
1611         range-for.
1612         (compare_symtabs): Rename to ...
1613         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
1614         const reference and adjust.
1615         (filter_sals): Rewrite using std::vector and standard algorithms.
1616         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
1617         (jump_command): Update to use std::vector.
1618         * linespec.c (struct linespec_state) <canonical_names>: Update
1619         comment.
1620         (add_sal_to_sals_basic): Delete.
1621         (add_sal_to_sals, filter_results, convert_results_to_lsals)
1622         (decode_line_2, create_sals_line_offset)
1623         (convert_address_location_to_sals, convert_linespec_to_sals)
1624         (convert_explicit_location_to_sals, parse_linespec)
1625         (event_location_to_sals, decode_line_full, decode_line_1)
1626         (decode_line_with_current_source)
1627         (decode_line_with_last_displayed, decode_objc)
1628         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
1629         (linespec_result::~linespec_result): Adjust to use std::vector
1630         instead of symtabs_and_lines.
1631         * linespec.h (linespec_sals::sals): Now a std::vector.
1632         (struct linespec_result): Use std::vector, bool, and in-class
1633         initialization.
1634         (decode_line_1, decode_line_with_current_source)
1635         (decode_line_with_last_displayed): Return std::vector.
1636         * macrocmd.c (info_macros_command): Use std::vector.
1637         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
1638         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
1639         std::vector.
1640         * probe.h (parse_probes): Return a std::vector.
1641         * python/python.c (gdbpy_decode_line): Use std::vector and
1642         gdb::array_view.
1643         * source.c (select_source_symtab, line_info): Use std::vector.
1644         * stack.c (func_command): Use std::vector.
1645         * symtab.h (struct symtabs_and_lines): Delete.
1646         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
1647
1648 2017-09-04  Pedro Alves  <palves@redhat.com>
1649
1650         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1651         unittests/array-view-selftests.c.
1652         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
1653         * common/array-view.h: New file.
1654         * unittests/array-view-selftests.c: New file.
1655
1656 2017-09-04  Pedro Alves  <palves@redhat.com>
1657
1658         * cli/cli-cmds.c (edit_command): Pass message to
1659         ambiguous_line_spec.
1660         (list_command): Pass message to ambiguous_line_spec.  Say
1661         "first"/"last" instead of "start" and "end" to be consistent with
1662         the manual.
1663         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
1664         them to print formatted message.
1665
1666 2017-09-04  Pedro Alves  <palves@redhat.com>
1667
1668         * btrace.c (ftrace_add_pt): Pass btrace_insn to
1669         ftrace_update_insns by reference instead of pointer.
1670
1671 2017-09-04  Yao Qi  <yao.qi@linaro.org>
1672
1673         * i386-go32-tdep.c: Include x86-xstate.h.
1674         (i386_go32_init_abi): Call i386_target_description.
1675         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
1676         if xcr0 is X86_XSTATE_X87_MASK.
1677         * i386-tdep.h (tdesc_i386): Remove the declaration.
1678         (tdesc_i386_mmx): Likewise.
1679
1680 2017-09-04  Yao Qi  <yao.qi@linaro.org>
1681
1682         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
1683         X86_XSTATE_SSE_MASK instead of 0.
1684
1685 2017-09-04  Yao Qi  <yao.qi@linaro.org>
1686
1687         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
1688         i386_target_description.
1689         * i386-fbsd-nat.c (i386fbsd_read_description): Call
1690         i386_target_description.
1691         * i386-tdep.c (i386_gdbarch_init): Likewise.
1692
1693 2017-09-04  Yao Qi  <yao.qi@linaro.org>
1694
1695         * amd64-darwin-tdep.c: Include "x86-xstate.h".
1696         (x86_darwin_init_abi_64): Call amd64_target_description.
1697         * amd64-dicos-tdep.c: Likewise.
1698         * amd64-fbsd-nat.c: Likewise.
1699         * amd64-fbsd-tdep.c: Likewise.
1700         * amd64-nbsd-tdep.c: Likewise.
1701         * amd64-obsd-tdep.c: Likewise.
1702         * amd64-sol2-tdep.c: Likewise.
1703         * amd64-windows-tdep.c: Likewise.
1704         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
1705
1706 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
1707
1708         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
1709         (btrace_function) <insn>: Change type to use std::vector.
1710         * btrace.c (ftrace_debug, ftrace_call_num_insn,
1711         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
1712         ftrace_update_insns, ftrace_compute_global_level_offset,
1713         btrace_stitch_bts, btrace_clear, btrace_insn_get,
1714         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
1715         change to std::vector.
1716         (ftrace_update_insns): Adjust to change to std::vector, change
1717         type of INSN parameter.
1718         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
1719         * record-btrace.c (btrace_call_history_insn_range,
1720         btrace_compute_src_line_range,
1721         record_btrace_frame_prev_register): Adjust to change to
1722         std::vector.
1723         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
1724         to change to std::vector.
1725
1726 2017-09-03  Tom Tromey  <tom@tromey.com>
1727
1728         * corefile.c (reopen_exec_file): Use std::string.
1729
1730 2017-09-03  Tom Tromey  <tom@tromey.com>
1731
1732         * compile/compile.c (compile_register_name_mangled): Return
1733         std::string.
1734         * compile/compile-loc2c.c (pushf_register_address): Update.
1735         (pushf_register): Update.
1736         * compile/compile-c-types.c (convert_array): Update.
1737         * compile/compile-c-symbols.c (generate_vla_size): Update.
1738         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
1739         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
1740         (convert_one_symbol): Update.
1741         (generate_c_for_for_one_variable): Update.
1742         * compile/compile-c-support.c (c_get_range_decl_name): Return a
1743         std::string.
1744         (generate_register_struct): Update.
1745         * compile/compile-internal.h (c_get_range_decl_name): Return a
1746         std::string.
1747         (compile_register_name_mangled): Return std::string.
1748
1749 2017-09-03  Tom Tromey  <tom@tromey.com>
1750
1751         * utils.c (perror_string): Return a std::string.
1752         (throw_perror_with_name, perror_warning_with_name): Update.
1753
1754 2017-09-03  Tom Tromey  <tom@tromey.com>
1755
1756         * demangle.c (demangle_command): Use std::string,
1757         unique_xmalloc_ptr.
1758
1759 2017-09-03  Tom Tromey  <tom@tromey.com>
1760
1761         * cli/cli-setshow.c (do_set_command): Use std::string.
1762
1763 2017-09-03  Tom Tromey  <tom@tromey.com>
1764
1765         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
1766
1767 2017-09-03  Tom Tromey  <tom@tromey.com>
1768
1769         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
1770
1771 2017-09-03  Tom Tromey  <tom@tromey.com>
1772
1773         * mi/mi-cmd-env.c (env_execute_cli_command): Use
1774         gdb::unique_xmalloc_ptr.
1775
1776 2017-09-03  Tom Tromey  <tom@tromey.com>
1777
1778         * thread.c (print_thread_info_1): Use string_printf.
1779         (thread_apply_command, thread_apply_all_command): Use
1780         std::string.
1781
1782 2017-09-03  Tom Tromey  <tom@tromey.com>
1783
1784         * valprint.c (val_print_string): Update.
1785         * gdbcore.h (memory_error_message): Return std::string.
1786         * corefile.c (memory_error_message): Return std::string.
1787         (memory_error): Update.
1788         * breakpoint.c (insert_bp_location): Update.
1789
1790 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
1791
1792         * target/waitstatus.h (target_waitstatus_to_string): Change
1793         return type to std::string.
1794         * target/waitstatus.c (target_waitstatus_to_string): Return
1795         std::string.
1796         * target.h (target_waitstatus_to_string): Remove declaration.
1797         * infrun.c (resume, clear_proceed_status_thread,
1798         print_target_wait_results, do_target_wait, save_waitstatus,
1799         stop_all_threads): Adjust.
1800         * record-btrace.c (record_btrace_wait): Adjust.
1801         * target-debug.h
1802         (target_debug_print_struct_target_waitstatus_p): Adjust.
1803
1804 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
1805
1806         PR gdb/22046
1807         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
1808         detection.
1809
1810 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1811
1812         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
1813         for setting/unsetting environment variables on the remote target.
1814         (New remote packets): Add entries for QEnvironmentHexEncoded,
1815         QEnvironmentUnset and QEnvironmentReset.
1816         * common/environ.c (gdb_environ::operator=): Extend method to
1817         handle m_user_set_env_list and m_user_unset_env_list.
1818         (gdb_environ::clear): Likewise.
1819         (match_var_in_string): Change type of first parameter from 'char
1820         *' to 'const char *'.
1821         (gdb_environ::set): Extend method to handle
1822         m_user_set_env_list and m_user_unset_env_list.
1823         (gdb_environ::unset): Likewise.
1824         (gdb_environ::clear_user_set_env): New method.
1825         (gdb_environ::user_set_envp): Likewise.
1826         (gdb_environ::user_unset_envp): Likewise.
1827         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
1828         m_user_unset_env_list on move constructor/assignment.
1829         (unset): Add new default parameter 'update_unset_list = true'.
1830         (clear_user_set_env): New method.
1831         (user_set_envp): Likewise.
1832         (user_unset_envp): Likewise.
1833         (m_user_set_env_list): New std::set.
1834         (m_user_unset_env_list): Likewise.
1835         * common/rsp-low.c (hex2str): New function.
1836         (bin2hex): New overload for bin2hex function.
1837         * common/rsp-low.c (hex2str): New prototype.
1838         (str2hex): New overload prototype.
1839         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
1840         QEnvironmentUnset and QEnvironmentReset.
1841         (remote_protocol_features): Add QEnvironmentHexEncoded,
1842         QEnvironmentUnset and QEnvironmentReset packets.
1843         (send_environment_packet): New function.
1844         (extended_remote_environment_support): Likewise.
1845         (extended_remote_create_inferior): Call
1846         extended_remote_environment_support.
1847         (_initialize_remote): Add QEnvironmentHexEncoded,
1848         QEnvironmentUnset and QEnvironmentReset packet configs.
1849         * unittests/environ-selftests.c (gdb_selftest_env_var):
1850         New variable.
1851         (test_vector_initialization): New function.
1852         (test_init_from_host_environ): Likewise.
1853         (test_reinit_from_host_environ): Likewise.
1854         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
1855         Likewise.
1856         (test_unset_set_empty_vector): Likewise.
1857         (test_vector_clear): Likewise.
1858         (test_std_move): Likewise.
1859         (test_move_constructor):
1860         (test_self_move): Likewise.
1861         (test_set_unset_reset): Likewise.
1862         (run_tests): Rewrite in terms of the functions above.
1863
1864 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
1865
1866         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
1867         (adi_available): Use a temp variable of type CORE_ADDR as argument
1868         3 when calling target_auxv_search.
1869         (adi_normalize_address): Use masks and xor operators to calculate
1870         normalized address.
1871         (adi_read_versions, adi_write_versions, adi_print_versions)
1872         (do_examine, do_assign): Use paddress.
1873
1874 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
1875
1876         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
1877         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
1878         out of loop and add supply of FIR.
1879         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
1880         add collect of FIR.
1881
1882 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
1883
1884         PR gdb/21827
1885         * cli/cli-script.c (define_command): Don't convert command name
1886         to lower case.
1887
1888 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
1889
1890         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
1891         Update all callers accordingly. Remove all code blocks handling
1892         the case where DISPP is not NULL.
1893
1894 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
1895
1896         PR symtab/22003
1897         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
1898         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
1899         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
1900
1901 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
1902
1903         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
1904         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
1905         (read_comp_units_from_section): New parameter abbrev_section, use
1906         read_and_check_comp_unit_head, allocate signatured_type if needed.
1907         (create_all_comp_units): Update read_comp_units_from_section caller.
1908
1909 2017-08-23  Pedro Alves  <palves@redhat.com>
1910
1911         PR remote/21852
1912         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
1913         to null_ptid and switch to thread without reading the registers
1914         after adding the inferior.
1915
1916 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
1917
1918         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
1919         compile-gcc.
1920         * compile/compile.c (compile_gcc, show_compile_gcc): New.
1921         (compile_to_object): Implement compile_gcc.
1922         (_initialize_compile): Install "set compile-gcc".  Initialize
1923         compile_gcc.
1924
1925 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
1926
1927         * compile/compile.c (compile_to_object): Conditionally call
1928         set_verbose.  Conditionally call compile or compile_v0.
1929
1930 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
1931
1932         * sparc64-tdep.h: (adi_normalize_address): New export.
1933         * sparc-nat.h: (open_adi_tag_fd): New export.
1934         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
1935         * sparc64-linux-tdep.c:
1936         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
1937         (sparc64_linux_handle_segmentation_fault): New function.
1938         (sparc64_linux_init_abi): Register
1939         sparc64_linux_handle_segmentation_fault
1940         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
1941         (sparc64_addr_bits_remove): New function.
1942         (sparc64_init_abi): Register sparc64_addr_bits_remove.
1943         (MAX_PROC_NAME_SIZE): New macro.
1944         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
1945         (sparc64adilist): New variable.
1946         (adi_proc_list): New variable.
1947         (find_adi_info): New function.
1948         (add_adi_info): New function.
1949         (get_adi_info_proc): New function.
1950         (get_adi_info): New function.
1951         (info_adi_command): New function.
1952         (read_maps_entry): New function.
1953         (adi_available): New function.
1954         (adi_normalize_address): New function.
1955         (adi_align_address): New function.
1956         (adi_convert_byte_count): New function.
1957         (adi_tag_fd): New function.
1958         (adi_is_addr_mapped): New function.
1959         (adi_read_versions): New function.
1960         (adi_write_versions): New function.
1961         (adi_print_versions): New function.
1962         (do_examine): New function.
1963         (do_assign): New function.
1964         (adi_examine_command): New function.
1965         (adi_assign_command): New function.
1966         (_initialize_sparc64_adi_tdep): New function.
1967
1968 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
1969
1970         * breakpoint.c (breakpoints_info): Rename to ...
1971         (info_breakpoints_command): ... this.
1972         (watchpoints_info): Rename to ...
1973         (info_watchpoints_command): ... this.
1974         (tracepoints_info): Rename to ...
1975         (info_tracepoints_command): ... this.
1976         (_initialize_breakpoint): Adjust.
1977         * dcache.c (dcache_info): Rename to ...
1978         (info_display_command): ... this.
1979         (_initialize_dcache): Adjust.
1980         * frame.h (args_info): Rename to ...
1981         (info_args_command): ... this.
1982         (locals_info): Rename to ...
1983         (info_locals_command): ... this.
1984         * infcmd.c (nofp_registers_info): Rename to ...
1985         (info_registers_command): ... this.
1986         (float_info): Rename to ...
1987         (info_float_command): ... this.
1988         (program_info): Rename to ...
1989         (info_program_command): ... this.
1990         (all_registers_info): Rename to ...
1991         (info_all_registers_command): ... this.
1992         (vector_info): Rename to ...
1993         (info_vector_command): ... this.
1994         (float_info): Rename to ...
1995         (info_float_command): ... this.
1996         (_initialize_infcmd): Adjust.
1997         * inferior.h (term_info): Rename to ...
1998         (info_terminal_command): ... this.
1999         * inflow.c (term_info): Rename to ...
2000         (info_terminal_command): ... this.
2001         (_initialize_inflow): Adjust.
2002         * infrun.c (signals_info): Rename to ...
2003         (info_signals_command): ... this.
2004         (_initialize_infrun): Adjust.
2005         * objc-lang.c (classes_info): Rename to ...
2006         (info_classes_command): ... this.
2007         (selectors_info): Rename to ...
2008         (info_selectors_command): ... this.
2009         (_initialize_objc_language): Adjust.
2010         * printcmd.c (sym_info): Rename to ...
2011         (info_symbol_command): ... this.
2012         (address_info): Rename to ...
2013         (info_address_command): ... this.
2014         (display_info): Rename to ...
2015         (info_display_command): ... this.
2016         (_initialize_printcmd): Adjust.
2017         * reverse.c (bookmarks_info): Rename to ...
2018         (info_breakpoints_command): ... this.
2019         (_initialize_reverse): Adjust.
2020         * ser-go32.c (dos_info): Rename to ...
2021         (info_serial_command): ... this.
2022         (_initialize_ser_dos): Adjust.
2023         * skip.c (skip_info): Rename to ...
2024         (info_skip_command): ... this.
2025         (_initialize_step_skip): Adjust.
2026         * source.c (line_info): Rename to ...
2027         (info_line_command): ... this.
2028         (source_info): Rename to ...
2029         (info_source_command)
2030         * stack.c (frame_info): Rename to ...
2031         (info_frame_command): ... this.
2032         (locals_info): Rename to ...
2033         (info_locals_command): ... this.
2034         (args_info): Rename to ...
2035         (info_args_command): ... this.
2036         (_initialize_stack): Adjust.
2037         * symtab.c (sources_info): Rename to ...
2038         (info_sources_command): ... this.
2039         (variables_info): Rename to ...
2040         (info_variables_command): ... this.
2041         (functions_info): Rename to ...
2042         (info_functions_command): ... this.
2043         (types_info): Rename to ...
2044         (info_types_command): ... this.
2045         (_initialize_symtab): Adjust.
2046         * target.c (target_info): Rename to ...
2047         (info_target_command): ... this.
2048         (initialize_targets): Adjust.
2049         * tracepoint.c (tvariables_info): Rename to ...
2050         (info_tvariables_command): ... this.
2051         (scope_info): Rename to ...
2052         (info_scope_command): ... this.
2053         (trace_dump_actions): Adjust.
2054         (_initialize_tracepoint): Adjust.
2055
2056 2017-08-22  Tom Tromey  <tom@tromey.com>
2057
2058         * breakpoint.h (install_breakpoint): Update.
2059         * breakpoint.c (add_solib_catchpoint): Update.
2060         (install_breakpoint): Change argument to a std::unique_ptr.
2061         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
2062         (create_breakpoint_sal, create_breakpoint): Update.
2063         (watch_command_1, catch_exec_command_1)
2064         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
2065         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
2066         Return the breakpoint.
2067         (set_raw_breakpoint_without_location, set_raw_breakpoint)
2068         (new_single_step_breakpoint): Update.
2069         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
2070         std::unique_ptr.
2071         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2072         std::unique_ptr.
2073         * break-catch-sig.c (create_signal_catchpoint): Use
2074         std::unique_ptr.
2075         * ada-lang.c (create_ada_exception_catchpoint): Use
2076         std::unique_ptr.
2077
2078 2017-08-22  Tom Tromey  <tom@tromey.com>
2079
2080         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
2081
2082 2017-08-22  Tom Tromey  <tom@tromey.com>
2083
2084         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
2085         (lookup_partial_symbol): Update.
2086
2087 2017-08-22  Tom Tromey  <tom@tromey.com>
2088
2089         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
2090         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
2091         (find_and_open_source, symtab_to_fullname): Update.
2092         * psymtab.c (psymtab_to_fullname): Update.
2093
2094 2017-08-22  Tom Tromey  <tom@tromey.com>
2095
2096         * exec.c (exec_file_attach): Update.
2097         * linux-thread-db.c (try_thread_db_load): Update.
2098         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
2099         * utils.c (gdb_realpath): Change return type.
2100         (gdb_realpath_keepfile): Update.
2101         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
2102         (_initialize_utils): Register the new self test.
2103         * source.c (openp): Update.
2104         (find_and_open_source): Update.
2105         * nto-tdep.c (nto_find_and_open_solib): Update.
2106         * main.c (set_gdb_data_directory): Update.
2107         (captured_main_1): Update.
2108         * dwarf2read.c (dwarf2_get_dwz_file): Update
2109         (dw2_map_symbol_filenames): Update.
2110         * auto-load.c (auto_load_safe_path_vec_update): Update.
2111         (filename_is_in_auto_load_safe_path_vec): Change type of
2112         "filename_realp".
2113         (auto_load_objfile_script): Update.
2114         (file_is_auto_load_safe): Update.  Use std::string.
2115         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
2116
2117 2017-08-22  Tom Tromey  <tom@tromey.com>
2118
2119         * utils.c (gdb_realpath_keepfile): Return a
2120         gdb::unique_xmalloc_ptr.
2121         * exec.c (exec_file_attach): Update.
2122         * utils.h (gdb_realpath_keepfile): Return a
2123         gdb::unique_xmalloc_ptr.
2124
2125 2017-08-22  Tom Tromey  <tom@tromey.com>
2126
2127         * compile/compile.c (compile_file_command): Use
2128         gdb::unique_xmalloc_ptr, std::string.
2129         * utils.c (gdb_abspath): Change return type.
2130         * source.c (openp): Update.
2131         * objfiles.c (allocate_objfile): Update.
2132         * main.c (set_gdb_data_directory): Update.
2133         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
2134
2135 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
2136
2137         * cli-cmds.c (list_commands): List actual code around more than
2138         one location.
2139
2140 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
2141
2142         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
2143
2144 2017-08-21  Pedro Alves  <palves@redhat.com>
2145
2146         PR gdb/19487
2147         * c-exp.y (variable production): Handle function aliases.
2148         * minsyms.c (msymbol_is_text): New function.
2149         * minsyms.h (msymbol_is_text): Declare.
2150         * symtab.c (find_function_alias_target): New function.
2151         * symtab.h (find_function_alias_target): Declare.
2152
2153 2017-08-21  Pedro Alves  <palves@redhat.com>
2154
2155         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
2156         typedefs.
2157         * typeprint.c (whatis_exp): If handling "whatis", and expression
2158         is OP_TYPE, strip one typedef level.  Otherwise don't strip
2159         typedefs here.
2160         * valops.c (value_cast): Save "to" type before resolving
2161         stubs/typedefs.  Use that type as resulting value's type.
2162
2163 2017-08-18  Tom Tromey  <tom@tromey.com>
2164             Pedro Alves  <palves@redhat.com>
2165
2166         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
2167         * sol-thread.c (sol_thread_resume, sol_thread_wait)
2168         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
2169         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
2170         * proc-service.c (ps_xfer_memory): Use scoped_restore.
2171         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
2172         (linux_get_siginfo_data): Add "thread" argument.  Use
2173         scoped_restore.
2174         * linux-nat.c (linux_child_follow_fork)
2175         (check_stopped_by_watchpoint): Use scoped_restore.
2176         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
2177         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
2178         (restore_inferior_ptid, save_inferior_ptid): Remove.
2179         * btrace.c (btrace_fetch): Use scoped_restore.
2180         * bsd-uthread.c (bsd_uthread_fetch_registers)
2181         (bsd_uthread_store_registers): Use scoped_restore.
2182         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
2183         scoped_restore.
2184         * aix-thread.c (aix_thread_resume, aix_thread_wait)
2185         (aix_thread_xfer_partial): Use scoped_restore.
2186         * inferior.h (save_inferior_ptid): Remove.
2187
2188 2017-08-18  Yao Qi  <yao.qi@linaro.org>
2189
2190         PR tdep/21818
2191         * arm-tdep.c (gdb_print_insn_arm): Mark
2192         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
2193
2194 2017-08-18  Yao Qi  <yao.qi@linaro.org>
2195
2196         * NEWS: Mention GDBserver's new option "--selftest".
2197         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
2198         * selftest.c: Move it to common/selftest.c.
2199         * selftest.h: Move it to common/selftest.h.
2200         * selftest-arch.c (reset): New function.
2201         (tests_with_arch): Call reset.
2202
2203 2017-08-18  Yao Qi  <yao.qi@linaro.org>
2204
2205         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
2206         instead of exception_fprintf and printf_filtered.
2207
2208 2017-08-18  Yao Qi  <yao.qi@linaro.org>
2209
2210         * selftest.c (register_self_test): Rename it to
2211         selftests::register_test.
2212         (run_self_tests): selftest::run_tests.
2213         * selftest.h: Update declarations.
2214         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
2215         selftests::register_test_foreach_arch.
2216         * selftest-arch.h: Update declaration.
2217         * aarch64-tdep.c: Update.
2218         * arm-tdep.c: Likewise.
2219         * disasm-selftests.c: Likewise.
2220         * dwarf2loc.c: Likewise.
2221         * dwarf2-frame.c: Likewise.
2222         * findvar.c: Likewise.
2223         * gdbarch-selftests.c: Likewise.
2224         * maint.c (maintenance_selftest): Likewise.
2225         * regcache.c: Likewise.
2226         * rust-exp.y: Likewise.
2227         * selftest-arch.c: Likewise.
2228         * unittests/environ-selftests.c: Likewise.
2229         * unittests/function-view-selftests.c: Likewise.
2230         * unittests/offset-type-selftests.c: Likewise.
2231         * unittests/optional-selftests.c: Likewise.
2232         * unittests/scoped_restore-selftests.c: Likewise.
2233         * utils-selftests.c: Likewise.
2234
2235 2017-08-17  Pedro Alves  <palves@redhat.com>
2236
2237         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
2238         local.
2239
2240 2017-08-17  Pedro Alves  <palves@redhat.com>
2241
2242         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
2243         field.
2244         (reset_die_in_process): Delete, replaced by ...
2245         (process_die_scope): ... this new class.  Make it responsible for
2246         freeing cu->line_header too.
2247         (process_die): Use process_die_scope.
2248         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
2249         cu->line_header_die_owner.  Don't release the line header if it's
2250         owned by the CU.
2251         (setup_type_unit_groups): Make the CU/DIE own the line header.
2252         Don't release the line header here.
2253
2254 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
2255
2256         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
2257
2258 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
2259
2260         * NEWS: Mention new shortcuts for nexti and stepi in TUI
2261         Single-Key mode
2262
2263 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
2264
2265         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
2266         mode command list.
2267
2268 2017-08-15  Stafford Horne  <shorne@gmail.com>
2269
2270         * MAINTAINERS (Write After Approval): Add Stafford Horne.
2271
2272 2017-08-15  Stafford Horne  <shorne@gmail.com>
2273
2274         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
2275
2276 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
2277
2278         PR gdb/21954
2279         * infcmd.c (unset_environment_command): Use the 'clear' method on
2280         the environment instead of resetting it.
2281
2282 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
2283
2284         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
2285         platforms.
2286
2287 2017-08-14  Tom Tromey  <tom@tromey.com>
2288
2289         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
2290         (print_binary_chars): Likewise.
2291         (BITS_IN_BYTES): Remove.
2292
2293 2017-08-14  Tom Tromey  <tom@tromey.com>
2294
2295         PR gdb/21675
2296         * valprint.c (LOW_ZERO): Change value to 034.
2297         (print_octal_chars): Add static_asserts for octal constants.
2298         * printcmd.c (print_scalar_formatted): Add 'd' case.
2299
2300 2017-08-11  Tom Tromey  <tom@tromey.com>
2301
2302         * symfile.c (add_symbol_file_command): Use std::vector.
2303
2304 2017-08-14  Tom Tromey  <tom@tromey.com>
2305
2306         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
2307         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2308         std::move.
2309         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
2310
2311 2017-08-11  Pedro Alves  <palves@redhat.com>
2312
2313         * infrun.c (process_event_stop_test): Adjust
2314         function_name_is_marked_for_skip call.
2315         * skip.c: Include <list>.
2316         (skiplist_entry): Make it a class with private fields, and
2317         getters/setters.
2318         (skiplist_entry_chain): Delete.
2319         (skiplist_entries): New.
2320         (skiplist_entry_count): Delete.
2321         (highest_skiplist_entry_num): New.
2322         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
2323         (add_skiplist_entry): Delete.
2324         (skiplist_entry::skiplist_entry): New.
2325         (skiplist_entry::add_entry): New.
2326         (skip_file_command, skip_function): Adjust.
2327         (compile_skip_regexp): Delete.
2328         (skip_command): Don't compile regexp here.  Adjust to use
2329         skiplist_entry::add_entry.
2330         (skip_info): Adjust to use range-for and getters.
2331         (skip_enable_command, skip_disable_command): Adjust to use
2332         range-for and setters.
2333         (skip_delete_command): Adjust to use std::list.
2334         (add_skiplist_entry): Delete.
2335         (skip_file_p): Delete, refactored as ...
2336         (skiplist_entry::do_skip_file_p): ... this new method.
2337         (skip_gfile_p): Delete, refactored as ...
2338         (skiplist_entry::do_gskip_file_p): ... this new method.
2339         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
2340         (skiplist_entry::skip_function_p): ... this new method.
2341         (function_name_is_marked_for_skip): Now returns bool, and takes
2342         the function sal by const reference.  Adjust to use range-for and
2343         skiplist_entry methods.
2344         (_initialize_step_skip): Remove references to
2345         skiplist_entry_chain, skiplist_entry_count.
2346         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
2347         takes the function sal by const reference.
2348
2349 2017-08-11  Yao Qi  <yao.qi@linaro.org>
2350
2351         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
2352         (dwarf2_frame_cache): Remove reset_cache_cleanup.
2353         (dwarf2_frame_cache):
2354         * frame-unwind.c (frame_unwind_try_unwinder): Catch
2355         RETURN_MASK_ALL and set *this_case to NULL.
2356         * frame-unwind.h: Update comments.
2357
2358 2017-08-11  Yao Qi  <yao.qi@linaro.org>
2359
2360         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
2361         (dwarf2_frame_state_copy_regs): Remove.
2362         (dwarf2_frame_state_free_regs): Remove.
2363         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
2364         (dwarf2_restore_rule): Call method .alloc_regs instead of
2365         dwarf2_frame_state_alloc_regs.
2366         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
2367         constructor.  Call std::move.
2368         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
2369         (dwarf2_frame_cache): Likewise.
2370
2371         [GDB_SELF_TEST]: Include selftest.h and
2372         selftest-arch.h.
2373         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
2374         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
2375         execute_cfa_program_test.
2376
2377         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
2378         copy ctor, assignment operator, move assignment.
2379         <alloc_regs>: New method.
2380         <swap>: New method.
2381         (struct dwarf2_frame_state): Delete dtor.
2382         (dwarf2_frame_state_alloc_regs): Remove declaration.
2383         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
2384         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
2385
2386 2017-08-11  Yao Qi  <yao.qi@linaro.org>
2387
2388         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
2389         (dwarf2_frame_state::dwarf2_frame_state): New.
2390         (dwarf2_frame_state::~dwarf2_frame_state): New.
2391         (dwarf2_fetch_cfa_info): Update.
2392         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
2393         rather than a pointer.  Update code.
2394         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
2395         dtor.
2396         <data_align, code_align, retaddr_column>: Change them to const.
2397         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
2398         to bool.
2399
2400 2017-08-11  Yao Qi  <yao.qi@linaro.org>
2401
2402         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
2403         <loc.exp>: New field.
2404         * dwarf2-frame.c (execute_cfa_program): Update.
2405         (dwarf2_frame_prev_register): Update.
2406
2407 2017-08-10  Pedro Alves  <palves@redhat.com>
2408
2409         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
2410
2411 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
2412
2413         * fbsd-nat.c (struct fbsd_fork_info): Remove.
2414         (fbsd_pending_children): Use std::list.
2415         (fbsd_remember_child): Likewise.
2416         (fbsd_is_child_pending): Likewise.
2417         (fbsd_pending_vfork_done): Use std::forward_list.
2418         (fbsd_add_vfork_done): Likewise.
2419         (fbsd_is_vfork_done_pending): Likewise.
2420         (fbsd_next_vfork_done): Likewise.
2421
2422 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
2423
2424         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
2425         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
2426         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
2427         for `mapfilename'.
2428         (fbsd_xfer_partial): Use gdb::byte_vector.
2429         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
2430
2431 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
2432
2433         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
2434         "filestuff.h".
2435         (fbsd_find_memory_regions): Fix `mapfile' initialization.
2436
2437 2017-08-09  Tom Tromey  <tom@tromey.com>
2438
2439         * skip.c (skiplist_entry): New constructor.
2440         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
2441         (skiplist_entry::file_is_glob): Now bool.
2442         (skiplist_entry::file, skiplist_entry::function): Now
2443         std::string.
2444         (make_skip_entry): Return a unique_ptr.  Use new.
2445         (free_skiplist_entry, free_skiplist_entry_cleanup)
2446         (make_free_skiplist_entry_cleanup): Remove.
2447         (skip_command, skip_disable_command, add_skiplist_entry)
2448         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
2449         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
2450         (function_name_is_marked_for_skip): Update.
2451         (skip_delete_command): Update.  Use delete.
2452
2453 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
2454
2455         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
2456         (aarch64_linux_core_read_description): New function.
2457         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
2458
2459 2017-08-09  Pedro Alves  <palves@redhat.com>
2460
2461         * cp-name-parser.y (cp_comp_to_string): Return a
2462         gdb::unique_xmalloc_ptr<char>.
2463         * cp-support.c (replace_typedefs_qualified_name)
2464         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
2465         (cp_canonicalize_string_full): Use op= instead of explicit
2466         convertion.
2467         (cp_class_name_from_physname, method_name_from_physname)
2468         (cp_func_name, cp_remove_params): Adjust to use
2469         gdb::unique_xmalloc_ptr<char>.
2470         * cp-support.h (cp_comp_to_string): Return a
2471         gdb::unique_xmalloc_ptr<char>.
2472         * python/py-type.c (typy_lookup_type): Adjust to use
2473         gdb::unique_xmalloc_ptr<char>.
2474
2475 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
2476
2477         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
2478
2479 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
2480             Yao Qi  <yao.qi@linaro.org>
2481
2482         * cp-support.c (cp_canonicalize_string_full): Use
2483         gdb::unique_xmalloc_ptr<char>.
2484         (cp_canonicalize_string): Likewise.
2485
2486 2017-08-09  Yao Qi  <yao.qi@linaro.org>
2487
2488         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
2489         * regformats/i386/amd64-avx-avx512.dat: Remove.
2490         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
2491         * regformats/i386/amd64-avx-mpx.dat:Remove.
2492         * regformats/i386/amd64-avx.dat: Remove.
2493         * regformats/i386/amd64-mpx.dat: Remove.
2494         * regformats/i386/i386-avx-avx512.dat: Remove.
2495         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
2496         * regformats/i386/i386-avx-mpx.dat: Remove.
2497         * regformats/i386/i386-mmx.dat: Remove.
2498         * regformats/i386/i386-mpx.dat: Remove.
2499
2500 2017-08-09  Yao Qi  <yao.qi@linaro.org>
2501
2502         * amd64-tdep.h (tdesc_x32): Remove the declaration.
2503         * amd64-tdep.c: Don't include features/i386/x32*.c.
2504         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
2505         functions.
2506         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
2507         and i386/x32-avx-avx512.
2508         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
2509         and i386/x32.xml.
2510         * features/i386/x32-avx-avx512.c: Removed.
2511         * features/i386/x32-avx-avx512.xml: Removed.
2512         * features/i386/x32-avx.c: Removed.
2513         * features/i386/x32-avx.xml: Removed.
2514         * features/i386/x32.c: Removed.
2515         * features/i386/x32.xml: Removed.
2516         * regformats/i386/x32-avx-avx512.dat: Removed.
2517         * regformats/i386/x32-avx.dat: Removed.
2518         * regformats/i386/x32.dat: Removed.
2519
2520 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
2521
2522         PR breakpoints/21886
2523         * mem-break.c (default_memory_insert_breakpoint): Use
2524         `->placed_address' rather than `->reqstd_address' for the
2525         breakpoint location.
2526
2527 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
2528
2529         * arch-utils.c (default_print_insn): Remove arch/mach/endian
2530         assertions.
2531
2532 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
2533
2534         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
2535         a union of `tdep_info', `tdesc_data' and `id'.
2536         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
2537         rather than `info.tdep_info'.
2538         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
2539         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
2540         * i386-tdep.c (i386_gdbarch_init): Likewise.
2541         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
2542         * mips-tdep.c (mips_gdbarch_init): Likewise.
2543         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2544         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
2545         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
2546         `info.tdep_info'.
2547         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
2548         `info.tdep_info'.
2549         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
2550         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
2551         `info.tdep_info'.
2552         * spu-tdep.c (spu_gdbarch_init): Likewise.
2553         * gdbarch.h: Regenerate.
2554
2555 2017-08-07  Leszek Swirski  <leszeks@google.com>
2556
2557         PR symtab/20899
2558         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
2559
2560 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2561
2562         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
2563         (gdbsim_open): Rename gdb_argv args object to argv.
2564
2565 2017-08-05  Tom Tromey  <tom@tromey.com>
2566
2567         * compile/compile-object-load.c (compile_object_load): Use
2568         gdb::unique_xmalloc_ptr.
2569         * cli/cli-dump.c (scan_filename): Rename from
2570         scan_filename_with_cleanup.  Change return type.
2571         (scan_expression): Rename from scan_expression_with_cleanup.
2572         Change return type.
2573         (dump_memory_to_file, dump_value_to_file, restore_command):
2574         Use gdb::unique_xmalloc_ptr.  Update.
2575         * cli/cli-cmds.c (find_and_open_script): Use
2576         gdb::unique_xmalloc_ptr.
2577         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
2578         * symmisc.c (maintenance_print_symbols)
2579         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
2580         * symfile.c (symfile_bfd_open, generic_load)
2581         (add_symbol_file_command, remove_symbol_file_command): Use
2582         gdb::unique_xmalloc_ptr.
2583         * source.c (openp): Use gdb::unique_xmalloc_ptr.
2584         * psymtab.c (maintenance_print_psymbols): Use
2585         gdb::unique_xmalloc_ptr.
2586         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
2587         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
2588         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
2589         (reload_shared_libraries_1): Likewise.
2590
2591 2017-08-05  Tom Tromey  <tom@tromey.com>
2592
2593         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
2594         (rust_op_vector, rust_set_vector): New typedefs.
2595         (current_parser): New global.
2596         (work_obstack): Change to pointer type.  Update all users.
2597         (rust_ast, pstate): Remove globals.
2598         (struct rust_parser): New.
2599         (%union) <params, field_inits>: Change type.
2600         (start, tuple_expr, unit_expr, struct_expr_list, literal)
2601         (field_expr, expr_list, maybe_expr_list, type_list): Update.
2602         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
2603         (convert_params_to_types, convert_params_to_expression): Change
2604         type of "params".
2605         (ast_string): Change type of "fields".
2606         (rust_parse): Make a rust_parser.  Remove cleanups.
2607         (rust_lex_tests): Make and install an auto_obstack.
2608
2609 2017-08-04  Yao Qi  <yao.qi@linaro.org>
2610
2611         * configure.srv (ipa_x32_linux_regobj): New.
2612         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
2613         instead of X86_TDESC_AVX512.
2614         (initialize_low_tracepoint): Call
2615         init_registers_x32_avx_avx512_linux.
2616
2617 2017-08-04  Yao Qi  <yao.qi@linaro.org>
2618
2619         * utils.h (gdb_argv): Add namespace std for nullptr_t.
2620
2621 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
2622
2623         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
2624
2625 2017-08-03  Tom Tromey  <tom@tromey.com>
2626
2627         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
2628         Remove.
2629         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
2630
2631 2017-08-03  Tom Tromey  <tom@tromey.com>
2632
2633         * python/py-param.c (compute_enum_values): Use gdb_argv.
2634
2635 2017-08-03  Tom Tromey  <tom@tromey.com>
2636
2637         * utils.h (struct gdb_argv_deleter): New.
2638         (gdb_argv): New class.
2639         * utils.c (gdb_argv::reset): New method.
2640         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
2641         * tracefile.c (tsave_command): Use gdb_argv.
2642         * top.c (new_ui_command): Use gdb_argv.
2643         * symmisc.c (maintenance_print_symbols)
2644         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
2645         * symfile.c (symbol_file_command, generic_load)
2646         (remove_symbol_file_command): Use gdb_argv.
2647         * stack.c (backtrace_command): Use gdb_argv.
2648         * source.c (add_path, show_substitute_path_command)
2649         (unset_substitute_path_command, set_substitute_path_command):
2650         Use gdb_argv.
2651         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
2652         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
2653         * remote.c (extended_remote_run, remote_put_command)
2654         (remote_get_command, remote_delete_command): Use gdb_argv.
2655         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
2656         (gdbsim_open): Use gdb_argv.
2657         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
2658         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
2659         * procfs.c (procfs_info_proc): Use gdb_argv.
2660         * interps.c (interpreter_exec_cmd): Use gdb_argv.
2661         * infrun.c (handle_command): Use gdb_argv.
2662         * inferior.c (add_inferior_command, clone_inferior_command):
2663         Use gdb_argv.
2664         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
2665         * exec.c (exec_file_command): Use gdb_argv.
2666         * cli/cli-cmds.c (alias_command): Use gdb_argv.
2667         * compile/compile.c (build_argc_argv): Use gdb_argv.
2668
2669 2017-08-03  Tom Tromey  <tom@tromey.com>
2670
2671         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
2672
2673 2017-08-03  Tom Tromey  <tom@tromey.com>
2674
2675         * python/python.c (compute_python_string): Return std::string.
2676         (gdbpy_eval_from_control_command): Update.
2677         (do_start_initialization): Use std::string.
2678         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
2679         xstrprintf.
2680         * python/py-breakpoint.c (local_setattro): Use string_printf, not
2681         xstrprintf.
2682
2683 2017-08-03  Tom Tromey  <tom@tromey.com>
2684
2685         * top.h (do_restore_instream_cleanup): Remove.
2686         * top.c (do_restore_instream_cleanup): Remove.
2687         (read_command_file): Use scoped_restore.
2688         * cli/cli-script.c (execute_user_command): Use scoped_restore.
2689
2690 2017-08-03  Tom Tromey  <tom@tromey.com>
2691
2692         * cli/cli-script.c (execute_user_command)
2693         (execute_control_command): Use scoped_restore.
2694
2695 2017-08-03  Tom Tromey  <tom@tromey.com>
2696
2697         * cli/cli-script.c (do_restore_user_call_depth): Remove.
2698         (execute_user_command): Remove user_call_depth; use
2699         user_args_stack's size instead.
2700
2701 2017-08-03  Tom Tromey  <tom@tromey.com>
2702
2703         * top.h (in_user_command): Remove.
2704         * top.c (in_user_command): Remove.
2705         * cli/cli-script.c (do_restore_user_call_depth)
2706         (execute_user_command): Update.
2707
2708 2017-08-03  Tom Tromey  <tom@tromey.com>
2709
2710         * valops.c (search_struct_method): Use gdb::byte_vector.
2711         * valarith.c (value_concat): Use std::vector.
2712         * target.c (memory_xfer_partial): Use gdb::byte_vector.
2713         (simple_search_memory): Likewise.
2714         * printcmd.c (find_string_backward): Use gdb::byte_vector.
2715         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
2716         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
2717         * elfread.c (elf_rel_plt_read): Use std::string.
2718         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
2719         * cli/cli-dump.c (restore_section_callback): Use
2720         gdb::byte_vector.
2721
2722 2017-08-03  Tom Tromey  <tom@tromey.com>
2723
2724         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
2725
2726 2017-08-03  Tom Tromey  <tom@tromey.com>
2727
2728         * tui/tui-regs.c (tui_restore_gdbout): Remove.
2729         (tui_register_format): Use scoped_restore.
2730
2731 2017-08-03  Tom Tromey  <tom@tromey.com>
2732
2733         * reverse.c (exec_direction_default): Remove.
2734         (exec_reverse_once): Use scoped_restore.
2735         * remote.c (restore_remote_timeout): Remove.
2736         (remote_flash_erase, remote_flash_write, remote_flash_done)
2737         (readchar, remote_serial_write): Use scoped_restore.
2738         * cli/cli-script.c (struct source_cleanup_lines_args)
2739         (source_cleanup_lines): Remove.
2740         (script_from_file): Use scoped_restore.
2741         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
2742         (source_command): Use scoped_restore.
2743
2744 2017-08-03  Tom Tromey  <tom@tromey.com>
2745
2746         * utils.h (make_cleanup_free_so): Remove.
2747         * utils.c (do_free_so, make_cleanup_free_so): Remove.
2748         * solist.h (struct so_deleter): New.
2749         (so_list_up): New typedef.
2750         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
2751
2752 2017-08-03  Tom Tromey  <tom@tromey.com>
2753
2754         * utils.h (make_cleanup_restore_current_language): Remove.
2755         * utils.c (do_restore_current_language)
2756         (make_cleanup_restore_current_language): Remove.
2757         * parse.c (parse_exp_in_context_1)
2758         (parse_expression_with_language): Use
2759         scoped_restore_current_language.
2760         * mi/mi-main.c (mi_cmd_execute): Use
2761         scoped_restore_current_language.
2762         * language.h (scoped_restore_current_language): New class.
2763
2764 2017-08-03  Tom Tromey  <tom@tromey.com>
2765
2766         * compile/compile.c (cleanup_unlink_file): Remove.
2767         (compile_to_object): Use gdb::unlinker.
2768         (eval_compile_command): Likewise.
2769
2770 2017-08-03  Tom Tromey  <tom@tromey.com>
2771
2772         * utils.h (make_cleanup_fclose): Remove.
2773         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
2774
2775 2017-08-03  Tom Tromey  <tom@tromey.com>
2776
2777         * top.c (open_terminal_stream): Return gdb_file_up.
2778         (new_ui_command): Update.
2779
2780 2017-08-03  Tom Tromey  <tom@tromey.com>
2781
2782         * source.c (print_source_lines_base, forward_search_command)
2783         (reverse_search_command): Use gdb_file_up.
2784
2785 2017-08-03  Tom Tromey  <tom@tromey.com>
2786
2787         * fbsd-nat.c (fbsd_find_memory_regions): Update.
2788
2789 2017-08-03  Tom Tromey  <tom@tromey.com>
2790
2791         * cli/cli-cmds.c (find_and_open_script): Change return type.
2792         Remove "streamp" and "full_path" parameters.
2793         (source_script_with_search): Update.
2794         * auto-load.c (source_script_file): Update.
2795         * cli/cli-cmds.h (find_and_open_script): Change type.
2796         (open_script): New struct.
2797
2798 2017-08-03  Tom Tromey  <tom@tromey.com>
2799
2800         * xml-support.c (xml_fetch_content_from_file): Update.
2801         * ui-file.c (stdio_file::open): Update.
2802         * tracefile-tfile.c (tfile_start): Update.
2803         * remote.c (remote_file_put, remote_file_get): Update.
2804         * nat/linux-procfs.c (linux_proc_get_int)
2805         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
2806         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
2807         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
2808         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
2809         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
2810         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
2811         * linux-nat.c (linux_proc_pending_signals): Update.
2812         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
2813         (file_closer): Remove.
2814         * compile/compile.c (compile_to_object): Update.
2815         * common/filestuff.h (struct gdb_file_deleter): New.
2816         (gdb_file_up): New typedef.
2817         (gdb_fopen_cloexec): Change return type.
2818         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
2819         * cli/cli-dump.c (fopen_with_cleanup): Remove.
2820         (dump_binary_file, restore_binary_file): Update.
2821         * auto-load.c (auto_load_objfile_script_1): Update.
2822
2823 2017-08-03  Tom Tromey  <tom@tromey.com>
2824
2825         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
2826         (info_static_tracepoint_markers_command): Likewise.
2827         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
2828         * skip.c (skip_info): Use ui_out_emit_table.
2829         * progspace.c (print_program_space): Use ui_out_emit_table.
2830         * osdata.c (info_osdata): Use ui_out_emit_table.
2831         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
2832         ui_out_emit_table.
2833         * linux-thread-db.c (info_auto_load_libthread_db): Use
2834         ui_out_emit_table.
2835         * inferior.c (print_inferior): Use ui_out_emit_table.
2836         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
2837         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
2838         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
2839         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
2840         * ui-out.h (class ui_out_emit_table): New.
2841
2842 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
2843
2844         * mips-tdep.c (mips_fpu_type_str): New function.
2845         (mips_dump_tdep): Call it.
2846
2847 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
2848
2849         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
2850         `->mips_fpu_type'.
2851
2852 2017-07-31  Xavier Roirand  <roirand@adacore.com>
2853
2854         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
2855
2856 2017-07-27  Xavier Roirand  <roirand@adacore.com>
2857
2858         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
2859
2860 2017-07-26  Yao Qi  <yao.qi@linaro.org>
2861
2862         * cli/cli-cmds.c (maintenancechecklist): New variable.
2863         * gdbcmd.h (maintenancechecklist): Declare it.
2864         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
2865         Call i386_linux_read_description with different masks.
2866         * maint.c (maintenance_check_command): New function.
2867         (_initialize_maint_cmds): Call add_prefix_cmd.
2868         * target-descriptions.c (tdesc_reg): override operator != and ==.
2869         (tdesc_type): Likewise.
2870         (tdesc_feature): Likewise.
2871         (target_desc): Likewise.
2872         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
2873         (maintenance_check_xml_descriptions): New function.
2874         (_initialize_target_descriptions) Add command "xml-descriptions".
2875         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
2876
2877 2017-07-26  Yao Qi  <yao.qi@linaro.org>
2878
2879         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
2880         Include features/i386/32bit-*.c.
2881         (i386_linux_read_description): Generate target description if it
2882         doesn't exist.
2883         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
2884         functions.
2885         * features/i386/32bit-linux.c: Re-generated.
2886         * features/i386/32bit-sse.c: Likewise.
2887         * target-descriptions.c (print_c_feature::visit): Print code to
2888         set register number if needed.
2889         (print_c_feature) <m_next_regnum>: New field.
2890
2891 2017-07-26  Yao Qi  <yao.qi@linaro.org>
2892
2893         * features/Makefile (CFILES): Rename with TDESC_CFILES.
2894         (FEATURE_XMLFILES): New.
2895         (FEATURE_CFILES): New.
2896         New rules.
2897         (clean-cfiles): Remove generated c files.
2898         * features/i386/32bit-avx.c: Generated.
2899         * features/i386/32bit-avx512.c: Generated.
2900         * features/i386/32bit-core.c: Generated.
2901         * features/i386/32bit-linux.c: Generated.
2902         * features/i386/32bit-mpx.c: Generated.
2903         * features/i386/32bit-pkeys.c: Generated.
2904         * features/i386/32bit-sse.c: Generated.
2905         * target-descriptions.c: Include algorithm.
2906         (tdesc_element_visitor): Add method visit_end.
2907         (print_c_tdesc): Implement visit_end.
2908         (print_c_tdesc:: m_filename_after_features): Move it to
2909         protected.
2910         (print_c_feature): New class.
2911         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
2912         name starts with "i386/32bit-".
2913
2914 2017-07-26  Yao Qi  <yao.qi@linaro.org>
2915
2916         * target-descriptions.c (tdesc_element_visitor): New class.
2917         (tdesc_element): New class.
2918         (tdesc_reg): Inherit from tdesc_element.
2919         (tdesc_reg::accept): New function.
2920         (tdesc_type): Inherit from tdesc_element.
2921         (tdesc_type::accept): New function.
2922         (tdesc_feature): Inherit from tdesc_element.
2923         (tdesc_feature::accept): New function.
2924         (target_desc): Inherit from tdesc_element.
2925         (target_desc::target_desc): New.
2926         (target_desc::~target_desc): New.
2927         (target_desc::accept): New.
2928         (allocate_target_description): Use new.
2929         (free_target_description): Use delete.
2930         (print_c_tdesc): New class.
2931         (maint_print_c_tdesc_cmd): Adjust.
2932
2933         * features/aarch64.c: Re-generated.
2934         * features/arc-arcompact.c: Re-generated.
2935         * features/arc-v2.c: Re-generated.
2936         * features/arm/arm-with-iwmmxt.c: Re-generated.
2937         * features/arm/arm-with-m.c: Re-generated.
2938         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
2939         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
2940         * features/arm/arm-with-neon.c: Re-generated.
2941         * features/arm/arm-with-vfpv2.c: Re-generated.
2942         * features/arm/arm-with-vfpv3.c: Re-generated.
2943         * features/i386/amd64-avx-avx512.c: Re-generated.
2944         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
2945         * features/i386/amd64-avx.c: Re-generated.
2946         * features/i386/amd64-avx-linux.c: Re-generated.
2947         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
2948         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
2949         * features/i386/amd64-avx-mpx.c: Re-generated.
2950         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
2951         * features/i386/amd64.c: Re-generated.
2952         * features/i386/amd64-linux.c: Re-generated.
2953         * features/i386/amd64-mpx.c: Re-generated.
2954         * features/i386/amd64-mpx-linux.c: Re-generated.
2955         * features/i386/i386-avx-avx512.c: Re-generated.
2956         * features/i386/i386-avx-avx512-linux.c: Re-generated.
2957         * features/i386/i386-avx.c: Re-generated.
2958         * features/i386/i386-avx-linux.c: Re-generated.
2959         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
2960         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
2961         * features/i386/i386-avx-mpx.c: Re-generated.
2962         * features/i386/i386-avx-mpx-linux.c: Re-generated.
2963         * features/i386/i386.c: Re-generated.
2964         * features/i386/i386-linux.c: Re-generated.
2965         * features/i386/i386-mmx.c: Re-generated.
2966         * features/i386/i386-mmx-linux.c: Re-generated.
2967         * features/i386/i386-mpx.c: Re-generated.
2968         * features/i386/i386-mpx-linux.c: Re-generated.
2969         * features/i386/x32-avx-avx512.c: Re-generated.
2970         * features/i386/x32-avx-avx512-linux.c: Re-generated.
2971         * features/i386/x32-avx.c: Re-generated.
2972         * features/i386/x32-avx-linux.c: Re-generated.
2973         * features/i386/x32.c: Re-generated.
2974         * features/i386/x32-linux.c: Re-generated.
2975         * features/microblaze.c: Re-generated.
2976         * features/microblaze-with-stack-protect.c: Re-generated.
2977         * features/mips64-dsp-linux.c: Re-generated.
2978         * features/mips64-linux.c: Re-generated.
2979         * features/mips-dsp-linux.c: Re-generated.
2980         * features/mips-linux.c: Re-generated.
2981         * features/nds32.c: Re-generated.
2982         * features/nios2.c: Re-generated.
2983         * features/nios2-linux.c: Re-generated.
2984         * features/rs6000/powerpc-32.c: Re-generated.
2985         * features/rs6000/powerpc-32l.c: Re-generated.
2986         * features/rs6000/powerpc-403.c: Re-generated.
2987         * features/rs6000/powerpc-403gc.c : Re-generated.
2988         * features/rs6000/powerpc-405.c: Re-generated.
2989         * features/rs6000/powerpc-505.c: Re-generated.
2990         * features/rs6000/powerpc-601.c: Re-generated.
2991         * features/rs6000/powerpc-602.c: Re-generated.
2992         * features/rs6000/powerpc-603.c: Re-generated.
2993         * features/rs6000/powerpc-604.c: Re-generated.
2994         * features/rs6000/powerpc-64.c: Re-generated.
2995         * features/rs6000/powerpc-64l.c: Re-generated.
2996         * features/rs6000/powerpc-7400.c: Re-generated.
2997         * features/rs6000/powerpc-750.c: Re-generated.
2998         * features/rs6000/powerpc-860.c: Re-generated.
2999         * features/rs6000/powerpc-altivec32.c: Re-generated.
3000         * features/rs6000/powerpc-altivec32l.c: Re-generated.
3001         * features/rs6000/powerpc-altivec64.c: Re-generated.
3002         * features/rs6000/powerpc-altivec64l.c: Re-generated.
3003         * features/rs6000/powerpc-cell32l.c: Re-generated.
3004         * features/rs6000/powerpc-cell64l.c: Re-generated.
3005         * features/rs6000/powerpc-e500.c: Re-generated.
3006         * features/rs6000/powerpc-e500l.c: Re-generated.
3007         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
3008         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
3009         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
3010         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
3011         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
3012         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
3013         * features/rs6000/powerpc-vsx32.c: Re-generated.
3014         * features/rs6000/powerpc-vsx32l.c: Re-generated.
3015         * features/rs6000/powerpc-vsx64.c: Re-generated.
3016         * features/rs6000/powerpc-vsx64l.c: Re-generated.
3017         * features/rs6000/rs6000.c: Re-generated.
3018         * features/s390-linux32.c: Re-generated.
3019         * features/s390-linux32v1.c: Re-generated.
3020         * features/s390-linux32v2.c: Re-generated.
3021         * features/s390-linux64.c: Re-generated.
3022         * features/s390-linux64v1.c: Re-generated.
3023         * features/s390-linux64v2.c: Re-generated.
3024         * features/s390-te-linux64.c: Re-generated.
3025         * features/s390-tevx-linux64.c: Re-generated.
3026         * features/s390-vx-linux64.c: Re-generated.
3027         * features/s390x-linux64.c: Re-generated.
3028         * features/s390x-linux64v1.c: Re-generated.
3029         * features/s390x-linux64v2.c: Re-generated.
3030         * features/s390x-te-linux64.c: Re-generated.
3031         * features/s390x-tevx-linux64.c: Re-generated.
3032         * features/s390x-vx-linux64.c: Re-generated.
3033         * features/sparc/sparc32-solaris.c: Re-generated.
3034         * features/sparc/sparc64-solaris.c: Re-generated.
3035         * features/tic6x-c62x.c: Re-generated.
3036         * features/tic6x-c62x-linux.c: Re-generated.
3037         * features/tic6x-c64x.c: Re-generated.
3038         * features/tic6x-c64x-linux.c: Re-generated.
3039         * features/tic6x-c64xp.c: Re-generated.
3040         * features/tic6x-c64xp-linux.c: Re-generated.
3041
3042 2017-07-26  Yao Qi  <yao.qi@linaro.org>
3043
3044         * i386-linux-tdep.c (i386_linux_read_description): New function.
3045         (i386_linux_core_read_description): Call
3046         i386_linux_read_description.
3047         * i386-linux-tdep.h (i386_linux_read_description): Declare.
3048         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
3049         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
3050         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
3051         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
3052         * x86-linux-nat.c (x86_linux_read_description): Call
3053         i386_linux_read_description.
3054
3055 2017-07-26  Yao Qi  <yao.qi@linaro.org>
3056
3057         * NEWS: Mention it.
3058         * features/Makefile (%.c: %.xml): Pass the xml file name to
3059         command "maint print c-tdesc".
3060         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
3061         name from 'arg'.
3062
3063 2017-07-26  Yao Qi  <yao.qi@linaro.org>
3064
3065         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
3066         in-class initialization.
3067         (tdesc_create_feature): Call new instead of XCNEW.
3068         (free_target_description): Ue delete.
3069
3070 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
3071
3072         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
3073
3074 2017-07-25  Yao Qi  <yao.qi@linaro.org>
3075
3076         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
3077         constant.
3078         (amd64_x32_init_abi): Likewise.
3079         * amd64-tdep.h (amd64_init_abi): Update declaration.
3080         (amd64_x32_init_abi): Likewise.
3081
3082 2017-07-25  Yao Qi  <yao.qi@linaro.org>
3083
3084         PR tdep/21717
3085         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
3086         condition for FPSCR.
3087         (arm_linux_store_inferior_registers): Likewise.
3088
3089 2017-07-22  Tom Tromey  <tom@tromey.com>
3090
3091         * break-catch-syscall.c (struct catch_syscall_inferior_data)
3092         <syscalls_counts>: Now a std::vector.
3093         (get_catch_syscall_inferior_data): Use "new".
3094         (catch_syscall_inferior_data_cleanup): Use "delete".
3095         (insert_catch_syscall, remove_catch_syscall)
3096         (clear_syscall_counts): Update.
3097
3098 2017-07-22  Tom Tromey  <tom@tromey.com>
3099
3100         * break-catch-syscall.c (syscall_catchpoint)
3101         <syscalls_to_be_caught>: Now a std::vector<int>
3102         (~syscall_catchpoint): Remove.
3103         (insert_catch_syscall, remove_catch_syscall)
3104         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
3105         (print_mention_catch_syscall, print_recreate_catch_syscall):
3106         Update.
3107         (create_syscall_event_catchpoint): Change type of "filter"
3108         parameter.
3109         (catch_syscall_split_args): Return a std::vector.
3110         (catch_syscall_command_1, catching_syscall_number_1): Update.
3111
3112 2017-07-22  Tom Tromey  <tom@tromey.com>
3113
3114         * break-catch-throw.c (struct exception_catchpoint)
3115         <exception_rx>: Now a std::string.
3116         (~exception_catchpoint): Remove.
3117         (print_one_detail_exception_catchpoint): Update.
3118         (handle_gnu_v3_exceptions): Change type of except_rx.
3119         (extract_exception_regexp): Return a std::string.
3120         (catch_exception_command_1): Update.
3121
3122 2017-07-22  Tom Tromey  <tom@tromey.com>
3123
3124         * break-catch-sig.c (gdb_signal_type): Remove typedef.
3125         (struct signal_catchpoint) <signals_to_be_caught>: Now a
3126         std::vector.
3127         <catch_all>: Now a bool.
3128         (~signal_catchpoint): Remove.
3129         (signal_catchpoint_insert_location)
3130         (signal_catchpoint_remove_location)
3131         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
3132         (signal_catchpoint_print_mention)
3133         (signal_catchpoint_print_recreate)
3134         (signal_catchpoint_explains_signal): Update.
3135         (create_signal_catchpoint): Change type of "filter" and
3136         "catch_all".
3137         (catch_signal_split_args): Return a std::vector.  Change type of
3138         "catch_all".
3139         (catch_signal_command): Update.
3140
3141 2017-07-20  Pedro Alves  <palves@redhat.com>
3142
3143         * ada-lang.c (ada_language_defn): Make extern.
3144         (_initialize_ada_language): Remove add_language call.
3145         * c-lang.c (c_language_defn, cplus_language_defn)
3146         (asm_language_defn, minimal_language_defn): Make extern.
3147         (_initialize_c_language): Delete.
3148         * completer.c (compare_cstrings): Delete, moved to utils.h.
3149         * d-lang.c (d_language_defn): Make extern.
3150         (_initialize_d_language): Remove add_language calls.
3151         * defs.h (enum language): Add comment.
3152         * f-lang.c (f_language_defn): Make extern.
3153         (_initialize_f_language): Remove add_language call.
3154         * go-lang.c (go_language_defn): Make extern.
3155         (_initialize_go_language): Remove add_language call.
3156         * language.c: Include <algorithm>.
3157         (languages): Redefine as const array.
3158         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
3159         (set_language_command): Handle "local".  Use for-range loop.
3160         (set_language): Remove loop.
3161         (language_enum): Rewrite.
3162         (language_def, language_str): Remove loops.
3163         (add_language): Delete.
3164         (add_set_language_command): New, based on add_languages.
3165         (skip_language_trampoline): Adjust.
3166         (local_language_defn): Delete.
3167         (language_gdbarch_post_init): Adjust.
3168         (_initialize_language): Remove add_language calls.  Call
3169         add_set_language_command.
3170         * language.h (add_language): Delete.
3171         (auto_language_defn)
3172         (unknown_language_defn, minimal_language_defn, ada_language_defn)
3173         (asm_language_defn, c_language_defn, cplus_language_defn)
3174         (d_language_defn, f_language_defn, go_language_defn)
3175         (m2_language_defn, objc_language_defn, opencl_language_defn)
3176         (pascal_language_defn, rust_language_defn): Declare.
3177         * m2-lang.c (m2_language_defn): Make extern.
3178         (_initialize_m2_language): Remove add_language call.
3179         * objc-lang.c (objc_language_defn): Make extern.
3180         (_initialize_objc_language): Remove add_language call.
3181         * opencl-lang.c (opencl_language_defn): Make extern.
3182         (_initialize_opencl_language): Remove add_language call.
3183         * p-lang.c (pascal_language_defn): Make extern.
3184         (_initialize_pascal_language): Delete.
3185         * rust-lang.c (rust_language_defn): Make extern.
3186         (_initialize_rust_language): Delete.
3187         * utils.h (compare_cstrings): New static inline function.
3188
3189 2017-07-20  Pedro Alves  <palves@redhat.com>
3190
3191         * ada-lang.c (ada_to_fixed_type_1): Adjust.
3192         (get_var_value): Constify parameters.
3193         (get_int_var_value): Change prototype.
3194         (to_fixed_range_type): Adjust.
3195         * ada-lang.h (get_int_var_value): Change prototype.
3196
3197 2017-07-20  Pedro Alves  <palves@redhat.com>
3198
3199         * dwarf2read.c (dw2_lookup_symbol): Use
3200         SYMBOL_MATCHES_SEARCH_NAME.
3201         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
3202
3203 2017-07-20  Pedro Alves  <palves@redhat.com>
3204
3205         * block.c (block_iter_name_step, block_iter_name_first)
3206         (block_iter_name_next): Delete.
3207         (block_lookup_symbol_primary): Adjust to use
3208         dict_iter_match_first/dict_iter_match_next.
3209         * block.h (block_iter_name_first, block_iter_name_next): Delete
3210         declarations.
3211         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
3212         dict_iter_match_first/dict_iter_match_next.
3213
3214 2017-07-20  Pedro Alves  <palves@redhat.com>
3215
3216         * cp-support.c (cp_find_first_component_aux): Add missing case for
3217         end of string.
3218
3219 2017-07-18  David Blaikie  <dblaikie@gmail.com>
3220
3221         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
3222         of dwo_cu's dwo_file.
3223
3224 2017-07-18  Yao Qi  <yao.qi@linaro.org>
3225
3226         * remote.c (store_registers_using_G): Remove one line comment.
3227
3228 2017-07-18  Yao Qi  <yao.qi@linaro.org>
3229
3230         * regcache.c (regcache_cpy): Simplify it.
3231         (regcache::cpy_no_passthrough): Remove it.
3232         * regcache.h (cpy_no_passthrough): Remove it.
3233         (regcache_dup, regcache_cpy): Update comments.
3234
3235 2017-07-18  Pedro Alves  <palves@redhat.com>
3236
3237         * remote-sim.c (sim_command_completer): Adjust to work with a
3238         completion_tracker instead of a VEC.
3239
3240 2017-07-17  Pedro Alves  <palves@redhat.com>
3241
3242         * completer.c (complete_source_filenames): New function.
3243         (complete_address_and_linespec_locations): New function.
3244         (location_completer): Use complete_address_and_linespec_locations.
3245         (completion_tracker::build_completion_result): Honor the tracker's
3246         request to suppress append.
3247         * completer.h (completion_tracker::suppress_append_ws)
3248         (completion_tracker::set_suppress_append_ws): New methods.
3249         (completion_tracker::m_suppress_append_ws): New field.
3250         (complete_source_filenames): New declaration.
3251         * linespec.c (linespec_complete_what): New.
3252         (struct ls_parser) <complete_what, completion_word,
3253         completion_quote_char, completion_quote_end, completion_tracker>:
3254         New fields.
3255         (string_find_incomplete_keyword_at_end): New.
3256         (linespec_lexer_lex_string): Record quote char.  If in completion
3257         mode, don't throw.
3258         (linespec_lexer_consume_token): Advance the completion word point.
3259         (linespec_lexer_peek_token): Save/restore completion info.
3260         (save_stream_and_consume_token): New.
3261         (set_completion_after_number): New.
3262         (linespec_parse_basic): Set what to complete next depending on
3263         token.  Handle function and label completions specially.
3264         (parse_linespec): Disable objc shortcut in completion mode.  Set
3265         what to complete next depending on token type.  Skip keyword if in
3266         completion mode.
3267         (complete_linespec_component, linespec_complete): New.
3268         * linespec.h (linespec_complete): Declare.
3269
3270 2017-07-17  Pedro Alves  <palves@redhat.com>
3271
3272         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
3273         Handle 'operator<' / 'operator<<'.
3274
3275 2017-07-17  Pedro Alves  <palves@redhat.com>
3276
3277         * completer.c (collect_explicit_location_matches): Handle
3278         MATCH_LABEL.
3279         (convert_explicit_location_to_linespec): New, factored out from
3280         ...
3281         (convert_explicit_location_to_sals): ... this.
3282         (complete_label): New.
3283         (linespec_complete_label, find_label_symbols_in_block): New.
3284         (find_label_symbols): Add completion_mode parameter and adjust to
3285         call find_label_symbols_in_block.
3286         * linespec.h (linespec_complete_label): Declare.
3287
3288 2017-07-17  Pedro Alves  <palves@redhat.com>
3289
3290         * ada-lang.c (ada_collect_symbol_completion_matches): Add
3291         complete_symbol_mode parameter.
3292         * cli/cli-cmds.c (complete_command): Get the completion result out
3293         of the handle_brkchars tracker if used a custom word point.
3294         * completer.c: Include "linespec.h".
3295         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
3296         (advance_to_expression_complete_word_point): New.
3297         (completion_tracker::completes_to_completion_word): New.
3298         (complete_files_symbols): Pass down
3299         complete_symbol_mode::EXPRESSION.
3300         (explicit_options, probe_options): New.
3301         (collect_explicit_location_matches): Complete on the
3302         explictit_loc->foo instead of word.  Use
3303         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
3304         keyword and options completions.
3305         (backup_text_ptr): Delete.
3306         (skip_keyword): New.
3307         (complete_explicit_location): Remove 'word' parameter.  Add
3308         language, quoted_arg_start and quoted_arg_end parameters.
3309         Rewrite, parsing left to right.
3310         (location_completer): Rewrite.
3311         (location_completer_handle_brkchars): New function.
3312         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
3313         (enum complete_line_internal_reason): Adjust comments.
3314         (completion_tracker::discard_completions): New.
3315         (completer_handle_brkchars_func_for_completer): Handle
3316         location_completer.
3317         (gdb_custom_word_point_brkchars)
3318         (gdb_org_rl_basic_quote_characters): New.
3319         (gdb_completion_word_break_characters_throw)
3320         (completion_find_completion_word): Handle trackers that use a
3321         custom word point.
3322         (completion_tracker::advance_custom_word_point_by): New.
3323         (completion_tracker::build_completion_result): Don't rely on
3324         readline appending the quote char.
3325         (gdb_rl_attempted_completion_function_throw): Handle trackers that
3326         use a custom word point.
3327         (gdb_rl_attempted_completion_function): Restore
3328         rl_basic_quote_characters.
3329         * completer.h (class completion_tracker): Extend intro comment.
3330         (completion_tracker::set_quote_char)
3331         (completion_tracker::quote_char)
3332         (completion_tracker::set_use_custom_word_point)
3333         (completion_tracker::use_custom_word_point)
3334         (completion_tracker::custom_word_point)
3335         (completion_tracker::set_custom_word_point)
3336         (completion_tracker::advance_custom_word_point_by)
3337         (completion_tracker::completes_to_completion_word)
3338         (completion_tracker::discard_completions): New methods.
3339         (completion_tracker::m_quote_char)
3340         (completion_tracker::m_use_custom_word_point)
3341         (completion_tracker::m_custom_word_point): New fields.
3342         (advance_to_expression_complete_word_point): Declare.
3343         * f-lang.c (f_collect_symbol_completion_matches): Add
3344         complete_symbol_mode parameter.
3345         * language.h (struct language_defn)
3346         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
3347         parameter.
3348         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
3349         (linespec_complete_function): New function.
3350         (linespec_lexer_lex_keyword): Adjust.
3351         * linespec.h (linespec_keywords, linespec_complete_function): New
3352         declarations.
3353         * location.c (find_end_quote): New function.
3354         (explicit_location_lex_one): Add explicit_completion_info
3355         parameter.  Save quoting info.  Don't throw if being called for
3356         completion.  Don't handle Ada operators here.
3357         (is_cp_operator, skip_op_false_positives, first_of)
3358         (explicit_location_lex_one_function): New function.
3359         (string_to_explicit_location): Replace 'dont_throw' parameter with
3360         an explicit_completion_info pointer parameter.  Handle it.  Don't
3361         use explicit_location_lex_one to lex function names.  Use
3362         explicit_location_lex_one_function instead.
3363         * location.h (struct explicit_completion_info): New.
3364         (string_to_explicit_location): Replace 'dont_throw' parameter with
3365         an explicit_completion_info pointer parameter.
3366         * symtab.c (default_collect_symbol_completion_matches_break_on):
3367         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
3368         (default_collect_symbol_completion_matches)
3369         (collect_symbol_completion_matches): Add complete_symbol_mode
3370         parameter.
3371         (collect_symbol_completion_matches_type): Pass down
3372         complete_symbol_mode::EXPRESSION.
3373         (collect_file_symbol_completion_matches): Add complete_symbol_mode
3374         parameter.  Handle LINESPEC mode.
3375         * symtab.h (complete_symbol_mode): New.
3376         (default_collect_symbol_completion_matches_break_on)
3377         (default_collect_symbol_completion_matches)
3378         (collect_symbol_completion_matches)
3379         (collect_file_symbol_completion_matches): Add complete_symbol_mode
3380         parameter.
3381
3382 2017-07-17  Pedro Alves  <palves@redhat.com>
3383
3384         * utils.c (enum class strncmp_iw_mode): New.
3385         (strcmp_iw): Rename to ...
3386         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
3387         parameters.  Handle them.
3388         (strncmp_iw): New.
3389         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
3390         * utils.h (strncmp_iw): Declare.
3391         (strcmp_iw): Move describing comments here.
3392
3393 2017-07-17  Pedro Alves  <palves@redhat.com>
3394
3395         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
3396         CP_OPERATOR_STR.
3397         * c-typeprint.c (is_type_conversion_operator): Use
3398         CP_OPERATOR_STR.
3399         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
3400         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
3401         CP_OPERATOR_LEN.
3402         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
3403         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
3404         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
3405         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
3406         CP_OPERATOR_STR.
3407         * location.c: Include "cp-support.h".
3408         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
3409         CP_OPERATOR_STR.
3410         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
3411         CP_OPERATOR_LEN.
3412
3413 2017-07-17  Pedro Alves  <palves@redhat.com>
3414
3415         * cli/cli-cmds.c (complete_command): Use a completion tracker
3416         along with completion_find_completion_word for handle_brkchars
3417         phase.
3418         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
3419         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
3420         (struct gdb_rl_completion_word_info): New.
3421         (gdb_rl_find_completion_word): New.
3422         (completion_find_completion_word): New.
3423         * completer.h (completion_find_completion_word): Declare.
3424
3425 2017-07-17  Pedro Alves  <palves@redhat.com>
3426
3427         * ada-lang.c (symbol_completion_match): Adjust comments.
3428         (symbol_completion_add): Replace vector parameter with
3429         completion_tracker parameter.  Use it.
3430         (ada_make_symbol_completion_list): Rename to...
3431         (ada_collect_symbol_completion_matches): ... this.  Add
3432         completion_tracker parameter and use it.
3433         (ada_language_defn): Adjust.
3434         * break-catch-syscall.c (catch_syscall_completer): Adjust
3435         prototype and work with completion_tracker instead of VEC.
3436         * breakpoint.c (condition_completer): Adjust prototype and work
3437         with completion_tracker instead of VEC.
3438         * c-lang.c (c_language_defn, cplus_language_defn)
3439         (asm_language_defn, minimal_language_defn): Adjust to renames.
3440         * cli/cli-cmds.c (complete_command): Rework using
3441         completion_tracker.  Catch exceptions when completing.
3442         * cli/cli-decode.c (integer_unlimited_completer)
3443         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
3444         with completion_tracker instead of VEC.
3445         * command.h (struct completion_tracker): Forward declare.
3446         (completer_ftype, completer_handle_brkchars_ftype): Change
3447         types.
3448         (complete_on_cmdlist, complete_on_enum): Adjust.
3449         * completer.c: Include <algorithm>.
3450         (struct gdb_completer_state): New.
3451         (current_completion): New global.
3452         (readline_line_completion_function): Delete.
3453         (noop_completer, filename_completer)
3454         (filename_completer_handle_brkchars, complete_files_symbols)
3455         (linespec_location_completer): Adjust to work with a
3456         completion_tracker instead of a VEC.
3457         (string_or_empty): New.
3458         (collect_explicit_location_matches): Adjust to work with a
3459         completion_tracker instead of a VEC.
3460         (explicit_location_completer): Rename to ...
3461         (complete_explicit_location): ... this and adjust to work with a
3462         completion_tracker instead of a VEC.
3463         (location_completer): Adjust to work with a completion_tracker
3464         instead of a VEC.
3465         (add_struct_fields): Adjust to work with a completion_list instead
3466         of VEC.
3467         (expression_completer): Rename to ...
3468         (complete_expression): ... this and adjust to work with a
3469         completion_tracker instead of a VEC.  Use complete_files_symbols.
3470         (expression_completer): Reimplement on top of complete_expression.
3471         (symbol_completer): Adjust to work with a completion_tracker
3472         instead of a VEC.
3473         (enum complete_line_internal_reason): Add describing comments.
3474         (complete_line_internal_normal_command): Adjust to work with a
3475         completion_tracker instead of a VEC.
3476         (complete_line_internal): Rename to ...
3477         (complete_line_internal_1): ... this and adjust to work with a
3478         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
3479         handle_brkchars phase.
3480         (new_completion_tracker): Delete.
3481         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
3482         complete_line_internal_1.
3483         (free_completion_tracker): Delete.
3484         (INITIAL_COMPLETION_HTAB_SIZE): New.
3485         (completion_tracker::completion_tracker)
3486         (completion_tracker::~completion_tracker): New.
3487         (maybe_add_completion): Delete.
3488         (completion_tracker::maybe_add_completion)
3489         (completion_tracker::add_completion)
3490         (completion_tracker::add_completions): New.
3491         (throw_max_completions_reached_error): Delete.
3492         (complete_line): Adjust to work with a completion_tracker instead
3493         of a VEC.  Don't create a completion_tracker_t or check for max
3494         completions here.
3495         (command_completer, command_completer_handle_brkchars)
3496         (signal_completer, reg_or_group_completer_1)
3497         (reg_or_group_completer, default_completer_handle_brkchars):
3498         Adjust to work with a completion_tracker.
3499         (gdb_completion_word_break_characters_throw): New.
3500         (gdb_completion_word_break_characters): Reimplement.
3501         (line_completion_function): Delete.
3502         (completion_tracker::recompute_lowest_common_denominator)
3503         (expand_preserving_ws)
3504         (completion_tracker::build_completion_result)
3505         (completion_result::completion_result)
3506         (completion_result::completion_result)
3507         (completion_result::~completion_result)
3508         (completion_result::completion_result)
3509         (completion_result::release_match_list, compare_cstrings)
3510         (completion_result::sort_match_list)
3511         (completion_result::reset_match_list)
3512         (gdb_rl_attempted_completion_function_throw)
3513         (gdb_rl_attempted_completion_function): New.
3514         * completer.h (completion_list, struct completion_result)
3515         (class completion_tracker): New.
3516         (complete_line): Add completion_tracker parameter.
3517         (readline_line_completion_function): Delete.
3518         (gdb_rl_attempted_completion_function): New.
3519         (noop_completer, filename_completer, expression_completer)
3520         (location_completer, symbol_completer, command_completer)
3521         (signal_completer, reg_or_group_completer): Update prototypes.
3522         (completion_tracker_t, new_completion_tracker)
3523         (make_cleanup_free_completion_tracker): Delete.
3524         (enum maybe_add_completion_enum): Delete.
3525         (maybe_add_completion): Delete.
3526         (throw_max_completions_reached_error): Delete.
3527         * corefile.c (complete_set_gnutarget): Adjust to work with a
3528         completion_tracker instead of a VEC.
3529         * cp-abi.c (cp_abi_completer): Adjust to work with a
3530         completion_tracker instead of a VEC.
3531         * d-lang.c (d_language_defn): Adjust.
3532         * disasm.c (disassembler_options_completer): Adjust to work with a
3533         completion_tracker instead of a VEC.
3534         * f-lang.c (f_make_symbol_completion_list): Rename to ...
3535         (f_collect_symbol_completion_matches): ... this.  Adjust to work
3536         with a completion_tracker instead of a VEC.
3537         (f_language_defn): Adjust.
3538         * go-lang.c (go_language_defn): Adjust.
3539         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
3540         Adjust to work with a completion_tracker instead of a VEC.
3541         * infrun.c (handle_completer): Likewise.
3542         * interps.c (interpreter_completer): Likewise.
3543         * interps.h (interpreter_completer): Likewise.
3544         * language.c (unknown_language_defn, auto_language_defn)
3545         (local_language_defn): Adjust.
3546         * language.h (language_defn::la_make_symbol_completion_list):
3547         Rename to ...
3548         (language_defn::la_collect_symbol_completion_matches): ... this
3549         and adjust to work with a completion_tracker instead of a VEC.
3550         * m2-lang.c (m2_language_defn): Adjust.
3551         * objc-lang.c (objc_language_defn): Adjust.
3552         * opencl-lang.c (opencl_language_defn): Adjust.
3553         * p-lang.c (pascal_language_defn): Adjust.
3554         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
3555         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
3556         with a completion_tracker.
3557         * rust-lang.c (rust_language_defn): Adjust.
3558         * symtab.c (free_completion_list, do_free_completion_list)
3559         (return_val, completion_tracker): Delete.
3560         (completion_list_add_name, completion_list_add_symbol)
3561         (completion_list_add_msymbol, completion_list_objc_symbol)
3562         (completion_list_add_fields, add_symtab_completions): Add
3563         completion_tracker parameter and use it.
3564         (default_make_symbol_completion_list_break_on_1): Rename to...
3565         (default_collect_symbol_completion_matches_break_on): ... this.
3566         Add completion_tracker parameter and use it instead of allocating
3567         a completion tracker here.
3568         (default_make_symbol_completion_list_break_on): Delete old
3569         implementation.
3570         (default_make_symbol_completion_list): Delete.
3571         (default_collect_symbol_completion_matches): New.
3572         (make_symbol_completion_list): Delete.
3573         (collect_symbol_completion_matches): New.
3574         (make_symbol_completion_type): Rename to ...
3575         (collect_symbol_completion_matches_type): ... this.  Add
3576         completion_tracker parameter and use it instead of VEC.
3577         (make_file_symbol_completion_list_1): Rename to...
3578         (collect_file_symbol_completion_matches): ... this.  Add
3579         completion_tracker parameter and use it instead of VEC.
3580         (make_file_symbol_completion_list): Delete.
3581         (add_filename_to_list): Use completion_list instead of a VEC.
3582         (add_partial_filename_data::list): Now a completion_list.
3583         (make_source_files_completion_list): Work with a completion_list
3584         instead of a VEC.
3585         * symtab.h: Include "completer.h".
3586         (default_make_symbol_completion_list_break_on)
3587         (default_make_symbol_completion_list, make_symbol_completion_list)
3588         (make_symbol_completion_type, make_file_symbol_completion_list)
3589         (make_source_files_completion_list): Delete.
3590         (default_collect_symbol_completion_matches_break_on)
3591         (default_collect_symbol_completion_matches)
3592         (collect_symbol_completion_matches)
3593         (collect_symbol_completion_matches_type)
3594         (collect_file_symbol_completion_matches)
3595         (make_source_files_completion_list): New.
3596         * top.c (init_main): Don't install a rl_completion_entry_function
3597         hook.  Install a rl_attempted_completion_function hook instead.
3598         * tui/tui-layout.c (layout_completer): Adjust to work with a
3599         completion_tracker.
3600         * tui/tui-regs.c (tui_reggroup_completer):
3601         * tui/tui-win.c (window_name_completer, focus_completer)
3602         (winheight_completer): Adjust to work with a completion_tracker.
3603         * value.c: Include "completer.h".
3604         (complete_internalvar): Adjust to work with a completion_tracker.
3605         * value.h (complete_internalvar): Likewise.
3606
3607 2017-07-17  Pedro Alves  <palves@redhat.com>
3608
3609         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
3610         renames.
3611         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
3612         comments to completer_ftype's declaration.
3613         <completer_handle_brkchars>: Change type to
3614         completer_handle_brkchars_ftype.
3615         * command.h (completer_ftype): Add describing comment and give
3616         names to parameters.
3617         (completer_ftype_void): Rename to ...
3618         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
3619         (set_cmd_completer_handle_brkchars): Adjust.
3620         * completer.c (filename_completer_handle_brkchars): New function.
3621         (complete_line_internal_normal_command): New function, factored
3622         out from ...
3623         (complete_line_internal): ... here.
3624         (command_completer_handle_brkchars)
3625         (default_completer_handle_brkchars)
3626         (completer_handle_brkchars_func_for_completer): New functions.
3627         * completer.h (set_gdb_completion_word_break_characters): Delete
3628         declaration.
3629         (completer_handle_brkchars_func_for_completer): New declaration.
3630         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
3631         completer_handle_brkchars_func_for_completer.
3632
3633 2017-07-17  Pedro Alves  <palves@redhat.com>
3634
3635         * completer.c (symbol_completer): New function, based on
3636         make_symbol_completion_list_fn.
3637         * completer.h (symbol_completer): New declaration.
3638         * guile/scm-cmd.c (cmdscm_completers): Adjust.
3639         * python/py-cmd.c (completers): Adjust.
3640         * symtab.c (make_symbol_completion_list_fn): Delete.
3641         * symtab.h (make_symbol_completion_list_fn): Delete.
3642         * cli/cli-decode.c (add_cmd): Adjust.
3643
3644 2017-07-17  Pedro Alves  <palves@redhat.com>
3645
3646         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
3647         * dwarf2read.c: Include "filename-seen-cache.h".
3648         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
3649         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
3650         * filename-seen-cache.c: New file.
3651         * filename-seen-cache.h: New file.
3652         * symtab.c: Include "filename-seen-cache.h".
3653         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
3654         (create_filename_seen_cache, clear_filename_seen_cache)
3655         (delete_filename_seen_cache, filename_seen): Delete, parts moved
3656         to filename-seen-cache.h/filename-seen-cache.c.
3657         (output_source_filename, sources_info)
3658         (maybe_add_partial_symtab_filename)
3659         (make_source_files_completion_list): Adjust to use
3660         filename_seen_cache.
3661
3662 2017-07-17  Pedro Alves  <palves@redhat.com>
3663
3664         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
3665         fields.
3666         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
3667         dwarf2_debug_sections*)): New.
3668         (dwarf2_per_objfile::dwarf2_per_objfile(const
3669         dwarf2_per_objfile&)): Declare as deleted.
3670         (dwarf2_per_objfile::operator=): Declare as deleted.
3671         (dwarf2_per_objfile::dwarf2_per_objfile)
3672         (dwarf2_per_objfile::~dwarf2_per_objfile)
3673         (dwarf2_per_objfile::free_cached_comp_units): New.
3674         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
3675         ctor.  Call dwarf2_per_objfile's ctor manually.
3676         (dwarf2_locate_sections): Deleted/refactored as ...
3677         (dwarf2_per_objfile::locate_sections): ... this new method.
3678         (free_cached_comp_units): Defer to
3679         dwarf2_per_objfile::free_cached_comp_units.
3680         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
3681
3682 2017-07-14  Tom Tromey  <tom@tromey.com>
3683
3684         PR rust/21764:
3685         * rust-exp.y (convert_ast_to_expression): Add "want_type"
3686         parameter.
3687         <UNOP_SIZEOF>: Split into separate case.
3688         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
3689
3690 2017-07-14  Tom Tromey  <tom@tromey.com>
3691
3692         PR rust/21763:
3693         * symtab.c (symbol_matches_domain): Add language_rust to special
3694         case.
3695         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
3696         treat LOC_TYPEDEF symbols as variables.
3697
3698 2017-07-14  Pedro Alves  <palves@redhat.com>
3699
3700         * symtab.c (make_file_symbol_completion_list_1): Iterate over
3701         symtabs matching all symtabs with SRCFILE as file name instead of
3702         only considering the first hit, with lookup_symtab.
3703
3704 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
3705
3706         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
3707         operator_name parameters.
3708         (gen_expr): Update function call.
3709
3710 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
3711
3712         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
3713         parameter.
3714         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
3715         Likewise.
3716         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
3717         parameter, use agent_expr::gdbarch instead, update function
3718         calls.
3719         (locexpr_tracepoint_var_ref): Likewise.
3720         (loclist_tracepoint_var_ref): Likewise.
3721         * ax-gdb.c (gen_trace_static_fields): Likewise.
3722         (gen_traced_pop): Likewise.
3723         (gen_frame_args_address): Likewise.
3724         (gen_frame_locals_address): Likewise.
3725         (gen_var_ref): Likewise.
3726         (gen_struct_ref_recursive): Likewise.
3727         (gen_static_field): Likewise.
3728         (gen_maybe_namespace_elt): Likewise.
3729         (gen_expr): Likewise.
3730         (gen_trace_for_var): Likewise.
3731         (gen_trace_for_expr): Likewise.
3732         (gen_trace_for_return_address): Likewise.
3733
3734 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
3735
3736         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
3737         parameter.
3738         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
3739
3740 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
3741
3742         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
3743         from ax, update calls.
3744         (gen_usual_arithmetic): Likewise.
3745         (gen_integral_promotions): Likewise.
3746         (gen_bitfield_ref): Likewise.
3747         (gen_primitive_field): Likewise.
3748         (gen_struct_ref_recursive): Likewise.
3749         (gen_struct_ref): Likewise.
3750         (gen_maybe_namespace_elt): Likewise.
3751         (gen_struct_elt_for_reference): Likewise.
3752         (gen_namespace_elt): Likewise.
3753         (gen_aggregate_elt_ref): Likewise.
3754         (gen_expr): Get gdbarch from ax, update calls.
3755         (gen_expr_binop_rest): Likewise.
3756
3757 2017-07-13  Pedro Alves  <palves@redhat.com>
3758
3759         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
3760         as default tdesc.
3761         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
3762         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
3763         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
3764         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
3765         tdep.
3766         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
3767         Get final tdesc from the tdep.
3768         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
3769         default tdesc.
3770         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3771         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3772         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
3773         Use it as default tdesc.
3774         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
3775         down to amd_init_abi.  No longer handle fallback tdesc here.
3776         * amd64-tdep.h (tdesc_x32): Declare.
3777         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
3778         parameter.
3779         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
3780         as default tdesc.
3781
3782 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3783
3784         * s390-linux-tdep.c (s390_process_record): Add support for
3785         instructions new in arch12.
3786
3787 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
3788
3789         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
3790         PT_GETFSBASE and PT_GETGSBASE.
3791         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
3792         PT_SETGSBASE.
3793
3794 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
3795
3796         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
3797         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
3798         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
3799         those rules.
3800         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
3801         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
3802         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
3803         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
3804         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
3805         * features/i386/amd64.xml: Add 64bit-segments.xml.
3806         * features/i386/amd64-avx-avx512.c: Regenerated.
3807         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
3808         * features/i386/amd64-avx-mpx.c: Regenerated.
3809         * features/i386/amd64-avx.c: Regenerated.
3810         * features/i386/amd64-mpx.c: Regenerated.
3811         * features/i386/amd64.c: Regenerated.
3812         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
3813         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
3814         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
3815         * regformats/i386/amd64-avx.dat: Regenerated.
3816         * regformats/i386/amd64-mpx.dat: Regenerated.
3817         * regformats/i386/amd64.dat: Regenerated.
3818
3819 2017-07-10  Yao Qi  <yao.qi@linaro.org>
3820
3821         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
3822         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
3823
3824 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
3825
3826         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
3827         unsetenv.
3828         * gnulib/aclocal.m4: Regenerate.
3829         * gnulib/config.in: Regenerate.
3830         * gnulib/configure: Regenerate.
3831         * gnulib/import/Makefile.am: Regenerate.
3832         * gnulib/import/Makefile.in: Regenerate.
3833         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3834         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3835         * gnulib/import/m4/environ.m4: New file.
3836         * gnulib/import/m4/setenv.m4: New file.
3837         * gnulib/import/setenv.c: New file.
3838         * gnulib/import/unsetenv.c: New file.
3839
3840 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
3841
3842         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
3843         address when op is DW_OP_addr.
3844
3845 2017-07-09  Tom Tromey  <tom@tromey.com>
3846
3847         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
3848         check and apply to outer type.
3849
3850 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
3851
3852         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
3853         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
3854         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
3855         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
3856
3857 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
3858
3859         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
3860
3861 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
3862
3863         * corelow.c (get_core_siginfo): Remove.
3864         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
3865         instead of get_core_siginfo.
3866         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
3867         * gdbarch.h: Re-generate.
3868         * gdbarch.c: Re-generate.
3869         * linux-tdep.c (linux_core_xfer_siginfo): New.
3870         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
3871
3872 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
3873
3874         * corelow.c (thread_section_name): Move to ...
3875         * gdbcore.h (thread_section_name): ... here.
3876
3877 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
3878
3879         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
3880         (struct siginfo32): New.
3881         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
3882         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
3883         via ptrace(PT_LWPINFO).
3884
3885 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
3886
3887         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
3888         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
3889         (fbsd_get_siginfo_type): New.
3890         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
3891         (_initialize_fbsd_tdep): New.
3892
3893 2017-07-06  David Blaikie  <dblaikie@gmail.com>
3894
3895         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
3896         a singular dwo_unit*) to support multiple CUs in the same way that
3897         multiple TUs are supported.
3898         (create_cus_hash_table): Replace create_dwo_cu with a function for
3899         parsing multiple CUs from a DWO file.
3900         (open_and_init_dwo_file): Use create_cus_hash_table rather than
3901         create_dwo_cu.
3902         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
3903         htab_find, rather than comparing the signature to a singleton CU in
3904         the dwo_file.
3905
3906 2017-07-06  Pedro Alves  <palves@redhat.com>
3907
3908         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
3909
3910 2017-07-04  Pedro Alves  <palves@redhat.com>
3911
3912         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
3913         * gdbtypes.h (TYPE_STATIC): Delete.
3914         (struct fn_field) <is_public, is_abstract, is_static, is_final,
3915         is_synchronized, is_native>: Delete.
3916         <dummy>: Bump.
3917         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
3918         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
3919         (TYPE_FN_FIELD_ABSTRACT): Delete.
3920
3921 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
3922
3923         * buffer.h (buffer_finish): Fix spelling mistakes.
3924
3925 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
3926
3927         * .dir-locals.el: Automatically switch to C-style comments in
3928         versions of Emacs that support the feature.
3929
3930 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
3931             Pedro Alves  <palves@redhat.com>
3932
3933         PR cli/21688
3934         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
3935         (process_next_line): New variable 'inline_cmd'.
3936         Adjust 'if' clauses for "python", "compile" and "guile" to use
3937         'command_name_equals' and check for '!inline_cmd'.
3938
3939 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
3940
3941         PR cli/21688
3942         * cli/cli-script.c (command_name_equals_not_inline): New function.
3943         (process_next_line): Adjust 'if' clauses for "python", "compile"
3944         and "guile" to use command_name_equals_not_inline.
3945
3946 2017-06-29  Pedro Alves  <palves@redhat.com>
3947
3948         * completer.c (expression_completer): Call
3949         linespec_location_completer instead of location_completer.
3950
3951 2017-06-29  Pedro Alves  <palves@redhat.com>
3952
3953         * completer.c (expression_completer): Remove code that recomputes
3954         'text' from 'word'.
3955
3956 2017-06-29  Yao Qi  <yao.qi@linaro.org>
3957
3958         * regformats/regdat.sh: Generate code with
3959         "ifndef IN_PROCESS_AGENT".
3960
3961 2017-06-28  Pedro Alves  <palves@redhat.com>
3962
3963         * command.h: Include "common/scoped_restore.h".
3964
3965 2017-06-28  Yao Qi  <yao.qi@linaro.org>
3966
3967         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
3968         instead of obstack_grow.
3969
3970 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
3971
3972         PR gdb/21337
3973         * symfile.c (reread_symbols): Call objfiles_changed just before
3974         read_symbols.
3975
3976 2017-06-27  Pedro Alves  <palves@redhat.com>
3977
3978         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
3979         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
3980         (completion_list_add_symbol, completion_list_add_msymbol):
3981         ... these new functions.
3982         (add_symtab_completions)
3983         (default_make_symbol_completion_list_break_on_1): Adjust.
3984
3985 2017-06-27  Pedro Alves  <palves@redhat.com>
3986
3987         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
3988         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
3989         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
3990         dtor.
3991         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
3992         'storage_obstack' field an auto_obstack.  In-class initialize all
3993         non-bitfield fields.  Make minsyms_read bool.
3994         * symfile.c (read_symbols): Adjust.
3995
3996 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
3997
3998         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
3999         (gdbsim_store_register): Likewise.
4000
4001 2017-06-27  Pedro Alves  <palves@redhat.com>
4002
4003         * c-exp.y (name_obstack): Now an auto_obstack.
4004         (yylex): Use auto_obstack::clear.
4005         (c_parse): Use auto_obstack::clear instead of reinitializing and
4006         freeing the obstack.
4007         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
4008         * d-exp.y (name_obstack): Now an auto_obstack.
4009         (yylex): Use auto_obstack::clear.
4010         (d_parse): Use auto_obstack::clear instead of reinitializing and
4011         freeing the obstack.
4012         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
4013         auto_obstack.
4014         * dwarf2read.c (create_addrmap_from_index)
4015         (dwarf2_build_psymtabs_hard)
4016         (update_enumeration_type_from_children): Likewise.
4017         * gdb_obstack.h (auto_obstack): New type.
4018         * go-exp.y (name_obstack): Now an auto_obstack.
4019         (build_packaged_name): Use auto_obstack::clear.
4020         (go_parse): Use auto_obstack::clear instead of reinitializing and
4021         freeing the obstack.
4022         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
4023         auto_obstack.
4024         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
4025         * rust-exp.y (work_obstack): Now an auto_obstack.
4026         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
4027         reinitializing and freeing the obstack.
4028         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
4029         (host_char_to_target): Use auto_obstack.
4030         * utils.h (make_cleanup_obstack_free): Delete declaration.
4031         * valprint.c (generic_emit_char, generic_printstr): Use
4032         auto_obstack.
4033
4034 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4035
4036         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
4037         thread.
4038         (darwin_init_thread_list): Don't update dummy thread.
4039         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
4040
4041 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
4042
4043         * record-full.c (netorder16): Remove.
4044
4045 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
4046
4047         * common/diagnostics.h: Define macros for GCC.
4048         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
4049         * common/vec.h: Include diagnostics.h.
4050         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
4051         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
4052         warning.
4053
4054 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
4055
4056         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
4057         New macro.
4058         * ada-lex.l: Ignore deprecated register warnings.
4059
4060 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
4061
4062         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
4063         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
4064
4065 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
4066
4067         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
4068         its own line.
4069
4070 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
4071
4072         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
4073
4074 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
4075
4076         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
4077         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
4078         (xtensa_register_read_masked): Likewise.
4079
4080 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4081
4082         * common/environ.c (gdb_environ::unset): Update comment.
4083
4084 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
4085
4086         * python/py-unwind.c (pyuw_sniffer): Allocate space for
4087         registers.
4088
4089 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
4090
4091         * record-full.c (record_full_exec_insn): Use byte_vector.
4092
4093 2017-06-22  Yao Qi  <yao.qi@linaro.org>
4094
4095         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
4096         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4097
4098 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
4099
4100         * remote.c (cached_reg): Move from here...
4101         * regcache.h (cached_reg): ...to here.
4102         * python/py-unwind.c (struct reg_info): Remove.
4103         (cached_frame_info): Use cached_reg_t.
4104         (pyuw_prev_register): Likewise.
4105         (pyuw_sniffer): Use cached_reg_t and allocate registers.
4106         (pyuw_dealloc_cache): Free all registers.
4107
4108 2017-06-22  Pedro Alves  <palves@redhat.com>
4109             Simon Marchi  <simon.marchi@ericsson.com>
4110
4111         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
4112         warning.
4113         * common/diagnostics.h: New file.
4114
4115 2017-06-22  Pedro Alves  <palves@redhat.com>
4116
4117         * common/agent.h: Add include guards.
4118
4119 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
4120
4121         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
4122         talk about addressable units instead of bytes.
4123
4124 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
4125
4126         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
4127         of '::const_iterator'.
4128
4129 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
4130
4131         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4132         'unittests/environ-selftests.c'.
4133         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
4134         * charset.c (find_charset_names): Declare object 'iconv_env'.
4135         Update code to use 'iconv_env' object.  Remove call to
4136         'free_environ'.
4137         * common/environ.c: Include <utility>.
4138         (make_environ): Delete function.
4139         (free_environ): Delete function.
4140         (gdb_environ::clear): New function.
4141         (gdb_environ::operator=): New function.
4142         (gdb_environ::get): Likewise.
4143         (environ_vector): Delete function.
4144         (set_in_environ): Delete function.
4145         (gdb_environ::set): New function.
4146         (unset_in_environ): Delete function.
4147         (gdb_environ::unset): New function.
4148         (gdb_environ::envp): Likewise.
4149         * common/environ.h: Include <vector>.
4150         (struct gdb_environ): Delete; transform into...
4151         (class gdb_environ): ... this class.
4152         (free_environ): Delete prototype.
4153         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
4154         environ_vector): Likewise.
4155         * infcmd.c (run_command_1): Update code to call
4156         'envp' from 'gdb_environ' class.
4157         (environment_info): Update code to call methods from 'gdb_environ'
4158         class.
4159         (unset_environment_command): Likewise.
4160         (path_info): Likewise.
4161         (path_command): Likewise.
4162         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
4163         (inferior::inferior): Initialize 'environment' using the host's
4164         information.
4165         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
4166         Include "environ.h".
4167         (class inferior) <environment>: Change type from 'struct
4168         gdb_environ' to 'gdb_environ'.
4169         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
4170         methods from 'gdb_environ' class.
4171         * solib.c (solib_find_1): Likewise
4172         * unittests/environ-selftests.c: New file.
4173
4174 2017-06-20  Yao Qi  <yao.qi@linaro.org>
4175
4176         * features/i386/i386-linux.xml: Exchange the order of including
4177         32bit-linux.xml and 32bit-sse.xml.
4178         * features/i386/i386-linux.c: Regenerated.
4179
4180 2017-06-20  Yao Qi  <yao.qi@linaro.org>
4181
4182         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
4183         Delete copy ctor and assignment operator.
4184         (tdesc_type): Likewise.
4185         (tdesc_feature): Likewise.
4186         (tdesc_free_reg): Remove.
4187         (tdesc_create_reg): Use new.
4188         (tdesc_free_type): Remove.
4189         (tdesc_create_vector): Use new.
4190         (tdesc_create_union): Likewise.
4191         (tdesc_create_flags): Likewise.
4192         (tdesc_create_enum): Likewise.
4193         (tdesc_free_feature): Delete.
4194         (free_target_description): Use delete.
4195
4196 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
4197
4198         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
4199         registers.
4200
4201 2017-06-19  Pedro Alves  <palves@redhat.com>
4202
4203         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
4204         after gdb::unlinker.
4205
4206 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
4207
4208         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
4209         gdb_environ to access an environment variable.
4210
4211 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
4212
4213         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
4214         gdb_byte*.
4215
4216 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
4217
4218         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
4219
4220 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
4221
4222         * configure: Re-generate.
4223         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
4224
4225 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
4226
4227         * configure: Re-generate.
4228         * warning.m4: Pass -Werror to compiler when checking for
4229         supported warning flags.
4230
4231 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
4232
4233         * Makefile.in (COMPILE.pre): Add "-x c++".
4234
4235 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
4236             Pedro Alves  <palves@redhat.com>
4237             Yao Qi  <yao.qi@linaro.org>
4238
4239         * defs.h (RequireLongest): New.
4240         (extract_integer): Declare function template.
4241         (extract_signed_integer): Remove the declaration, but define it
4242         static inline.
4243         (extract_unsigned_integer): Likewise.
4244         (store_integer): Declare function template.
4245         (store_signed_integer): Remove the declaration, but define it
4246         static inline.
4247         (store_unsigned_integer): Likewise.
4248         * findvar.c (extract_integer): New function template.
4249         (extract_signed_integer): Remove.
4250         (extract_unsigned_integer): Remove.
4251         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
4252         instantiations.
4253         (store_integer): New function template.
4254         (store_signed_integer): Remove.
4255         (store_unsigned_integer): Remove.
4256         (store_integer): Explicit instantiations.
4257         * regcache.c (regcache_raw_read_signed): Update.
4258         (regcache::raw_read): New function.
4259         (regcache::raw_read_signed): Remove.
4260         (regcache::raw_read_unsigned): Remove.
4261         (regcache_raw_read_unsigned): Update.
4262         (regcache_raw_write_unsigned): Update.
4263         (regcache::raw_write_signed): Remove.
4264         (regcache::raw_write): New function.
4265         (regcache_cooked_read_signed): Update.
4266         (regcache::raw_write_unsigned): Remove.
4267         (regcache::cooked_read_signed): Remove.
4268         (regcache_cooked_read_unsigned): Update.
4269         (regcache::cooked_read_unsigned): Remove.
4270         (regcache_cooked_write_signed): Update.
4271         (regcache_cooked_write_unsigned): Update.
4272         * regcache.h (regcache) <raw_read_signed>: Remove.
4273         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
4274         <raw_read, raw_write>: New.
4275         <cooked_read_signed, cooked_write_signed>: Remove.
4276         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
4277         <cooked_read, cooked_write>: New.
4278         * sh64-tdep.c (sh64_pseudo_register_read): Update.
4279         (sh64_pseudo_register_write): Update.
4280
4281 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
4282
4283         * arc-tdep.c (arc_disassembler_options): New variable.
4284         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
4285         of default_print_insn.
4286         (arc_delayed_print_insn): Set info->section when needed,
4287         use default_print_insn to retrieve a disassembler.
4288
4289 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
4290
4291         PR gdb/21574
4292         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
4293         to mention $SHELL and startup-with-shell.
4294
4295 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
4296
4297         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
4298
4299 2017-06-14  Yao Qi  <yao.qi@linaro.org>
4300
4301         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
4302         default_print_insn instead of print_insn_aarch64.
4303         * arm-tdep.c (gdb_print_insn_arm): Call
4304         default_print_insn instead of print_insn_big_arm
4305         and print_insn_little_arm.
4306         * i386-tdep.c (i386_print_insn): Call default_print_insn
4307         instead of print_insn_i386.
4308         * ia64-tdep.c (ia64_print_insn): Call
4309         default_print_insn instead of print_insn_ia64.
4310         * mips-tdep.c (gdb_print_insn_mips): Call
4311         default_print_insn instead of print_insn_big_mips
4312         and print_insn_little_mips.
4313         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
4314         instead of print_insn_spu.
4315
4316 2017-06-14  Pedro Alves  <palves@redhat.com>
4317
4318         * ada-lang.c: Include "common/byte-vector.h".
4319         (ada_value_primitive_packed_val): Use gdb::byte_vector.
4320         * charset.c (wchar_iterator::iterate): Resize the vector instead
4321         of reserving it.
4322         * common/byte-vector.h: Include "common/def-vector.h".
4323         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
4324         * cli/cli-dump.c: Include "common/byte-vector.h".
4325         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
4326         * common/byte-vector.h: New file.
4327         * common/def-vector.h: New file.
4328         * common/default-init-alloc.h: New file.
4329         * dwarf2loc.c: Include "common/byte-vector.h".
4330         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
4331         instead of reserving it.
4332         * dwarf2read.c: Include "common/byte-vector.h".
4333         (data_buf::m_vec): Now a gdb::byte_vector.
4334         * gdb_regex.c: Include "common/def-vector.h".
4335         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
4336         * mi/mi-main.c: Include "common/byte-vector.h".
4337         (mi_cmd_data_read_memory): Use gdb::byte_vector.
4338         * printcmd.c: Include "common/byte-vector.h".
4339         (print_scalar_formatted): Use gdb::byte_vector.
4340         * valprint.c: Include "common/byte-vector.h".
4341         (maybe_negate_by_bytes, print_decimal_chars): Use
4342         gdb::byte_vector.
4343
4344 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4345
4346         * darwin-nat.c: Include "nat/fork-inferior.h".
4347
4348 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4349
4350         * configure.nat: Factor out Darwin bits that are not
4351         architecture-specific.  Add fork-inferior.o.
4352
4353 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4354
4355         * configure.nat: Factor out AIX bits that are not
4356         architecture-specific.  Add fork-inferior.o.
4357
4358 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4359
4360         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
4361         (read_pieced_value, write_pieced_value): ...here.  Reduce to
4362         wrappers that just call rw_pieced_value.
4363
4364 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4365
4366         * dwarf2loc.c (write_pieced_value): When writing the data for a
4367         memory piece, use write_memory_with_notification instead of
4368         write_memory.
4369
4370 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4371
4372         * valops.c (read_value_memory): Change embedded_offset to
4373         represent a bit offset instead of a byte offset.
4374         * value.h (read_value_memory): Adjust comment.
4375
4376 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4377
4378         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
4379         dest_offset_bits and source_offset_bits.
4380         (write_pieced_value): Likewise.
4381
4382 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4383
4384         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
4385         given by DW_OP_bit_piece.
4386         (write_pieced_value): Likewise.
4387
4388 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4389
4390         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
4391         some other preparations to the places where sufficient information
4392         is available.
4393         (write_pieced_value): Likewise.
4394
4395 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4396
4397         * dwarf2loc.c (bits_to_bytes): New function.
4398         (read_pieced_value): Fix offset calculations for register pieces
4399         on big-endian targets.
4400         (write_pieced_value): Likewise.
4401
4402 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4403
4404         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
4405         (write_pieced_value): Likewise.
4406
4407 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4408
4409         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
4410         transfer the source value's least significant bits, instead of its
4411         lowest-addressed ones.  Rename type_len to max_offset.
4412         (read_pieced_value): Mirror above changes to write_pieced_value as
4413         applicable.
4414
4415 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4416
4417         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
4418         truncate full bytes from dest_offset_bits before using it as an
4419         offset into the buffer.
4420
4421 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4422
4423         * dwarf2loc.c (write_pieced_value): Include transfer size in
4424         byte-wise check.
4425
4426 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4427
4428         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
4429         calculation of this_size.
4430
4431 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4432
4433         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
4434         when targeting a bit-field.
4435         (write_pieced_value): Likewise.
4436
4437 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4438
4439         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
4440         (allocate_piece_closure): Drop addr_size parameter.
4441         (dwarf2_evaluate_loc_desc_full): Adjust call to
4442         allocate_piece_closure.
4443
4444 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4445
4446         PR gdb/21226
4447         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
4448         the LSB end, independent of endianness.
4449
4450 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4451
4452         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
4453         size capping.
4454
4455 2017-06-13  Yao Qi  <yao.qi@linaro.org>
4456
4457         * mips-linux-nat.c: Move include features/mips*-linux.c to
4458         mips-linux-tdep.c.
4459         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
4460         to mips-linux-tdep.c.
4461         * mips-linux-tdep.c: Include features/mips*-linux.c
4462         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
4463         functions.
4464         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
4465         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
4466         (tdesc_mips64_dsp_linux): Declare.
4467
4468 2017-06-12  Tom Tromey  <tom@tromey.com>
4469
4470         * valprint.h (val_print_type_code_int): Remove.
4471         * valprint.c (generic_val_print_int): Always call
4472         val_print_scalar_formatted.
4473         (val_print_type_code_int): Remove.
4474         * printcmd.c (print_scalar_formatted): Handle options->format==0.
4475         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
4476         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
4477         * ada-valprint.c (ada_val_print_num): Use
4478         val_print_scalar_formatted.
4479
4480 2017-06-12  Tom Tromey  <tom@tromey.com>
4481
4482         * printcmd.c (print_scalar_formatted): Unify the two switches.
4483         Don't convert scalars to LONGEST.
4484
4485 2017-06-12  Tom Tromey  <tom@tromey.com>
4486
4487         PR exp/16225:
4488         * valprint.h (print_decimal_chars): Update.
4489         * valprint.c (maybe_negate_by_bytes): New function.
4490         (print_decimal_chars): Add "is_signed" argument.
4491         * printcmd.c (print_scalar_formatted): Update.
4492
4493 2017-06-12  Tom Tromey  <tom@tromey.com>
4494
4495         PR exp/16225:
4496         * valprint.h (print_binary_chars, print_hex_chars): Update.
4497         * valprint.c (val_print_type_code_int): Update.
4498         (print_binary_chars): Add "zero_pad" argument.
4499         (emit_octal_digit): New function.
4500         (print_octal_chars): Don't zero-pad.
4501         (print_decimal_chars): Likewise.
4502         (print_hex_chars): Add "zero_pad" argument.
4503         * sh64-tdep.c (sh64_do_fp_register): Update.
4504         * regcache.c (regcache::dump): Update.
4505         * printcmd.c (print_scalar_formatted): Update.
4506         * infcmd.c (default_print_one_register_info): Update.
4507
4508 2017-06-12  Pedro Alves  <palves@redhat.com>
4509             Alan Hayward  <alan.hayward@arm.com>
4510
4511         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
4512         (mips_eabi_push_dummy_call): Rename local 'regsize' to
4513         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
4514         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
4515         Assert that abi_regsize bytes fit in 'ref_valbuf'.
4516
4517 2017-06-12  Pedro Alves  <palves@redhat.com>
4518
4519         * dwarf2read.c (mapped_symtab::data): Now a vector of
4520         symtab_index_entry instead of vector of
4521         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
4522         whether an element's name is NULL instead of checking whether the
4523         element itself is NULL.
4524         (find_slot): Change return type.  Adjust.
4525         (hash_expand, , add_index_entry, uniquify_cu_indices)
4526         (write_hash_table): Adjust.
4527
4528 2017-06-12  Pedro Alves  <palves@redhat.com>
4529
4530         * dwarf2read.c (recursively_count_psymbols): New function.
4531         (write_psymtabs_to_index): Call it to compute number of psyms and
4532         pass estimate size of psyms_seen to unordered_set's ctor.
4533
4534 2017-06-12  Pedro Alves  <palves@redhat.com>
4535
4536         * dwarf2read.c (write_hash_table): Check if key already exists
4537         before emplacing.
4538
4539 2017-06-12  Pedro Alves  <palves@redhat.com>
4540
4541         * dwarf2read.c (data_buf::append_space): Rename to...
4542         (data_buf::grow): ... this, and make private.  Adjust all callers.
4543         (data_buf::append_uint): New method.
4544         (add_address_entry, write_one_signatured_type)
4545         (write_psymtabs_to_index): Use it.
4546
4547 2017-06-12  Pedro Alves  <palves@redhat.com>
4548
4549         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
4550         (file_write (FILE *, const std::vector<Elem>&)): Delete.
4551         (data_buf::file_write): Call ::fwrite directly.
4552
4553 2017-06-12  Pedro Alves  <palves@redhat.com>
4554
4555         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
4556         std::vector::erase.
4557
4558 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
4559
4560         Code cleanup: C++ify .gdb_index producer.
4561         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
4562         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
4563         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
4564         (create_strtab, add_string): Remove.
4565         (file_write, data_buf): New.
4566         (struct symtab_index_entry): Use std::vector for cu_indices.
4567         (struct mapped_symtab): Use std::vector for data.
4568         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
4569         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
4570         Remove.
4571         (find_slot): Change return type.  Update it to the new data structures.
4572         (hash_expand, add_index_entry): Update it to the new data structures.
4573         (offset_type_compare): Remove.
4574         (uniquify_cu_indices): Update it to the new data structures.
4575         (c_str_view, c_str_view_hasher, vector_hasher): New.
4576         (add_indices_to_cpool): Remove.
4577         (write_hash_table): Update it to the new data structures.
4578         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
4579         (eq_psymtab_cu_index): Remove.
4580         (psym_index_map): New typedef.
4581         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
4582         reference and std::unordered_map for cu_index_htab.
4583         (add_address_entry, add_address_entry_worker, write_address_map)
4584         (write_psymbols): Update it to the new data structures.
4585         (write_obstack): Remove.
4586         (struct signatured_type_index_data): Change types_list to a data_buf
4587         reference and psyms_seen to a std::unordered_set reference.
4588         (write_one_signatured_type, recursively_write_psymbols)
4589         (write_psymtabs_to_index): Update it to the new data structures.
4590
4591 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
4592
4593         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
4594         separate-debug-file commands.
4595         * symfile.h (separate_debug_file_debug): New global.
4596         * symfile.c (separate_debug_file_debug): New global.
4597         (separate_debug_file_exists, find_separate_debug_file): Add
4598         debug output.
4599         (_initialize_symfile): Add "set debug separate-debug-file"
4600         command.
4601         * build-id.c (build_id_to_debug_bfd,
4602         find_separate_debug_file_by_buildid): Add debug output.
4603
4604 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
4605
4606         * gdbarch.sh (displaced_step_free_closure): Remove.
4607         * gdbarch.h, gdbarch.c: Re-generate.
4608         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
4609         displaced_step_free_closure.
4610         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
4611         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
4612         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4613         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
4614         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
4615         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
4616         * arch-utils.h (simple_displaced_step_free_closure): Remove.
4617         * arch-utils.c (simple_displaced_step_free_closure): Remove.
4618         * infrun.c (displaced_step_clear): Call xfree instead of
4619         gdbarch_displaced_step_free_closure.
4620
4621 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
4622
4623         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
4624         NULL".
4625
4626 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
4627
4628         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
4629         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
4630         (mn10300_push_dummy_call): Likewise.
4631
4632 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
4633
4634         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
4635
4636 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
4637
4638         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
4639
4640 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
4641
4642         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
4643         able to start inferiors using a shell.
4644         (New remote packets): Announce new packet "QStartupWithShell".
4645         * remote.c: Add PACKET_QStartupWithShell.
4646         (extended_remote_create_inferior): Handle new
4647         PACKET_QStartupWithShell.
4648         (remote_protocol_features) <QStartupWithShell>: New entry for
4649         PACKET_QStartupWithShell.
4650         (_initialize_remote): Call "add_packet_config_cmd" for
4651         QStartupShell.
4652
4653 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
4654             Pedro Alves  <palves@redhat.com>
4655
4656         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
4657         and "nat/fork-inferior.h".
4658         * common/common-inferior.h: New file, with contents from
4659         "gdb/inferior.h".
4660         * commom/common-utils.c: Include "common-utils.h".
4661         (stringify_argv): New function.
4662         * common/common-utils.h (stringify_argv): New prototype.
4663         * configure.nat: Add "fork-inferior.o" as a dependency for
4664         "*linux*", "fbsd*" and "nbsd*" hosts.
4665         * corefile.c (get_exec_file): Update comment.
4666         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
4667         instead of "startup_inferior".
4668         (darwin_create_inferior): Call "add_thread_silent" after
4669         "fork_inferior".
4670         * fork-child.c: Cleanup unnecessary includes.
4671         (SHELL_FILE): Move to "common/common-fork-child.c".
4672         (environ): Likewise.
4673         (exec_wrapper): Initialize.
4674         (get_exec_wrapper): New function.
4675         (breakup_args): Move to "common/common-fork-child.c"; rename to
4676         "breakup_args_for_exec".
4677         (escape_bang_in_quoted_argument): Move to
4678         "common/common-fork-child.c".
4679         (saved_ui): New variable.
4680         (prefork_hook): New function.
4681         (postfork_hook): Likewise.
4682         (postfork_child_hook): Likewise.
4683         (gdb_startup_inferior): Likewise.
4684         (fork_inferior): Move to "common/common-fork-child.c".  Update
4685         function to support gdbserver.
4686         (startup_inferior): Likewise.
4687         * gdbcore.h (get_exec_file): Remove declaration.
4688         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
4689         instead of "startup_inferior".  Call "add_thread_silent" after
4690         "fork_inferior".
4691         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
4692         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
4693         instead of "startup_inferior".  Call "add_thread_silent" after
4694         "fork_inferior".
4695         * inferior.h: Include "common-inferior.h".
4696         (trace_start_error): Move to "common/common-utils.h".
4697         (trace_start_error_with_name): Likewise.
4698         (fork_inferior): Move prototype to "nat/fork-inferior.h".
4699         (startup_inferior): Likewise.
4700         (gdb_startup_inferior): New prototype.
4701         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
4702         * nat/fork-inferior.h: New file.
4703         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
4704         instead of "startup_inferior".  Call "add_thread_silent" after
4705         "fork_inferior".
4706         * target.h (target_terminal_init): Move prototype to
4707         "target/target.h".
4708         (target_terminal_inferior): Likewise.
4709         (target_terminal_ours): Likewise.
4710         * target/target.h (target_terminal_init): New prototype, moved
4711         from "target.h".
4712         (target_terminal_inferior): Likewise.
4713         (target_terminal_ours): Likewise.
4714         * utils.c (gdb_flush_out_err): New function.
4715
4716 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
4717
4718         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
4719         * common/common-gdbthread.h: New file, with parts from
4720         "gdb/gdbthread.h".
4721         * gdbthread.h: Include "common-gdbthread.h".
4722         (switch_to_thread): Moved to "common/common-gdbthread.h".
4723
4724 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
4725
4726         * Makefile.in (SFILES): Add "common/job-control.c".
4727         (HFILES_NO_SRCDIR): Add "common/job-control.h".
4728         (COMMON_OBS): Add "job-control.o".
4729         * common/job-control.c: New file, with contents from
4730         "gdb/inflow.c".
4731         * common/job-control.h: New file, with contents from "terminal.h".
4732         * fork-child.c: Include "job-control.h".
4733         * inflow.c: Include "job-control.h".
4734         (gdb_setpgid): Move to "common/common-inflow.c".
4735         (_initialize_inflow): Move setting of "job_control" to
4736         "handle_job_control".
4737         * terminal.h (job_control): Moved to "common/common-terminal.h".
4738         (gdb_setpgid): Likewise.
4739         * top.c: Include "job_control.h".
4740         * utils.c: Likewise.
4741         (job_control): Moved to "job-control.c".
4742
4743 2017-06-07  Pedro Alves  <palves@redhat.com>
4744
4745         * Makefile.in (SFILES): Add gdb_regex.c.
4746         (COMMON_OBS): Add gdb_regex.o.
4747         * ada-lang.c (ada_add_standard_exceptions)
4748         (ada_add_exceptions_from_frame, name_matches_regex)
4749         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
4750         parameter type to compiled_regex.  Adjust.
4751         (ada_exceptions_list): Use compiled_regex.
4752         * break-catch-throw.c (exception_catchpoint::pattern): Now a
4753         std::unique_ptr<compiled_regex>.
4754         (exception_catchpoint::~exception_catchpoint): Remove regfree
4755         call.
4756         (check_status_exception_catchpoint): Adjust to use compiled_regex.
4757         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
4758         * breakpoint.c (solib_catchpoint::compiled): Now a
4759         std::unique_ptr<compiled_regex>.
4760         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
4761         (check_status_catch_solib): Adjust to use compiled_regex.
4762         (add_solib_catchpoint): Adjust to use compiled_regex.
4763         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
4764         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
4765         compiled_regex reference.  Adjust to use it.
4766         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
4767         declaration.  Include "gdb_regex.h".
4768         (apropos_cmd): Change regex parameter to compiled_regex reference.
4769         * gdb_regex.c: New file.
4770         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
4771         declarations.
4772         (class compiled_regex): New.
4773         * linux-tdep.c: Include "common/gdb_optional.h".
4774         (struct mapping_regexes): New, factored out from
4775         mapping_is_anonymous_p, and adjusted to use compiled_regex.
4776         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
4777         gdb::optional and remove cleanups.  Adjust to compiled_regex.
4778         * probe.c: Include "common/gdb_optional.h".
4779         (collect_probes): Use compiled_regex and gdb::optional and remove
4780         cleanups.
4781         * skip.c: Include "common/gdb_optional.h".
4782         (skiplist_entry::compiled_function_regexp): Now a
4783         gdb::optional<compiled_regex>.
4784         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
4785         (free_skiplist_entry): Remove regfree call.
4786         (compile_skip_regexp, skip_rfunction_p): Adjust to use
4787         compiled_regex and gdb::optional.
4788         * symtab.c: Include "common/gdb_optional.h".
4789         (search_symbols): Use compiled_regex and gdb::optional.
4790         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
4791         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
4792         to gdb_regex.c.
4793
4794 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
4795
4796         * regcache.c (regcache::save): Avoid buffer use.
4797         (regcache::dump): Likewise.
4798
4799 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
4800
4801         * sh-tdep.c (sh_pseudo_register_read): Remove
4802         MAX_REGISTER_SIZE.
4803         (sh_pseudo_register_write): Likewise.
4804         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
4805         (sh64_pseudo_register_write): Likewise
4806
4807 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
4808
4809         * aarch64-tdep.c (aarch64_store_return_value): Use
4810         V_REGISTER_SIZE.
4811         (aarch64_pseudo_read_value): Likewise.
4812         (aarch64_pseudo_write): Likewise.
4813
4814 2017-06-06  Yao Qi  <yao.qi@linaro.org>
4815
4816         * regformats/regdef.h (set_register_cache): Remove the
4817         declaration.
4818
4819 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
4820
4821         * frame.c (frame_unwind_register_signed): Use
4822         frame_unwind_register_value.
4823
4824 2017-06-06  Pedro Alves  <palves@redhat.com>
4825
4826         PR breakpoints/21553
4827         * breakpoint.c (create_breakpoints_sal_default)
4828         (init_breakpoint_sal, create_breakpoint_sal): Use
4829         gdb::unique_xmalloc_ptr for string parameters.
4830         (create_breakpoint): Constify 'extra_string' and 'cond_string'
4831         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
4832         (base_breakpoint_create_breakpoints_sal)
4833         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
4834         (strace_marker_create_breakpoints_sal)
4835         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
4836         string parameters.
4837         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
4838         gdb::unique_xmalloc_ptr for string parameters.
4839         (create_breakpoint): Constify 'extra_string' and 'cond_string'
4840         parameters.
4841
4842 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
4843
4844         * alpha-tdep.c (alpha_register_to_value): Use
4845         get_frame_register_value.
4846         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
4847
4848 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
4849
4850         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
4851         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
4852         (ia64_value_to_register): Likewise.
4853         (ia64_extract_return_value): Likewise.
4854         (ia64_store_return_value): Likewise.
4855         (ia64_push_dummy_call): Likewise.
4856
4857 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
4858
4859         GDB 8.0 released.
4860
4861 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
4862
4863         * x86-linux-nat.c (struct arch_lwp_info): Remove.
4864
4865 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
4866
4867         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
4868         parameter.
4869         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
4870
4871 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
4872
4873         * event-loop.c (poll_timers): Unallocate timer using delete
4874         instead of xfree.
4875
4876 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
4877
4878         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
4879         (struct breakpoint) <~breakpoint>: New.
4880         (struct watchpoint): Inherit from breakpoint.
4881         <~watchpoint>: New.
4882         <base>: Remove.
4883         (struct tracepoint): Inherit from breakpoint.
4884         <base>: Remove.
4885         * breakpoint.c (longjmp_breakpoint_ops): Remove.
4886         (struct longjmp_breakpoint): Inherit from breakpoint.
4887         <~longjmp_breakpoint>: New.
4888         <base>: Remove.
4889         (new_breakpoint_from_type): Remove casts.
4890         (watchpoint_in_thread_scope): Remove reference to base field.
4891         (watchpoint_del_at_next_stop): Likewise.
4892         (update_watchpoint): Likewise.
4893         (watchpoint_check): Likewise.
4894         (bpstat_check_watchpoint): Likewise.
4895         (set_longjmp_breakpoint): Likewise.
4896         (struct fork_catchpoint): Inherit from breakpoint.
4897         <base>: Remove.
4898         (struct solib_catchpoint): Inherit from breakpoint.
4899         <~solib_catchpoint>: New.
4900         <base>: Remove.
4901         (dtor_catch_solib): Change to ...
4902         (solib_catchpoint::~solib_catchpoint): ... this.
4903         (breakpoint_hit_catch_solib): Remove reference to base field.
4904         (add_solib_catchpoint): Likewise.
4905         (create_fork_vfork_event_catchpoint): Likewise.
4906         (struct exec_catchpoint): Inherit from breakpoint.
4907         <~exec_catchpoint>: New.
4908         <base>: Remove.
4909         (dtor_catch_exec): Change to ...
4910         (exec_catchpoint::~exec_catchpoint): ... this.
4911         (dtor_watchpoint): Change to ...
4912         (watchpoint::~watchpoint): ... this.
4913         (watch_command_1): Remove reference to base field.
4914         (catch_exec_command_1): Likewise.
4915         (base_breakpoint_dtor): Change to ...
4916         (breakpoint::~breakpoint): ... this.
4917         (base_breakpoint_ops): Remove dtor field value.
4918         (longjmp_bkpt_dtor): Change to ...
4919         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
4920         (strace_marker_create_breakpoints_sal): Remove reference to base
4921         field.
4922         (delete_breakpoint): Don't manually call breakpoint destructor.
4923         (create_tracepoint_from_upload): Remove reference to base field.
4924         (trace_pass_set_count): Likewise.
4925         (initialize_breakpoint_ops): Don't initialize
4926         momentary_breakpoint_ops, don't set dtors.
4927         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
4928         <~ada_catchpoint>: New.
4929         <base>: Remove.
4930         (create_excep_cond_exprs): Remove reference to base field.
4931         (dtor_exception): Change to ...
4932         (ada_catchpoint::~ada_catchpoint): ... this.
4933         (dtor_catch_exception): Remove.
4934         (dtor_catch_exception_unhandled): Remove.
4935         (dtor_catch_assert): Remove.
4936         (create_ada_exception_catchpoint): Remove reference to base
4937         field.
4938         (initialize_ada_catchpoint_ops): Don't set dtors.
4939         * break-catch-sig.c (struct signal_catchpoint): Inherit from
4940         breakpoint.
4941         <~signal_catchpoint>: New.
4942         <base>: Remove.
4943         (signal_catchpoint_dtor): Change to ...
4944         (signal_catchpoint::~signal_catchpoint): ... this.
4945         (create_signal_catchpoint): Remove reference to base field.
4946         (initialize_signal_catchpoint_ops): Don't set dtor.
4947         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
4948         from breakpoint.
4949         <~syscall_catchpoint>: New.
4950         <base>: Remove.
4951         (dtor_catch_syscall): Change to ...
4952         (syscall_catchpoint::~syscall_catchpoint): ... this.
4953         (create_syscall_event_catchpoint): Remove reference to base
4954         field.
4955         (initialize_syscall_catchpoint_ops): Don't set dtor.
4956         * break-catch-throw.c (struct exception_catchpoint): Inherit
4957         from breakpoint.
4958         <~exception_catchpoint>: New.
4959         <base>: Remove.
4960         (dtor_exception_catchpoint): Change to ...
4961         (exception_catchpoint::~exception_catchpoint): ... this.
4962         (handle_gnu_v3_exceptions): Remove reference to base field.
4963         (initialize_throw_catchpoint_ops): Don't set dtor.
4964         * ctf.c (ctf_get_traceframe_address): Remove reference to base
4965         field.
4966         * remote.c (remote_get_tracepoint_status): Likewise.
4967         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
4968         * tracefile.c (tracefile_fetch_registers): Likewise.
4969         * tracepoint.c (actions_command): Likewise.
4970         (validate_actionline): Likewise.
4971         (tfind_1): Likewise.
4972         (get_traceframe_location): Likewise.
4973         (find_matching_tracepoint_location): Likewise.
4974         (parse_tracepoint_status): Likewise.
4975         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
4976
4977 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
4978
4979         * breakpoint.c (struct longjmp_breakpoint): New struct.
4980         (is_tracepoint_type): Change return type to bool.
4981         (is_longjmp_type): New function.
4982         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
4983         (set_raw_breakpoint_without_location): Use
4984         new_breakpoint_from_type.
4985         (set_raw_breakpoint): Likewise.
4986
4987 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
4988
4989         * breakpoint.c (new_breakpoint_from_type): New function.
4990         (create_breakpoint_sal): Use new_breakpoint_from_type and
4991         unique_ptr.
4992         (create_breakpoint): Likewise.
4993
4994 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
4995
4996         * memattr.c (mem_info_command): Rename to ...
4997         (info_mem_command): ... this.
4998         (mem_enable_command): Rename to ...
4999         (enable_mem_command): ... this.
5000         (mem_disable_command): Rename to ...
5001         (disable_mem_command): ... this.
5002         (mem_delete_command): Rename to ...
5003         (delete_mem_command): ... this.
5004         (_initialize_mem): Adjust function names.
5005
5006 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
5007
5008         * btrace.c (handle_pt_insn_events): New.
5009         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
5010         STATUS.  Split into this and ...
5011         (handle_pt_insn_event_flags): ... this.
5012
5013 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
5014
5015         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
5016         and struct pt_insn.resynced.
5017         * configure: Regenerated.
5018         * config.in: Regenerated.
5019
5020 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5021
5022         * btrace.c (ftrace_find_call_by_number): New function.
5023         (ftrace_new_function): Store objects, not pointers.
5024         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
5025         ftrace_new_gap, ftrace_update_function,
5026         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
5027         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
5028         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
5029         btrace_ends_with_single_insn, btrace_call_get): Account for
5030         btrace_thread_info::functions now storing objects.
5031         * btrace.h (struct btrace_thread_info): Add constructor.
5032         (struct btrace_thread_info) <functions>: Make std::vector.
5033         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
5034         Initialize with default values.
5035         * record-btrace.c (record_btrace_frame_sniffer): Account for
5036         btrace_thread_info::functions now storing objects.
5037
5038 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5039
5040         * btrace.c: Remove typedef bfun_s.
5041         (ftrace_new_gap): Directly add gaps to the list of gaps.
5042         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
5043         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
5044         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
5045         instead of gdb VEC.
5046
5047 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5048
5049         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
5050         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
5051         with btrace_thread_info::next_segment and
5052         btrace_thread_info::prev_segment.
5053         * btrace.h: Remove struct btrace_func_link.
5054         (struct btrace_function): Replace pair of function segment pointers
5055         with pair of indices.
5056         * python/py-record-btrace.c (btpy_call_prev_sibling,
5057         btpy_call_next_sibling): Replace references to
5058         btrace_thread_info::segment with btrace_thread_info::next_segment and
5059         btrace_thread_info::prev_segment.
5060         * record-btrace.c (record_btrace_frame_this_id): Use
5061         btrace_find_call_by_number.
5062
5063 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5064
5065         * btrace.c (ftrace_new_function, ftrace_fixup_level,
5066         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
5067         btrace_insn_next, btrace_insn_prev): Remove references to
5068         btrace_thread_info::flow.
5069         * btrace.h (struct btrace_function): Remove FLOW.
5070
5071 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5072
5073         * btrace.c (ftrace_find_call_by_number): New function.
5074         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
5075         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
5076         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
5077         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
5078         index.
5079         * btrace.h (struct btrace_function): Turn UP into an index.
5080         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
5081         as an index.
5082         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
5083         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
5084         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
5085
5086 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5087
5088         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5089         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5090         ftrace_update_function, ftrace_compute_global_level_offset,
5091         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
5092         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
5093         btrace_insn_end, btrace_is_empty): Remove references to
5094         btrace_thread_info::begin and btrace_thread_info::end.
5095         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
5096         (struct btrace_thread_info) <functions>: Adjust comment.
5097         * record-btrace.c (record_btrace_start_replaying): Remove reference to
5098         btrace_thread_info::begin.
5099
5100 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5101
5102         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5103         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5104         ftrace_update_function): Remove arguments that implicitly were always
5105         BTINFO->END.
5106         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
5107         Don't pass BTINFO->END.
5108
5109 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5110
5111         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
5112         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
5113         btrace_find_insn_by_number): Replace function segment pointer with
5114         index.
5115         (btrace_insn_cmp): Simplify.
5116         * btrace.h: (struct btrace_insn_iterator) Rename index to
5117         insn_index.  Replace function segment pointer with index into function
5118         segment vector.
5119         * record-btrace.c (record_btrace_call_history): Replace function
5120         segment pointer use with index.
5121         (record_btrace_frame_sniffer): Retrieve function call segment through
5122         vector.
5123         (record_btrace_set_replay): Remove defunc't safety check.
5124
5125 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5126
5127         * btrace.c (btrace_ends_with_single_insn): New function.
5128         (btrace_call_get, btrace_call_number, btrace_call_begin,
5129         btrace_call_end, btrace_call_next, btrace_call_prev,
5130         btrace_find_call_by_number): Use index into call segment vector
5131         instead of pointer.
5132         (btrace_call_cmp): Simplify.
5133         * btrace.h (struct btrace_call_iterator): Replace function call segment
5134         pointer with index into vector.
5135         * record-btrace.c (record_btrace_call_history): Use index instead of
5136         pointer.
5137
5138 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5139
5140         * btrace.c (btrace_insn_begin, btrace_insn_end,
5141         btrace_find_insn_by_number): Add btinfo to iterator.
5142         * btrace.h (struct btrace_insn_iterator): Add btinfo.
5143
5144 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5145
5146         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
5147         and save pointers directly.
5148         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
5149         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
5150         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
5151         changed signature of functions.
5152         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
5153         (btrace_fetch): Remove code that adds btrace_function pointers to
5154         vector of btrace_functions.
5155         (btrace_clear): Simplify freeing vector of btrace_functions.
5156
5157 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5158
5159         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
5160         Replace VEC_* with std::vector functions.
5161         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
5162         (struct btrace_thread_info)<functions>: Change type to std::vector.
5163
5164 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5165
5166         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
5167         "Removed targets and native configurations" up.  Merge duplicate
5168         "New commands" sub-sections.  Add "New options" sub-sections.
5169
5170 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
5171
5172         * defs.h (copy_integer_to_size): New declaration.
5173         * findvar.c (copy_integer_to_size): New function.
5174         (do_cint_test): New selftest function.
5175         (copy_integer_to_size_test): Likewise.
5176         (_initialize_findvar): Likewise.
5177         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
5178         (mips_fbsd_collect_reg): Use raw_collect_integer.
5179         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
5180         (mips64_fill_gregset): Use raw_collect_integer
5181         (mips64_fill_fpregset): Use raw_supply_integer.
5182         * regcache.c (regcache::raw_supply_integer): New function.
5183         (regcache::raw_collect_integer): Likewise.
5184         * regcache.h: (regcache::raw_supply_integer): New declaration.
5185         (regcache::raw_collect_integer): Likewise.
5186
5187 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5188
5189         * Makefile.in (SFILES): Add gdbarch-selftests.c.
5190         (COMMON_OBS): Add gdbarch-selftests.o.
5191         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
5192         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
5193         * gdbarch-selftests.c: New file.
5194         * regcache.h (regcache) <~regcache>: Mark it virtual if
5195         GDB_SELF_TEST.
5196         <raw_write>: Likewise.
5197
5198 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5199
5200         * regcache.c (current_regcache): Change it to
5201         regcache::current_regcache.
5202         (regcache_observer_target_changed): Update.
5203         (regcache_thread_ptid_changed): Make it a regcache static
5204         method.
5205         (regcache_thread_ptid_changed): Update.
5206         (class regcache_access): New.
5207         (current_regcache_test): Update.
5208         (_initialize_regcache): Update.
5209         * regcache.h: Include forward_list.
5210         (regcache): Declare regcache_thread_ptid_changed and declare
5211         registers_changed_ptid as friend.
5212
5213 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5214
5215         * i387-tdep.c (i387_register_to_value): Use register_size
5216         instead of TYPE_LENGTH.
5217         * m68k-tdep.c (m68k_register_to_value): Likewise.
5218
5219 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5220
5221         * i387-tdep.c (i387_convert_register_p): Return false if type
5222         code isn't TYPE_CODE_FLT.
5223
5224 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5225
5226         * alpha-tdep.c (alpha_convert_register_p): Return true if type
5227         length is 4.
5228         (alpha_register_to_value): Remove type length check.
5229         (alpha_value_to_register): Likewise.
5230
5231 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5232
5233         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
5234         TYPE_CODE_FLT.
5235
5236 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5237
5238         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
5239         TYPE_CODE_FLT or not.
5240
5241 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5242
5243         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
5244         * avr-tdep.c (avr_gdbarch_init): Likewise.
5245         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5246         * cris-tdep.c (cris_gdbarch_init): Likewise.
5247         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5248         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5249         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5250         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
5251         * mep-tdep.c (mep_gdbarch_init): Likewise.
5252         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5253         * mips-tdep.c (mips_gdbarch_init): Likewise.
5254         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5255         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5256         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5257         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5258         * v850-tdep.c (v850_gdbarch_init): Likewise.
5259
5260 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5261
5262         * selftest-arch.c (tests_with_arch): Call registers_changed
5263         and reinit_frame_cache.
5264         * selftest.c (run_self_tests): Likewise.
5265
5266 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5267
5268         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
5269         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
5270
5271 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5272
5273         * rl78-tdep.c (rl78_gdbarch_init): Don't call
5274         set_gdbarch_print_insn.
5275
5276 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5277
5278         * h8300-tdep.c (h8300_gdbarch_init): Don't call
5279         set_gdbarch_print_insn.
5280
5281 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5282
5283         * alpha-tdep.c (alpha_gdbarch_init): Don't call
5284         set_gdbarch_print_insn.
5285         * arc-tdep.c (arc_gdbarch_init): Likewise.
5286         * arch-utils.c: include dis-asm.h.
5287         (default_print_insn): New function.
5288         * arch-utils.h (default_print_insn): Declare.
5289         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
5290         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5291         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
5292         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
5293         * frv-tdep.c (frv_gdbarch_init): Likewise.
5294         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5295         * gdbarch.sh (print_insn): Use default_print_insn.
5296         * gdbarch.c: Regenerated.
5297         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
5298         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
5299         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5300         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
5301         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5302         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
5303         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
5304         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
5305         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
5306         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5307         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5308         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5309         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5310         * mt-tdep.c (mt_gdbarch_init): Likewise.
5311         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5312         * nios2-tdep.c (nios2_print_insn): Remove.
5313         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
5314         * rx-tdep.c (rx_gdbarch_init): Likewise.
5315         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5316         * score-tdep.c (score_print_insn): Remove.
5317         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
5318         * sh-tdep.c (sh_gdbarch_init): Likewise.
5319         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5320         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5321         * tic6x-tdep.c (tic6x_print_insn): Remove.
5322         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
5323         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
5324         * v850-tdep.c (v850_gdbarch_init): Likewise.
5325         * vax-tdep.c (vax_gdbarch_init): Likewise.
5326         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
5327         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
5328
5329 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
5330
5331         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
5332         (MIPS_FP0_REGNUM): Remove.
5333         (MIPS_FSR_REGNUM): Remove.
5334         (mips_fbsd_supply_fpregs): Use mips_regnum.
5335         (mips_fbsd_supply_gregs): Likewise.
5336         (mips_fbsd_collect_fpregs): Likewise.
5337         (mips_fbsd_collect_gregs): Likewise.
5338
5339 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
5340
5341         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
5342         (getpfpregs_supplies): New function.
5343         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
5344         getfpregs_supplies.
5345         (mips_fbsd_store_inferior_registers): Likewise.
5346
5347 2017-05-22  Pedro Alves <palves@redhat.com>
5348
5349         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
5350         maintainer.
5351
5352 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
5353
5354         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
5355         (store_register): Likewise.
5356         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
5357         (get_decimal_float_return_value): Likewise.
5358         (do_ppc_sysv_return_value): Likewise.
5359         (ppc64_sysv_abi_push_integer): Likewise.
5360         (ppc64_sysv_abi_push_freg): Likewise.
5361         (ppc64_sysv_abi_return_value_base): Likewise.
5362         (ppc64_sysv_abi_return_value): Likewise.
5363         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
5364         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
5365         * rs6000-nat.c: Likewise.
5366         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
5367         (rs6000_value_to_register): Likewise.
5368         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
5369
5370 2017-05-21  Tom Tromey  <tom@tromey.com>
5371
5372         PR rust/21466:
5373         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
5374         arrays as "[T]", not "[T; ]".
5375
5376 2017-05-19  Tom Tromey  <tom@tromey.com>
5377
5378         PR rust/21484:
5379         * rust-lang.c (exp_descriptor_rust): New function.
5380         (rust_language_defn): Use it.
5381         * p-lang.c (pascal_language_defn): Update.
5382         * opencl-lang.c (opencl_language_defn): Update.
5383         * objc-lang.c (objc_language_defn): Update.
5384         * m2-lang.c (m2_language_defn): Update.
5385         * language.h (struct language_defn)
5386         <la_watch_location_expression>: New member.
5387         * language.c (unknown_language_defn, auto_language_defn)
5388         (local_language_defn): Update.
5389         * go-lang.c (go_language_defn): Update.
5390         * f-lang.c (f_language_defn): Update.
5391         * d-lang.c (d_language_defn): Update.
5392         * c-lang.h (c_watch_location_expression): Declare.
5393         * c-lang.c (c_watch_location_expression): New function.
5394         (c_language_defn, cplus_language_defn, asm_language_defn)
5395         (minimal_language_defn): Use it.
5396         * breakpoint.c (watch_command_1): Call
5397         la_watch_location_expression.
5398         * ada-lang.c (ada_language_defn): Update.
5399
5400 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5401
5402         PR tui/21482
5403         * gdb_curses.h (NOMACROS): Define.
5404         (NCURSES_NOMACROS): Define.
5405
5406 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5407
5408         PR tui/21482
5409         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
5410         arg to char *.
5411         * tui/tui-wingeneral.c (box_win): Likewise.
5412         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
5413         (tui_show_source_line): Likewise.
5414         (tui_show_exec_info_content): Likewise.
5415
5416 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
5417
5418         * sparc-tdep.c (sparc_structure_return_p)
5419         (sparc_arg_on_registers_p): New functions.
5420         (sparc32_store_arguments): Use them.
5421         * sparc64-tdep.c (sparc64_16_byte_align_p)
5422         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
5423         Handle TYPE_CODE_ARRAY.
5424
5425 2017-05-17  Yao Qi  <yao.qi@linaro.org>
5426
5427         * cli/cli-decode.c (add_alias_cmd): New function.
5428         * command.h (add_alias_cmd): Declare.
5429         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
5430         instead call add_alias_cmd.
5431
5432 2017-05-17  Pedro Alves  <palves@redhat.com>
5433
5434         * Makefile.in (nat_extra_makefile_frag): Rename to ...
5435         (nat_makefile_frag): ... this.  All references updated.
5436         * configure.ac: Likewise.
5437         * configure.nat: Likewise.  Enhance comments.
5438         * configure: Regenerate.
5439
5440 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5441
5442         * procfs.c (procfs_create_inferior): Change prototype to match
5443         definition.
5444
5445 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
5446
5447         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
5448         C++ compiler warning.
5449
5450 2017-05-12  Tom Tromey  <tom@tromey.com>
5451
5452         PR rust/21483:
5453         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
5454         recurse, just call value_struct_elt directly.
5455
5456 2017-05-12  Tom Tromey  <tom@tromey.com>
5457
5458         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
5459         OP_RUST_ARRAY>: Fix.
5460
5461 2017-05-12  Tom Tromey  <tom@tromey.com>
5462
5463         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
5464
5465 2017-05-09  Yao Qi  <yao.qi@linaro.org>
5466
5467         * regcache.c: Include <forward_list>.
5468         (struct regcache_list): Remove.
5469         (current_regcache): Update.
5470         (get_thread_arch_aspace_regcache): Update for std::forward_list.
5471         (regcache_thread_ptid_changed): Likewise.
5472         (registers_changed_ptid): Likewise.
5473         (current_regcache_size): Likewise.
5474
5475 2017-05-09  Yao Qi  <yao.qi@linaro.org>
5476
5477         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
5478         (current_regcache_size): New function.
5479         (current_regcache_test): New function.
5480         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
5481
5482 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
5483
5484         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
5485         (print_gp_register_row): Use get_frame_register_value.
5486
5487 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
5488
5489         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
5490         (mips_supply_fpregset): Likewise.
5491         (mips64_supply_gregset): Likewise.
5492
5493 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
5494
5495         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
5496         regcache->raw_supply_zeroed.
5497
5498 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
5499
5500         * configure.nat: Rearrange 'case' statements to match
5501         host before cpu.
5502
5503 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
5504
5505         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
5506         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
5507         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
5508         "@nat_extra_makefile_frag@".
5509         (Makefile): Remove dependency on "@frags@".
5510         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
5511         (data-directory/Makefile): Likewise.
5512         * config/aarch64/linux.mh: Deleted; moved contents to
5513         "gdb/configure.nat".
5514         * config/alpha/alpha-linux.mh: Likewise.
5515         * config/alpha/nbsd.mh: Likewise.
5516         * config/arm/linux.mh: Likewise.
5517         * config/arm/nbsdelf.mh: Likewise.
5518         * config/i386/cygwin.mh: Likewise.
5519         * config/i386/cygwin64.mh: Likewise.
5520         * config/i386/darwin.mh: Likewise.
5521         * config/i386/fbsd.mh: Likewise.
5522         * config/i386/fbsd64.mh: Likewise.
5523         * config/i386/go32.mh: Likewise.
5524         * config/i386/i386gnu.mh: Likewise.
5525         * config/i386/i386sol2.mh: Likewise.
5526         * config/i386/linux.mh: Likewise.
5527         * config/i386/linux64.mh: Likewise.
5528         * config/i386/mingw.mh: Likewise.
5529         * config/i386/mingw64.mh: Likewise.
5530         * config/i386/nbsd64.mh: Likewise.
5531         * config/i386/nbsdelf.mh: Likewise.
5532         * config/i386/nto.mh: Likewise.
5533         * config/i386/obsd.mh: Likewise.
5534         * config/i386/obsd64.mh: Likewise.
5535         * config/i386/sol2-64.mh: Likewise.
5536         * config/ia64/linux.mh: Likewise.
5537         * config/m32r/linux.mh: Likewise.
5538         * config/m68k/linux.mh: Likewise.
5539         * config/m68k/nbsdelf.mh: Likewise.
5540         * config/m68k/obsd.mh: Likewise.
5541         * config/m88k/obsd.mh: Likewise.
5542         * config/mips/fbsd.mh: Likewise.
5543         * config/mips/linux.mh: Likewise.
5544         * config/mips/nbsd.mh: Likewise.
5545         * config/mips/obsd64.mh: Likewise.
5546         * config/pa/linux.mh: Likewise.
5547         * config/pa/nbsd.mh: Likewise.
5548         * config/pa/obsd.mh: Likewise.
5549         * config/powerpc/aix.mh: Likewise.
5550         * config/powerpc/fbsd.mh: Likewise.
5551         * config/powerpc/linux.mh: Likewise.
5552         * config/powerpc/nbsd.mh: Likewise.
5553         * config/powerpc/obsd.mh: Likewise.
5554         * config/powerpc/ppc64-linux.mh: Likewise.
5555         * config/powerpc/spu-linux.mh: Likewise.
5556         * config/s390/linux.mh: Likewise.
5557         * config/sh/nbsd.mh: Likewise.
5558         * config/sparc/fbsd.mh: Likewise.
5559         * config/sparc/linux.mh: Likewise.
5560         * config/sparc/linux64.mh: Likewise.
5561         * config/sparc/nbsd64.mh: Likewise.
5562         * config/sparc/nbsdelf.mh: Likewise.
5563         * config/sparc/obsd64.mh: Likewise.
5564         * config/sparc/sol2.mh: Likewise.
5565         * config/tilegx/linux.mh: Likewise.
5566         * config/vax/nbsdelf.mh: Likewise.
5567         * config/vax/obsd.mh: Likewise.
5568         * config/xtensa/linux.mh: Likewise.
5569         * config/i386/i386gnu.mn: New file, with excerpts from
5570         "config/i386/i386gnu.mh".
5571         * configure: Regenerate.
5572         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
5573         *.mh files under "gdb/config".
5574         * configure.nat: New file, with contents from the
5575         "gdb/config/*/*.mh" files.
5576
5577 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
5578
5579         * btrace.c (btrace_clear): Free insn vector.
5580
5581 2017-05-05  Pedro Alves  <palves@redhat.com>
5582
5583         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
5584         * configure: Regenerate.
5585
5586 2017-05-04  Pedro Alves  <palves@redhat.com>
5587
5588         * Makefile.in (SFILES): Add progspace-and-thread.c.
5589         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
5590         (COMMON_OBS): Add progspace-and-thread.o.
5591         * breakpoint.c: Include "progspace-and-thread.h".
5592         (update_inserted_breakpoint_locations)
5593         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
5594         Use scoped_restore_current_pspace_and_thread.
5595         (create_std_terminate_master_breakpoint): Use
5596         scoped_restore_current_program_space.
5597         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
5598         (print_breakpoint_location): Use
5599         scoped_restore_current_program_space.
5600         (bp_loc_is_permanent): Use
5601         scoped_restore_current_pspace_and_thread.
5602         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
5603         (download_tracepoint_locations): Use
5604         scoped_restore_current_pspace_and_thread.
5605         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
5606         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
5607         (enum step_over_calls_kind): Moved from inferior.h.
5608         (class scoped_restore_current_thread): New class.
5609         * gdbthread.h (make_cleanup_restore_current_thread): Delete
5610         declaration.
5611         (scoped_restore_current_thread): New class.
5612         * infcmd.c: Include "common/gdb_optional.h".
5613         (continue_1, proceed_after_attach): Use
5614         scoped_restore_current_thread.
5615         (notice_new_inferior): Use scoped_restore_current_thread.
5616         * inferior.c: Include "progspace-and-thread.h".
5617         (restore_inferior, save_current_inferior): Delete.
5618         (add_inferior_command, clone_inferior_command): Use
5619         scoped_restore_current_pspace_and_thread.
5620         * inferior.h (scoped_restore_current_inferior): New class.
5621         * infrun.c: Include "progspace-and-thread.h" and
5622         "common/gdb_optional.h".
5623         (follow_fork_inferior): Use
5624         scoped_restore_current_pspace_and_thread.
5625         (scoped_restore_exited_inferior): New class.
5626         (handle_vfork_child_exec_or_exit): Use
5627         scoped_restore_exited_inferior,
5628         scoped_restore_current_pspace_and_thread,
5629         scoped_restore_current_thread and scoped_restore.
5630         (fetch_inferior_event): Use scoped_restore_current_thread.
5631         * linespec.c (decode_line_full, decode_line_1): Use
5632         scoped_restore_current_program_space.
5633         * mi/mi-main.c: Include "progspace-and-thread.h".
5634         (exec_continue): Use scoped_restore_current_thread.
5635         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
5636         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
5637         * proc-service.c (ps_pglobal_lookup): Use
5638         scoped_restore_current_program_space.
5639         * progspace-and-thread.c: New file.
5640         * progspace-and-thread.h: New file.
5641         * progspace.c (release_program_space, clone_program_space): Use
5642         scoped_restore_current_program_space.
5643         (restore_program_space, save_current_program_space)
5644         (save_current_space_and_thread): Delete.
5645         (switch_to_program_space_and_thread): Moved to
5646         progspace-and-thread.c.
5647         * progspace.h (save_current_program_space)
5648         (save_current_space_and_thread): Delete declarations.
5649         (scoped_restore_current_program_space): New class.
5650         * remote.c (remote_btrace_maybe_reopen): Use
5651         scoped_restore_current_thread.
5652         * symtab.c: Include "progspace-and-thread.h".
5653         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
5654         * thread.c (print_thread_info_1): Use
5655         scoped_restore_current_thread.
5656         (struct current_thread_cleanup): Delete.
5657         (do_restore_current_thread_cleanup)
5658         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
5659         (scoped_restore_current_thread::~scoped_restore_current_thread):
5660         ... this new dtor.
5661         (make_cleanup_restore_current_thread): Rename/convert to ...
5662         (scoped_restore_current_thread::scoped_restore_current_thread):
5663         ... this new ctor.
5664         (thread_apply_all_command): Use scoped_restore_current_thread.
5665         (thread_apply_command): Use scoped_restore_current_thread.
5666         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
5667         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
5668
5669 2017-05-04  Pedro Alves  <palves@redhat.com>
5670
5671         * thread.c (make_cleanup_restore_current_thread): Move
5672         find_thread_ptid call before the is_stopped call.  Assert that the
5673         thread is found.  Replace is_stopped call by checking the thread's
5674         state directly.  Remove unnecessary NULL-thread check.
5675
5676 2017-05-04  Pedro Alves  <palves@redhat.com>
5677
5678         * corelow.c (thread_section_name): New class.
5679         (get_core_register_section, get_core_siginfo): Use it.
5680
5681 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5682
5683         * corelow.c (sniff_core_bfd): Remove extra semicolon.
5684         (get_core_register_section): Remove xfree of NULL pointer.
5685
5686 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
5687
5688         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
5689         * regcache.c (regcache::raw_supply_zeroed): New function.
5690         * regcache.h (regcache::raw_supply_zeroed): New declaration.
5691
5692 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
5693
5694         * gdbarch.sh: Remove commented out definition of
5695         TARGET_CHAR_BIT.
5696         * gdbarch.h: Re-generate.
5697
5698 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
5699
5700         * configure: Regenerate.
5701
5702 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
5703
5704         * solib-target.c (solib_target_relocate_section_addresses):
5705         Remove num_section_bases, num_bases, segment_bases variables.
5706
5707 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
5708
5709         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
5710
5711 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
5712
5713         * solib-target.c: Include <vector>
5714         (struct lm_info_target) <~lm_info_target>: Remove.
5715         <segment_bases, section_bases>: Change type to
5716         std::vector<CORE_ADDR>.
5717         (library_list_start_segment, library_list_start_section,
5718         library_list_end_library,
5719         solib_target_relocate_section_addresses): Adjust.
5720
5721 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
5722
5723         * gdbarch.sh (software_single_step): Change return type to
5724         std::vector<CORE_ADDR>.
5725         * gdbarch.c, gdbarch.h: Re-generate.
5726         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
5727         Adjust.
5728         (arm_deal_with_atomic_sequence_raw): Adjust.
5729         (thumb_get_next_pcs_raw): Adjust.
5730         (arm_get_next_pcs_raw): Adjust.
5731         (arm_get_next_pcs): Adjust.
5732         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
5733         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
5734         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
5735         (alpha_software_single_step): Adjust.
5736         * alpha-tdep.h (alpha_software_single_step): Adjust.
5737         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
5738         * arm-tdep.c (arm_software_single_step): Adjust.
5739         (arm_breakpoint_kind_from_current_state): Adjust.
5740         * arm-tdep.h (arm_software_single_step): Adjust.
5741         * breakpoint.c (insert_single_step_breakpoint): Adjust.
5742         * cris-tdep.c (cris_software_single_step): Adjust.
5743         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
5744         (micromips_deal_with_atomic_sequence): Adjust.
5745         (deal_with_atomic_sequence): Adjust.
5746         (mips_software_single_step): Adjust.
5747         * mips-tdep.h (mips_software_single_step): Adjust.
5748         * moxie-tdep.c (moxie_software_single_step): Adjust.
5749         * nios2-tdep.c (nios2_software_single_step): Adjust.
5750         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
5751         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
5752         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
5753         * s390-linux-tdep.c (s390_software_single_step): Adjust.
5754         * sparc-tdep.c (sparc_software_single_step): Adjust.
5755         * spu-tdep.c (spu_software_single_step): Adjust.
5756         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
5757
5758 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
5759
5760         * gdbarch.sh: Use semi-colon as field separator instead of colon.
5761         * gdbarch.h: Re-generate.
5762
5763 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
5764
5765         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
5766         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
5767         * python/py-instruction.c, python/py-instruction.h: New file.
5768         * python/py-record.c: Add py-instruction.h include.
5769         (gdbpy_initialize_record): Make gdb.Instruction a super class of
5770         gdb.RecordInstruction.
5771         * python/python-internal.h: Add gdbpy_initialize_instruction
5772         declaration.
5773         * python/python.c (do_start_initialization): Add
5774         gdbpy_initialize_instruction.
5775
5776 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
5777
5778         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
5779         Remove.
5780         (btrace_func_from_recpy_func): New function.
5781         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
5782         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
5783         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
5784         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
5785         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
5786         Also, use new helper functions.
5787         (btpy_list_item): Use new helper functions.
5788         (recpy_bt_function_call_history): Use new type name.
5789         (btpy_call_getset): Remove.
5790         (gdbpy_initialize_btrace): Remove code to initialize
5791         gdb.BtraceFunctionCall.
5792         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
5793         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
5794         recpy_bt_func_prev, recpy_bt_func_next): New export.
5795         * python/py-record.c (recpy_func_type): New static object.
5796         (recpy_func_new, recpy_func_level, recpy_func_symbol,
5797         recpy_func_instructions, recpy_func_up, recpy_func_prev,
5798         recpy_func_next): New function.
5799         (recpy_element_hash, recpy_element_richcompare): Updated comment.
5800         (recpy_func_getset): New static object.
5801         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
5802         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
5803
5804 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
5805
5806         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
5807         (btpy_object, btpy_insn_type, btpy_new): Remove.
5808         (btpy_list_object): Use gdb.RecordInstruction type instead of
5809         gdb.BtraceInstruction type.
5810         (btrace_insn_from_recpy_insn): New function.
5811         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
5812         btpy_new.
5813         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
5814         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
5815         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
5816         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
5817         instead of btpy_object.
5818         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
5819         btpy_insn_data, btpy_insn_decode): Rename to ...
5820         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
5821         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
5822         recpy_bt_insn_decode): This.  Also, use new helper functions.
5823         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
5824         recpy_insn_type.
5825         (btpy_insn_getset): Remove.
5826         (gdbpy_initialize_btrace): Remove code to initialize
5827         gdb.BtraceInstruction.  Use recpy_element_object.
5828         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
5829         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
5830         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
5831         * python/py-record.c (recpy_insn_type): New static object.
5832         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
5833         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
5834         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
5835         New function.
5836         (recpy_insn_getset): New static object.
5837         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
5838         * python/py-record.h (recpy_element_object): New typedef.
5839         (recpy_insn_type, recpy_insn_new): New export.
5840
5841 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
5842
5843         * py-record-btrace.c (btpy_insn_new): Removed.
5844         (btpy_insn_or_gap_new): New function.
5845         (btpy_insn_error): Removed.
5846         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
5847         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
5848         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
5849         btpy_insn_or_gap_new instead of btpy_insn_new.
5850         (btpy_insn_getset): Remove btpy_insn_error.
5851         * py-record.c (recpy_gap_type): New static object.
5852         (recpy_gap_object): New typedef.
5853         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
5854         recpy_gap_reason_string): New function.
5855         (recpy_gap_getset): New static object.
5856         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
5857         * py-record.h (recpy_gap_new): New export.
5858
5859 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
5860
5861         * python/py-record.c (recpy_ptid): Remove.
5862         (recpy_record_getset): Remove recpy_ptid.
5863
5864 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
5865
5866         * btrace.c (btrace_fetch): Set inferior_ptid.
5867         * python/py-record-btrace.c: Add "py-record.h" include.
5868         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
5869         recpy_bt_end, recpy_bt_instruction_history,
5870         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
5871         in gdb.Record object instead of current ptid.
5872         * python/py-record.c: Include new "py-record.h" file.
5873         (recpy_record_object): Moved to py-record.h.
5874         * python/py-record.h: New file.
5875
5876 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
5877
5878         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
5879         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
5880         indentation.
5881
5882 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
5883
5884         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
5885         the past maintainers section.
5886
5887 2017-04-28  Yao Qi  <yao.qi@linaro.org>
5888
5889         * infcmd.c (get_return_value): Use regcache ctor, and remove
5890         cleanup.
5891
5892 2017-04-28  Yao Qi  <yao.qi@linaro.org>
5893             Pedro Alves  <palves@redhat.com>
5894
5895         * regcache.c (regcache::regcache): New tag dispatch ctor.
5896         (do_cooked_read): Moved above.
5897         (regcache_dup): Use the tag dispatch ctor..
5898         * regcache.h (regcache): Declare ctor, delete copy ctor and
5899         assignment operator, remove friend regcache_dup.
5900
5901 2017-04-28  Yao Qi  <yao.qi@linaro.org>
5902
5903         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
5904         call method save instead of regcache_cpy.
5905         * regcache.h (struct regcache): Make regcache_dup a friend.
5906
5907 2017-04-28  Yao Qi  <yao.qi@linaro.org>
5908
5909         * regcache.c (struct regcache): Move to regcache.h
5910         (regcache::arch): New method.
5911         (regcache_get_ptid): Update.
5912         (get_regcache_arch): Call arch method.
5913         (get_regcache_aspace): Call method aspace.
5914         (register_buffer): Change it to method.
5915         (regcache_save): Change it to regcache::save.
5916         (regcache_restore): Likewise.
5917         (regcache_cpy_no_passthrough): Remove the declaration.
5918         (regcache_cpy): Call methods restore and cpy_no_passthrough.
5919         (regcache_cpy_no_passthrough): Change it to method
5920         cpy_no_passthrough.
5921         (regcache_register_status): Change it to method
5922         get_register_status.
5923         (regcache_invalidate): Change it to method invalidate.
5924         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
5925         (regcache_raw_update): Change it to method raw_update.
5926         (regcache_raw_read): Likewise.
5927         (regcache_raw_read_signed): Likewise.
5928         (regcache_raw_read_unsigned): Likewise.
5929         (regcache_raw_write_signed): Likewise.
5930         (regcache_raw_write_unsigned): Likewise.
5931         (regcache_cooked_read): Likewise.
5932         (regcache_cooked_read_value): Likewise.
5933         (regcache_cooked_read_signed): Likewise.
5934         (regcache_cooked_read_unsigned): Likewise.
5935         (regcache_cooked_write_signed): Likewise.
5936         (regcache_cooked_write_unsigned): Likewise.
5937         (regcache_raw_set_cached_value): Likewise.
5938         (regcache_raw_write): Likewise.
5939         (regcache_cooked_write): Likewise.
5940         (regcache_xfer_part): Likewise.
5941         (regcache_raw_read_part): Likewise.
5942         (regcache_raw_write_part): Likewise.
5943         (regcache_cooked_read_part): Likewise.
5944         (regcache_cooked_write_part): Likewise.
5945         (regcache_raw_supply): Likewise.
5946         (regcache_raw_collect): Likewise.
5947         (regcache_transfer_regset): Likewise.
5948         (regcache_supply_regset): Likewise.
5949         (regcache_collect_regset): Likewise.
5950         (regcache_debug_print_register): Likewise.
5951         (enum regcache_dump_what): Move it to regcache.h.
5952         (regcache_dump): Change it to method dump.
5953         * regcache.h (enum regcache_dump_what): New.
5954         (class regcache): New.
5955         * target.c (target_fetch_registers): Call method
5956         debug_print_register.
5957         (target_store_registers): Likewise.
5958
5959 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
5960
5961         * windows-nat.c (struct lm_info_windows): Initialize field.
5962         (windows_make_so): Allocate lm_info_windows with new.
5963         (windows_free_so): Free lm_info_windows with delete.
5964
5965 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
5966
5967         * solib-darwin.c (struct lm_info_darwin): Initialize field.
5968         (darwin_current_sos): Allocate lm_info_darwin with new, remove
5969         cleanup.
5970         (darwin_free_so): Free lm_info_darwin with delete.
5971
5972 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
5973
5974         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
5975         <l_addr_p>: Change type to bool.
5976         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
5977         (svr4_free_so): Free lm_info_svr4 with delete.
5978         (svr4_copy_library_list): Replace memcpy with call to copy
5979         constructor.
5980         (library_list_start_library, svr4_default_sos): Allocate
5981         lm_info_svr4 with new.
5982
5983 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
5984
5985         * solib-target.c (struct lm_info_target): Add destructor,
5986         initialize fields.
5987         <name>: Change type to std::string.
5988         (library_list_start_library): Allocate lm_info_target with new.
5989         (solib_target_free_library_list): Free lm_info_target with
5990         delete.
5991         (solib_target_current_sos): Adapt to std::string.
5992         (solib_target_free_so): Free lm_info_target with delete.
5993
5994 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
5995
5996         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
5997         fields.
5998         (frv_current_sos): Allocate lm_info_frv with new.
5999         (frv_relocate_main_executable): Free lm_info_frv with delete,
6000         allocate with new.
6001         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
6002
6003 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
6004
6005         * solib-frv.c (struct lm_info_frv): Fix indentation.
6006
6007 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
6008
6009         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
6010         map field.
6011         (dsbt_current_sos): Allocate lm_info_dsbt with new.
6012         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
6013         and allocate with new.
6014         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
6015
6016 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
6017
6018         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
6019         <filename, member_name>: Change type to std::string.
6020         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
6021         (library_list_start_library): Allocate lm_info_aix with new.
6022         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
6023         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
6024         with copy constructor.
6025
6026 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
6027
6028         * solist.h (struct lm_info): Remove.
6029         (struct lm_info_base): New class.
6030         (struct so_list) <lm_info>: Change type to lm_info_base *.
6031         * nto-tdep.c (struct lm_info): Remove.
6032         (lm_addr): Adjust.
6033         * solib-aix.c (struct lm_info): Rename to ...
6034         (struct lm_info_aix): ... this.  Extend lm_info_base.
6035         (lm_info_p): Rename to ...
6036         (lm_info_aix_p): ... this, and adjust.
6037         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
6038         solib_aix_parse_libraries, library_list_start_library,
6039         solib_aix_free_library_list, solib_aix_parse_libraries,
6040         solib_aix_get_library_list,
6041         solib_aix_relocate_section_addresses, solib_aix_free_so,
6042         solib_aix_get_section_offsets,
6043         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
6044         Adjust.
6045         (struct solib_aix_inferior_data) <library_list>: Adjust.
6046         * solib-darwin.c (struct lm_info): Rename to ...
6047         (struct lm_info_darwin): ... this.  Extend lm_info_base.
6048         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
6049         * solib-dsbt.c (struct lm_info): Rename to ...
6050         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
6051         (struct dsbt_info) <main_executable_lm_info): Adjust.
6052         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
6053         dsbt_relocate_section_addresses): Adjust.
6054         * solib-frv.c (struct lm_info): Rename to ...
6055         (struct lm_info_frv): ... this.  Extend lm_info_base.
6056         (main_executable_lm_info): Adjust.
6057         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
6058         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
6059         find_canonical_descriptor_in_load_object,
6060         frv_fdpic_find_canonical_descriptor): Adjust.
6061         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
6062         to lm_info_svr4.
6063         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
6064         svr4_clear_so, svr4_copy_library_list,
6065         library_list_start_library, svr4_default_sos, svr4_read_so_list,
6066         svr4_current_sos, svr4_fetch_objfile_link_map,
6067         solist_update_incremental): Adjust.
6068         * solib-svr4.h (struct lm_info_svr4): Move here from
6069         solib-svr4.c.
6070         * solib-target.c (struct lm_info): Rename to ...
6071         (struct lm_info_target): ... this.  Extend lm_info_base.
6072         (lm_info_p): Rename to ...
6073         (lm_info_target_p): ... this.
6074         (solib_target_parse_libraries, library_list_start_segment,
6075         library_list_start_section, library_list_start_library,
6076         library_list_end_library, solib_target_free_library_list,
6077         solib_target_current_sos, solib_target_free_so,
6078         solib_target_relocate_section_addresses): Adjust.
6079         * windows-nat.c (struct lm_info): Rename to ...
6080         (struct lm_info_windows): ... this.  Extend lm_info_base.
6081         (windows_make_so, handle_load_dll, handle_unload_dll,
6082         windows_xfer_shared_libraries): Adjust.
6083
6084 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
6085
6086         * solib-darwin.c (struct darwin_so_list): Remove.
6087         (darwin_current_sos): Allocate an so_list object instead of a
6088         darwin_so_list, separately allocate an lm_info object.
6089         (darwin_free_so): Free lm_info.
6090
6091 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
6092
6093         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
6094         with fprintf_filtered.
6095
6096 2017-04-28  Yao Qi  <yao.qi@linaro.org>
6097
6098         * regcache.c (regcache::regcache): New function.
6099         (regcache::~regcache): New function.
6100         (regcache_xmalloc_1): Remove.
6101         (regcache_xmalloc): Call new regcache.
6102         (regcache_xfree): Call delete regcache.
6103         (get_thread_arch_aspace_regcache): Call new regcache.
6104
6105 2017-04-28  Yao Qi  <yao.qi@linaro.org>
6106
6107         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
6108         lwp instead of ptid_get_lwp.
6109
6110 2017-04-28  Yao Qi  <yao.qi@linaro.org>
6111
6112         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
6113         lwp_info instead of getting from inferior_ptid.
6114
6115 2017-04-27  Keith Seitz  <keiths@redhat.com>
6116
6117         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
6118         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
6119         (CV_CONVERSION_BADNESS): Define.
6120         (rank_one_type): Remove overly restrictive rvalue reference
6121         rank checks.
6122         Add cv-qualifier checks and subranks for type equality.
6123         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
6124         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
6125         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
6126
6127 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
6128
6129         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
6130         count when creating the object.
6131
6132 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
6133             Ulrich Weigand  <uweigand@de.ibm.com>
6134
6135         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
6136         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
6137         is used in AIX.
6138         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
6139         (process_xcoff_symbol): Likewise.
6140         (scan_xcoff_symtab): Likewise.
6141
6142 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
6143
6144         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
6145         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
6146         (ia64_access_reg): Use get_frame_register_unsigned.
6147         (ia64_access_rse_reg): Likewise.
6148         (ia64_libunwind_frame_prev_register): Likewise.
6149
6150 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
6151
6152         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
6153         * gdbarch.c: Regenerated.
6154         * gdbarch.h: Regenerated.
6155         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
6156         visibility external.
6157         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
6158         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
6159         (enum cfa_how_kind): Move to ...
6160         (struct dwarf2_frame_state_reg_info): Likewise.
6161         (struct dwarf2_frame_state): Likewise.
6162         * dwarf2-frame.h: ... here.
6163         (dwarf2_frame_state_alloc_regs): New declaration.
6164         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
6165         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
6166
6167 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
6168
6169         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
6170         regcache_raw_read_unsigned.
6171         (xtensa_pseudo_register_write): Likewise.
6172
6173 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
6174
6175         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
6176         (nds32_pseudo_register_write): Likewise.
6177
6178 2017-04-25  Yao Qi  <yao.qi@linaro.org>
6179
6180         * regcache.c (struct regcache) <readonly_p>: Change its type
6181         to bool.
6182         (regcache_xmalloc_1): Update parameter type and callers update.
6183
6184 2017-04-25  Yao Qi  <yao.qi@linaro.org>
6185
6186         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
6187         set_gdbarch_wchar_bit.
6188         * arm-tdep.c (arm_gdbarch_init): Likewise.
6189
6190 2017-04-25  Pedro Alves  <palves@redhat.com>
6191
6192         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
6193         (BothAreRelocatable, memcopy, memmove): Don't define.
6194         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
6195         macros.
6196
6197 2017-04-25  Pedro Alves  <palves@redhat.com>
6198
6199         * common/common-defs.h: Include "common/poison.h".
6200         * common/function-view.h: (Not, Or, Requires): Move to traits.h
6201         and adjust.
6202         * common/poison.h: New file.
6203         * common/traits.h: Include <type_traits>.
6204         (Not, Or, Requires): New, moved from common/function-view.h.
6205
6206 2017-04-25  Pedro Alves  <palves@redhat.com>
6207
6208         * breakpoint.h (struct breakpoint): In-class initialize all
6209         fields.  Make boolean fields "bool".
6210         * breakpoint.c (init_raw_breakpoint_without_location): Remove
6211         memset call and initializations no longer necessary.
6212
6213 2017-04-25  Pedro Alves  <palves@redhat.com>
6214
6215         * btrace.c (pt_btrace_insn_flags): Change parameter type to
6216         reference.
6217         (pt_btrace_insn): New function.
6218         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
6219
6220 2017-04-25  Pedro Alves  <palves@redhat.com>
6221
6222         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
6223         "base" field and inherit from "bp_location" instead.  Add
6224         non-default ctor.
6225         (allocate_location_exception): Use new non-default ctor.
6226         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
6227         (init_bp_location): Convert to ...
6228         (bp_location::bp_location): ... this new ctor, and remove memset
6229         call.
6230         (base_breakpoint_allocate_location): Use the new non-default ctor.
6231         * breakpoint.h (bp_location): Now a class.  Declare default and
6232         non-default ctors.  In-class initialize all members.
6233         (init_bp_location): Remove declaration.
6234
6235 2017-04-25  Pedro Alves  <palves@redhat.com>
6236
6237         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
6238         assignment operator.
6239
6240 2017-04-24  Yao Qi  <yao.qi@linaro.org>
6241
6242         * doublest.c (convert_doublest_to_floatformat): Call
6243         floatformat_totalsize_bytes.
6244
6245 2017-04-22  Tom Tromey  <tom@tromey.com>
6246
6247         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6248         ui_out_emit_list.
6249         * stack.c (print_frame): Use ui_out_emit_list.
6250         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6251         ui_out_emit_list.
6252         * mi/mi-main.c (print_one_inferior)
6253         (mi_cmd_data_list_register_names)
6254         (mi_cmd_data_list_register_values, mi_cmd_list_features)
6255         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
6256         ui_out_emit_list.
6257         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
6258         (mi_output_solib_attribs): Use ui_out_emit_list,
6259         ui_out_emit_tuple.
6260         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
6261         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
6262         (mi_cmd_stack_list_args, list_args_or_locals): Use
6263         ui_out_emit_list.
6264         * disasm.c (do_assembly_only): Use ui_out_emit_list.
6265         * breakpoint.c (print_solib_event, output_thread_groups): Use
6266         ui_out_emit_list.
6267
6268 2017-04-22  Tom Tromey  <tom@tromey.com>
6269
6270         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
6271         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
6272         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
6273
6274 2017-04-22  Tom Tromey  <tom@tromey.com>
6275
6276         * tracepoint.c (tvariables_info_1)
6277         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
6278
6279 2017-04-22  Tom Tromey  <tom@tromey.com>
6280
6281         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
6282         annotate_arg_emitter.
6283         * breakpoint.c (print_mention_watchpoint)
6284         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
6285         * annotate.h (struct annotate_arg_emitter): New.
6286
6287 2017-04-22  Tom Tromey  <tom@tromey.com>
6288
6289         * record-btrace.c (record_btrace_insn_history)
6290         (record_btrace_insn_history_range, record_btrace_call_history)
6291         (record_btrace_call_history_range): Use ui_out_emit_tuple.
6292         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
6293         ui_out_emit_tuple.
6294         * stack.c (print_frame_info): Use ui_out_emit_tuple.
6295         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
6296         * skip.c (skip_info): Use ui_out_emit_tuple.
6297         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
6298         * progspace.c (print_program_space): Use ui_out_emit_tuple.
6299         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
6300         * osdata.c (info_osdata): Use ui_out_emit_tuple.
6301         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6302         ui_out_emit_tuple.
6303         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
6304         (output_register, mi_cmd_data_read_memory)
6305         (mi_cmd_data_read_memory_bytes, mi_load_progress)
6306         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
6307         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
6308         Use ui_out_emit_tuple.
6309         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
6310         ui_out_emit_tuple.
6311         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
6312         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
6313         * linux-thread-db.c (info_auto_load_libthread_db): Use
6314         ui_out_emit_tuple.
6315         * inferior.c (print_inferior): Use ui_out_emit_tuple.
6316         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
6317         * disasm.c (do_mixed_source_and_assembly_deprecated)
6318         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
6319         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
6320         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
6321         * breakpoint.c (print_one_breakpoint_location)
6322         (print_one_breakpoint): Use ui_out_emit_tuple.
6323         * auto-load.c (print_script, info_auto_load_cmd): Use
6324         ui_out_emit_tuple.
6325         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
6326
6327 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
6328
6329         * thread.c (print_thread_info_1): Remove dead code.
6330
6331 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
6332
6333         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
6334         GDB_SELF_TEST.
6335         * arm-tdep.c (selftests::arm_record_test): Likewise.
6336
6337 2017-04-21  Yao Qi  <yao.qi@linaro.org>
6338
6339         * regcache.c (regcache_restore): Remove argument 2.  Replace
6340         argument 3 with regcache.  Get register status from
6341         src->register_status and get register contents from
6342         register_buffer (src, regnum).
6343         (regcache_cpy): Update.
6344
6345 2017-04-19  Pedro Alves  <palves@redhat.com>
6346
6347         * gdbthread.h (thread): Add missing closing parenthesis in
6348         comment.
6349
6350 2017-04-19  Pedro Alves  <palves@redhat.com>
6351
6352         * common/refcounted-object.h: New file.
6353         * gdbthread.h: Include "common/refcounted-object.h".
6354         (thread_info): Inherit from refcounted_object and add comments.
6355         (thread_info::incref, thread_info::decref)
6356         (thread_info::m_refcount): Delete.
6357         (thread_info::deletable): Use the refcounted_object::refcount()
6358         method.
6359         * inferior.c (current_inferior_): Add comment.
6360         (set_current_inferior): Increment/decrement refcounts.
6361         (prune_inferiors, remove_inferior_command): Skip inferiors marked
6362         not-deletable instead of comparing with the current inferior.
6363         (initialize_inferiors): Increment the initial inferior's refcount.
6364         * inferior.h (struct inferior): Forward declare.
6365         Include "common/refcounted-object.h".
6366         (current_inferior, set_current_inferior): Move declaration to
6367         before struct inferior's definition, and fix comment.
6368         (inferior): Inherit from refcounted_object.  Add comments.
6369         * thread.c (switch_to_thread_no_regs): Reference the thread's
6370         inferior pointer directly instead of doing a ptid lookup.
6371         (switch_to_no_thread): New function.
6372         (switch_to_thread(thread_info *)): New function, factored out
6373         from ...
6374         (switch_to_thread(ptid_t)): ... this.
6375         (restore_current_thread): Delete.
6376         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
6377         fields, and add 'inf' field.
6378         (do_restore_current_thread_cleanup): Check whether old->inf is
6379         alive instead of looking up an inferior by ptid.  Use
6380         switch_to_thread and switch_to_no_thread.
6381         (restore_current_thread_cleanup_dtor): Use old->inf directly
6382         instead of lookup up an inferior by id.  Decref the inferior.
6383         Don't restore 'removable'.
6384         (make_cleanup_restore_current_thread): Same the inferior pointer
6385         in old, instead of the inferior number.  Incref the inferior.
6386         Don't save/clear 'removable'.
6387
6388 2017-04-19  Pedro Alves  <palves@redhat.com>
6389
6390         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6391         unittests/scoped_restore-selftests.c.
6392         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
6393         * common/scoped_restore.h (scoped_restore_base): Make "class".
6394         (scoped_restore_base::release): New public method.
6395         (scoped_restore_base::scoped_restore_base): New protected ctor.
6396         (scoped_restore_base::m_saved_var): New protected field.
6397         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
6398         scoped_restore_base base class instead of m_saved_var directly.
6399         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
6400         (scoped_restore_tmpl::scoped_restore_tmpl(const
6401         scoped_restore_tmpl<T>&)): Likewise.
6402         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
6403         method.
6404         (scoped_restore_tmpl::saved_var): New method.
6405         (scoped_restore_tmpl::m_saved_var): Delete.
6406         * inferior.h (inferior::detaching): Now a bool.
6407         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
6408         cleanup.
6409         * unittests/scoped_restore-selftests.c: New file.
6410
6411 2017-04-19  Pedro Alves  <palves@redhat.com>
6412
6413         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
6414         Re-sort in alphabetic order.
6415
6416 2017-04-18  Pedro Alves  <palves@redhat.com>
6417
6418         * xml-support.c (obstack_xml_printf): Delete.
6419         * xml-support.h (obstack_xml_printf): Delete.
6420
6421 2017-04-18  Pedro Alves  <palves@redhat.com>
6422
6423         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
6424         vdebug, verror, body_text, start_element, end_element, name,
6425         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
6426         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
6427         is_xinclude>: Make private and add m_ prefix.
6428         (gdb_xml_parser::body_text): New method, based on ...
6429         (gdb_xml_body_text): ... this.  Adjust.
6430         (gdb_xml_parser::vdebug): New method, based on ...
6431         (gdb_xml_debug): ... this.  Adjust.
6432         (gdb_xml_parser::verror): New method, based on ...
6433         (gdb_xml_error): ... this.  Adjust.
6434         (gdb_xml_parser::start_element): New method, based on ...
6435         (gdb_xml_start_element): ... this.  Adjust.
6436         (gdb_xml_start_element_wrapper): Defer to
6437         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
6438         (gdb_xml_parser::end_element): New method, based on ...
6439         (gdb_xml_end_element_wrapper): ... this.  Adjust.
6440         (gdb_xml_parser::~gdb_xml_parser): Adjust.
6441         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
6442         (gdb_xml_parser::use_dtd): New method, based on ...
6443         (gdb_xml_use_dtd): ... this.  Adjust.
6444         (gdb_xml_parser::parse): New method, based on ...
6445         (gdb_xml_parse): ... this.  Adjust.
6446         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
6447         (xinclude_start_include): Adjust to call the parser's name method.
6448         (xml_xinclude_default, xml_xinclude_start_doctype)
6449         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
6450         method.
6451         (xml_process_xincludes): Adjust to call parser methods.
6452         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
6453         declarations.
6454
6455 2017-04-18  Pedro Alves  <palves@redhat.com>
6456
6457         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
6458         gdb::optional<std::string>.
6459         * xml-support.c: Include <string>.
6460         (scope_level::scope_level(scope_level &&))
6461         (scope_level::~scope_level): Delete.
6462         (scope_level::body): Now a std::string.
6463         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
6464         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
6465         parameter.
6466         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
6467         (xinclude_parsing_data::output): Now a std::string reference.
6468         (xinclude_start_include): Adjust.
6469         (xml_xinclude_default): Adjust.
6470         (xml_process_xincludes): Add 'output' parameter, and return bool.
6471         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
6472         and return bool.
6473         * xml-tdesc.c: Include <unordered_map> and <string>.
6474         (tdesc_xml_cache): Delete.
6475         (tdesc_xml_cache_s): Delete.
6476         (xml_cache): Now an std::unordered_map.
6477         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
6478         (target_fetch_description_xml): Change return type to
6479         gdb::optional<std::string>, and adjust.
6480         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
6481         (target_fetch_description_xml): Change return type to
6482         gdb::optional<std::string>.
6483
6484 2017-04-18  Pedro Alves  <palves@redhat.com>
6485
6486         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6487         unittests/optional-selftests.c.
6488         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
6489         * unittests/optional-selftests.c: New file.
6490         * unittests/optional/assignment/1.cc: New file.
6491         * unittests/optional/assignment/2.cc: New file.
6492         * unittests/optional/assignment/3.cc: New file.
6493         * unittests/optional/assignment/4.cc: New file.
6494         * unittests/optional/assignment/5.cc: New file.
6495         * unittests/optional/assignment/6.cc: New file.
6496         * unittests/optional/assignment/7.cc: New file.
6497         * unittests/optional/cons/copy.cc: New file.
6498         * unittests/optional/cons/default.cc: New file.
6499         * unittests/optional/cons/move.cc: New file.
6500         * unittests/optional/cons/value.cc: New file.
6501         * unittests/optional/in_place.cc: New file.
6502         * unittests/optional/observers/1.cc: New file.
6503         * unittests/optional/observers/2.cc: New file.
6504
6505 2017-04-18  Pedro Alves  <palves@redhat.com>
6506
6507         * common/gdb_optional.h: Include common/traits.h.
6508         (in_place_t): New type.
6509         (in_place): New constexpr variable.
6510         (optional::optional): Remove member initialization of
6511         m_instantiated.
6512         (optional::optional(in_place_t...)): New constructor.
6513         (optional::~optional): Use reset.
6514         (optional::optional(const optional&)): New.
6515         (optional::optional(const optional&&)): New.
6516         (optional::optional(T &)): New.
6517         (optional::optional(T &&)): New.
6518         (operator::operator=(const optional &)): New.
6519         (operator::operator=(optional &&)): New.
6520         (operator::operator= (const T &))
6521         (operator::operator= (T &&))
6522         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
6523         (operator::reset): New.
6524         (operator::m_instantiated):: Add in-class initializer.
6525         * common/traits.h: Include <type_traits>.
6526         (struct And): New types.
6527
6528 2017-04-18  Pedro Alves  <palves@redhat.com>
6529
6530         * xml-support.c: Include <vector>.
6531         (scope_level::scope_level(const gdb_xml_element *))
6532         (scope_level::scope_level(scope_level&&)): New.
6533         (scope_level::~scope_level): New.
6534         (scope_level_s): Delete.
6535         (gdb_xml_parser::scopes): Now a std::vector.
6536         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
6537         Use std::vector.
6538         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
6539         scope cleanup code.
6540         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
6541         of the scopes member.  Use std::vector::emplace_back.
6542
6543 2017-04-18  Pedro Alves  <palves@redhat.com>
6544
6545         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
6546         a bool.
6547         (gdb_xml_end_element): Change type of first parameter.
6548         (gdb_xml_cleanup): Rename to ...
6549         (gdb_xml_parser::~gdb_xml_parser): ... this.
6550         (gdb_xml_create_parser_and_cleanup): Delete with ...
6551         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
6552         to this new ctor.
6553         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
6554         using gdb_xml_create_parser_and_cleanup.
6555         (xinclude_parsing_data): Add ctor/dtor.
6556         (xml_xinclude_cleanup): Delete.
6557         (xml_process_xincludes): Create a local xinclude_parsing_data
6558         instead of heap-allocating one.  Create a local gdb_xml_parser
6559         instead of heap-allocating one with
6560         gdb_xml_create_parser_and_cleanup.
6561
6562 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
6563
6564         PR threads/20743
6565         * fbsd-nat.c (resume_one_thread_cb): Remove.
6566         (resume_all_threads_cb): Remove.
6567         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
6568         iterate_over_threads.
6569
6570 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
6571
6572         * NEWS: Create a new section for the next release branch.
6573         Rename the section of the current branch, now that it has
6574         been cut.
6575
6576 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
6577
6578         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
6579         * version.in: Bump version to 8.0.50.DATE-git.
6580
6581 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
6582
6583         PR gdb/21385
6584         * windows-nat.c (windows_create_inferior): Declare 'allargs'
6585         independently of the host, and fix build breakage on Cygwin.
6586
6587 2017-04-13  Pedro Alves  <palves@redhat.com>
6588
6589         * inferior.c (free_inferior): Convert to ...
6590         (inferior::~inferior): ... this dtor.
6591         (inferior::inferior): New ctor, factored out from ...
6592         (add_inferior_silent): ... here.  Allocate the inferior with a new
6593         expression.
6594         (delete_inferior): Call delete instead of free_inferior.
6595         * inferior.h (gdb_environ, continuation): Forward declare.
6596         (inferior): Now a class.  Add in-class initialization to all
6597         members.  Make boolean fields bool, except 'detaching'.
6598         (inferior::inferior): New explicit ctor.
6599         (inferior::~inferior): New.
6600
6601 2017-04-13  Pedro Alves  <palves@redhat.com>
6602
6603         * inferior.c (init_inferior_list): Delete.
6604         * inferior.h (init_inferior_list): Delete.
6605
6606 2017-04-13  Pedro Alves  <palves@redhat.com>
6607
6608         PR threads/13217
6609         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
6610         (top level): Call it twice, with different thread sets.
6611
6612 2017-04-13  Pedro Alves  <palves@redhat.com>
6613
6614         * thread.c: Include <algorithm>.
6615         (thread_array_cleanup): Delete.
6616         (scoped_inc_dec_ref): New class.
6617         (live_threads_count): New function.
6618         (set_thread_refcount): Delete.
6619         (tp_array_compar_ascending): Now a bool.
6620         (tp_array_compar): Convert to a std::sort comparison function.
6621         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
6622         and live_threads_count.
6623
6624 2017-04-13  Pedro Alves  <palves@redhat.com>
6625
6626         * infrun.c (follow_fork_inferior): Also switch the current
6627         inferior.
6628
6629 2017-04-13  Pedro Alves  <palves@redhat.com>
6630
6631         * breakpoint.c (watch_command_1): Save watchpoint-frame info
6632         before calling create_internal_breakpoint.
6633
6634 2017-04-13  Pedro Alves  <palves@redhat.com>
6635
6636         * fork-child.c (execv_argv): New class.
6637         (breakup_args): Refactored as ...
6638         (execv_argv::init_for_no_shell): .. this method of execv_argv.
6639         Copy arguments to storage and replace separators with NULL
6640         terminators in place.
6641         (escape_bang_in_quoted_argument): Adjust to return bool.
6642         (execv_argv::execv_argv): New ctor.
6643         (execv_argv::init_for_shell): New method, factored out from
6644         fork_inferior.  Don't strdup strings into the vector.
6645         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
6646         Remove free_vector_argv call.
6647
6648 2017-04-13  Yao Qi  <yao.qi@linaro.org>
6649
6650         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
6651         tdep->rx_psw_type.
6652
6653 2017-04-13  Yao Qi  <yao.qi@linaro.org>
6654
6655         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
6656         * rx-tdep.c (rx_gdbarch_init): Likewise.
6657
6658 2017-04-13  Pedro Alves  <palves@redhat.com>
6659
6660         * breakpoint.h (struct breakpoint): Reindent.
6661
6662 2017-04-13  Pedro Alves  <palves@redhat.com>
6663
6664         * breakpoint.c (bp_location): Rename to ...
6665         (bp_locations): ... this.  All references updated.
6666         (bp_location_count): Rename to ...
6667         (bp_locations_count): ... this.  All references updated.
6668         (bp_location_placed_address_before_address_max): Rename to ...
6669         (bp_locations_placed_address_before_address_max): ... this.  All
6670         references updated.
6671         (bp_location_shadow_len_after_address_max): Rename to ...
6672         (bp_locations_shadow_len_after_address_max): ... this.  All
6673         references updated.
6674         (bp_location_compare_addrs): Rename to ...
6675         (bp_locations_compare_addrs): ... this.  All references updated.
6676         (bp_location_compare):Rename to ...
6677         (bp_locations_compare): ... this.  All references updated.
6678         (bp_location_target_extensions_update): Rename to ...
6679         (bp_locations_target_extensions_update): ... this.  All references
6680         updated.
6681
6682 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
6683
6684         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
6685         * common/common.m4: Check headers 'termios.h', 'termio.h' and
6686         'sgtty.h'.
6687         * common/gdb_termios.h: New file, with parts of "terminal.h".
6688         * inflow.c: Include "gdb_termios.h".
6689         * ser-unix.c: Include "gdb_termios.h".
6690         * terminal.h: Move terminal-related defines to
6691         "common/gdb_termios.h".
6692
6693 2017-04-12  Tom Tromey  <tom@tromey.com>
6694
6695         * probe.c (parse_probes): Update.
6696         * location.h (delete_event_location): Don't declare.
6697         (event_location_deleter::operator()): Update.
6698         * location.c (event_location_deleter::operator()): Rename from
6699         delete_event_location.
6700         * linespec.h (linespec_result) <location>: Change type to
6701         event_location_up.
6702         * linespec.c (canonicalize_linespec, event_location_to_sals)
6703         (decode_objc): Update.
6704         (linespec_result): Don't call delete_event_location.
6705         * breakpoint.c (create_breakpoints_sal)
6706         (bkpt_probe_create_sals_from_location)
6707         (strace_marker_create_sals_from_location): Update.
6708
6709 2017-04-12  Tom Tromey  <tom@tromey.com>
6710
6711         * linespec.h (struct linespec_result): Add constructor and
6712         destructor.
6713         (init_linespec_result, destroy_linespec_result)
6714         (make_cleanup_destroy_linespec_result): Don't declare.
6715         * linespec.c (init_linespec_result): Remove.
6716         (linespec_result::~linespec_result): Rename from
6717         destroy_linespec_result.  Update.
6718         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
6719         Remove.
6720         * breakpoint.c (create_breakpoint, break_range_command)
6721         (decode_location_default): Update.
6722         * ax-gdb.c (agent_command_1): Update.
6723
6724 2017-04-12  Tom Tromey  <tom@tromey.com>
6725
6726         * remote.c (remote_download_tracepoint): Update.
6727         * python/py-breakpoint.c (bppy_get_location): Update.
6728         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
6729         (gdbscm_breakpoint_location): Update.
6730         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
6731         * breakpoint.h (struct breakpoint) <location, location_range_end>:
6732         Change type to event_location_up.
6733         * breakpoint.c (create_overlay_event_breakpoint)
6734         (create_longjmp_master_breakpoint)
6735         (create_std_terminate_master_breakpoint)
6736         (create_exception_master_breakpoint)
6737         (breakpoint_event_location_empty_p, print_breakpoint_location)
6738         (print_one_breakpoint_location, create_thread_event_breakpoint)
6739         (init_breakpoint_sal, create_breakpoint)
6740         (print_recreate_ranged_breakpoint, break_range_command)
6741         (init_ada_exception_breakpoint, say_where): Update.
6742         (base_breakpoint_dtor): Don't call delete_event_location.
6743         (bkpt_print_recreate, tracepoint_print_recreate)
6744         (dprintf_print_recreate, update_static_tracepoint)
6745         (breakpoint_re_set_default): Update.
6746
6747 2017-04-12  Tom Tromey  <tom@tromey.com>
6748
6749         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
6750         type of "to_do".  Update.
6751         (compute_stack_depth): Use std::vector.
6752
6753 2017-04-12  Tom Tromey  <tom@tromey.com>
6754
6755         * printcmd.c (find_instruction_backward): Use std::vector.
6756
6757 2017-04-12  Tom Tromey  <tom@tromey.com>
6758
6759         * symfile.c (objfilep): Remove typedef.
6760         (reread_symbols): Use a std::vector.
6761
6762 2017-04-12  Tom Tromey  <tom@tromey.com>
6763
6764         * mi/mi-main.c (exec_direction_forward): Remove.
6765         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
6766         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6767         scoped_restore.
6768         * guile/guile.c (guile_repl_command, guile_command)
6769         (gdbscm_execute_gdb_command): Use scoped_restore.
6770         * go-exp.y (go_parse): Use scoped_restore.
6771         * d-exp.y (d_parse): Use scoped_restore.
6772         * cli/cli-decode.c (cmd_func): Use scoped_restore.
6773         * c-exp.y (c_parse): Use scoped_restore.
6774
6775 2017-04-12  Tom Tromey  <tom@tromey.com>
6776
6777         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
6778         (mi_parse): Update return type.
6779         (mi_parse_free): Remove.
6780         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
6781         (mi_parse::~mi_parse): Rename from mi_parse_free.
6782         (mi_parse_cleanup): Remove.
6783         (mi_parse): Return a unique_ptr.  Use new.
6784         * mi/mi-main.c (mi_execute_command): Update.
6785
6786 2017-04-12  Tom Tromey  <tom@tromey.com>
6787
6788         * location.c (explicit_location_lex_one): Return a
6789         unique_xmalloc_ptr.
6790         (string_to_explicit_location): Update.  Remove cleanups.
6791
6792 2017-04-12  Tom Tromey  <tom@tromey.com>
6793
6794         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
6795         (compare_value_and_voffset): Change type.  Update.
6796         (compute_vtable_size): Change type of "offset_vec".
6797         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
6798         (gnuv3_get_typeid): Remove extraneous declaration.
6799
6800 2017-04-12  Tom Tromey  <tom@tromey.com>
6801
6802         * charset.h (wchar_iterator): Fix comment.
6803
6804 2017-04-12  Tom Tromey  <tom@tromey.com>
6805
6806         * charset.c (iconv_wrapper): New class.
6807         (cleanup_iconv): Remove.
6808         (convert_between_encodings): Use it.
6809
6810 2017-04-12  Tom Tromey  <tom@tromey.com>
6811
6812         * symfile.h (increment_reading_symtab): Update type.
6813         * symfile.c (decrement_reading_symtab): Remove.
6814         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
6815         * psymtab.c (psymtab_to_symtab): Update.
6816         * dwarf2read.c (dw2_instantiate_symtab): Update.
6817
6818 2017-04-12  Tom Tromey  <tom@tromey.com>
6819
6820         * jit.c (struct jit_reader): Declare separately.  Add constructor
6821         and destructor.  Change type of "handle".
6822         (loaded_jit_reader): Define separately.
6823         (jit_reader_load): Update.  New "new".
6824         (jit_reader_unload_command): Use "delete".
6825         * gdb-dlfcn.h (struct dlclose_deleter): New.
6826         (gdb_dlhandle_up): New typedef.
6827         (gdb_dlopen, gdb_dlsym): Update types.
6828         (gdb_dlclose): Remove.
6829         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
6830         (gdb_dlsym): Change type of "handle".
6831         (make_cleanup_dlclose): Remove.
6832         (dlclose_deleter::operator()): Rename from gdb_dlclose.
6833         * compile/compile-c-support.c (load_libcc): Update.
6834
6835 2017-04-12  Tom Tromey  <tom@tromey.com>
6836
6837         * symtab.h (find_pcs_for_symtab_line): Change return type.
6838         * symtab.c (find_pcs_for_symtab_line): Change return type.
6839         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
6840         type of "vec".  Update.
6841         (ltpy_get_pcs_for_line): Update.
6842         * linespec.c (decode_digits_ordinary): Update.
6843
6844 2017-04-12  Tom Tromey  <tom@tromey.com>
6845
6846         * tracepoint.c (actions_command): Update.
6847         * python/python.c (python_command, python_interactive_command):
6848         Update.
6849         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6850         * guile/guile.c (guile_command): Update.
6851         * defs.h (read_command_lines, read_command_lines_1): Return
6852         command_line_up.
6853         (command_lines_deleter): New struct.
6854         (command_line_up): New typedef.
6855         * compile/compile.c (compile_code_command)
6856         (compile_print_command): Update.
6857         * cli/cli-script.h (get_command_line, copy_command_lines): Return
6858         command_line_up.
6859         (make_cleanup_free_command_lines): Remove.
6860         * cli/cli-script.c (get_command_line, read_command_lines_1)
6861         (copy_command_lines): Return command_line_up.
6862         (while_command, if_command, read_command_lines, define_command)
6863         (document_command): Update.
6864         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
6865         Remove.
6866         * breakpoint.h (breakpoint_set_commands): Change type of
6867         "commands".
6868         * breakpoint.c (breakpoint_set_commands): Change type of
6869         "commands".  Update.
6870         (do_map_commands_command, update_dprintf_command_list)
6871         (create_tracepoint_from_upload): Update.
6872
6873 2017-04-12  Tom Tromey  <tom@tromey.com>
6874
6875         * tracepoint.c (scope_info): Update.
6876         * spu-tdep.c (spu_catch_start): Update.
6877         * python/python.c (gdbpy_decode_line): Update.
6878         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
6879         * python/py-breakpoint.c (bppy_init): Update.
6880         * probe.c (parse_probes): Update.
6881         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
6882         * location.h (event_location_deleter): New struct.
6883         (event_location_up): New typedef.
6884         (new_linespec_location, new_address_location, new_probe_location)
6885         (new_explicit_location, copy_event_location)
6886         (string_to_event_location, string_to_event_location_basic)
6887         (string_to_explicit_location): Update return type.
6888         (make_cleanup_delete_event_location): Remove.
6889         * location.c (new_linespec_location, new_address_location)
6890         (new_probe_location, new_explicit_location, copy_event_location):
6891         Return event_location_up.
6892         (delete_event_location_cleanup)
6893         (make_cleanup_delete_event_location): Remove.
6894         (string_to_explicit_location, string_to_event_location_basic)
6895         (string_to_event_location): Return event_location_up.
6896         * linespec.c (canonicalize_linespec, event_location_to_sals)
6897         (decode_line_with_current_source)
6898         (decode_line_with_last_displayed, decode_objc): Update.
6899         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
6900         * completer.c (location_completer): Update.
6901         * cli/cli-cmds.c (edit_command, list_command): Update.
6902         * breakpoint.c (create_overlay_event_breakpoint)
6903         (create_longjmp_master_breakpoint)
6904         (create_std_terminate_master_breakpoint)
6905         (create_exception_master_breakpoint)
6906         (create_thread_event_breakpoint): Update.
6907         (init_breakpoint_sal): Update.  Remove some dead code.
6908         (create_breakpoint_sal): Change type of "location".  Update.
6909         (create_breakpoints_sal, create_breakpoint, break_command_1)
6910         (dprintf_command, break_range_command, until_break_command)
6911         (init_ada_exception_breakpoint)
6912         (strace_marker_create_sals_from_location)
6913         (update_static_tracepoint, trace_command, ftrace_command)
6914         (strace_command, create_tracepoint_from_upload): Update.
6915         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6916         * ax-gdb.c (agent_command_1): Update.
6917
6918 2017-04-12  Pedro Alves  <palves@redhat.com>
6919
6920         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
6921         * configure.tgt: Handle i[34567]86-*-go32* and
6922         i[34567]86-*-msdosdjgpp*.
6923         * i386-tdep.c (i386_svr4_reg_to_regnum):
6924         Make extern.
6925         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
6926         i386-go32-tdep.c.
6927         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
6928         * i386-go32-tdep.c: New file.
6929         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
6930         declarations.
6931
6932 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
6933
6934         * aix-thread.c (pd_status2str): Change return type to const char *.
6935
6936 2017-04-12  Pedro Alves  <palves@redhat.com>
6937
6938         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
6939         calls to set_gdbarch_gnu_triplet_regexp.
6940
6941 2017-04-12  Pedro Alves  <palves@redhat.com>
6942
6943         PR gdb/21323
6944         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
6945         New enum value.
6946         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
6947         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
6948         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
6949         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
6950         * gdbarch.h, gdbarch.c: Regenerate.
6951         * aarch64-tdep.c (aarch64_gdbarch_init): Override
6952         gdbarch_wchar_bit and gdbarch_wchar_signed.
6953         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
6954         * arm-tdep.c (arm_gdbarch_init): Likewise.
6955         * avr-tdep.c (avr_gdbarch_init): Likewise.
6956         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
6957         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
6958         * i386-tdep.c (i386_go32_init_abi): Likewise.
6959         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6960         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6961         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6962         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
6963         * sh-tdep.c (sh_gdbarch_init): Likewise.
6964         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6965         * sparc64-tdep.c (sparc64_init_abi): Likewise.
6966         * windows-tdep.c (windows_init_abi): Likewise.
6967         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6968
6969 2017-04-12  Pedro Alves  <palves@redhat.com>
6970
6971         PR c++/21323
6972         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
6973         cplus_primitive_type_char32_t>: New enum values.
6974         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
6975         and cplus_primitive_type_char32_t.
6976         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
6977         32, use the archtecture's built-in type for char16_t and char32_t,
6978         respectively.  Otherwise, fallback to init_integer_type as before,
6979         but make the type unsigned, and issue a complaint.
6980         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
6981
6982 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
6983
6984         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
6985         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
6986
6987 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
6988
6989         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
6990         'const char *'.
6991
6992 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
6993
6994         * common/common-utils.c (free_vector_argv): New function.
6995         * common/common-utils.h: Include <vector>.
6996         (free_vector_argv): New prototype.
6997         * darwin-nat.c (darwin_create_inferior): Rewrite function
6998         prototype in order to constify "exec_file" and accept a
6999         "std::string" for "allargs".
7000         * fork-child.c: Include <vector>.
7001         (breakup_args): Rewrite function, using C++.
7002         (fork_inferior): Rewrite function header, constify "exec_file_arg"
7003         and accept "std::string" for "allargs".  Update the code to
7004         calculate "argv" based on "allargs".  Update calls to "exec_fun"
7005         and "execvp".
7006         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
7007         order to constify "exec_file" and accept a "std::string" for
7008         "allargs".
7009         * go32-nat.c (go32_create_inferior): Likewise.
7010         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
7011         * infcmd.c (run_command_1): Constify "exec_file".  Use
7012         "std::string" for inferior arguments.
7013         * inferior.h (fork_inferior): Update prototype.
7014         * linux-nat.c (linux_nat_create_inferior): Rewrite function
7015         prototype in order to constify "exec_file" and accept a
7016         "std::string" for "allargs".
7017         * nto-procfs.c (procfs_create_inferior): Likewise.
7018         * procfs.c (procfs_create_inferior): Likewise.
7019         * remote-sim.c (gdbsim_create_inferior): Likewise.
7020         * remote.c (extended_remote_run): Update code to accept
7021         "std::string" as argument.
7022         (extended_remote_create_inferior): Rewrite function prototype in
7023         order to constify "exec_file" and accept a "std::string" for
7024         "allargs".
7025         * rs6000-nat.c (super_create_inferior): Likewise.
7026         (rs6000_create_inferior): Likewise.
7027         * target.h (struct target_ops) <to_create_inferior>: Likewise.
7028         * windows-nat.c (windows_create_inferior): Likewise.
7029
7030 2017-04-11  Pedro Alves  <palves@redhat.com>
7031
7032         * thread.c: Fix whitespace throughout.
7033
7034 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
7035
7036         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
7037
7038 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
7039
7040         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
7041
7042 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
7043
7044         PR gdb/21364
7045         * osdata.c (info_osdata): Check if 'type' is an empty string
7046         instead of NULL.
7047
7048 2017-04-10  Pedro Alves  <palves@redhat.com>
7049
7050         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
7051         (ptid_to_global_thread_id, in_thread_list)
7052         (do_captured_list_thread_ids, set_resumed, set_running)
7053         (set_executing, set_stop_requested, finish_thread_state)
7054         (validate_registers_access, can_access_registers_ptid)
7055         (print_thread_info_1, switch_to_thread)
7056         (do_restore_current_thread_cleanup)
7057         (make_cleanup_restore_current_thread, thread_command)
7058         (thread_name_command): Use operator== instead of ptid_equal.
7059
7060 2017-04-10  Pedro Alves  <palves@redhat.com>
7061
7062         * thread.c (struct current_thread_cleanup) <next>: Delete field.
7063         (current_thread_cleanup_chain): Delete.
7064         (restore_current_thread_cleanup_dtor)
7065         (make_cleanup_restore_current_thread): Remove references to
7066         current_thread_cleanup_chain.
7067
7068 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
7069
7070         * msp430-tdep.c (msp430_pseudo_register_read): Never return
7071         REG_UNKNOWN.
7072
7073 2017-04-10  Yao Qi  <yao.qi@linaro.org>
7074
7075         PR gdb/19942
7076         * gdbthread.h (thread_info::deletable): New method.
7077         (thread_info::incref): New method.
7078         (thread_info::decref): New method.
7079         (thread_info::refcount): Move it to private.
7080         * infrun.c (save_stop_context): Call inc_refcount.
7081         (release_stop_context_cleanup): Likewise.
7082         * thread.c (set_thread_exited): New function.
7083         (init_thread_list): Delete "tp" only it is deletable, otherwise
7084         call set_thread_exited.
7085         (delete_thread_1): Call set_thread_exited.
7086         (current_thread_cleanup) <inferior_pid>: Remove.
7087         <thread>: New field.
7088         (restore_current_thread_ptid_changed): Removed.
7089         (do_restore_current_thread_cleanup): Adjust.
7090         (restore_current_thread_cleanup_dtor): Don't call
7091         find_thread_ptid.
7092         (set_thread_refcount): Use dec_refcount.
7093         (make_cleanup_restore_current_thread): Adjust.
7094         (thread_apply_all_command): Call inc_refcount.
7095         (_initialize_thread): Don't call
7096         observer_attach_thread_ptid_changed.
7097
7098 2017-04-10  Yao Qi  <yao.qi@linaro.org>
7099
7100         * thread.c (delete_thread_1): Hoist code on marking thread as
7101         exited.
7102
7103 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7104
7105         * windows-nat.c (windows_detach): Initialize ptid with
7106         minus_one_ptid.
7107
7108 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7109
7110         * unittests/ptid-selftests.c: Fix erroneous assert messages.
7111
7112 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
7113
7114         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
7115         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
7116         (bfin_pseudo_register_write): Likewise
7117
7118 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
7119
7120         * common/ptid.h (struct ptid): Change to...
7121         (class ptid_t): ... this.
7122         <ptid_t>: New constructors.
7123         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
7124         matches>: New methods.
7125         <make_null, make_minus_one>: New static methods.
7126         <pid>: Rename to...
7127         <m_pid>: ...this.
7128         <lwp>: Rename to...
7129         <m_lwp>: ...this.
7130         <tid>: Rename to...
7131         <m_tid>: ...this.
7132         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
7133         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
7134         as references, move comment to class ptid_t.
7135         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
7136         ptid_t static methods.
7137         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
7138         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
7139         Take ptid arguments as references, implement using ptid_t methods.
7140         * unittests/ptid-selftests.c: New file.
7141         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7142         unittests/ptid-selftests.c.
7143         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
7144
7145 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7146
7147         * python/python.c (python_run_simple_file): Cast mode literal to
7148         non-const char pointer as expected by PyFile_FromString.
7149
7150 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
7151
7152         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
7153         minus_one_ptid and null_ptid.
7154
7155 2017-04-05  Pedro Alves  <palves@redhat.com>
7156
7157         * warning.m4 (build_warnings): Remove -Wno-write-strings.
7158         * configure: Regenerate.
7159
7160 2017-04-05  Pedro Alves  <palves@redhat.com>
7161
7162         * ada-exp.y (yyerror): Constify.
7163         * ada-lang.c (bound_name, get_selections)
7164         (ada_variant_discrim_type)
7165         (ada_variant_discrim_name, ada_value_struct_elt)
7166         (ada_lookup_struct_elt_type, is_unchecked_variant)
7167         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
7168         (catch_ada_exception_command_split)
7169         (catch_ada_assert_command_split, catch_assert_command)
7170         (ada_op_name): Constify.
7171         * ada-lang.h (ada_yyerror, get_selections)
7172         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
7173         * arc-tdep.c (arc_print_frame_cache): Constify.
7174         * arm-tdep.c (arm_skip_stub): Constify.
7175         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
7176         (gen_aggregate_elt_ref): Constify.
7177         * bcache.c (print_bcache_statistics): Constify.
7178         * bcache.h (print_bcache_statistics): Constify.
7179         * break-catch-throw.c (catch_exception_command_1):
7180         * breakpoint.c (struct ep_type_description::description):
7181         Constify.
7182         (add_solib_catchpoint): Constify.
7183         (catch_fork_command_1): Add cast.
7184         (add_catch_command): Constify.
7185         * breakpoint.h (add_catch_command, add_solib_catchpoint):
7186         Constify.
7187         * bsd-uthread.c (bsd_uthread_state): Constify.
7188         * buildsym.c (patch_subfile_names): Constify.
7189         * buildsym.h (next_symbol_text_func, patch_subfile_names):
7190         Constify.
7191         * c-exp.y (yyerror): Constify.
7192         (token::oper): Constify.
7193         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
7194         * c-varobj.c (cplus_describe_child): Constify.
7195         * charset.c (find_charset_names): Add cast.
7196         (find_charset_names): Constify array and add const_cast.
7197         * cli/cli-cmds.c (complete_command, cd_command): Constify.
7198         (edit_command): Constify.
7199         * cli/cli-decode.c (lookup_cmd): Constify.
7200         * cli/cli-dump.c (dump_memory_command, dump_value_command):
7201         Constify.
7202         (struct dump_context): Constify.
7203         (add_dump_command, restore_command): Constify.
7204         * cli/cli-script.c (get_command_line): Constify.
7205         * cli/cli-script.h (get_command_line): Constify.
7206         * cli/cli-utils.c (check_for_argument): Constify.
7207         * cli/cli-utils.h (check_for_argument): Constify.
7208         * coff-pe-read.c (struct read_pe_section_data): Constify.
7209         * command.h (lookup_cmd): Constify.
7210         * common/print-utils.c (decimal2str): Constify.
7211         * completer.c (gdb_print_filename): Constify.
7212         * corefile.c (set_gnutarget): Constify.
7213         * cp-name-parser.y (yyerror): Constify.
7214         * cp-valprint.c (cp_print_class_member): Constify.
7215         * cris-tdep.c (cris_register_name, crisv32_register_name):
7216         Constify.
7217         * d-exp.y (yyerror): Constify.
7218         (struct token::oper): Constify.
7219         * d-lang.h (d_yyerror): Constify.
7220         * dbxread.c (struct header_file_location::name): Constify.
7221         (add_old_header_file, add_new_header_file, last_function_name)
7222         (dbx_next_symbol_text, add_bincl_to_list)
7223         (find_corresponding_bincl_psymtab, set_namestring)
7224         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
7225         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
7226         * defs.h (command_line_input, print_address_symbolic)
7227         (deprecated_readline_begin_hook): Constify.
7228         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
7229         Constify.
7230         * event-top.c (handle_line_of_input): Constify and add cast.
7231         * exceptions.c (catch_errors): Constify.
7232         * exceptions.h (catch_errors): Constify.
7233         * expprint.c (print_subexp_standard, op_string, op_name)
7234         (op_name_standard, dump_raw_expression, dump_raw_expression):
7235         * expression.h (op_name, op_string, dump_raw_expression):
7236         Constify.
7237         * f-exp.y (yyerror): Constify.
7238         (struct token::oper): Constify.
7239         (struct f77_boolean_val::name): Constify.
7240         * f-lang.c (f_word_break_characters): Constify.
7241         * f-lang.h (f_yyerror): Constify.
7242         * fork-child.c (fork_inferior): Add cast.
7243         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
7244         (new_variant): Constify.
7245         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
7246         * gdbarch.c: Regenerate.
7247         * gdbcore.h (set_gnutarget): Constify.
7248         * go-exp.y (yyerror): Constify.
7249         (token::oper): Constify.
7250         * go-lang.h (go_yyerror): Constify.
7251         * go32-nat.c (go32_sysinfo): Constify.
7252         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
7253         * guile/scm-cmd.c (cmdscm_function): Constify.
7254         * guile/scm-param.c (pascm_param_value): Constify.
7255         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
7256         (h8300sx_register_name): Constify.
7257         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
7258         Constify.
7259         * ia64-tdep.c (ia64_register_names): Constify.
7260         * infcmd.c (construct_inferior_arguments): Constify.
7261         (path_command, attach_post_wait): Constify.
7262         * language.c (show_range_command, show_case_command)
7263         (unk_lang_error): Constify.
7264         * language.h (language_defn::la_error)
7265         (language_defn::la_name_of_this): Constify.
7266         * linespec.c (decode_line_2): Constify.
7267         * linux-thread-db.c (thread_db_err_str): Constify.
7268         * lm32-tdep.c (lm32_register_name): Constify.
7269         * m2-exp.y (yyerror): Constify.
7270         * m2-lang.h (m2_yyerror): Constify.
7271         * m32r-tdep.c (m32r_register_names): Constify and make static.
7272         * m68hc11-tdep.c (m68hc11_register_names): Constify.
7273         * m88k-tdep.c (m88k_register_name): Constify.
7274         * macroexp.c (appendmem): Constify.
7275         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
7276         (upgrade_type, parse_external, parse_partial_symbols)
7277         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
7278         (new_symbol): Constify.
7279         * memattr.c (mem_info_command): Constify.
7280         * mep-tdep.c (register_name_from_keyword): Constify.
7281         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
7282         Constify.
7283         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
7284         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
7285         * mi/mi-main.c (captured_mi_execute_command): Constify and add
7286         cast.
7287         (mi_execute_async_cli_command): Constify.
7288         * mips-tdep.c (mips_register_name): Constify.
7289         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
7290         (am33_register_name, am33_2_register_name)
7291         * moxie-tdep.c (moxie_register_names): Constify.
7292         * nat/linux-osdata.c (osdata_type): Constify fields.
7293         * nto-tdep.c (nto_parse_redirection): Constify.
7294         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
7295         (lookup_child_selector): Constify.
7296         (objc_methcall::name): Constify.
7297         * objc-lang.h (lookup_objc_class, lookup_child_selector)
7298         (lookup_struct_typedef): Constify.
7299         * objfiles.c (pc_in_section): Constify.
7300         * objfiles.h (pc_in_section): Constify.
7301         * p-exp.y (struct token::oper): Constify.
7302         (yyerror): Constify.
7303         * p-lang.h (pascal_yyerror): Constify.
7304         * parser-defs.h (op_name_standard): Constify.
7305         (op_print::string): Constify.
7306         (exp_descriptor::op_name): Constify.
7307         * printcmd.c (print_address_symbolic): Constify.
7308         * psymtab.c (print_partial_symbols): Constify.
7309         * python/py-breakpoint.c (stop_func): Constify.
7310         (bppy_get_expression): Constify.
7311         * python/py-cmd.c (cmdpy_completer::name): Constify.
7312         (cmdpy_function): Constify.
7313         * python/py-event.c (evpy_add_attribute)
7314         (gdbpy_initialize_event_generic): Constify.
7315         * python/py-event.h (evpy_add_attribute)
7316         (gdbpy_initialize_event_generic): Constify.
7317         * python/py-evts.c (add_new_registry): Constify.
7318         * python/py-finishbreakpoint.c (outofscope_func): Constify.
7319         * python/py-framefilter.c (get_py_iter_from_func): Constify.
7320         * python/py-inferior.c (get_buffer): Add cast.
7321         * python/py-param.c (parm_constant::name): Constify.
7322         * python/py-unwind.c (fprint_frame_id): Constify.
7323         * python/python.c (gdbpy_parameter_value): Constify.
7324         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
7325         * remote.c (memory_packet_config::name): Constify.
7326         (show_packet_config_cmd, remote_write_bytes)
7327         (remote_buffer_add_string):
7328         * reverse.c (exec_reverse_once): Constify.
7329         * rs6000-tdep.c (variant::name, variant::description): Constify.
7330         * rust-exp.y (rustyyerror): Constify.
7331         * rust-lang.c (rust_op_name): Constify.
7332         * rust-lang.h (rustyyerror): Constify.
7333         * serial.h (serial_ops::name): Constify.
7334         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
7335         (sh_sh3e_register_name, sh_sh2e_register_name)
7336         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
7337         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
7338         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
7339         (sh_sh4al_dsp_register_name): Constify.
7340         * sh64-tdep.c (sh64_register_name): Constify.
7341         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
7342         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
7343         * stabsread.c (patch_block_stabs, read_type_number)
7344         (ref_map::stabs, ref_add, process_reference)
7345         (symbol_reference_defined, define_symbol, define_symbol)
7346         (error_type, read_type, read_member_functions, read_cpp_abbrev)
7347         (read_one_struct_field, read_struct_fields, read_baseclasses)
7348         (read_tilde_fields, read_struct_type, read_array_type)
7349         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
7350         (read_huge_number, read_range_type, read_args, common_block_start)
7351         (find_name_end): Constify.
7352         * stabsread.h (common_block_start, define_symbol)
7353         (process_one_symbol, symbol_reference_defined, ref_add):
7354         * symfile.c (get_section_index, add_symbol_file_command):
7355         * symfile.h (get_section_index): Constify.
7356         * target-descriptions.c (tdesc_type::name): Constify.
7357         (tdesc_free_type): Add cast.
7358         * target.c (find_default_run_target):
7359         (add_deprecated_target_alias, find_default_run_target)
7360         (target_announce_detach): Constify.
7361         (do_option): Constify.
7362         * target.h (add_deprecated_target_alias): Constify.
7363         * thread.c (print_thread_info_1): Constify.
7364         * top.c (deprecated_readline_begin_hook, command_line_input):
7365         Constify.
7366         (init_main): Add casts.
7367         * top.h (handle_line_of_input): Constify.
7368         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
7369         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
7370         (tfind_command): Rename to ...
7371         (tfind_command_1): ... this and constify.
7372         (tfind_command): New function.
7373         (tfind_end_command, tfind_start_command): Adjust.
7374         (encode_source_string): Constify.
7375         * tracepoint.h (encode_source_string): Constify.
7376         * tui/tui-data.c (tui_partial_win_by_name): Constify.
7377         * tui/tui-data.h (tui_partial_win_by_name): Constify.
7378         * tui/tui-source.c (tui_set_source_content_nil): Constify.
7379         * tui/tui-source.h (tui_set_source_content_nil): Constify.
7380         * tui/tui-win.c (parse_scrolling_args): Constify.
7381         * tui/tui-windata.c (tui_erase_data_content): Constify.
7382         * tui/tui-windata.h (tui_erase_data_content): Constify.
7383         * tui/tui-winsource.c (tui_erase_source_content): Constify.
7384         * tui/tui.c (tui_enable): Add cast.
7385         * utils.c (defaulted_query): Constify.
7386         (init_page_info): Add cast.
7387         (puts_debug, subset_compare): Constify.
7388         * utils.h (subset_compare): Constify.
7389         * varobj.c (varobj_format_string): Constify.
7390         * varobj.h (varobj_format_string): Constify.
7391         * vax-tdep.c (vax_register_name): Constify.
7392         * windows-nat.c (windows_detach): Constify.
7393         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
7394         * xml-support.c (gdb_xml_end_element): Constify.
7395         * xml-tdesc.c (tdesc_start_reg): Constify.
7396         * xstormy16-tdep.c (xstormy16_register_name): Constify.
7397         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
7398         * xtensa-tdep.h (xtensa_register_t::name): Constify.
7399
7400 2017-04-05  Pedro Alves  <palves@redhat.com>
7401
7402         * proc-api.c (struct trans): Constify.
7403         (procfs_note): Constify.
7404         * proc-events.c (struct trans, syscall_table):
7405         * proc-flags.c (struct trans): Constify.
7406         * proc-utils.h (procfs_note): Constify.
7407         * proc-why.c (struct trans): Constify.
7408         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
7409         (procfs_detach): Constify.
7410         * sol-thread.c (struct string_map): Constify.
7411         (td_err_string, td_state_string): Constify.
7412
7413 2017-04-05  Pedro Alves  <palves@redhat.com>
7414
7415         * proc-api.c (procfs_filename): Don't initialize
7416         procfs_filename.
7417         (prepare_to_trace): Assume procfs_filename is non-NULL.
7418         (_initialize_proc_api): Give procfs_filename a default value here.
7419
7420 2017-04-05  Pedro Alves  <palves@redhat.com>
7421
7422         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
7423         'cond_string' parameter.
7424         (extract_exception_regexp): Constify 'string' parameter.
7425         (catch_exception_command_1): Constify.
7426         * breakpoint.c (init_catchpoint)
7427         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
7428         parameter.
7429         (ep_parse_optional_if_clause, catch_fork_command_1)
7430         (catch_exec_command_1): Constify.
7431         * breakpoint.h (init_catchpoint): Constify 'cond_string'
7432         parameter.
7433         (ep_parse_optional_if_clause): Constify.
7434         * cli/cli-utils.c (remove_trailing_whitespace)
7435         (check_for_argument): Constify.
7436         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
7437         non-const overload.
7438         (check_for_argument): Likewise.
7439
7440 2017-04-05  Pedro Alves  <palves@redhat.com>
7441
7442         * event-top.c (command_line_handler): Add cast to execute_command
7443         call.
7444         * record-btrace.c (cmd_record_btrace_bts_start)
7445         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
7446         (cmd_record_btrace_start): Add cast to execute_command call.
7447         * record-full.c (record_full_goto_insn):
7448         * record.c (record_start, record_stop): Add cast to
7449         execute_command_to_string calls.
7450         (cmd_record_start): Add cast to execute_command calls.
7451
7452 2017-04-05  Pedro Alves  <palves@redhat.com>
7453
7454         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
7455         static inline function.
7456         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
7457         array and use gdb_PyArg_ParseTupleAndKeywords.
7458         * python/py-cmd.c (cmdpy_init): Likewise.
7459         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
7460         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
7461         (infpy_search_memory): Likewise.
7462         * python/py-objfile.c (objfpy_add_separate_debug_file)
7463         (gdbpy_lookup_objfile): Likewise.
7464         * python/py-symbol.c (gdbpy_lookup_symbol)
7465         (gdbpy_lookup_global_symbol): Likewise.
7466         * python/py-type.c (gdbpy_lookup_type): Likewise.
7467         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
7468         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
7469         Likewise.
7470
7471 2017-04-05  Pedro Alves  <palves@redhat.com>
7472
7473         * python/python-internal.h (gdb_PyGetSetDef): New type.
7474         * python/py-block.c (block_object_getset)
7475         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
7476         * python/py-event.c (event_object_getset)
7477         (finish_breakpoint_object_getset): Likewise.
7478         * python/py-inferior.c (inferior_object_getset): Likewise.
7479         * python/py-infthread.c (thread_object_getset): Likewise.
7480         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
7481         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
7482         * python/py-objfile.c (objfile_getset): Likewise.
7483         * python/py-progspace.c (pspace_getset): Likewise.
7484         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
7485         Likewise.
7486         * python/py-record.c (recpy_record_getset): Likewise.
7487         * python/py-symbol.c (symbol_object_getset): Likewise.
7488         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
7489         Likewise.
7490         * python/py-type.c (type_object_getset, field_object_getset):
7491         Likewise.
7492         * python/py-value.c (value_object_getset): Likewise.
7493
7494 2017-04-05  Pedro Alves  <palves@redhat.com>
7495
7496         * python/python-internal.h (gdb_PyObject_CallMethod)
7497         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
7498         New functions.
7499         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
7500         (PySys_GetObject, PySys_SetPath): New macros.
7501
7502 2017-04-05  Pedro Alves  <palves@redhat.com>
7503
7504         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
7505         info_osdata_command.
7506         * osdata.c (info_osdata_command): Rename to ...
7507         (info_osdata): ... this.  Constify 'type' parameter, and remove
7508         the 'from_tty' parameter.  Accept NULL TYPE.
7509         (info_osdata_command): New function.
7510         * osdata.h (info_osdata_command): Remove declaration.
7511         (info_osdata): New declaration.
7512
7513 2017-04-05  Pedro Alves  <palves@redhat.com>
7514
7515         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
7516         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
7517         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
7518         parameter.
7519         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
7520         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
7521         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
7522         parameter.
7523         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
7524         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
7525         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
7526         (mi_cmd_file_list_exec_source_files)
7527         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
7528         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7529         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
7530         parameter.
7531         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
7532         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
7533         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
7534         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
7535         (mi_cmd_stack_info_frame): Constify 'command' parameter.
7536         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
7537         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
7538         'command' parameter.
7539         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
7540         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
7541         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
7542         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
7543         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
7544         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
7545         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
7546         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
7547         (mi_cmd_var_set_update_range): Constify 'command' parameter.
7548         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
7549         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
7550         parameter.
7551         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
7552         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
7553         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
7554         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
7555         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
7556         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
7557         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
7558         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
7559         (mi_cmd_data_list_changed_registers)
7560         (mi_cmd_data_write_register_values)
7561         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
7562         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
7563         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
7564         (mi_cmd_list_features, mi_cmd_list_target_features)
7565         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
7566         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
7567         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
7568         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
7569         (mi_cmd_trace_frame_collected): Constify 'command'
7570         parameter.
7571         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
7572         'command' parameter.
7573
7574 2017-04-05  Pedro Alves  <palves@redhat.com>
7575
7576         * ada-lang.c (ada_completer_word_break_characters): Now a const
7577         array.
7578         (ada_get_gdb_completer_word_break_characters): Constify.
7579         * completer.c (gdb_completer_command_word_break_characters)
7580         (gdb_completer_file_name_break_characters)
7581         (gdb_completer_quote_characters): Now const arrays.
7582         (get_gdb_completer_quote_characters): Constify.
7583         (set_rl_completer_word_break_characters): New function.
7584         (set_gdb_completion_word_break_characters)
7585         (complete_line_internal): Use it.
7586         * completer.h (get_gdb_completer_quote_characters): Constify.
7587         (set_rl_completer_word_break_characters): Declare.
7588         * f-lang.c (f_word_break_characters): Constify.
7589         * language.c (default_word_break_characters): Constify.
7590         * language.h (language_defn::la_word_break_characters): Constify.
7591         (default_word_break_characters): Constify.
7592         * top.c (init_main): Use set_rl_completer_word_break_characters.
7593
7594 2017-04-05  Pedro Alves  <palves@redhat.com>
7595
7596         * aix-thread.c (aix_thread_pid_to_str)
7597         (aix_thread_extra_thread_info): Constify.
7598         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
7599         * bsd-uthread.c (bsd_uthread_extra_thread_info)
7600         (bsd_uthread_pid_to_str): Constify.
7601         * corelow.c (core_pid_to_str): Constify.
7602         * darwin-nat.c (darwin_pid_to_str): Constify.
7603         * fbsd-nat.c (fbsd_pid_to_str): Constify.
7604         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
7605         Constify.
7606         * gnu-nat.c (gnu_pid_to_str): Constify.
7607         * go32-nat.c (go32_pid_to_str): Constify.
7608         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
7609         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
7610         * inferior.c (inferior_pid_to_str): Constify.
7611         * linux-nat.c (linux_nat_pid_to_str): Constify.
7612         * linux-tdep.c (linux_core_pid_to_str): Constify.
7613         * linux-thread-db.c (thread_db_pid_to_str)
7614         (thread_db_extra_thread_info): Constify.
7615         * nto-tdep.c (nto_extra_thread_info): Constify.
7616         * nto-tdep.h (nto_extra_thread_info): Constify.
7617         * obsd-nat.c (obsd_pid_to_str): Constify.
7618         * procfs.c (procfs_pid_to_str): Constify.
7619         * ravenscar-thread.c (ravenscar_extra_thread_info)
7620         (ravenscar_pid_to_str): Constify.
7621         * remote-sim.c (gdbsim_pid_to_str): Constify.
7622         * remote.c (remote_threads_extra_info, remote_pid_to_str):
7623         Constify.
7624         * sol-thread.c (solaris_pid_to_str): Constify.
7625         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
7626         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
7627         * target.c (default_pid_to_str, target_pid_to_str)
7628         (normal_pid_to_str, default_pid_to_str): Constify.
7629         * target.h (target_ops::to_pid_to_str)
7630         (target_ops::to_extra_thread_info): Constify.
7631         (target_pid_to_str, normal_pid_to_str): Constify.
7632         * windows-nat.c (windows_pid_to_str): Constify.
7633         * gdbarch.sh (core_pid_to_str): Constify.
7634         * target-delegates.c: Regenerate.
7635         * gdbarch.h, gdbarch.c: Regenerate.
7636
7637 2017-04-05  Pedro Alves  <palves@redhat.com>
7638
7639         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
7640         the memory of the temporary warning_pre_print override.
7641         * utils.c (warning_pre_print): Constify.
7642         * utils.h (warning_pre_print): Constify.
7643
7644 2017-04-05  Pedro Alves  <palves@redhat.com>
7645
7646         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
7647         (shell_command): New function.
7648         (make_command): Use std::string.
7649         (init_cli_cmds): Register shell_command instead of shell_escape.
7650
7651 2017-04-05  Pedro Alves  <palves@redhat.com>
7652
7653         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
7654         * tracepoint.c (default_collect): Don't initialize.
7655
7656 2017-04-05  Pedro Alves  <palves@redhat.com>
7657
7658         * macroexp.c (macro_buffer::shared): Now a bool.
7659         (init_buffer): Update.
7660         (init_shared_buffer): Constify 'addr' parameter.
7661         (substitute_args, expand, macro_expand, macro_expand_next): Remove
7662         casts.
7663
7664 2017-04-05  Pedro Alves  <palves@redhat.com>
7665
7666         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
7667         * disasm.c (set_disassembler_options): Constify local.
7668         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
7669
7670 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
7671
7672         PR gdb/21352
7673         * tracefile.c (tsave_command): Fix argument parsing for '-r'
7674         option.
7675
7676 2017-04-05  Yao Qi  <yao.qi@linaro.org>
7677
7678         * frame.c (frame_unwind_register_unsigned): Call
7679         frame_unwind_register_value.
7680
7681 2017-04-05  Yao Qi  <yao.qi@linaro.org>
7682
7683         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
7684         Use gdb_test_multiple, and don't match anchor.
7685
7686 2017-04-05  Pedro Alves  <palves@redhat.com>
7687
7688         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
7689         (Write After Approval): Remove Simon Marchi.
7690
7691 2017-04-05  Pedro Alves  <palves@redhat.com>
7692
7693         * common/gdb_optional.h (optional::optional): Make constexpr and
7694         initialize m_dummy.
7695
7696 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
7697
7698         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
7699         (amd64fbsd_jmp_buf_reg_offset): Remove.
7700         (amd64fbsd_supply_uthread): Remove function.
7701         (amd64fbsd_collect_uthread): Remove function.
7702         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
7703         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
7704         (x86_64-*-freebsd*): Remove bsd-uthread.o.
7705         (fbsd-nat.c): Update comment.
7706         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
7707         (i386fbsd_jmp_buf_reg_offset): Remove.
7708         (i386fbsd_supply_uthread): Remove function.
7709         (i386fbsd_collect_uthread): Remove function.
7710         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
7711
7712 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
7713
7714         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
7715         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
7716         * NEWS: Mention that support for FreeBSD/alpha was removed.
7717         * alpha-fbsd-tdep.c: Delete file.
7718         * config/alpha/fbsd.mh: Delete file.
7719         * configure.host: Delete alpha*-*-freebsd* and
7720         alpha*-*-kfreebsd*-gnu.
7721         * configure.tgt: Delete alpha*-*-freebsd* and
7722         alpha*-*-kfreebsd*-gnu.
7723
7724 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
7725
7726         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
7727         amd64bsd_store_inferior_registers): Use ptid from regcache.
7728
7729 2017-04-04  Pedro Alves  <palves@redhat.com>
7730
7731         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
7732         data fields, make them private and add "m_" prefixes.
7733         (lnp_state_machine::lnp_state_machine): New ctor.
7734         (record_line, check_line_address, handle_set_discriminator)
7735         (handle_set_address, handle_advance_pc, handle_special_opcode)
7736         (handle_advance_line, handle_set_file, handle_negate_stmt)
7737         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
7738         (end_sequence, advance_line): New methods.
7739         (m_gdbarch, m_record_lines_p): New fields.
7740         (lnp_reader_state): Delete.
7741         (dwarf_record_line): Rename to ...
7742         (lnp_state_machine::record_line): ... adjust.
7743         (init_lnp_state_machine): Delete.
7744         (lnp_state_machine::lnp_state_machine): New.
7745         (check_line_address): Rename to ...
7746         (lnp_state_machine::check_line_address): This.
7747         (dwarf_decode_lines_1): Remove reference to "reader_state".
7748         Adjust lnp_state_machine having a non-default ctor.  Use bool.
7749         State machine internal state manipulation moved to
7750         lnp_state_machine methods.
7751
7752 2017-04-04  Pedro Alves  <palves@redhat.com>
7753
7754         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7755         unittests/offset-type-selftests.c.
7756         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
7757         * common/offset-type.h: New file.
7758         * common/preprocessor.h: New file.
7759         * common/traits.h: New file.
7760         * common/valid-expr.h: New file.
7761         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
7762         sect_offset and cu_offset strong typedefs throughout.
7763         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
7764         typedefs throughout.
7765         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
7766         sect_offset and cu_offset strong typedefs throughout.
7767         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
7768         typedefs throughout.
7769         * gdbtypes.h: Include "common/offset-type.h".
7770         (cu_offset): Now an offset type (strong typedef) instead of a
7771         struct.
7772         (sect_offset): Likewise.
7773         (union call_site_parameter_u): Rename "param_offset" field to
7774         "param_cu_off".
7775         * unittests/offset-type-selftests.c: New file.
7776
7777 2017-04-04  Pedro Alves  <palves@redhat.com>
7778
7779         * common/underlying.h: New file.
7780         * dwarf2read.c: Include "common/gdb_optional.h" and
7781         "common/underlying.h".
7782         (dir_index, file_name_index): New types.
7783         (file_entry): Use them.
7784         (file_entry::include): Use to_underlying.
7785         (line_header::add_file_name): Use dir_index.
7786         (read_formatted_entries): Use gdb::optional.  Read form before
7787         writting to file_entry.
7788         (dwarf_decode_line_header): Use dir_index.
7789         (lnp_state_machine::current_file): Use to_underlying.
7790         (lnp_state_machine::file): Change type to file_name_index.
7791         (dwarf_record_line): Use to_underlying.
7792         (init_lnp_state_machine): Use file_name_index.
7793         (dwarf_decode_lines_1): Use dir_index and file_name_index.
7794
7795 2017-04-04  Pedro Alves  <palves@redhat.com>
7796
7797         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
7798         operator bool, has_value and get methods.
7799
7800 2017-04-04  Pedro Alves  <palves@redhat.com>
7801
7802         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
7803         fields.
7804         (line_header): Initialize all data fields.  Change type of
7805         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
7806         Change type of include_dirs to std::vector<const char *>.  Remove
7807         num_include_dirs, include_dirs_size.  Change type of file_names to
7808         std::vector<file_entry>.  Remove num_file_names, file_names_size.
7809         (line_header::line_header): New.
7810         (line_header::add_include_dir, line_header::add_file_name): New
7811         methods.
7812         (line_header::include_dir_at): Remove NULL check.
7813         (line_header::file_name_at): Add const overload.
7814         (line_header_up): New unique_ptr typedef.
7815         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
7816         std::vector.  Remove free_line_header call.
7817         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
7818         free_line_header call.
7819         (free_cu_line_header): Delete.
7820         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
7821         (setup_type_unit_groups): Use line_header_up instead of cleanups.
7822         Adjust to use std::vector.
7823         (free_line_header): Delete.
7824         (free_line_header_voidp): Use delete.
7825         (add_include_dir): Replace with ...
7826         (line_header::add_include_dir): ... this method.  Use std::vector.
7827         (add_file_name): Replace with ...
7828         (line_header::add_file_name): ... this method.  Use std::vector.
7829         (add_include_dir_stub): Delete.
7830         (read_formatted_entries): Remove memset.
7831         (dwarf_decode_line_header): Return a line_header_up instead of a
7832         raw pointer.  Remove cleanup handling.  Pass lambdas to
7833         read_formatted_entries.  Adjust to use line_header methods.
7834         (dwarf_decode_lines_1): Adjust to use line_header methods.
7835         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
7836         use std::vector.
7837
7838 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
7839
7840         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
7841         instead of struct ptid.
7842
7843 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
7844
7845         * frame.c (get_frame_register_bytes): Unwind using value.
7846         (put_frame_register_bytes): Likewise.
7847
7848 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
7849
7850         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
7851         aggregate-like.
7852
7853 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
7854
7855         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
7856
7857 2017-03-29  Yao Qi  <yao.qi@linaro.org>
7858
7859         * gdbthread.h (struct thread_info): Declare constructor and
7860         destructor.  Add some in-class member initializers.
7861         * thread.c (free_thread): Remove.
7862         (init_thread_list): Call delete instead of free_thread.
7863         (new_thread): Call thread_info constructor.
7864         (thread_info::thread_info): New function.
7865         (thread_info::~thread_info): New function.
7866         (delete_thread_1): Call delete instead of free_thread.
7867         (make_cleanup_restore_current_thread): Move tp and frame to
7868         inner block.
7869
7870 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
7871
7872         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
7873         (arc_skip_prologue): Likewise.
7874         (arc_make_frame_cache): Likewise.
7875         (arc_pv_get_operand): New function.
7876         (arc_is_in_prologue): Likewise.
7877         (arc_analyze_prologue): Likewise.
7878         (arc_print_frame_cache): Likewise.
7879         (MAX_PROLOGUE_LENGTH): New constant.
7880
7881 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
7882
7883         * configure.tgt: Add arc-insn.o.
7884         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
7885         (dump_arc_instruction_command): New function.
7886         (arc_fprintf_disasm): Likewise.
7887         (arc_disassemble_info): Likewise.
7888         (arc_insn_get_operand_value): Likewise.
7889         (arc_insn_get_operand_value_signed): Likewise.
7890         (arc_insn_get_memory_base_reg): Likewise.
7891         (arc_insn_get_memory_offset): Likewise.
7892         (arc_insn_get_branch_target): Likewise.
7893         (arc_insn_dump): Likewise.
7894         (arc_insn_get_linear_next_pc): Likewise.
7895         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
7896         (arc_disassemble_info): Likewise.
7897         (arc_insn_get_branch_target): Likewise.
7898         (arc_insn_get_linear_next_pc): Likewise.
7899         * NEWS: Mention new "maint print arc arc-instruction".
7900
7901 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
7902
7903         * arc-tdep (maintenance_print_arc_list): New variable.
7904         (maintenance_print_arc_command): New function.
7905
7906 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
7907
7908         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
7909         Add "limm" and "reserved".
7910         (arc_cannot_fetch_register, arc_cannot_store_register): Add
7911         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
7912         * arc-tdep.h (arc_regnum): Likewise.
7913
7914 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
7915
7916         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
7917         for THREADPTR register.
7918         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
7919         register.
7920         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
7921         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
7922         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
7923
7924 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
7925
7926         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
7927         registers above gdbarch_num_regs (gdbarch) as privileged in
7928         call0 ABI.
7929
7930 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
7931
7932         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
7933         for a single specified register or for all registers in
7934         a0_base..a0_base + C0_NREGS range.
7935         (supply_gregset_reg): Call regcache_raw_supply for a single
7936         specified register or for all registers in a0_base..a0_base +
7937         C0_NREGS range.
7938
7939 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
7940
7941         * arch/xtensa.h (C0_NREGS): Add definition.
7942         * xtensa-tdep.c (C0_NREGS): Remove definition.
7943
7944 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
7945
7946         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
7947         Drop xtensa_default_isa initialization.
7948         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
7949
7950 2017-03-27  Pedro Alves  <palves@redhat.com>
7951
7952         * dwarf2read.c (file_entry) <dir_index>: Add comment.
7953         (file_entry::include_dir): New method.
7954         (line_header::include_dir_at, line_header::file_name_at): New
7955         methods.
7956         (setup_type_unit_groups, setup_type_unit_groups)
7957         (psymtab_include_file_name): Simplify using the new methods.
7958         (lnp_state_machine) <the_line_header>: New field.
7959         <file>: Add comment.
7960         (lnp_state_machine::current_file): New method.
7961         (dwarf_record_line): Simplify using the new methods.
7962         (init_lnp_state_machine): Initialize the "the_line_header" field.
7963         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
7964         Simplify using the new methods.
7965
7966 2017-03-27  Pedro Alves  <palves@redhat.com>
7967
7968         * cp-name-parser.y (make_empty): Delete.
7969         (demangler_special, nested_name, ptr_operator, array_indicator)
7970         (direct_declarator, declarator_1): Use fill_comp instead of
7971         make_empty.
7972
7973 2017-03-27  Pedro Alves  <palves@redhat.com>
7974
7975         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
7976         to ATTRIBUTE_PRINTF.
7977         * solib-target.c (library_list_start_list): Print "string" not
7978         "version".
7979         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
7980         gdb_xml_error call.
7981
7982 2017-03-27  Pedro Alves  <palves@redhat.com>
7983
7984         * dwarf2read.c (struct file_and_directory): New.
7985         (dwarf2_get_dwz_file): Adjust to use std::string.
7986         (dw2_get_file_names_reader): Adjust to use file_and_directory.
7987         (find_file_and_directory): Adjust to return a file_and_directory
7988         object.
7989         (read_file_scope): Adjust to use file_and_directory.  Remove
7990         make_cleanup/do_cleanups calls.
7991         (open_and_init_dwp_file): Adjust to use std::string.  Remove
7992         make_cleanup/do_cleanups calls.
7993         * python/python.c (do_start_initialization): Adjust to ldirname
7994         returning a std::string.
7995         * utils.c (ldirname): Now returns a std::string.
7996         * utils.h (ldirname): Change return type to std::string.
7997         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
7998         returning a std::string.
7999         * xml-tdesc.c (file_read_description_xml): Likewise.
8000
8001 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
8002
8003         * regcache.c (regcache_debug_print_register): New function.
8004         * regcache.h (regcache_debug_print_register): New declaration.
8005         * target.c (debug_print_register): Remove.
8006         (target_fetch_registers): Call regcache_debug_print_register.
8007         (target_store_registers): Likewise.
8008
8009 2017-03-24  Pádraig Brady  <pbrady@fb.com>
8010
8011         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
8012         reference beyond the 'lh->include_dirs' array before accessing to
8013         it.
8014         (psymtab_include_file_name): Likewise.
8015         (dwarf_decode_lines_1): Likewise.
8016         (dwarf_decode_lines): Likewise.
8017         (file_file_name): Likewise.
8018
8019 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
8020
8021         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
8022         inferior_ptid.
8023         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8024         ps_lsetfpregs): Likewise.
8025         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
8026         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8027         ps_lsetfpregs): Likewise.
8028         * target.c (target_fetch_registers, target_store_registers):
8029         Remove asserts.
8030
8031 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
8032
8033         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
8034
8035 2017-03-23  Yao Qi  <yao.qi@linaro.org>
8036
8037         * aarch64-tdep.c (aarch64_process_record_test): Declare.
8038         (_initialize_aarch64_tdep): Register it.
8039         (aarch64_record_load_store): Handle PRFM instruction.
8040         (aarch64_process_record_test): New function.
8041
8042 2017-03-23  Yao Qi  <yao.qi@linaro.org>
8043
8044         * aarch64-tdep.c (aarch64_record_load_store): Fix code
8045         indentation.
8046
8047 2017-03-23  Yao Qi  <yao.qi@linaro.org>
8048
8049         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
8050
8051 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
8052
8053         python/python.c (do_start_initialization): Fix memory leak.
8054
8055 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
8056
8057         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
8058         using get_ptrace_pid.
8059         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
8060         inferior_ptid.
8061         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
8062         inferior_ptid instead of pid.
8063
8064 2017-03-22  Yao Qi  <yao.qi@linaro.org>
8065
8066         * aarch64-tdep.c: Wrap locally used classes in anonymous
8067         namespace.
8068         * arm-tdep.c: Likewise.
8069         * linespec.c: Likewise.
8070         * ui-out.c: Likewise.
8071
8072 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
8073
8074         PR gdb/19637
8075         * python/lib/gdb/printer/bound_registers.py: Import sys.
8076
8077 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
8078
8079         * windows-nat.c (do_windows_fetch_inferior_registers): Add
8080         windows_thread_info parameter and use it instead of
8081         current_thread.
8082         (windows_fetch_inferior_registers): Don't set current_thread,
8083         pass the thread to do_windows_fetch_inferior_registers.  Use
8084         ptid from regcache instead of inferior_ptid.
8085         (do_windows_store_inferior_registers): Add windows_thread_info
8086         parameter and use it instead of current_thread.
8087         (windows_store_inferior_registers): Don't set current_thread,
8088         pass the thread to do_windows_store_inferior_registers.  Use
8089         ptid from regcache instead of inferior_ptid.
8090
8091 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
8092
8093         * ser-mingw.c (ser_windows_raw): Remove reference to
8094         struct serial::current_timeout.
8095
8096 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
8097
8098         PR tdep/20928
8099         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
8100         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
8101         (sparc64_fsr_type): Fix %fsr decoding.
8102
8103 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
8104
8105         * python/py-record-btrace.c (btpy_insn_data): Change return type
8106         for Python 2.
8107
8108 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
8109
8110         * spu-linux-nat.c (spu_fetch_inferior_registers,
8111         spu_store_inferior_registers): Use ptid from regcache, set and
8112         restore inferior_ptid.
8113         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
8114         Likewise.
8115
8116 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
8117
8118         * i386-linux-nat.c (fetch_register, store_register,
8119         i386_linux_fetch_inferior_registers,
8120         i386_linux_store_inferior_registers): Use ptid from regcache.
8121         * ia64-linux-nat.c (ia64_linux_fetch_register,
8122         ia64_linux_store_register): Likewise.
8123         * inf-ptrace.c (inf_ptrace_fetch_register,
8124         inf_ptrace_store_register): Likewise.
8125         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
8126         m32r_linux_store_inferior_registers): Likewise.
8127         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
8128         m68kbsd_store_inferior_registers): Likewise.
8129         * m68k-linux-nat.c (fetch_register, store_register,
8130         m68k_linux_fetch_inferior_registers,
8131         m68k_linux_store_inferior_registers): Likewise.
8132         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
8133         m88kbsd_store_inferior_registers): Likewise.
8134         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
8135         mips_fbsd_store_inferior_registers): Likewise.
8136         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
8137         mips64_linux_regsets_store_registers): Likewise.
8138         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
8139         mipsnbsd_store_inferior_registers): Likewise.
8140         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
8141         mips64obsd_store_inferior_registers): Likewise.
8142         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
8143         Likewise.
8144         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
8145         ppcfbsd_store_inferior_registers): Likewise.
8146         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
8147         ppc_linux_store_inferior_registers): Likewise.
8148         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
8149         ppcnbsd_store_inferior_registers): Likewise.
8150         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
8151         ppcobsd_store_registers): Likewise.
8152         * procfs.c (procfs_fetch_registers, procfs_store_registers):
8153         Likewise.
8154         * ravenscar-thread.c (ravenscar_fetch_registers,
8155         ravenscar_store_registers, ravenscar_prepare_to_store):
8156         Likewise.
8157         * record-btrace.c (record_btrace_fetch_registers,
8158         record_btrace_store_registers, record_btrace_prepare_to_store):
8159         Likewise.
8160         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
8161         Lookup inferior using ptid from regcache, instead of
8162         current_inferior.
8163         * remote.c (remote_fetch_registers, remote_store_registers): Use
8164         ptid from regcache.
8165         * rs6000-nat.c (fetch_register, store_register): Likewise.
8166         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
8167         s390_linux_store_inferior_registers): Likewise.
8168         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
8169         shnbsd_store_inferior_registers): Likewise.
8170         * sol-thread.c (sol_thread_fetch_registers,
8171         sol_thread_store_registers): Likewise.
8172         * sparc-nat.c (sparc_fetch_inferior_registers,
8173         sparc_store_inferior_registers): Likewise.
8174         * tilegx-linux-nat.c (fetch_inferior_registers,
8175         store_inferior_registers): Likewise.
8176         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
8177         vaxbsd_store_inferior_registers): Likewise.
8178         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
8179         store_xtregs): Likewise.
8180
8181 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8182
8183         PR gdb/14441
8184         * NEWS: Mention support for rvalue references in GDB and python.
8185         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
8186         supports both lvalue and rvalue references.
8187
8188 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8189
8190         PR gdb/14441
8191         * gdbtypes.c (rank_one_type): Implement overloading
8192         resolution rules regarding rvalue references.
8193
8194 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8195
8196         PR gdb/14441
8197         * aarch64-tdep.c (aarch64_type_align)
8198         (aarch64_extract_return_value, aarch64_store_return_value): Change
8199         lvalue reference type checks to general reference type checks.
8200         * amd64-tdep.c (amd64_classify): Likewise.
8201         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
8202         Likewise.
8203         * arm-tdep.c (arm_type_align, arm_extract_return_value)
8204         (arm_store_return_value): Likewise.
8205         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
8206         * c-typeprint.c (c_print_type): Likewise.
8207         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
8208         (cplus_number_of_children, cplus_describe_child): Likewise.
8209         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
8210         * completer.c (expression_completer): Likewise.
8211         * cp-support.c (make_symbol_overload_list_adl_namespace):
8212         Likewise.
8213         * darwin-nat-info.c (info_mach_region_command): Likewise.
8214         * dwarf2loc.c (entry_data_value_coerce_ref)
8215         (value_of_dwarf_reg_entry): Likewise.
8216         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
8217         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
8218         Likewise.
8219         * findvar.c (extract_typed_address, store_typed_address):
8220         Likewise.
8221         * gdbtypes.c (rank_one_type): Likewise.
8222         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
8223         * infcall.c (value_arg_coerce): Likewise.
8224         * language.c (pointer_type): Likewise.
8225         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
8226         Likewise.
8227         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
8228         * mn10300-tdep.c (mn10300_type_align): Likewise.
8229         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
8230         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
8231         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
8232         Likewise.
8233         * printcmd.c (print_formatted, x_command): Likewise.
8234         * python/py-type.c (typy_get_composite, typy_template_argument):
8235         Likewise.
8236         * python/py-value.c (valpy_referenced_value)
8237         (valpy_get_dynamic_type, value_has_field): Likewise.
8238         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
8239         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
8240         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
8241         * spu-tdep.c (spu_scalar_value_p): Likewise.
8242         * symtab.c (lookup_symbol_aux): Likewise.
8243         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
8244         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
8245         Likewise.
8246         * valops.c (value_cast_pointers, value_cast)
8247         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
8248         (value_struct_elt, value_struct_elt_bitpos)
8249         (value_find_oload_method_list, find_overload_match)
8250         (value_rtti_indirect_type): Likewise.
8251         * valprint.c (val_print_scalar_type_p, generic_val_print):
8252         Likewise.
8253         * value.c (value_actual_type, value_as_address, unpack_long)
8254         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
8255         (coerce_ref): Likewise.
8256         * varobj.c (varobj_get_value_type): Likewise.
8257
8258 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8259
8260         PR gdb/14441
8261         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
8262         table of constants.
8263         * python/lib/gdb/command/explore.py: Support exploring values
8264         of rvalue reference types.
8265         * python/lib/gdb/types.py: Implement get_basic_type() for
8266         rvalue reference types.
8267         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
8268         constant.
8269         * python/py-value.c (valpy_getitem): Add an rvalue reference
8270         check.
8271         (valpy_reference_value): Add new parameter "refcode".
8272         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
8273         New wrappers for valpy_reference_value().
8274         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
8275         (gdbpy_invoke_xmethod): Likewise.
8276
8277 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8278
8279         PR gdb/14441
8280         * dwarf2read.c (process_die, read_type_die_1): Handle the
8281         DW_TAG_rvalue_reference_type DIE.
8282         (read_tag_reference_type): Add new parameter "refcode".
8283
8284 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8285
8286         PR gdb/14441
8287         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
8288         (c_type_print_modifier, c_type_print_varspec_suffix)
8289         (c_type_print_base): Support printing rvalue reference types.
8290         * c-valprint.c (c_val_print, c_value_print): Support printing
8291         rvalue reference values.
8292
8293 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8294
8295         PR gdb/14441
8296         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
8297         typename.
8298         * cp-support.c (replace_typedefs): Handle
8299         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
8300         * python/py-type.c (typy_lookup_type): Likewise.
8301
8302 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8303
8304         PR gdb/14441
8305         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
8306         * parse.c (insert_type): Change assert statement.
8307         (follow_types): Handle rvalue reference types.
8308         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
8309         constant.
8310
8311 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8312
8313         PR gdb/14441
8314         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
8315         value_ref() interface.
8316         * c-valprint.c (c_value_print): Likewise.
8317         * infcall.c (value_arg_coerce): Likewise.
8318         * python/py-value.c (valpy_reference_value): Likewise.
8319         * valops.c (value_cast, value_reinterpret_cast)
8320         (value_dynamic_cast, typecmp): Likewise.
8321         (value_ref): Parameterize by kind of return value reference type.
8322         * value.h (value_ref): Add new parameter "refcode".
8323
8324 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8325
8326         PR gdb/14441
8327         * dwarf2read.c (read_tag_reference_type): Use
8328         lookup_lvalue_reference_type() instead of lookup_reference_type().
8329         * eval.c (evaluate_subexp_standard): Likewise.
8330         * f-exp.y: Likewise.
8331         * gdbtypes.c (make_reference_type, lookup_reference_type):
8332         Generalize with rvalue reference types.
8333         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
8334         convenience wrappers for lookup_reference_type().
8335         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
8336         reference kind parameter.
8337         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
8338         wrappers for lookup_reference_type().
8339         * guile/scm-type.c (gdbscm_type_reference): Use
8340         lookup_lvalue_reference_type() instead of lookup_reference_type().
8341         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
8342         * parse.c (follow_types): Likewise.
8343         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
8344         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
8345         Likewise.
8346         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
8347         (gdbpy_invoke_xmethod): Likewise.
8348         * stabsread.c: Provide extra argument to make_reference_type()
8349         call.
8350         * valops.c (value_ref, value_rtti_indirect_type): Use
8351         lookup_lvalue_reference_type() instead of lookup_reference_type().
8352
8353 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8354
8355         PR gdb/14441
8356         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
8357         (TYPE_IS_REFERENCE): New macro.
8358         (struct type): Add rvalue_reference_type field.
8359         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
8360
8361 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
8362
8363         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
8364         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
8365         New function definition.
8366         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
8367         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
8368         New function declaration.
8369         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
8370         * mi/mi-interp.h: New file.
8371         * solib.c (info_sharedlibrary_command): Replace for loop with
8372         ALL_SO_LIBS macro
8373         * solib.h (update_solib_list): New function declaration.
8374         (so_list_head): Move macro.
8375         * solist.h (ALL_SO_LIBS): New macro.
8376
8377 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
8378
8379         * infcmd.c (post_create_inferior): Remove unused argument in
8380         call to solib_add.
8381         * remote.c (remote_start_remote): Likewise.
8382         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
8383         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
8384         (enable_break): Likewise.
8385         * solib.c (update_solib_list): Remove unused target argument
8386         and its documentation.
8387         (solib_add): Remove unused target argument.  Remove unused
8388         argument in call to update_solib_list.
8389         (info_sharedlibrary_command): Remove unused argument in call
8390         to update_solib_list.
8391         (sharedlibrary_command): Remove unused argument in call to
8392         solib_add.
8393         (handle_solib_event): Likewise.
8394         (reload_shared_libraries): Likewise.
8395         * solib.h (solib_add): Remove unused target argument.
8396
8397 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8398
8399         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
8400         (s390_displaced_step_fixup): Cover relative branches with the
8401         default fixup handling.  This fixes lack of support for some
8402         relative branch instructions.
8403
8404 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8405
8406         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
8407         ptid from regcache.
8408
8409 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8410
8411         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
8412         i386_darwin_store_inferior_registers): Use ptid from regcache.
8413
8414 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8415
8416         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
8417         i386bsd_store_inferior_registers): Use ptid from regcache.
8418
8419 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8420
8421         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
8422         hppaobsd_store_registers): Use ptid from regcache.
8423
8424 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8425
8426         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
8427         hppanbsd_store_registers): Use ptid from regcache.
8428
8429 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8430
8431         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
8432         from regcache.  Use get_ptrace_pid.
8433
8434 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8435
8436         * corelow.c (get_core_register_section): Use ptid from regcache,
8437         update doc.
8438
8439 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8440
8441         * bsd-uthread.c (bsd_uthread_fetch_registers,
8442         bsd_uthread_store_registers): Use ptid from regcache, set and
8443         restore inferior_ptid.
8444
8445 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8446
8447         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
8448         fetch_fp_regs, store_register, store_regs, store_fp_register,
8449         store_fp_regs): Use ptid from regcache.
8450
8451 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8452
8453         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
8454         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
8455         store_vfp_regs): Use ptid from regcache.
8456
8457 2017-03-17  Pedro Alves  <palves@redhat.com>
8458
8459         PR remote/21188
8460         * ser-base.c (ser_base_wait_for): Add comment.
8461         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
8462         version.
8463         * ser-unix.c (hardwire_raw): Remove reference to
8464         scb->current_timeout.
8465         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
8466         (hardwire_ops): Install ser_base_readchar instead of
8467         hardwire_readchar.
8468         * serial.h (struct serial) <current_timeout, timeout_remaining>:
8469         Remove fields.
8470
8471 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
8472
8473         PR gdb/19637
8474         * python/lib/gdb/printer/bound_registers.py: Add support for
8475         Python 3.
8476
8477 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8478
8479         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
8480         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
8481         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
8482         byte_offset to subobj_byte_offset.  Fix the handling of
8483         DWARF_VALUE_STACK on big-endian targets when coming via an
8484         implicit pointer.
8485         (dwarf2_evaluate_loc_desc): Adjust call to
8486         dwarf2_evaluate_loc_desc_full.
8487         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
8488         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
8489
8490 2017-03-16  Yao Qi  <yao.qi@linaro.org>
8491
8492         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
8493         and REVSH instructions.
8494
8495 2017-03-16  Yao Qi  <yao.qi@linaro.org>
8496
8497         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
8498         (arm_record_test): Declare.
8499         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
8500         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
8501         align with the manual.
8502         (thumb_record_misc): Adjust the code order to align with the
8503         manual.
8504         (thumb2_record_decode_insn_handler): Fix instruction matching.
8505         (instruction_reader_thumb): New class.
8506         (arm_record_test): New function.
8507
8508 2017-03-16  Yao Qi  <yao.qi@linaro.org>
8509
8510         * arm-tdep.c (abstract_memory_reader): New class.
8511         (instruction_reader): New class.
8512         (extract_arm_insn): Add argument 'reader'.  Callers updated.
8513         (decode_insn): Likewise.
8514
8515 2017-03-16  Doug Evans  <dje@google.com>
8516
8517         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
8518         member.  Change type of TYPE member to SCM.  All uses updated.
8519         (lsscm_make_lazy_string_smob): Add assert.
8520         (lsscm_make_lazy_string): Flag bad length values.
8521         (lsscm_elt_type): New function.
8522         (gdbscm_lazy_string_to_value): Rewrite to use
8523         lsscm_safe_lazy_string_to_value.
8524         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
8525         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
8526         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
8527         in incoming type.
8528         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
8529         * guile/scm-type.c (tyscm_scm_to_type): New function.
8530
8531 2017-03-15  Doug Evans  <dje@google.com>
8532
8533         PR python/17728, python/18439, python/18779
8534         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
8535         member.  Change type of TYPE member to PyObject *.  All uses updated.
8536         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
8537         (gdbpy_create_lazy_string_object): Flag bad length values.
8538         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
8539         Handle typedefs in incoming type.
8540         (stpy_lazy_string_elt_type): New function.
8541         (gdbpy_extract_lazy_string): Call it.
8542         * python/py-value.c (valpy_lazy_string): Flag bad length values.
8543         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
8544         typedefs in incoming type.
8545
8546 2017-03-16  Doug Evans  <dje@google.com>
8547
8548         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
8549         * guile/scm-type.c (tyscm_scm_to_type): New function.
8550
8551 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
8552
8553         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
8554         "ULONGEST" for "skip".
8555
8556 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8557
8558         PR gdb/21220
8559         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
8560         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
8561         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
8562         over ptrace peek/poke until end of buffer or error.
8563
8564 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
8565
8566         * parse.c (length_of_subexp): Make static.
8567         * parser-defs.h (length_of_subexp): Remove.
8568
8569 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8570
8571         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
8572         as well.
8573
8574 2017-03-14  Pedro Alves  <palves@redhat.com>
8575
8576         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
8577         (main): Use std::unique_ptr.  Remove calls to
8578         cp_demangled_name_parse_free.
8579
8580 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
8581
8582         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
8583         alphabsd_store_inferior_registers): Use regcache->ptid instead
8584         of inferior_ptid.
8585
8586 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
8587
8588         * aix-thread.c (aix_thread_fetch_registers,
8589         aix_thread_store_registers): Use regcache->ptid instead of
8590         inferior_ptid.
8591
8592 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
8593
8594         * aarch64-linux-nat.c (fetch_gregs_from_thread,
8595         store_gregs_to_thread, fetch_fpregs_from_thread,
8596         store_fpregs_to_thread): Use regcache->ptid instead of
8597         inferior_ptid.
8598
8599 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
8600
8601         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
8602         amd64_linux_fetch_inferior_registers): Use regcache->ptid
8603         instead of inferior_ptid.
8604
8605 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
8606
8607         * target.c (target_fetch_registers, target_store_registers): Add
8608         assert.
8609
8610 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
8611
8612         * regcache.h (regcache_get_ptid): New function.
8613         * regcache.c (regcache_get_ptid): New function.
8614
8615 2017-03-13  Mark Wielaard  <mark@klomp.org>
8616
8617         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
8618
8619 2017-03-10  Keith Seitz  <keiths@redhat.com>
8620
8621         PR c++/8218
8622         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
8623
8624 2017-03-08  Pedro Alves  <palves@redhat.com>
8625
8626         PR gdb/18360
8627         * infrun.c (start_step_over, do_target_resume, resume)
8628         (restart_threads): Assert we're not resuming a thread that is
8629         meant to be stopped.
8630         (infrun_thread_stop_requested_callback): Delete.
8631         (infrun_thread_stop_requested): If the thread is internally
8632         stopped, queue a pending stop event and clear the thread's
8633         inline-frame state.
8634         (handle_stop_requested): New function.
8635         (handle_syscall_event, handle_inferior_event_1): Use
8636         handle_stop_requested.
8637         (handle_stop_requested): New function.
8638         (handle_signal_stop): Set the thread's stop_signal here instead of
8639         at caller.
8640         (finish_step_over): Clear step over info unconditionally.
8641         (handle_signal_stop): If the user had interrupted the event
8642         thread, consider the stop a random signal.
8643         (handle_signal_stop) <signal arrived while stepping over
8644         breakpoint>: Don't restart threads here.
8645         (stop_waiting): Don't clear step-over info here.
8646
8647 2017-03-08  Pedro Alves  <palves@redhat.com>
8648
8649         PR 21206
8650         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
8651         goes to argument 2, not 1.
8652
8653 2017-03-08  Pedro Alves  <palves@redhat.com>
8654
8655         PR cli/21218
8656         * top.c (gdb_readline_wrapper): Avoid passing NULL to
8657         display_gdb_prompt.
8658         (command_line_input): Add comment.
8659
8660 2017-03-08  Pedro Alves  <palves@redhat.com>
8661
8662         PR tui/21216
8663         * tui/tui-file.c (tui_file::write): New.
8664         * tui/tui-file.h (tui_file): Override "write".
8665         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
8666         factored out from ...
8667         (tui_puts): ... here.
8668         (tui_putc): Use them.
8669         (tui_write): New function.
8670         * tui/tui-io.h (tui_write): Declare.
8671
8672 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8673
8674         * Makefile.in (SFILES): Replace "environ.c" with
8675         "common/environ.c".
8676         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
8677         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
8678         to...
8679         * common/environ.c: ... here.
8680         * environ.h: Moved to...
8681         * common/environ.h: ... here.
8682
8683 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
8684
8685         * gdbarch.sh (pstring_ptr): New static function.
8686         (gdbarch_disassembler_options): Use it.
8687         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
8688         not valid_disassembler_option->name.
8689         * gdbarch.c: Regenerate.
8690
8691 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
8692
8693         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
8694
8695 2017-03-07  Pedro Alves  <palves@redhat.com>
8696
8697         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
8698
8699 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
8700
8701         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
8702         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
8703         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
8704         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
8705
8706 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
8707
8708         * xtensa-linux-nat.c (fetch_gregs): Remove const.
8709
8710 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
8711
8712         * remote.c (remote_add_target_side_commands): Use range-based
8713         for loop.
8714
8715 2017-03-03  Yao Qi  <yao.qi@linaro.org>
8716
8717         PR gdb/21165
8718         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
8719         value is lazy.
8720         * valprint.c (common_val_print): Likewise.
8721
8722 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
8723
8724         * NEWS: Mention new set/show disassembler-options commands.
8725         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
8726         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
8727         (prospective_options): New static variable.
8728         (gdb_disassembler::gdb_disassembler): Initialize
8729         m_di.disassembler_options.
8730         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
8731         (get_disassembler_options): New function.
8732         (set_disassembler_options): Likewise.
8733         (set_disassembler_options_sfunc): Likewise.
8734         (show_disassembler_options_sfunc): Likewise.
8735         (disassembler_options_completer): Likewise.
8736         (_initialize_disasm): Likewise.
8737         * disasm.h (get_disassembler_options): New prototype.
8738         (set_disassembler_options): Likewise.
8739         * gdbarch.sh (gdbarch_disassembler_options): New variable.
8740         (gdbarch_verify_disassembler_options): Likewise.
8741         * gdbarch.c: Regenerate.
8742         * gdbarch.h: Likewise.
8743         * arm-tdep.c (num_disassembly_options): Delete.
8744         (set_disassembly_style): Likewise.
8745         (arm_disassembler_options): New static variable.
8746         (set_disassembly_style_sfunc): Convert short style name into long
8747         option name.  Call set_disassembler_options.
8748         (show_disassembly_style_sfunc): New function.
8749         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
8750         set_gdbarch_verify_disassembler_options.
8751         (_initialize_arm_tdep): Delete regnames variable and update callers.
8752         (arm_disassembler_options): Initialize.
8753         (disasm_options): New variable.
8754         (num_disassembly_options): Rename from this...
8755         (num_disassembly_styles): ...to this.  Compute by scanning through
8756         disasm_options.
8757         (valid_disassembly_styles): Initialize using disasm_options.
8758         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
8759         set_arm_regname_option.
8760         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
8761         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
8762         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
8763         set_gdbarch_verify_disassembler_options.
8764         * s390-tdep.c (s390_disassembler_options): New static variable.
8765         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
8766         set_gdbarch_verify_disassembler_options.
8767
8768 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
8769
8770         * remote.c (remote_add_target_side_condition): Remove "struct"
8771         keyword from range-based for loop.
8772
8773 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
8774
8775         * remote.c (remote_add_target_side_condition): Use range-based
8776         for loop.  Update comment.
8777
8778 2017-02-27  Yao Qi  <yao.qi@linaro.org>
8779
8780         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
8781
8782 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
8783
8784         * regcache.c (regcache_raw_update): New function.
8785         (regcache_raw_read): Move code to regcache_raw_update.
8786         * regcache.h (regcache_raw_update): New declaration.
8787         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
8788
8789 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
8790
8791         * dwarf2read.c (create_debug_type_hash_table): Initialize
8792         header.signature and header.type_offset_in_tu.
8793
8794 2017-02-24  Pedro Alves  <palves@redhat.com>
8795
8796         * symtab.c (make_file_symbol_completion_list_1): Use
8797         add_symtab_completions.
8798
8799 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
8800
8801         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
8802
8803 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
8804
8805         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
8806         I386_MAX_REGISTER_SIZE.
8807         (i386_pseudo_register_write): Likewise.
8808         (i386_process_record): Likewise.
8809         * i387-tdep.c (i387_supply_xsave): Likewise.
8810         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
8811         (store_register): Likewise.
8812
8813 2017-02-23  Pedro Alves  <palves@redhat.com>
8814
8815         * ada-lang.c: Include "common/function-view.h".
8816         (ada_iterate_over_symbols): Adjust to use function_view as
8817         callback type.
8818         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
8819         (ada_make_symbol_completion_list): Use a lambda.
8820         (ada_exc_search_name_matches): Delete.
8821         (name_matches_regex): New.
8822         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
8823         * compile/compile-c-support.c: Include "common/function-view.h".
8824         (print_one_macro): Change prototype to accept a ui_file pointer.
8825         (write_macro_definitions): Use a lambda.
8826         * dwarf2read.c: Include "common/function-view.h".
8827         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
8828         (dw2_expand_symtabs_matching): Adjust to use function_view as
8829         callback type.
8830         * language.h: Include "common/function-view.h".
8831         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
8832         function_view as callback type.
8833         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
8834         * linespec.c: Include "common/function-view.h".
8835         (collect_info::add_symbol): New method.
8836         (struct symbol_and_data_callback, iterate_inline_only, struct
8837         symbol_matcher_data, iterate_name_matcher): Delete.
8838         (iterate_over_all_matching_symtabs): Adjust to use function_view
8839         as callback type and lambdas.
8840         (iterate_over_file_blocks): Adjust to use function_view as
8841         callback type.
8842         (decode_compound_collector): Now a class with private fields.
8843         (decode_compound_collector::release_symbols): New method.
8844         (collect_one_symbol): Rename to...
8845         (decode_compound_collector::operator()): ... this and adjust.
8846         (lookup_prefix_sym): decode_compound_collector construction bits
8847         move to decode_compound_collector ctor.  Pass the
8848         decode_compound_collector object directly as callback.  Remove
8849         cleanups and use decode_compound_collector::release_symbols
8850         instead.
8851         (symtab_collector): Now a class with private fields.
8852         (symtab_collector::release_symtabs): New method.
8853         (add_symtabs_to_list): Rename to...
8854         (symtab_collector::operator()): ... this and adjust.
8855         (collect_symtabs_from_filename): symtab_collector construction
8856         bits move to symtab_collector ctor.  Pass the symtab_collector
8857         object directly as callback.  Remove cleanups and use
8858         symtab_collector::release_symtabs instead.
8859         (collect_symbols): Delete.
8860         (add_matching_symbols_to_info): Use lambdas.
8861         * macrocmd.c (print_macro_callback): Delete.
8862         (info_macro_command): Use a lambda.
8863         (info_macros_command): Pass print_macro_definition as callable
8864         directly.
8865         (print_one_macro): Remove 'ignore' parameter.
8866         (macro_list_command): Adjust.
8867         * macrotab.c (macro_for_each_data::fn): Now a function_view.
8868         (macro_for_each_data::user_data): Delete field.
8869         (foreach_macro): Adjust to call the function_view.
8870         (macro_for_each): Adjust to use function_view as callback type.
8871         (foreach_macro_in_scope): Adjust to call the function_view.
8872         (macro_for_each_in_scope): Adjust to use function_view as callback
8873         type.
8874         * macrotab.h: Include "common/function-view.h".
8875         (macro_callback_fn): Declare a prototype instead of a pointer.
8876         Remove "user_data" parameter.
8877         (macro_for_each, macro_for_each_in_scope): Adjust to use
8878         function_view as callback type.
8879         * psymtab.c (partial_map_expand_apply)
8880         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
8881         Adjust to use function_view as callback type and to return bool.
8882         (psym_expand_symtabs_matching): Adjust to use function_view as
8883         callback types.
8884         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
8885         to use function_view as callback type and to return bool.
8886         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
8887         callback types.
8888         * symfile.c (expand_symtabs_matching): Adjust to use function_view
8889         as callback types.
8890         * symfile.h: Include "common/function-view.h".
8891         (expand_symtabs_file_matcher_ftype)
8892         (expand_symtabs_symbol_matcher_ftype)
8893         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
8894         return bool.
8895         (quick_symbol_functions::map_symtabs_matching_filename)
8896         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
8897         function_view as callback type and return bool.
8898         (expand_symtabs_matching): Adjust to use function_view as callback
8899         type.
8900         (maintenance_expand_name_matcher)
8901         (maintenance_expand_file_matcher): Delete.
8902         (maintenance_expand_symtabs): Use lambdas.
8903         * symtab.c (iterate_over_some_symtabs): Adjust to use
8904         function_view as callback types and return bool.
8905         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
8906         of a cleanup.
8907         (lookup_symtab_callback): Delete.
8908         (lookup_symtab): Use a lambda.
8909         (iterate_over_symbols): Adjust to use function_view as callback
8910         type.
8911         (struct search_symbols_data, search_symbols_file_matches)
8912         (search_symbols_name_matches): Delete.
8913         (search_symbols): Use a pair of lambdas.
8914         (struct add_name_data, add_macro_name, symbol_completion_matcher)
8915         (symtab_expansion_callback): Delete.
8916         (default_make_symbol_completion_list_break_on_1): Use lambdas.
8917         * symtab.h: Include "common/function-view.h".
8918         (iterate_over_some_symtabs): Adjust to use function_view as
8919         callback type and return bool.
8920         (iterate_over_symtabs): Adjust to use function_view as callback
8921         type.
8922         (symbol_found_callback_ftype): Remove 'data' parameter and return
8923         bool.
8924         (iterate_over_symbols): Adjust to use function_view as callback
8925         type.
8926
8927 2017-02-23  Pedro Alves  <palves@redhat.com>
8928
8929         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
8930         (%.o) <unittests/%.c>: New pattern.
8931         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
8932         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
8933         * common/function-view.h: New file.
8934         * unittests/function-view-selftests.c: New file.
8935         * configure: Regenerate.
8936
8937 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
8938
8939         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
8940         inferior_ptid.
8941         * go32-nat.c (go32_thread_alive): Likewise.
8942
8943 2017-02-23  Yao Qi  <yao.qi@linaro.org>
8944
8945         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
8946         delete.
8947
8948 2017-02-23  Yao Qi  <yao.qi@linaro.org>
8949
8950         * varobj.c (varobj_clear_saved_item): Use delete instead of
8951         xfree.
8952         (update_dynamic_varobj_children): Likewise.
8953
8954 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
8955
8956         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
8957
8958 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
8959
8960         * common/enum-flags.h (enum_flags::enum_flags): Initialize
8961         m_enum_value to 0 in default constructor.
8962
8963 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
8964
8965         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
8966         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
8967         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
8968         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
8969         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
8970         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
8971         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
8972         IS_STORE_CONDITIONAL_INSN.
8973
8974 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
8975
8976         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
8977
8978 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
8979
8980         * NEWS (Changes since GDB 7.12): Add DWARF-5.
8981
8982 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
8983
8984         * dwarf2read.c (skip_one_die, read_attribute_value)
8985         (dwarf2_const_value_attr, dump_die_shallow)
8986         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8987         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
8988
8989 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
8990
8991         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
8992         (dwarf_parse_macro_header): Accept DWARF version 5.
8993         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
8994
8995 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
8996
8997         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
8998         DW_AT_GNU_*.
8999         * common/common-exceptions.h (enum errors): Likewise.
9000         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
9001         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
9002         (dwarf_expr_context::execute_stack_op): Likewise.
9003         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
9004         Likewise.
9005         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
9006         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
9007         (show_entry_values_debug, call_site_to_target_addr)
9008         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
9009         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
9010         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
9011         (value_of_dwarf_block_entry, indirect_pieced_value)
9012         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
9013         (disassemble_dwarf_expression): Likewise.
9014         * dwarf2read.c (process_die, inherit_abstract_dies)
9015         (read_call_site_scope): Likewise.
9016         * gdbtypes.h (struct func_type, struct call_site_parameter)
9017         (struct call_site): Likewise.
9018         * stack.c (read_frame_arg): Likewise.
9019         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
9020
9021 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
9022
9023         * defs.h (read_unsigned_leb128): New declaration.
9024         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
9025         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
9026         (dwarf2_find_location_expression): Call also
9027         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
9028         * dwarf2loc.h (dwarf2_version): New declaration.
9029         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
9030         rnglists.
9031         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
9032         .debug_rnglists.
9033         (struct dwop_section_names): Add loclists_dwo.
9034         (dwop_section_names): Add .debug_loclists.dwo.
9035         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
9036         (struct dwarf2_per_cu_data): Add dwarf_version.
9037         (struct dwo_sections): Add loclists.
9038         (struct attr_abbrev): Add implicit_const.
9039         (read_indirect_line_string): New declaration.
9040         (read_unsigned_leb128): Delete declaration.
9041         (rcuh_kind): New definition.
9042         (read_and_check_comp_unit_head): Change parameter
9043         is_debug_types_section to section_kind.
9044         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
9045         (read_comp_unit_head): Change parameter abfd to section, add parameter
9046         section_kind.  Handle DWARF-5.
9047         (error_check_comp_unit_head): Accept also DWARF version 5.
9048         (read_and_check_comp_unit_head): Change parameter
9049         is_debug_types_section to section_kind.
9050         (read_and_check_type_unit_head): Delete function.
9051         (read_abbrev_offset): Handle DWARF-5.
9052         (create_debug_type_hash_table): Add parameter section_kind.  Process
9053         only DW_UT_type.  Use signature and type_offset_in_tu from struct
9054         comp_unit_head.
9055         (create_debug_types_hash_table): Update create_debug_type_hash_table
9056         caller.
9057         (create_all_type_units): Call create_debug_type_hash_table.
9058         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
9059         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
9060         caller.
9061         (skip_one_die): Handle DW_FORM_implicit_const.
9062         (dwarf2_rnglists_process): New function.
9063         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
9064         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
9065         (read_attribute_value): Handle DW_FORM_implicit_const,
9066         DW_FORM_line_strp.
9067         (read_attribute): Handle DW_FORM_implicit_const.
9068         (read_indirect_string_at_offset_from): New function from
9069         read_indirect_string_at_offset.
9070         (read_indirect_string_at_offset): Call
9071         read_indirect_string_at_offset_from.
9072         (read_indirect_line_string_at_offset): New function.
9073         (read_indirect_string): New function comment.
9074         (read_indirect_line_string): New function.
9075         (read_unsigned_leb128): Make it global.
9076         (dwarf2_string_attr): Handle DWARF-5.
9077         (add_include_dir_stub, read_formatted_entries): New functions.
9078         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
9079         Handle DWARF-5.
9080         (per_cu_header_read_in): Update read_comp_unit_head caller.
9081         (dwarf2_version): New function.
9082         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
9083         rnglists.
9084         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
9085         fields.
9086
9087 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
9088
9089         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
9090
9091 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
9092
9093         * dwarf2read.c (dwarf2_ranges_process): New function from
9094         dwarf2_ranges_read.
9095         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
9096         dwarf2_ranges_process.
9097
9098 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
9099
9100         * dwarf2read.c (create_debug_type_hash_table): New function from
9101         create_debug_types_hash_table.
9102         (create_debug_types_hash_table): Call create_debug_type_hash_table.
9103         (create_all_type_units, open_and_init_dwo_file): Update
9104         create_debug_types_hash_table callers.
9105
9106 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9107
9108         PR gdb/16188
9109         * fork-child.c (trace_start_error): Fix thinko.  va_end should
9110         refer to 'ap', not 'args'.
9111
9112 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9113             Pedro Alves  <palves@redhat.com>
9114
9115         PR gdb/16188
9116         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
9117         calls succeeded.
9118         * fork-child.c (trace_start_error): New function.
9119         (trace_start_error_with_name): Likewise.
9120         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
9121         * inf-ptrace.c (inf_ptrace_me): Likewise.
9122         * inferior.h (trace_start_error): New prototype.
9123         (trace_start_error_with_name): Likewise.
9124
9125 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
9126
9127         PR gdb/21164
9128         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
9129         NULL before using it.
9130         * symmisc.c (maintenance_print_symbols): Likewise.
9131         (maintenance_print_msymbols): Likewise.
9132
9133 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
9134
9135         * NEWS: Add record Python bindings entry.
9136
9137 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
9138
9139         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
9140         py-record-full.o.
9141         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
9142         * python/py-record-btrace.c, python/py-record-btrace.h,
9143         python/py-record-full.c, python/py-record-full.h: New file.
9144         * python/py-record.c: Add include for py-record-btrace.h and
9145         py-record-full.h.
9146         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
9147         recpy_instruction_history, recpy_function_call_history, recpy_begin,
9148         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
9149         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
9150         New definition.
9151         (gdbpy_initialize_btrace): New export.
9152         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
9153
9154 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
9155
9156         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
9157         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
9158         * python/py-record.c: New file.
9159         * python/python-internal.h (gdbpy_start_recording,
9160         gdbpy_current_recording, gdpy_stop_recording,
9161         gdbpy_initialize_record): New export.
9162         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
9163         (python_GdbMethods): Add gdbpy_start_recording,
9164         gdbpy_current_recording and gdbpy_stop_recording.
9165
9166 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
9167
9168         * record-btrace.c (record_btrace_record_method): New function.
9169         (init_record_btrace_ops): Initialize to_record_method.
9170         * record-full.c (record_full_record_method): New function.
9171         (init_record_full_ops, init_record_full_core_ops): Add
9172         record_full_record_method.
9173         * record.h (enum record_method): New enum.
9174         * target-debug.h (target_debug_print_enum_record_method: New define.
9175         * target-delegates.c: Regenerate.
9176         * target.c (target_record_method): New function.
9177         * target.h: Include record.h.
9178         (struct target_ops) <to_record_method>: New field.
9179         (target_record_method): New export.
9180
9181 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
9182
9183         * record.h (record_start, record_stop): New export.
9184         * record.c (record_start, record_stop): New function.
9185
9186 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
9187
9188         * btrace.c (btrace_fetch): Copy function call segments pointer
9189         into a vector.
9190         (btrace_clear): Clear the vector.
9191         (btrace_find_insn_by_number): Use binary search to find the correct
9192         function call segment.
9193         * btrace.h (brace_fun_p): New typedef.
9194         (struct btrace_thread_info) <functions>: New field.
9195
9196 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
9197
9198         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
9199         * btrace.c (btrace_decode_error): ... here.  New function.
9200         * btrace.h (btrace_decode_error): New export.
9201
9202 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
9203
9204         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
9205         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
9206         btrace_find_insn_by_number): Remove special case for gaps.
9207         * btrace.h (btrace_insn_get_error): New export.
9208         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
9209         * record-btrace.c (btrace_insn_history): Print number for gaps.
9210         (record_btrace_info, record_btrace_goto): Handle gaps.
9211
9212 2017-02-14  Tom Tromey  <tom@tromey.com>
9213
9214         PR python/13598:
9215         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
9216         event.
9217         * python/py-evts.c (gdbpy_initialize_py_events): Add
9218         before_prompt registry.
9219         * python/py-events.h (events_object) <before_prompt>: New field.
9220
9221 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
9222
9223         * btrace.c (ftrace_new_switch): Preserve up link and flags.
9224
9225 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
9226
9227         * symfile (_initialize_symfile): Add usage text to the load command's
9228         help text.
9229
9230 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
9231
9232         * utils.c (defaulted_query): Don't query on secondary UIs.
9233
9234 2017-02-10  Tom Tromey  <tom@tromey.com>
9235
9236         * rust-lang.c (rust_get_disr_info): Remove unused variable.
9237
9238 2017-02-10  Tom Tromey  <tom@tromey.com>
9239
9240         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
9241         "cleanup" local.
9242         * python/py-type.c (typy_legacy_template_argument): Remove
9243         unnecessary "cleanup" local.
9244
9245 2017-02-10  Tom Tromey  <tom@tromey.com>
9246
9247         * python/python.c (do_start_initialization): New function, from
9248         _initialize_python.
9249         (_initialize_python): Call do_start_initialization.
9250         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
9251         goto.
9252
9253 2017-02-10  Tom Tromey  <tom@tromey.com>
9254
9255         * python/py-prettyprint.c (pretty_print_one_value): Use
9256         gdbpy_ref.
9257
9258 2017-02-10  Tom Tromey  <tom@tromey.com>
9259
9260         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
9261         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
9262         gdbpy_ref.
9263         * python/py-type.c (field_new): Use gdbpy_ref.
9264         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
9265         gdbpy_ref.
9266         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
9267         (py_free_pspace): Likewise.
9268         (pspace_to_pspace_object): Likewise.
9269         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
9270         (py_free_objfile): Likewise.
9271         (objfile_to_objfile_object): Likewise.
9272         * python/py-inferior.c (delete_thread_object): Use
9273         gdbpy_ref.
9274         (infpy_read_memory): Likewise.
9275         (py_free_inferior): Likewise.
9276         * python/py-evtregistry.c (create_eventregistry_object): Use
9277         gdbpy_ref.
9278         * python/py-event.c (create_event_object): Use gdbpy_ref.
9279
9280 2017-02-10  Tom Tromey  <tom@tromey.com>
9281
9282         * python/py-ref.h (gdbpy_ref_policy): Now a template.
9283         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
9284         used.
9285         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
9286         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
9287         python/py-exitedevent.c, python/py-finishbreakpoint.c,
9288         python/py-framefilter.c, python/py-function.c,
9289         python/py-inferior.c, python/py-infevents.c,
9290         python/py-linetable.c, python/py-newobjfileevent.c,
9291         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
9292         python/py-signalevent.c, python/py-stopevent.c,
9293         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
9294         python/py-unwind.c, python/py-utils.c, python/py-value.c,
9295         python/py-varobj.c, python/py-xmethods.c, python/python.c,
9296         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
9297
9298 2017-02-10  Tom Tromey  <tom@tromey.com>
9299
9300         * ui-out.h (ui_out_emit_type): New class.
9301         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
9302         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
9303         and ui_out_emit_tuple.
9304         (enumerate_locals): Likewise.
9305         (py_mi_print_variables, py_print_locals, py_print_args): Use
9306         ui_out_emit_list.
9307         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
9308         ui_out_emit_list.
9309         * common/gdb_optional.h: New file.
9310
9311 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
9312
9313         * MAINTAINERS (Write After Approval): Update my e-mail address.
9314
9315 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
9316
9317         PR gdb/21122
9318         * breakpoint.c (_initialize_breakpoint): Update the help description
9319         of the 'commands' command to indicate that it takes a list argument.
9320
9321 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
9322
9323         * interps.c (current_interp_set_logging): Remove "return".
9324
9325 2017-02-09  Gary Benson  <gbenson@redhat.com>
9326
9327         * symtab.c (add_symtab_completions): Prevent NULL pointer
9328         dereference.
9329
9330 2017-02-08  Pedro Alves  <palves@redhat.com>
9331
9332         * interps.c (interp::interp): Remove reference to quiet_p.
9333         (interp_set): Make static.  Remove dead "Switching to" output
9334         code.
9335         (interp_quiet_p, interp_set_quiet): Delete.
9336         (interpreter_exec_cmd): Don't set the interpreter quiet.
9337         * interps.h (interp_quiet_p): Make static.
9338         (class interp) <quiet_p>: Remove field
9339
9340 2017-02-08  Jerome Guitton  <guitton@adacore.com>
9341
9342         * cli/cli-decode.c (find_command_name_length): Make it extern.
9343         * cli/cli-decode.h (find_command_name_length): Declare.
9344         * cli/cli-script.c (command_name_equals, line_first_arg):
9345         New functions.
9346         (process_next_line): Use cli-decode to parse command names.
9347         (build_command_line): Make args a constant pointer.
9348
9349 2017-02-08  Jerome Guitton  <guitton@adacore.com>
9350
9351         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
9352         Remove case-insensitive search.
9353
9354 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
9355
9356         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
9357         at the end of the line.  Avoids an ARI warning.
9358
9359 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
9360
9361         * NEWS: Mention support for record/replay of Intel 64 rdrand and
9362         rdseed instructions.
9363         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
9364
9365 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
9366
9367         PR tdep/20936
9368         Provide and use sparc32 and sparc64 target description XML files.
9369         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
9370         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
9371         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
9372         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
9373         * features/sparc/sparc32-solaris.xml: New file.
9374         * features/sparc/sparc64-solaris.xml: New file.
9375         * features/sparc/sparc32-solaris.c: Generated.
9376         * features/sparc/sparc64-solaris.c: Generated.
9377         * sparc-tdep.h: Account for differences in target descriptions.
9378         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
9379         (sparc32_register_type): Use target provided registers.
9380         (validate_tdesc_registers): New function.
9381         (sparc32_gdbarch_init): Use tdesc_has_registers.
9382         Set pseudoregister functions.
9383         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
9384         (sparc64_register_type): Use target provided registers.
9385         (sparc64_init_abi): Set pseudoregister functions.
9386
9387 2017-02-03  Tom Tromey  <tom@tromey.com>
9388
9389         PR rust/21097:
9390         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
9391         with a single member.
9392
9393 2017-02-03  Pedro Alves  <palves@redhat.com>
9394
9395         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
9396         (cli_interp_base::~cli_interp_base): New.
9397         (cli_interp): New struct.
9398         (as_cli_interp): Cast the interp itself to cli_interp.
9399         (cli_interpreter_pre_command_loop): Rename to ...
9400         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
9401         parameter.
9402         (cli_interpreter_init): Rename to ...
9403         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
9404         boolean.  Make extern.
9405         (cli_interpreter_resume): Rename to ...
9406         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
9407         extern.
9408         (cli_interpreter_suspend): Rename to ...
9409         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
9410         extern.
9411         (cli_interpreter_exec): Rename to ...
9412         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
9413         extern.
9414         (cli_interpreter_supports_command_editing): Rename to ...
9415         (cli_interp_base::supports_command_editing): ... this.  Remove
9416         'interp' parameter.  Make extern.
9417         (cli_ui_out): Rename to ...
9418         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
9419         Make extern.
9420         (cli_set_logging): Rename to ...
9421         (cli_interp_base::set_logging): ... this.  Remove 'interp'
9422         parameter.  Make extern.
9423         (cli_interp_procs): Delete.
9424         (cli_interp_factory): Adjust to use "new".
9425         * cli/cli-interp.h: Include "interps.h".
9426         (struct cli_interp_base): New struct.
9427         * interps.c (struct interp): Delete.  Fields moved to interps.h.
9428         (interp_new): Delete.
9429         (interp::interp, interp::~interp): New.
9430         (interp_set): Use bool, and return void.  Assume the interpreter
9431         has suspend, init and resume methods, and that the all return
9432         void.
9433         (set_top_level_interpreter): interp_set returns void.
9434         (interp_ui_out): Adapt.
9435         (current_interp_set_logging): Adapt.
9436         (interp_data): Delete.
9437         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
9438         (interp_exec): Adapt.
9439         (top_level_interpreter_data): Delete.
9440         * interps.h (interp_init_ftype, interp_resume_ftype)
9441         (interp_suspend_ftype, interp_exec_ftype)
9442         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
9443         (class interp): New.
9444         (interp_new): Delete.
9445         (interp_set): Now returns void.  Use bool.
9446         (interp_data, top_level_interpreter_data): Delete.
9447         * mi/mi-common.h: Include interps.h.
9448         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
9449         init, resume, suspect, exec, interp_ui_out, set_logging and
9450         pre_command_loop methods.
9451         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
9452         (mi_interpreter_init): Rename to ...
9453         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
9454         bool, return void and make extern.  Adjust.
9455         (mi_interpreter_resume): ... Rename to ...
9456         (mi_interp::resume): ... this.  Remove the 'data' parameter,
9457         return void and make extern.  Adjust.
9458         (mi_interpreter_suspend): ... Rename to ...
9459         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
9460         return void and make extern.  Adjust.
9461         (mi_interpreter_exec): ... Rename to ...
9462         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
9463         extern.  Adjust.
9464         (mi_interpreter_pre_command_loop): ... Rename to ...
9465         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
9466         parameter and make extern.
9467         (mi_on_normal_stop_1): Adjust.
9468         (mi_ui_out): Rename to ...
9469         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
9470         parameter and make extern.  Adjust.
9471         (mi_set_logging): Rename to ...
9472         (mi_interp::set_logging): ... this.  Remove the 'interp'
9473         parameter and make extern.  Adjust.
9474         (mi_interp_procs): Delete.
9475         (mi_interp_factory): Adjust to use 'new'.
9476         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
9477         (mi_print_exception, mi_execute_command, mi_load_progress):
9478         Adjust.
9479         * tui/tui-interp.c (tui_interp): New class.
9480         (as_tui_interp): Return a tui_interp pointer.
9481         (tui_on_normal_stop, tui_on_signal_received)
9482         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
9483         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
9484         to use interp::interp_ui_out.
9485         (tui_init): Rename to ...
9486         (tui_interp::init): ... this.  Remove the 'self' parameter, use
9487         bool, return void and make extern.  Adjust.
9488         (tui_resume): Rename to ...
9489         (tui_interp::resume): ... this.  Remove the 'data' parameter,
9490         return void and make extern.  Adjust.
9491         (tui_suspend): Rename to ...
9492         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
9493         return void and make extern.  Adjust.
9494         (tui_ui_out): Rename to ...
9495         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
9496         parameter, and make extern.  Adjust.
9497         (tui_exec): Rename to ...
9498         (tui_interp::exec): ... this.  Remove the 'data' parameter and
9499         make extern.
9500         (tui_interp_procs): Delete.
9501         (tui_interp_factory): Use "new".
9502
9503 2017-02-02  Tom Tromey  <tom@tromey.com>
9504
9505         * rust-exp.y (ends_raw_string, space_then_number)
9506         (rust_identifier_start_p): Return bool.
9507         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
9508         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
9509         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
9510         (rust_chartype_p): Return bool.
9511         (val_print_struct, rust_print_struct_def, rust_print_type):
9512         Update.
9513         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
9514         Return bool.
9515
9516 2017-02-02  Tom Tromey  <tom@tromey.com>
9517
9518         * rust-lang.c: Reindent.
9519
9520 2017-02-02  Tom Tromey  <tom@tromey.com>
9521
9522         * rust-lang.h (rust_crate_for_block): Update.
9523         * rust-lang.c (rust_crate_for_block): Return std::string.
9524         (rust_get_disr_info): Use std:;string, not
9525         gdb::unique_xmalloc_ptr.
9526         * rust-exp.y (crate_name): Update.
9527
9528 2017-02-02  Pedro Alves  <palves@redhat.com>
9529
9530         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
9531         field out of gdb_disassembler_test and make it static.
9532
9533 2017-02-02  Pedro Alves  <palves@redhat.com>
9534
9535         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
9536         mi1_interp and mi_interp fields.
9537
9538 2017-02-02  Pedro Alves  <palves@redhat.com>
9539
9540         * cli/cli-interp.c (struct saved_output_files, saved_output):
9541         Moved from cli/cli-logging.c.
9542         (cli_set_logging): New function.
9543         (cli_interp_procs): Install cli_set_logging.
9544         * cli/cli-interp.h (make_logging_output, cli_set_logging):
9545         Declare.
9546         * cli/cli-logging.c (struct saved_output_files, saved_output):
9547         Moved to cli/cli-interp.c.
9548         (pop_output_files): Don't save outputs here.
9549         (make_logging_output): New function.
9550         (handle_redirections): Don't build tee nor save previous outputs
9551         here.
9552         * interps.c (current_interp_set_logging): Change prototype.
9553         Assume there's always a set_logging_proc method installed.
9554         * interps.h (interp_set_logging_ftype): Change prototype.
9555         (current_interp_set_logging): Change prototype and adjust comment.
9556         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
9557         use make_logging_output.
9558         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
9559 2017-02-02  Pedro Alves  <palves@redhat.com>
9560
9561         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
9562         from ...
9563         (set_logging_overwrite): ... here.
9564         (logging_no_redirect_file): Delete.
9565         (set_logging_redirect): Don't handle redirection on the fly.
9566         Instead warn that "logging off" / "logging on" is necessary.
9567         (pop_output_files): Delete references to logging_no_redirect_file.
9568         (show_logging_command): Always speak in terms of what will happen
9569         once logging is reenabled.
9570
9571 2017-02-02  Pedro Alves  <palves@redhat.com>
9572
9573         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
9574
9575 2017-02-02  Pedro Alves  <palves@redhat.com>
9576
9577         * disasm.c (gdb_pretty_print_insn): Rename to ...
9578         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
9579         Remove gdbarch parameter.  Adapt to clear the object's buffers
9580         instead of allocating new buffers, and to print using the object's
9581         gdb_disassembler instead of calling gdb_print_insn.
9582         (dump_insns): Use gdb_pretty_print_disassembler.
9583         * disasm.h (gdb_pretty_print_insn): Delete declaration.
9584         (gdb_pretty_print_disassembler): New class.
9585         * record-btrace.c (btrace_insn_history): Use
9586         gdb_pretty_print_disassembler.
9587
9588 2017-02-02  Pedro Alves  <palves@redhat.com>
9589
9590         * ada-lang.c (type_as_string): Use string_file.
9591         * ada-valprint.c (ada_print_floating): Use string_file.
9592         * ada-varobj.c (ada_varobj_scalar_image)
9593         (ada_varobj_get_value_image): Use string_file.
9594         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
9595         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
9596         * breakpoint.c (update_inserted_breakpoint_locations)
9597         (insert_breakpoint_locations, reattach_breakpoints)
9598         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
9599         (print_it_watchpoint): Use string_file.
9600         (save_breakpoints): Use stdio_file.
9601         * c-exp.y (oper): Use string_file.
9602         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
9603         tee_file.
9604         (pop_output_files): Use delete.
9605         (handle_redirections): Use stdio_file and tee_file.
9606         * cli/cli-setshow.c (do_show_command): Use string_file.
9607         * compile/compile-c-support.c (c_compute_program): Use
9608         string_file.
9609         * compile/compile-c-symbols.c (generate_vla_size): Take a
9610         'string_file &' instead of a 'ui_file *'.
9611         (generate_c_for_for_one_variable): Take a 'string_file &' instead
9612         of a 'ui_file *'.  Use string_file.
9613         (generate_c_for_variable_locations): Take a 'string_file &'
9614         instead of a 'ui_file *'.
9615         * compile/compile-internal.h (generate_c_for_for_one_variable):
9616         Take a 'string_file &' instead of a 'ui_file *'.
9617         * compile/compile-loc2c.c (push, pushf, unary, binary)
9618         (print_label, pushf_register_address, pushf_register)
9619         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
9620         'ui_file *'.  Adjust.
9621         * compile/compile.c (compile_to_object): Use string_file.
9622         * compile/compile.h (compile_dwarf_expr_to_c)
9623         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
9624         'ui_file *'.
9625         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
9626         (replace_typedefs_qualified_name): Use string_file and
9627         obstack_copy0.
9628         * disasm.c (gdb_pretty_print_insn): Use string_file.
9629         (gdb_disassembly): Adjust reference the null_stream global.
9630         (do_ui_file_delete): Delete.
9631         (gdb_insn_length): Use null_stream.
9632         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
9633         * dwarf2loc.c (dwarf2_compile_property_to_c)
9634         (locexpr_generate_c_location, loclist_generate_c_location): Take a
9635         'string_file &' instead of a 'ui_file *'.
9636         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
9637         * dwarf2read.c (do_ui_file_peek_last): Delete.
9638         (dwarf2_compute_name): Use string_file.
9639         * event-top.c (gdb_setup_readline): Use stdio_file.
9640         * gdbarch.sh (verify_gdbarch): Use string_file.
9641         * gdbtypes.c (safe_parse_type): Use null_stream.
9642         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
9643         string_file.
9644         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
9645         'string_file *' instead of a 'ui_file *'.
9646         (gdbscm_arch_disassemble): Use string_file.
9647         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
9648         * guile/scm-ports.c (class ioscm_file_port): Now a class that
9649         inherits from ui_file.
9650         (ioscm_file_port_delete, ioscm_file_port_rewind)
9651         (ioscm_file_port_put): Delete.
9652         (ioscm_file_port_write): Rename to ...
9653         (ioscm_file_port::write): ... this.  Remove file_port_magic
9654         checks.
9655         (ioscm_file_port_new): Delete.
9656         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
9657         ui_file_up.
9658         * guile/scm-type.c (tyscm_type_name): Use string_file.
9659         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
9660         Use string_file.
9661         * infcmd.c (print_return_value_1): Use string_file.
9662         * infrun.c (print_target_wait_results): Use string_file.
9663         * language.c (add_language): Use string_file.
9664         * location.c (explicit_to_string_internal): Use string_file.
9665         * main.c (captured_main_1): Use null_file.
9666         * maint.c (maintenance_print_architecture): Use stdio_file.
9667         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
9668         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
9669         event_channel>: Change type to mi_console_file pointer.
9670         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
9671         (mi_console_file_delete): Delete.
9672         (struct mi_console_file): Delete.
9673         (mi_console_file_magic): Delete.
9674         (mi_console_file_new): Delete.
9675         (mi_console_file::mi_console_file): New.
9676         (mi_console_file_delete): Delete.
9677         (mi_console_file_fputs): Delete.
9678         (mi_console_file::write): New.
9679         (mi_console_raw_packet): Delete.
9680         (mi_console_file::flush): New.
9681         (mi_console_file_flush): Delete.
9682         (mi_console_set_raw): Rename to ...
9683         (mi_console_file::set_raw): ... this.
9684         * mi/mi-console.h (class mi_console_file): New class.
9685         (mi_console_file_new, mi_console_set_raw): Delete.
9686         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
9687         (mi_set_logging): Use delete and tee_file.  Adjust.
9688         * mi/mi-main.c (output_register): Use string_file.
9689         (mi_cmd_data_evaluate_expression): Use string_file.
9690         (mi_cmd_data_read_memory): Use string_file.
9691         (mi_cmd_execute, print_variable_or_computed): Use string_file.
9692         * mi/mi-out.c (mi_ui_out::main_stream): New.
9693         (mi_ui_out::rewind): Use main_stream and
9694         string_file.
9695         (mi_ui_out::put): Use main_stream and string_file.
9696         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
9697         Allocate a 'string_file' instead.
9698         (mi_out_new): Don't allocate a mem_fileopen stream here.
9699         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
9700         (mi_ui_out::main_stream): Declare method.
9701         * printcmd.c (eval_command): Use string_file.
9702         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
9703         * python/py-arch.c (archpy_disassemble): Use string_file.
9704         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
9705         * python/py-frame.c (frapy_str): Use string_file.
9706         * python/py-framefilter.c (py_print_type, py_print_single_arg):
9707         Use string_file.
9708         * python/py-type.c (typy_str): Use string_file.
9709         * python/py-unwind.c (unwind_infopy_str): Use string_file.
9710         * python/py-value.c (valpy_str): Use string_file.
9711         * record-btrace.c (btrace_insn_history): Use string_file.
9712         * regcache.c (regcache_print): Use stdio_file.
9713         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
9714         * remote.c (escape_buffer): Use string_file.
9715         * rust-lang.c (rust_get_disr_info): Use string_file.
9716         * serial.c (serial_open_ops_1): Use stdio_file.
9717         (do_serial_close): Use delete.
9718         * stack.c (print_frame_arg): Use string_file.
9719         (print_frame_args): Remove local mem_fileopen stream, not used.
9720         (print_frame): Use string_file.
9721         * symmisc.c (maintenance_print_symbols): Use stdio_file.
9722         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
9723         Take a 'string_file *' instead of a 'ui_file *'.
9724         * top.c (new_ui): Use stdio_file and stderr_file.
9725         (free_ui): Use delete.
9726         (execute_command_to_string): Use string_file.
9727         (quit_confirm): Use string_file.
9728         * tracepoint.c (collection_list::append_exp): Use string_file.
9729         * tui/tui-disasm.c (tui_disassemble): Use string_file.
9730         * tui/tui-file.c: Don't include "ui-file.h".
9731         (enum streamtype, struct tui_stream): Delete.
9732         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
9733         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
9734         (tui_file::tui_file): New method.
9735         (tui_file_fputs): Delete.
9736         (tui_file_get_strbuf): Delete.
9737         (tui_file::puts): New method.
9738         (tui_file_adjust_strbuf): Delete.
9739         (tui_file_flush): Delete.
9740         (tui_file::flush): New method.
9741         * tui/tui-file.h: Tweak intro comment.
9742         Include ui-file.h.
9743         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
9744         (tui_file_adjust_strbuf): Delete declarations.
9745         (class tui_file): New class.
9746         * tui/tui-io.c (tui_initialize_io): Use tui_file.
9747         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
9748         (tui_register_format): Use string_stream.
9749         * tui/tui-stack.c (tui_make_status_line): Use string_file.
9750         (tui_get_function_from_frame): Use string_file.
9751         * typeprint.c (type_to_string): Use string_file.
9752         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
9753         (null_stream): New global.
9754         (ui_file_delete): Delete.
9755         (ui_file::ui_file): New.
9756         (null_file_isatty): Delete.
9757         (ui_file::~ui_file): New.
9758         (null_file_rewind): Delete.
9759         (ui_file::printf): New.
9760         (null_file_put): Delete.
9761         (null_file_flush): Delete.
9762         (ui_file::putstr): New.
9763         (null_file_write): Delete.
9764         (ui_file::putstrn): New.
9765         (null_file_read): Delete.
9766         (ui_file::putc): New.
9767         (null_file_fputs): Delete.
9768         (null_file_write_async_safe): Delete.
9769         (ui_file::vprintf): New.
9770         (null_file_delete): Delete.
9771         (null_file::write): New.
9772         (null_file_fseek): Delete.
9773         (null_file::puts): New.
9774         (ui_file_data): Delete.
9775         (null_file::write_async_safe): New.
9776         (gdb_flush, ui_file_isatty): Adjust.
9777         (ui_file_put, ui_file_rewind): Delete.
9778         (ui_file_write): Adjust.
9779         (ui_file_write_for_put): Delete.
9780         (ui_file_write_async_safe, ui_file_read): Adjust.
9781         (ui_file_fseek): Delete.
9782         (fputs_unfiltered): Adjust.
9783         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
9784         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
9785         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
9786         (set_ui_file_data): Delete.
9787         (string_file::~string_file, string_file::write)
9788         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
9789         (do_ui_file_as_string, ui_file_as_string): Delete.
9790         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
9791         (struct mem_file): Delete.
9792         (mem_file_new): Delete.
9793         (stdio_file::stdio_file): New.
9794         (mem_file_delete): Delete.
9795         (stdio_file::stdio_file): New.
9796         (mem_fileopen): Delete.
9797         (stdio_file::~stdio_file): New.
9798         (mem_file_rewind): Delete.
9799         (stdio_file::set_stream): New.
9800         (mem_file_put): Delete.
9801         (stdio_file::open): New.
9802         (mem_file_write): Delete.
9803         (stdio_file_magic, struct stdio_file): Delete.
9804         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
9805         (stdio_file::flush): New.
9806         (stdio_file_read): Rename to ...
9807         (stdio_file::read): ... this.  Adjust.
9808         (stdio_file_write): Rename to ...
9809         (stdio_file::write): ... this.  Adjust.
9810         (stdio_file_write_async_safe): Rename to ...
9811         (stdio_file::write_async_safe) ... this.  Adjust.
9812         (stdio_file_fputs): Rename to ...
9813         (stdio_file::puts) ... this.  Adjust.
9814         (stdio_file_isatty): Delete.
9815         (stdio_file_fseek): Delete.
9816         (stdio_file::isatty): New.
9817         (stderr_file_write): Rename to ...
9818         (stderr_file::write) ... this.  Adjust.
9819         (stderr_file_fputs): Rename to ...
9820         (stderr_file::puts) ... this.  Adjust.
9821         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
9822         (stderr_file::stderr_file): New.
9823         (tee_file_magic): Delete.
9824         (struct tee_file): Delete.
9825         (tee_file::tee_file): New.
9826         (tee_file_new): Delete.
9827         (tee_file::~tee_file): New.
9828         (tee_file_delete): Delete.
9829         (tee_file_flush): Rename to ...
9830         (tee_file::flush): ... this.  Adjust.
9831         (tee_file_write): Rename to ...
9832         (tee_file::write): ... this.  Adjust.
9833         (tee_file::write_async_safe): New.
9834         (tee_file_fputs): Rename to ...
9835         (tee_file::puts): ... this.  Adjust.
9836         (tee_file_isatty): Rename to ...
9837         (tee_file::isatty): ... this.  Adjust.
9838         * ui-file.h (struct obstack, struct ui_file): Don't
9839         forward-declare.
9840         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
9841         (ui_file_write_ftype)
9842         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
9843         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
9844         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
9845         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
9846         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
9847         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
9848         (set_ui_file_fseek): Delete.
9849         (ui_file_data, ui_file_delete, ui_file_rewind)
9850         (struct ui_file): New.
9851         (ui_file_up): New.
9852         (class null_file): New.
9853         (null_stream): Declare.
9854         (ui_file_write_for_put, ui_file_put): Delete.
9855         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
9856         Delete.
9857         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
9858         (gdb_fopen, tee_file_new): Delete.
9859         (struct string_file): New.
9860         (struct stdio_file): New.
9861         (stdio_file_up): New.
9862         (struct stderr_file): New.
9863         (class tee_file): New.
9864         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
9865         of a 'ui_file *'.  Adjust.
9866         * ui-out.h (class ui_out) <field_stream>: Likewise.
9867         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
9868         (null_stream): Delete.
9869         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
9870         Adjust.
9871         * utils.h (struct ui_file): Delete forward declaration..
9872         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
9873         (error_stream): Take a 'string_file &' instead of a
9874         'ui_file *'.
9875         * varobj.c (varobj_value_get_print_value): Use string_file.
9876         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
9877         * gdbarch.c: Regenerate.
9878
9879 2017-02-02  Pedro Alves  <palves@redhat.com>
9880
9881         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
9882         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
9883         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
9884         Adjust to call gdb_print_insn instead of
9885         gdb_disassembler::print_insn.
9886         (dump_insns, do_mixed_source_and_assembly_deprecated)
9887         (do_mixed_source_and_assembly, do_assembly_only): Add back a
9888         'gdbarch' parameter.  Remove gdb_disassembler parameter.
9889         (gdb_disassembly): Don't allocate a gdb_disassembler here.
9890         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
9891         declaration.
9892         (gdb_pretty_print_insn): Re-add declaration.
9893         * record-btrace.c (btrace_insn_history): Don't allocate a
9894         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
9895
9896 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
9897
9898         * disasm.h (gdb_disassembly): Remove file_string parameter.
9899         * disasm.c (gdb_disassembly): Likewise.
9900         * cli/cli-cmds.c (print_disassembly): Adapt.
9901         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
9902         * stack.c (do_gdb_disassembly): Likewise.
9903
9904 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9905
9906         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
9907         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
9908         targets.  And if the implicit value is longer than needed, extract
9909         the first bytes instead of the "least significant" ones.
9910
9911 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
9912
9913         * btrace.c (btrace_enable): Do not call btrace_add_pc for
9914         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
9915         (btrace_fetch): Assert can_access_registers_ptid.
9916         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
9917         validate_registers_access.
9918
9919 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
9920
9921         * gdbthread.h (can_access_registers_ptid): New.
9922         * thread.c (can_access_registers_ptid): New.
9923
9924 2017-02-01  Pedro Alves  <palves@redhat.com>
9925
9926         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
9927
9928 2017-01-31  Pedro Alves  <palves@redhat.com>
9929
9930         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
9931         Fix typos.
9932
9933 2017-01-31  Pedro Alves  <palves@redhat.com>
9934
9935         * stack.c (print_frame_args): Remove local mem_fileopen stream,
9936         not used.
9937
9938 2017-01-31  Pedro Alves  <palves@redhat.com>
9939
9940         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
9941
9942 2017-01-31  Pedro Alves  <palves@redhat.com>
9943
9944         * common/scoped_restore.h
9945         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
9946         change the value's parameter type to T2.
9947         (make_scoped_restore): Likewise.
9948
9949 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
9950             Richard Henderson  <rth@redhat.com>
9951
9952         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
9953         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
9954         GS_BASE for older kernels.
9955         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
9956         GS_BASE for older kernels.
9957         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
9958         and GS_BASE to the offset table.
9959         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
9960         system register group.
9961         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
9962         for older kernels.
9963         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
9964         amd64 ABI.
9965         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
9966         AMD64_GSBASE_REGNUM.
9967         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
9968         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
9969         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
9970         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
9971         i386/64bit-segments.xml in those rules.
9972         * features/i386/64bit-segments.xml: New file.
9973         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
9974         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
9975         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
9976         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
9977         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
9978         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
9979         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
9980         * features/i386/amd64-avx-linux.c: Regenerated.
9981         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
9982         * features/i386/amd64-avx-mpx.c: Regenerated.
9983         * features/i386/amd64-avx512-linux.c: Regenerated.
9984         * features/i386/amd64-linux.c: Regenerated.
9985         * features/i386/amd64-mpx-linux.c: Regenerated.
9986         * features/i386/i386-avx-mpx-linux.c: Regenerated.
9987         * features/i386/i386-avx-mpx.c: Regenerated.
9988         * features/i386/x32-avx-linux.c: Regenerated.
9989         * features/i386/x32-avx512-linux.c: Regenerated.
9990         * regformats/i386/amd64-avx-linux.dat: Regenerated.
9991         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
9992         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
9993         * regformats/i386/amd64-linux.dat: Regenerated.
9994         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
9995         * regformats/i386/x32-avx-linux.dat: Regenerated.
9996         * regformats/i386/x32-avx512-linux.dat: Regenerated.
9997         * regformats/i386/x32-linux.dat: Regenerated.
9998
9999 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
10000
10001         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
10002         Set to AMD64_NUM_REGS.
10003
10004 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
10005
10006         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
10007         that checks validity of a register number.
10008
10009 2017-01-27  Kees Cook  <keescook@google.com>
10010
10011         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
10012         fetch_fpregs if target has fpa registers.
10013         (arm_linux_store_inferior_registers): Call store_fpregs if target
10014         has fpa registers.
10015
10016 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10017
10018         * cris-tdep.c (cris_gdbarch_init): Remove check for
10019         info.byte_order and force it to BFD_ENDIAN_LITTLE.
10020
10021 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
10022
10023         * corelow.c (get_core_register_section): Check for regset
10024         existence before checking for REGSET_VARIABLE_SIZE.
10025
10026 2017-01-26  Yao Qi  <yao.qi@linaro.org>
10027             Pedro Alves  <palves@redhat.com>
10028
10029         PR gdb/20939
10030         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
10031         call memory_error, save memaddr instead.
10032         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
10033         negative, cal memory_error.
10034         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
10035
10036 2017-01-26  Yao Qi  <yao.qi@linaro.org>
10037
10038         * disasm-selftests.c (memory_error_test): New function.
10039         (_initialize_disasm_selftests): Register memory_error_test.
10040
10041 2017-01-26  Yao Qi  <yao.qi@linaro.org>
10042
10043         * Makefile.in (SFILES): Add disasm-selftests.c and
10044         selftest-arch.c.
10045         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
10046         * disasm-selftests.c: New file.
10047         * selftest-arch.c: New file.
10048         * selftest-arch.h: New file.
10049
10050 2017-01-26  Yao Qi  <yao.qi@linaro.org>
10051
10052         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
10053         to bfd_arch_mep.  Don't return 0 if section is not
10054         found.  Call print_insn_mep.
10055
10056 2017-01-26  Pedro Alves  <palves@redhat.com>
10057             Yao Qi  <yao.qi@linaro.org>
10058
10059         * arm-tdep.c: Include "disasm.h".
10060         (gdb_print_insn_arm): Update code to get gdbarch.
10061         * disasm.c (dis_asm_read_memory): Change it to
10062         gdb_disassembler::dis_asm_read_memory.
10063         (dis_asm_memory_error): Likewise.
10064         (dis_asm_print_address): Likewise.
10065         (gdb_pretty_print_insn): Change it to
10066         gdb_disassembler::pretty_print_insn.
10067         (dump_insns): Add one argument gdb_disassemlber.  All
10068         callers updated.
10069         (do_mixed_source_and_assembly_deprecated): Likewise.
10070         (do_mixed_source_and_assembly): Likewise.
10071         (do_assembly_only): Likewise.
10072         (gdb_disassembler::gdb_disassembler): New.
10073         (gdb_disassembler::print_insn): New.
10074         * disasm.h (class gdb_disassembler): New.
10075         (gdb_pretty_print_insn): Remove declaration.
10076         (gdb_disassemble_info): Likewise.
10077         * guile/scm-disasm.c (class gdbscm_disassembler): New.
10078         (gdbscm_disasm_read_memory_worker): Update.
10079         (gdbscm_disasm_read_memory): Update.
10080         (gdbscm_disasm_memory_error): Remove.
10081         (gdbscm_disasm_print_address): Remove.
10082         (gdbscm_disassembler::gdbscm_disassembler): New.
10083         (gdbscm_print_insn_from_port): Update.
10084         * mips-tdep.c: Include disasm.h.
10085         (gdb_print_insn_mips): Update code to get gdbarch.
10086         * record-btrace.c (btrace_insn_history): Update.
10087         * spu-tdep.c: Include disasm.h.
10088         (struct spu_dis_asm_data): Remove.
10089         (struct spu_dis_asm_info): New.
10090         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
10091         SPU id.
10092         (gdb_print_insn_spu): Cast disassemble_info to
10093         spu_dis_asm_info.
10094
10095 2017-01-26  Yao Qi  <yao.qi@linaro.org>
10096
10097         * disasm.c (do_ui_file_delete): Delete.
10098         (gdb_insn_length): Move code creating stream to ...
10099         * utils.c (null_stream): ... here.  New function.
10100         * utils.h (null_stream): Declare.
10101
10102 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
10103
10104         * python/py-inferior.c (find_thread_object): Return directly
10105         from the loop.  Remove "found" variable.
10106
10107 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
10108
10109         GDB 7.12.1 released.
10110
10111 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
10112
10113         * python/py-function.c (fnpy_call): Reorder declarations to have
10114         the gdbpy_enter object declared first.
10115         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
10116
10117 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
10118
10119         PR python/21068
10120         * python/python-internal.h (PyMem_RawMalloc): Define for
10121         Python < 3.4.
10122         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
10123         PyMem_RawMalloc instead of PyMem_Malloc.
10124
10125 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
10126             Luis Machado  <lgustavo@codesourcery.com>
10127
10128         * NEWS (New commands): Mention flash-erase.
10129         (New MI commands): Mention target-flash-erase.
10130         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
10131         command.
10132         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
10133         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
10134         * target.c (flash_erase_command): New function.
10135         (initialize_targets): Add new flash-erase command.
10136         * target.h (flash_erase_command): New declaration.
10137
10138 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
10139
10140         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
10141         HAVE_SYS_PROCFS_H is defined.
10142
10143 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
10144
10145         * remote.c (struct cached_reg): Change data into a pointer.
10146         * (stop_reply_dtr): Free data pointers before deleting vector.
10147         (process_stop_reply): Likewise.
10148         (remote_parse_stop_reply): Allocate space for data
10149
10150 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
10151
10152         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
10153         MAX_REGISTER_SIZE.
10154         (amd64_pseudo_register_read_value): Likewise.
10155         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
10156         (store_register_using_P): Likewise.
10157         * regcache.c (regcache_xfer_part): Likewise.
10158
10159 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
10160
10161         Split real and pseudo registers.
10162         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
10163         (sparc32_pseudo_regnum): New enum.
10164         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
10165         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
10166         (SPARC32_CP0_REGISTERS): New macro.
10167         (sparc32_pseudo_register_name): New function.
10168         (sparc32_register_name): Use sparc32_pseudo_register_name.
10169         (sparc32_pseudo_register_type): New function.
10170         (sparc32_register_type): Use sparc32_pseudo_register_type.
10171         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
10172         pseudo register numbers.
10173         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
10174         (SPARC64_CP0_REGISTERS): New macro.
10175         (sparc64_pseudo_register_name): New function.
10176         (sparc64_register_name): Use sparc64_pseudo_register_name.
10177         (sparc64_pseudo_register_type): New function.
10178         (sparc64_register_type): Use sparc64_pseudo_register_type.
10179         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
10180         pseudo register numbers.
10181         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
10182         sparc64_store_arguments): Handle pseudo register numbers.
10183
10184 2017-01-13  Yao Qi  <yao.qi@linaro.org>
10185
10186         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
10187         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
10188         output.
10189         (getpkt_or_notif_sane_1): Likewise.
10190
10191 2017-01-13  Yao Qi  <yao.qi@linaro.org>
10192
10193         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
10194         of CC.  Pass "-x c++-header" instead of "-x c".
10195
10196 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
10197
10198         * remote.c (remote_can_async_p): Update comment.
10199
10200 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
10201
10202         * linux-nat.c (linux_nat_can_async_p): Update comment.
10203
10204 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
10205
10206         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
10207
10208 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
10209
10210         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
10211
10212 2017-01-10  Tom Tromey  <tom@tromey.com>
10213
10214         * python/py-type.c (typy_legacy_template_argument): Update.
10215         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
10216         ~demangle_parse_info): Declare new members.
10217         (cp_demangled_name_to_comp): Return unique_ptr.
10218         (cp_demangled_name_parse_free)
10219         (make_cleanup_cp_demangled_name_parse_free)
10220         (cp_new_demangle_parse_info): Remove.
10221         * cp-support.c (do_demangled_name_parse_free_cleanup)
10222         (make_cleanup_cp_demangled_name_parse_free): Remove.
10223         (inspect_type, cp_canonicalize_string_full)
10224         (cp_canonicalize_string): Update.
10225         (mangled_name_to_comp): Change return type.
10226         (cp_class_name_from_physname, method_name_from_physname)
10227         (cp_func_name, cp_remove_params): Update.
10228         * cp-name-parser.y (demangle_parse_info): New constructor, from
10229         cp_new_demangle_parse_info.
10230         (~demangle_parse_info): New destructor, from
10231         cp_demangled_name_parse_free.
10232         (cp_merge_demangle_parse_infos): Update.
10233         (cp_demangled_name_to_comp): Change return type.
10234
10235 2017-01-10  Tom Tromey  <tom@tromey.com>
10236
10237         * top.c (prevent_dont_repeat): Change return type.
10238         * python/python.c (execute_gdb_command): Use std::string.
10239         Update.
10240         * guile/guile.c (gdbscm_execute_gdb_command): Update.
10241         * command.h (prevent_dont_repeat): Change return type.
10242         * breakpoint.c (bpstat_do_actions_1): Update.
10243
10244 2017-01-10  Tom Tromey  <tom@tromey.com>
10245
10246         * value.h (scoped_value_mark::~scoped_value_mark): Call
10247         free_to_mark.
10248         (scoped_value_mark::free_to_mark): New method.
10249         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
10250         scoped_value_mark.
10251
10252 2017-01-10  Tom Tromey  <tom@tromey.com>
10253
10254         * python/py-value.c (valpy_dereference, valpy_referenced_value)
10255         (valpy_reference_value, valpy_const_value, valpy_get_address)
10256         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
10257         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
10258         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
10259         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
10260         scoped_value_mark.
10261         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
10262         * value.h (scoped_value_mark): New class.
10263
10264 2017-01-10  Tom Tromey  <tom@tromey.com>
10265
10266         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
10267         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
10268         * psymtab.c (discard_psymtabs_upto): Remove.
10269         (make_cleanup_discard_psymtabs): Remove.
10270         (struct psymtab_state): Remove.
10271
10272 2017-01-10  Tom Tromey  <tom@tromey.com>
10273
10274         * record-full.c (record_full_save_cleanups): Remove.
10275         (record_full_save): Use gdb::unlinker.
10276         * gcore.c (do_bfd_delete_cleanup): Remove.
10277         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
10278         cleanups.
10279         * dwarf2read.c (unlink_if_set): Remove.
10280         (write_psymtabs_to_index): Use gdb::unlinker.
10281         * common/gdb_unlinker.h: New file.
10282
10283 2017-01-10  Tom Tromey  <tom@tromey.com>
10284
10285         * windows-tdep.c (windows_xfer_shared_library): Update.
10286         * windows-nat.c (windows_make_so): Update.
10287         * utils.h (make_cleanup_bfd_unref): Remove.
10288         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
10289         * symfile.h (symfile_bfd_open)
10290         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
10291         * symfile.c (read_symbols, symbol_file_add)
10292         (separate_debug_file_exists): Update.
10293         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
10294         (generic_load, reread_symbols): Update.
10295         * symfile-mem.c (symbol_file_add_from_memory): Update.
10296         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
10297         (spu_symbol_file_add_from_memory): Update.
10298         * solist.h (struct target_so_ops) <bfd_open>: Return
10299         gdb_bfd_ref_ptr.
10300         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
10301         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
10302         gdb_bfd_ref_ptr.
10303         (solib_map_sections, reload_shared_libraries_1): Update.
10304         * solib-svr4.c (enable_break): Update.
10305         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
10306         * solib-frv.c (enable_break2): Update.
10307         * solib-dsbt.c (enable_break): Update.
10308         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
10309         gdb_bfd_ref_ptr.
10310         (darwin_solib_get_all_image_info_addr_at_init): Update.
10311         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
10312         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
10313         * record-full.c (record_full_save): Update.
10314         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
10315         * procfs.c (insert_dbx_link_bpt_in_file): Update.
10316         * minidebug.c (find_separate_debug_file_in_section): Return
10317         gdb_bfd_ref_ptr.
10318         * machoread.c (macho_add_oso_symfile): Change abfd to
10319         gdb_bfd_ref_ptr.
10320         (macho_symfile_read_all_oso): Update.
10321         (macho_check_dsym): Return gdb_bfd_ref_ptr.
10322         (macho_symfile_read): Update.
10323         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
10324         (jit_bfd_try_read_symtab): Update.
10325         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10326         (gdb_bfd_openw, gdb_bfd_openr_iovec)
10327         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
10328         gdb_bfd_ref_ptr.
10329         (gdb_bfd_ref_policy): New struct.
10330         (gdb_bfd_ref_ptr): New typedef.
10331         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10332         (gdb_bfd_openw, gdb_bfd_openr_iovec)
10333         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
10334         gdb_bfd_ref_ptr.
10335         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
10336         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
10337         (gcore_command): Update.
10338         * exec.c (exec_file_attach): Update.
10339         * elfread.c (elf_symfile_read): Update.
10340         * dwarf2read.c (dwarf2_get_dwz_file): Update.
10341         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
10342         (open_and_init_dwo_file): Update.
10343         (open_dwp_file): Return gdb_bfd_ref_ptr.
10344         (open_and_init_dwp_file): Update.
10345         * corelow.c (core_open): Update.
10346         * compile/compile-object-load.c (compile_object_load): Update.
10347         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
10348         * coffread.c (coff_symfile_read): Update.
10349         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
10350         gdb_bfd_ref_ptr.  Rename.
10351         (dump_bfd_file, restore_command): Update.
10352         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
10353         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
10354         (find_separate_debug_file_by_buildid): Update.
10355
10356 2017-01-10  Tom Tromey  <tom@tromey.com>
10357
10358         * common/gdb_ref_ptr.h: New file.
10359         * python/py-ref.h (struct gdbpy_ref_policy): New.
10360         (gdbpy_ref): Now a typedef.
10361
10362 2017-01-10  Tom Tromey  <tom@tromey.com>
10363
10364         * utils.h (make_cleanup_htab_delete): Don't declare.
10365         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
10366         Remove.
10367         * linespec.c (decode_compound_collector): Add constructor,
10368         destructor.
10369         (lookup_prefix_sym): Remove cleanup.
10370         (symtab_collector): Add constructor, destructor.
10371         (collect_symtabs_from_filename): Remove cleanup.
10372         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
10373         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
10374         Use htab_up.
10375         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
10376         * dwarf2read.c (dw2_expand_symtabs_matching)
10377         (dw2_map_symbol_filenames, dwarf_decode_macros)
10378         (write_psymtabs_to_index): Use htab_up.
10379         * dwarf2loc.c (func_verify_no_selftailcall)
10380         (call_site_find_chain_1, func_verify_no_selftailcall)
10381         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
10382         std::vector, gdb::unique_xmalloc_ptr.
10383         (call_sitep): Remove typedef.
10384         (dwarf2_locexpr_baton_eval): Remove unused variable.
10385
10386 2017-01-10  Tom Tromey  <tom@tromey.com>
10387
10388         * python/python-internal.h (make_cleanup_py_decref)
10389         (make_cleanup_py_xdecref): Don't declare.
10390         * python/py-utils.c (py_decref, make_cleanup_py_decref)
10391         (py_xdecref, make_cleanup_py_xdecref): Remove.
10392
10393 2017-01-10  Tom Tromey  <tom@tromey.com>
10394
10395         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
10396         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
10397
10398 2017-01-10  Tom Tromey  <tom@tromey.com>
10399
10400         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
10401
10402 2017-01-10  Tom Tromey  <tom@tromey.com>
10403
10404         * python/py-utils.c (unicode_to_encoded_string)
10405         (python_string_to_target_string)
10406         (python_string_to_target_python_string)
10407         (python_string_to_host_string, gdbpy_obj_to_string)
10408         (get_addr_from_python): Use gdbpy_ref.
10409
10410 2017-01-10  Tom Tromey  <tom@tromey.com>
10411
10412         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
10413         gdbpy_ref.
10414
10415 2017-01-10  Tom Tromey  <tom@tromey.com>
10416
10417         * python/python.c (eval_python_command, gdbpy_decode_line)
10418         (gdbpy_run_events, gdbpy_start_type_printers)
10419         (gdbpy_apply_type_printers): Use gdbpy_ref.
10420
10421 2017-01-10  Tom Tromey  <tom@tromey.com>
10422
10423         * python/py-param.c (get_doc_string, compute_enum_values): Use
10424         gdbpy_ref.
10425
10426 2017-01-10  Tom Tromey  <tom@tromey.com>
10427
10428         * python/py-inferior.c (find_thread_object, build_inferior_list):
10429         Use gdbpy_ref.
10430
10431 2017-01-10  Tom Tromey  <tom@tromey.com>
10432
10433         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
10434
10435 2017-01-10  Tom Tromey  <tom@tromey.com>
10436
10437         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
10438         gdbpy_ref.
10439
10440 2017-01-10  Tom Tromey  <tom@tromey.com>
10441
10442         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
10443         extra incref.
10444         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
10445         Use gdbpy_ref.
10446
10447 2017-01-10  Tom Tromey  <tom@tromey.com>
10448
10449         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
10450         gdbpy_ref.
10451
10452 2017-01-10  Tom Tromey  <tom@tromey.com>
10453
10454         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
10455         decref results of PyArg_ParseTupleAndKeywords.
10456
10457 2017-01-10  Tom Tromey  <tom@tromey.com>
10458
10459         * python/python.c (python_run_simple_file): Use
10460         unique_xmalloc_ptr, gdbpy_ref.
10461
10462 2017-01-10  Tom Tromey  <tom@tromey.com>
10463
10464         * python/py-prettyprint.c (print_stack_unless_memory_error)
10465         (print_string_repr, print_children): Use gdbpy_ref.
10466         (dummy_python_frame): New class.
10467         (dummy_python_frame::dummy_python_frame): Rename from
10468         push_dummy_python_frame.
10469         (py_restore_tstate): Remove.
10470
10471 2017-01-10  Tom Tromey  <tom@tromey.com>
10472
10473         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
10474
10475 2017-01-10  Tom Tromey  <tom@tromey.com>
10476
10477         * python/python.c (ensure_python_env, restore_python_env):
10478         Remove.
10479         * python/python-internal.h (ensure_python_env): Don't declare.
10480         * varobj.h (varobj_ensure_python_env): Don't declare.
10481         * varobj.c (varobj_ensure_python_env): Remove.
10482
10483 2017-01-10  Tom Tromey  <tom@tromey.com>
10484
10485         * varobj.c (varobj_value_get_print_value): Use
10486         gdbpy_enter_varobj.
10487
10488 2017-01-10  Tom Tromey  <tom@tromey.com>
10489
10490         * python/py-prettyprint.c (print_string_repr, print_children):
10491         Update.
10492         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
10493         of "encoding".
10494         * varobj.c (varobj_value_get_print_value): Update.
10495         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
10496
10497 2017-01-10  Tom Tromey  <tom@tromey.com>
10498
10499         * varobj.c (varobj_get_display_hint)
10500         (dynamic_varobj_has_child_method, install_new_value_visualizer)
10501         (varobj_set_visualizer, free_variable): Use
10502         gdbpy_enter_varobj.
10503
10504 2017-01-10  Tom Tromey  <tom@tromey.com>
10505
10506         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
10507         (do_finish_initialization): New function.  Use gdbpy_ref.
10508         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
10509         do_finish_initialization.
10510
10511 2017-01-10  Tom Tromey  <tom@tromey.com>
10512
10513         * python/py-param.c (get_set_value, get_show_value): Use
10514         gdbpy_enter, gdbpy_ref.
10515
10516 2017-01-10  Tom Tromey  <tom@tromey.com>
10517
10518         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
10519
10520 2017-01-10  Tom Tromey  <tom@tromey.com>
10521
10522         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
10523
10524 2017-01-10  Tom Tromey  <tom@tromey.com>
10525
10526         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
10527         Use gdbpy_enter_varobj.
10528
10529 2017-01-10  Tom Tromey  <tom@tromey.com>
10530
10531         * varobj.c (gdbpy_enter_varobj): New constructor.
10532         * python/python-internal.h (gdbpy_enter_varobj): New class.
10533         * python/py-varobj.c (py_varobj_get_iterator): Use
10534         gdbpy_enter_varobj.
10535
10536 2017-01-10  Tom Tromey  <tom@tromey.com>
10537
10538         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
10539         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
10540         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
10541         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
10542         unique_xmalloc_ptr.
10543         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
10544
10545 2017-01-10  Tom Tromey  <tom@tromey.com>
10546
10547         * python/py-xmethods.c (invoke_match_method): Use
10548         gdbpy_ref.
10549
10550 2017-01-10  Tom Tromey  <tom@tromey.com>
10551
10552         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
10553         gdbpy_enter, gdbpy_ref.
10554
10555 2017-01-10  Tom Tromey  <tom@tromey.com>
10556
10557         * python/python.c (python_interactive_command): Use gdbpy_enter.
10558
10559 2017-01-10  Tom Tromey  <tom@tromey.com>
10560
10561         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
10562         gdbpy_ref.
10563
10564 2017-01-10  Tom Tromey  <tom@tromey.com>
10565
10566         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
10567         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
10568
10569 2017-01-10  Tom Tromey  <tom@tromey.com>
10570
10571         * utils.h (htab_deleter): New struct.
10572         (htab_up): New typedef.
10573         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
10574         gdbpy_enter, gdbpy_ref, htab_up.
10575
10576 2017-01-10  Tom Tromey  <tom@tromey.com>
10577
10578         * python/py-unwind.c (pending_frame_invalidate): Remove.
10579         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
10580
10581 2017-01-10  Tom Tromey  <tom@tromey.com>
10582
10583         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
10584         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
10585
10586 2017-01-10  Tom Tromey  <tom@tromey.com>
10587
10588         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
10589
10590 2017-01-10  Tom Tromey  <tom@tromey.com>
10591
10592         * python/python.c (gdbpy_eval_from_control_command)
10593         (gdbpy_source_script, gdbpy_run_events)
10594         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
10595         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
10596         gdbpy_enter.
10597
10598 2017-01-10  Tom Tromey  <tom@tromey.com>
10599
10600         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
10601
10602 2017-01-10  Tom Tromey  <tom@tromey.com>
10603
10604         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
10605
10606 2017-01-10  Tom Tromey  <tom@tromey.com>
10607
10608         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
10609         (python_on_inferior_call_pre, python_on_inferior_call_post)
10610         (python_on_memory_change, python_on_register_change)
10611         (python_inferior_exit, python_new_objfile, add_thread_object)
10612         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
10613
10614 2017-01-10  Tom Tromey  <tom@tromey.com>
10615
10616         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
10617         (bpfinishpy_handle_exit): Use gdbpy_enter.
10618
10619 2017-01-10  Tom Tromey  <tom@tromey.com>
10620
10621         * python/py-cmd.c (cmdpy_destroyer)
10622         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
10623         gdbpy_enter.
10624
10625 2017-01-10  Tom Tromey  <tom@tromey.com>
10626
10627         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
10628         gdbpy_enter.
10629         (gdbpy_breakpoint_has_cond): Likewise.
10630
10631 2017-01-10  Tom Tromey  <tom@tromey.com>
10632
10633         * python/python.c (gdbpy_enter): New constructor.
10634         (~gdbpy_enter): New destructor.
10635         (restore_python_env, ensure_python_env): Rewrite.
10636         * python/python-internal.h (gdbpy_enter): New class.
10637
10638 2017-01-10  Tom Tromey  <tom@tromey.com>
10639
10640         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
10641
10642 2017-01-10  Tom Tromey  <tom@tromey.com>
10643
10644         * python/py-value.c (value_has_field, get_field_flag)
10645         (get_field_type, valpy_getitem, convert_value_from_python): Use
10646         gdbpy_ref.
10647
10648 2017-01-10  Tom Tromey  <tom@tromey.com>
10649
10650         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
10651         gdbpy_ref.
10652
10653 2017-01-10  Tom Tromey  <tom@tromey.com>
10654
10655         * python/py-prettyprint.c (search_pp_list)
10656         (find_pretty_printer_from_objfiles)
10657         (find_pretty_printer_from_progspace)
10658         (find_pretty_printer_from_gdb, find_pretty_printer)
10659         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
10660         gdbpy_ref.
10661
10662 2017-01-10  Tom Tromey  <tom@tromey.com>
10663
10664         * python/py-param.c (call_doc_function): Use gdbpy_ref.
10665
10666 2017-01-10  Tom Tromey  <tom@tromey.com>
10667
10668         * python/py-linetable.c (build_line_table_tuple_from_pcs)
10669         (ltpy_get_all_source_lines): Use gdbpy_ref.
10670
10671 2017-01-10  Tom Tromey  <tom@tromey.com>
10672
10673         * python/py-framefilter.c (extract_sym, extract_value)
10674         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
10675         gdbpy_ref.
10676
10677 2017-01-10  Tom Tromey  <tom@tromey.com>
10678
10679         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
10680
10681 2017-01-10  Tom Tromey  <tom@tromey.com>
10682
10683         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
10684
10685 2017-01-10  Tom Tromey  <tom@tromey.com>
10686
10687         * python/py-function.c (convert_values_to_python, fnpy_init): Use
10688         gdbpy_ref.
10689
10690 2017-01-10  Tom Tromey  <tom@tromey.com>
10691
10692         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
10693
10694 2017-01-10  Tom Tromey  <tom@tromey.com>
10695
10696         * python/py-type.c (convert_field, make_fielditem, typy_fields)
10697         (typy_range): Use gdbpy_ref.
10698
10699 2017-01-10  Tom Tromey  <tom@tromey.com>
10700
10701         * python/py-threadevent.c (create_thread_event_object): Use
10702         gdbpy_ref.
10703         * python/py-stopevent.c (create_stop_event_object): Simplify.
10704         (emit_stop_event): Use gdbpy_ref.
10705         * python/py-signalevent.c (create_signal_event_object): Use
10706         gdbpy_ref.
10707         * python/py-newobjfileevent.c (create_new_objfile_event_object)
10708         (emit_new_objfile_event, create_clear_objfiles_event_object)
10709         (emit_clear_objfiles_event): Use gdbpy_ref.
10710         * python/py-infevents.c (create_inferior_call_event_object)
10711         (create_register_changed_event_object)
10712         (create_memory_changed_event_object, emit_inferior_call_event)
10713         (emit_memory_changed_event, emit_register_changed_event): Use
10714         gdbpy_ref.
10715         * python/py-exitedevent.c (create_exited_event_object)
10716         (emit_exited_event): Use gdbpy_ref.
10717         * python/py-event.h (evpy_emit_event): Remove
10718         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
10719         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
10720         * python/py-continueevent.c (emit_continue_event): Use
10721         gdbpy_ref.
10722         * python/py-breakpoint.c (gdbpy_breakpoint_created)
10723         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
10724         gdbpy_ref.
10725         * python/py-bpevent.c (create_breakpoint_event_object): Use
10726         gdbpy_ref.
10727
10728 2017-01-10  Tom Tromey  <tom@tromey.com>
10729
10730         * python/py-ref.h: New file.
10731
10732 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
10733
10734         * cli-out.c (cli_ui_out::do_redirect): Change return type to
10735         void.
10736         * cli-out.h (cli_ui_out::do_redirect): Likewise.
10737         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
10738         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
10739         * ui-out.c (ui_out::redirect): Likewise.
10740         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
10741         * cli/cli-logging.c (set_logging_redirect): Update call site of
10742         ui_out::redirect.
10743         (handle_redirections): Likewise.
10744         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
10745         * top.c (execute_command_to_string): Likewise.
10746         * utils.c (do_ui_out_redirect_pop): Likewise.
10747
10748 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
10749
10750         * stack.c (_initialize_stack): Update "frame" command help message.
10751
10752 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
10753
10754         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
10755
10756 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10757
10758         * x86-linux-nat.h: Include gdb_proc_service.h.
10759
10760 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10761
10762         * ser-base.h: Include serial.h.
10763
10764 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10765
10766         * ppc-linux-tdep.h: Include ppc-tdep.h.
10767
10768 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10769
10770         * nat/amd64-linux-siginfo.h: Include signal.h.
10771
10772 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10773
10774         * nat/aarch64-linux-hw-point.h: Include break-common.h.
10775
10776 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10777
10778         * mi/mi-parse.h: Include mi-cmds.h.
10779
10780 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10781
10782         * inf-loop.c: Don't include "target.h".
10783         * inf-loop.h: Include it here.
10784
10785 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10786
10787         * dfp.h: Include "dboulest.h" and "expression.h".
10788
10789 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10790
10791         * ax-gdb.h: Include "ax.h".
10792
10793 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10794
10795         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
10796         with nat/gdb_ptrace.h.
10797
10798 2017-01-05  Yao Qi  <yao.qi@linaro.org>
10799
10800         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
10801         new line.
10802         (mips64_fbsd_sigframe_init): Likewise.
10803
10804 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
10805
10806         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
10807         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
10808
10809 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
10810
10811         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
10812         * NEWS: Mention new FreeBSD/mips native configuration.
10813         * config/mips/fbsd.mh: New file.
10814         * configure.host: Add mips*-*-freebsd*.
10815         * mips-fbsd-nat.c: New file.
10816
10817 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
10818
10819         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
10820         (ALLDEPFILES): Add mips-fbsd-tdep.c.
10821         * NEWS: Mention new FreeBSD/mips target.
10822         * configure.tgt: Add mips*-*-freebsd*.
10823         * mips-fbsd-tdep.c: New file.
10824         * mips-fbsd-tdep.h: New file.
10825
10826 2017-01-04  Yao Qi  <yao.qi@linaro.org>
10827
10828         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
10829         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
10830
10831 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
10832
10833         Update copyright year range in all GDB files.
10834
10835 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
10836
10837         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
10838
10839 For older changes see ChangeLog-2016.
10840 \f
10841 Local Variables:
10842 mode: change-log
10843 left-margin: 8
10844 fill-column: 74
10845 version-control: never
10846 coding: utf-8
10847 End: