78f0c14b905e106f64744234dfd4a394757e09c8
[external/binutils.git] / gdb / ChangeLog
1 2017-09-11  Tom Tromey  <tom@tromey.com>
2
3         * demangle.c (demangle_command): Update.
4         * breakpoint.c (disable_command): Update.
5         (enable_command): Update.
6         (find_location_by_number): Make "number" const.  Use
7         get_number_trailer.
8         * cli/cli-utils.c (extract_arg): Return std::string.
9         * probe.c (parse_probe_linespec): Update.  Change types.
10         (collect_probes): Take string arguments.
11         (parse_probe_linespec): Likewise.
12         (info_probes_for_ops): Update.
13         (enable_probes_command): Update.
14         (disable_probes_command): Update.
15         * break-catch-sig.c (catch_signal_split_args): Update.
16         * mi/mi-parse.c (mi_parse): Update.
17
18 2017-09-11  Tom Tromey  <tom@tromey.com>
19
20         * language.h (language_enum): Make argument const.
21         * language.c (language_enum): Make argument const.
22
23 2017-09-11  Tom Tromey  <tom@tromey.com>
24
25         * common/common-utils.h (skip_to_space): Remove macro, redeclare
26         as function.
27         (skip_to_space): Rename from skip_to_space_const.
28         * common/common-utils.c (skip_to_space): New function.
29         (skip_to_space): Rename from skip_to_space_const.
30         * cli/cli-utils.h (get_number): Rename from get_number_const.
31         (extract_arg): Rename from extract_arg_const.
32         * cli/cli-utils.c (get_number): Rename from get_number_const.
33         (extract_arg): Rename from extract_arg_const.
34         (number_or_range_parser::get_number): Use ::get_number.
35         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
36         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
37         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
38         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
39         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
40         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
41         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
42         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
43
44 2017-09-11  Tom Tromey  <tom@tromey.com>
45
46         * python/python.c (do_start_initialization): Use
47         py-event-types.def to initialize types.
48         Define all object type structures.
49         * python/python-internal.h: Don't declare event initialization
50         functions.
51         * python/py-threadevent.c (thread_event_object_type): Don't
52         define.
53         * python/py-stopevent.c (stop_event_object_type): Don't define.
54         * python/py-signalevent.c (signal_event_object_type): Don't
55         declare or define.
56         * python/py-newobjfileevent.c (new_objfile_event_object_type)
57         (clear_objfiles_event_object_type): Don't declare or define.
58         * python/py-infevents.c (inferior_call_pre_event_object_type)
59         (inferior_call_post_event_object_type)
60         (register_changed_event_object_type)
61         (memory_changed_event_object_type): Don't declare or define.
62         * python/py-inferior.c (new_thread_event_object_type)
63         (new_inferior_event_object_type)
64         (inferior_deleted_event_object_type): Don't declare or define.
65         * python/py-exitedevent.c (exited_event_object_type): Don't
66         declare or define.
67         * python/py-evts.c (gdbpy_initialize_py_events): Use
68         py-all-events.def.
69         * python/py-events.h (thread_event_object_type): Don't declare.
70         (events_object): Use py-all-events.def.
71         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
72         py-event-types.def.
73         * python/py-event-types.def: New file.
74         * python/py-continueevent.c (create_continue_event_object): Don't
75         declare or define.
76         * python/py-bpevent.c (breakpoint_event_object_type): Don't
77         declare or define.
78         * python/py-all-events.def: New file.
79
80 2017-09-11  Tom Tromey  <tom@tromey.com>
81
82         * python/py-threadevent.c (create_thread_event_object): Return
83         gdbpy_ref.
84         * python/py-stopevent.h (create_stop_event_object)
85         (create_breakpoint_event_object, create_signal_event_object):
86         Update.
87         * python/py-stopevent.c (create_stop_event_object): Return
88         gdbpy_ref.
89         (emit_stop_event): Update.
90         * python/py-signalevent.c (create_signal_event_object): Return
91         gdbpy_ref.
92         * python/py-infevents.c (create_inferior_call_event_object):
93         Update.
94         * python/py-event.h (create_event_object)
95         (create_thread_event_object): Update.
96         * python/py-event.c (create_event_object): Return gdbpy_ref.
97         * python/py-continueevent.c: Return gdbpy_ref.
98         * python/py-bpevent.c (create_breakpoint_event_object): Return
99         gdbpy_ref.
100
101 2017-09-11  Tom Tromey  <tom@tromey.com>
102
103         PR python/15622:
104         * NEWS: Add entry.
105         * python/python.c (do_start_initialization): Initialize new event
106         types.
107         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
108         (gdbpy_initialize_inferior_deleted_event)
109         (gdbpy_initialize_new_thread_event): Declare.
110         * python/py-threadevent.c (create_thread_event_object): Add option
111         "thread" parameter.
112         * python/py-inferior.c (new_thread_event_object_type)
113         (new_inferior_event_object_type)
114         (inferior_deleted_event_object_type): Declare.
115         (python_new_inferior, python_inferior_deleted): New functions.
116         (add_thread_object): Emit new_thread event.
117         (gdbpy_initialize_inferior): Attach new functions to corresponding
118         observers.
119         (new_thread, new_inferior, inferior_deleted): Define new event
120         types.
121         * python/py-evts.c (gdbpy_initialize_py_events): Add new
122         registries.
123         * python/py-events.h (events_object) <new_inferior,
124         inferior_deleted, new_thread>: New fields.
125         * python/py-event.h (create_thread_event_breakpoint): Add optional
126         "thread" parameter.
127
128 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
129
130         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
131         check current_ui instead.
132         (internal_vproblem): Likewise.
133
134 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
135
136         * thread.c (print_thread_info_1): Remove unnecessary calls to
137         uiout->is_mi_like_p.
138
139 2017-09-09  Tom Tromey  <tom@tromey.com>
140
141         * namespace.h (add_using_directive): Update.
142         * namespace.c (add_using_directive): Change type of excludes to
143         std::vector.
144         * dwarf2read.c (read_import_statement): Use std::vector.
145         (read_namespace): Update.
146         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
147
148 2017-09-09  Tom Tromey  <tom@tromey.com>
149
150         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
151
152 2017-09-09  Tom Tromey  <tom@tromey.com>
153
154         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
155
156 2017-09-09  Tom Tromey  <tom@tromey.com>
157
158         * stack.c (func_command): Use gdb::def_vector.
159
160 2017-09-09  Tom Tromey  <tom@tromey.com>
161
162         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
163         ui_out_emit_list, ui_out_emit_tuple.
164         (mi_cmd_var_update): Likewise.
165
166 2017-09-09  Tom Tromey  <tom@tromey.com>
167
168         * mi/mi-interp.c (mi_user_selected_context_changed): Use
169         ui_out_redirect_pop.
170         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
171         ui_out_redirect_pop.
172         * utils.c (do_ui_out_redirect_pop)
173         (make_cleanup_ui_out_redirect_pop): Remove.
174         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
175         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
176         * ui-out.h (ui_out_redirect_pop): New class.
177
178 2017-09-09  Tom Tromey  <tom@tromey.com>
179
180         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
181         (list_available_thread_groups, mi_cmd_list_thread_groups)
182         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
183         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
184         Likewise.
185
186 2017-09-09  Tom Tromey  <tom@tromey.com>
187
188         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
189         ui_out_emit_tuple.
190
191 2017-09-09  Tom Tromey  <tom@tromey.com>
192
193         * target.c (flash_erase_command): Use ui_out_emit_tuple.
194         * stack.c (print_frame): Use ui_out_emit_tuple.
195         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
196         (info_spu_mailbox_command, info_spu_dma_command)
197         (info_spu_proxydma_command): Likewise.
198         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
199         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
200         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
201         ui_out_emit_tuple.
202         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
203
204 2017-09-09  Tom Tromey  <tom@tromey.com>
205
206         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
207         (class ui_out_emit_table): Update comment.
208         * ui-out.c (do_cleanup_table_end)
209         (make_cleanup_ui_out_table_begin_end): Remove.
210         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
211         (info_spu_dma_cmdlist): Likewise.
212         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
213         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
214         ui_out_emit_table.
215
216 2017-09-09  Tom Tromey  <tom@tromey.com>
217
218         * thread.c (print_thread_info_1): Use ui_out_emit_table,
219         ui_out_emit_list, gdb::optional.
220
221 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
222
223         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
224         prototype.
225         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
226         prototype.
227         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
228         prototype.
229         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
230         * ada-exp.y: Remove _initialize_ada_exp prototype.
231         * ada-lang.c: Remove _initialize_ada_language prototype.
232         * ada-tasks.c: Remove _initialize_tasks prototype.
233         * addrmap.c: Remove _initialize_addrmap prototype.
234         * agent.c: Remove _initialize_agent prototype.
235         * aix-thread.c: Remove _initialize_aix_thread prototype.
236         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
237         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
238         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
239         prototype.
240         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
241         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
242         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
243         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
244         prototype.
245         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
246         prototype.
247         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
248         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
249         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
250         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
251         prototype.
252         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
253         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
254         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
255         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
256         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
257         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
258         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
259         prototype.
260         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
261         prototype.
262         * annotate.c: Remove _initialize_annotate prototype.
263         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
264         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
265         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
266         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
267         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
268         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
269         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
270         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
271         prototype.
272         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
273         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
274         * auto-load.c: Remove _initialize_auto_load prototype.
275         * auxv.c: Remove _initialize_auxv prototype.
276         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
277         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
278         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
279         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
280         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
281         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
282         prototype.
283         * break-catch-throw.c: Remove _initialize_break_catch_throw
284         prototype.
285         * breakpoint.c: Remove _initialize_breakpoint prototype.
286         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
287         * btrace.c: Remove _initialize_btrace prototype.
288         * charset.c: Remove _initialize_charset prototype.
289         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
290         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
291         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
292         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
293         * cli/cli-script.c: Remove _initialize_cli_script prototype.
294         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
295         * coffread.c: Remove _initialize_coffread prototype.
296         * compile/compile.c: Remove _initialize_compile prototype.
297         * complaints.c: Remove _initialize_complaints prototype.
298         * completer.c: Remove _initialize_completer prototype.
299         * copying.awk: Remove _initialize_copying prototype.
300         * copying.c: Regenerate.
301         * core-regset.c: Remove _initialize_core_regset prototype.
302         * corefile.c: Remove _initialize_core prototype.
303         * corelow.c: Remove _initialize_corelow prototype.
304         * cp-abi.c: Remove _initialize_cp_abi prototype.
305         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
306         * cp-support.c: Remove _initialize_cp_support prototype.
307         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
308         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
309         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
310         * ctf.c: Remove _initialize_ctf prototype.
311         * d-lang.c: Remove _initialize_d_language prototype.
312         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
313         prototype.
314         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
315         * dbxread.c: Remove _initialize_dbxread prototype.
316         * dcache.c: Remove _initialize_dcache prototype.
317         * demangle.c: Remove _initialize_demangler prototype.
318         * disasm-selftests.c: Remove _initialize_disasm_selftests
319         prototype.
320         * disasm.c: Remove _initialize_disasm prototype.
321         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
322         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
323         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
324         prototype.
325         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
326         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
327         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
328         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
329         * elfread.c: Remove _initialize_elfread prototype.
330         * exec.c: Remove _initialize_exec prototype.
331         * extension.c: Remove _initialize_extension prototype.
332         * f-lang.c: Remove _initialize_f_language prototype.
333         * f-valprint.c: Remove _initialize_f_valprint prototype.
334         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
335         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
336         * filesystem.c: Remove _initialize_filesystem prototype.
337         * findcmd.c: Remove _initialize_mem_search prototype.
338         * fork-child.c: Remove _initialize_fork_child prototype.
339         * frame-base.c: Remove _initialize_frame_base prototype.
340         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
341         * frame.c: Remove _initialize_frame prototype.
342         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
343         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
344         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
345         * gcore.c: Remove _initialize_gcore prototype.
346         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
347         * gdbarch.c: Regenerate.
348         * gdbarch.sh: Remove _initialize_gdbarch prototype.
349         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
350         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
351         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
352         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
353         * go-lang.c: Remove _initialize_go_language prototype.
354         * go32-nat.c: Remove _initialize_go32_nat prototype.
355         * guile/guile.c: Remove _initialize_guile prototype.
356         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
357         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
358         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
359         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
360         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
361         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
362         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
363         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
364         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
365         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
366         prototype.
367         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
368         prototype.
369         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
370         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
371         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
372         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
373         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
374         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
375         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
376         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
377         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
378         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
379         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
380         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
381         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
382         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
383         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
384         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
385         prototype.
386         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
387         prototype.
388         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
389         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
390         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
391         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
392         * infcall.c: Remove _initialize_infcall prototype.
393         * infcmd.c: Remove _initialize_infcmd prototype.
394         * inferior.c: Remove _initialize_inferiors prototype.
395         * inflow.c: Remove _initialize_inflow prototype.
396         * infrun.c: Remove _initialize_infrun prototype.
397         * interps.c: Remove _initialize_interpreter prototype.
398         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
399         * jit.c: Remove _initialize_jit prototype.
400         * language.c: Remove _initialize_language prototype.
401         * linux-fork.c: Remove _initialize_linux_fork prototype.
402         * linux-nat.c: Remove _initialize_linux_nat prototype.
403         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
404         * linux-thread-db.c: Remove _initialize_thread_db prototype.
405         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
406         * m2-lang.c: Remove _initialize_m2_language prototype.
407         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
408         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
409         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
410         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
411         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
412         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
413         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
414         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
415         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
416         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
417         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
418         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
419         * machoread.c: Remove _initialize_machoread prototype.
420         * macrocmd.c: Remove _initialize_macrocmd prototype.
421         * macroscope.c: Remove _initialize_macroscope prototype.
422         * maint.c: Remove _initialize_maint_cmds prototype.
423         * mdebugread.c: Remove _initialize_mdebugread prototype.
424         * memattr.c: Remove _initialize_mem prototype.
425         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
426         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
427         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
428         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
429         * mi/mi-main.c: Remove _initialize_mi_main prototype.
430         * microblaze-linux-tdep.c: Remove
431         _initialize_microblaze_linux_tdep prototype.
432         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
433         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
434         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
435         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
436         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
437         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
438         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
439         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
440         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
441         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
442         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
443         prototype.
444         * mipsread.c: Remove _initialize_mipsread prototype.
445         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
446         prototype.
447         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
448         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
449         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
450         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
451         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
452         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
453         prototype.
454         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
455         * nto-procfs.c: Remove _initialize_procfs prototype.
456         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
457         * objc-lang.c: Remove _initialize_objc_language prototype.
458         * objfiles.c: Remove _initialize_objfiles prototype.
459         * observer.c: Remove observer_test_first_notification_function,
460         observer_test_second_notification_function,
461         observer_test_third_notification_function, and
462         _initialize_observer prototypes.
463         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
464         * osabi.c: Remove _initialize_gdb_osabi prototype.
465         * osdata.c: Remove _initialize_osdata prototype.
466         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
467         * parse.c: Remove _initialize_parse prototype.
468         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
469         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
470         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
471         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
472         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
473         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
474         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
475         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
476         * printcmd.c: Remove _initialize_printcmd prototype.
477         * probe.c: Remove _initialize_probe prototype.
478         * proc-api.c: Remove _initialize_proc_api prototype.
479         * proc-events.c: Remove _initialize_proc_events prototype.
480         * proc-service.c: Remove _initialize_proc_service prototype.
481         * procfs.c: Remove _initialize_procfs prototype.
482         * psymtab.c: Remove _initialize_psymtab prototype.
483         * python/python.c: Remove _initialize_python prototype.
484         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
485         * record-btrace.c: Remove _initialize_record_btrace prototype.
486         * record-full.c: Remove _initialize_record_full prototype.
487         * record.c: Remove _initialize_record prototype.
488         * regcache.c: Remove _initialize_regcache prototype.
489         * reggroups.c: Remove _initialize_reggroup prototype.
490         * remote-notif.c: Remove _initialize_notif prototype.
491         * remote-sim.c: Remove _initialize_remote_sim prototype.
492         * remote.c: Remove _initialize_remote prototype.
493         * reverse.c: Remove _initialize_reverse prototype.
494         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
495         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
496         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
497         prototype.
498         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
499         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
500         * rust-exp.y: Remove _initialize_rust_exp prototype.
501         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
502         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
503         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
504         * score-tdep.c: Remove _initialize_score_tdep prototype.
505         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
506         prototype.
507         * ser-go32.c: Remove _initialize_ser_dos prototype.
508         * ser-mingw.c: Remove _initialize_ser_windows prototype.
509         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
510         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
511         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
512         * serial.c: Remove _initialize_serial prototype.
513         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
514         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
515         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
516         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
517         * skip.c: Remove _initialize_step_skip prototype.
518         * sol-thread.c: Remove _initialize_sol_thread prototype.
519         * solib-aix.c: Remove _initialize_solib_aix prototype.
520         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
521         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
522         * solib-frv.c: Remove _initialize_frv_solib prototype.
523         * solib-spu.c: Remove _initialize_spu_solib prototype.
524         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
525         * solib-target.c: Remove _initialize_solib_target prototype.
526         * solib.c: Remove _initialize_solib prototype.
527         * source.c: Remove _initialize_source prototype.
528         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
529         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
530         prototype.
531         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
532         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
533         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
534         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
535         prototype.
536         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
537         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
538         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
539         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
540         prototype.
541         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
542         prototype.
543         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
544         prototype.
545         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
546         prototype.
547         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
548         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
549         prototype.
550         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
551         prototype.
552         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
553         prototype.
554         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
555         prototype.
556         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
557         prototype.
558         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
559         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
560         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
561         * stabsread.c: Remove _initialize_stabsread prototype.
562         * stack.c: Remove _initialize_stack prototype.
563         * stap-probe.c: Remove _initialize_stap_probe prototype.
564         * std-regs.c: Remove _initialize_frame_reg prototype.
565         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
566         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
567         * symfile.c: Remove _initialize_symfile prototype.
568         * symmisc.c: Remove _initialize_symmisc prototype.
569         * symtab.c: Remove _initialize_symtab prototype.
570         * target-dcache.c: Remove _initialize_target_dcache prototype.
571         * target-descriptions.c: Remove _initialize_target_descriptions
572         prototype.
573         * thread.c: Remove _initialize_thread prototype.
574         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
575         prototype.
576         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
577         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
578         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
579         prototype.
580         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
581         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
582         * tracefile.c: Remove _initialize_tracefile prototype.
583         * tracepoint.c: Remove _initialize_tracepoint prototype.
584         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
585         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
586         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
587         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
588         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
589         * tui/tui-win.c: Remove _initialize_tui_win prototype.
590         * tui/tui.c: Remove _initialize_tui prototype.
591         * typeprint.c: Remove _initialize_typeprint prototype.
592         * user-regs.c: Remove _initialize_user_regs prototype.
593         * utils.c: Remove _initialize_utils prototype.
594         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
595         * valarith.c: Remove _initialize_valarith prototype.
596         * valops.c: Remove _initialize_valops prototype.
597         * valprint.c: Remove _initialize_valprint prototype.
598         * value.c: Remove _initialize_values prototype.
599         * varobj.c: Remove _initialize_varobj prototype.
600         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
601         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
602         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
603         * windows-nat.c: Remove _initialize_windows_nat,
604         _initialize_check_for_gdb_ini, and _initialize_loadable
605         prototypes.
606         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
607         * xcoffread.c: Remove _initialize_xcoffread prototype.
608         * xml-support.c: Remove _initialize_xml_support prototype.
609         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
610         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
611         prototype.
612         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
613         prototype.
614         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
615
616 2017-09-08  Keith Seitz  <keiths@redhat.com>
617
618         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
619         field.
620
621 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
622
623         * f-valprint.c (f_val_print): Remove check for one byte
624         sized integers. Remove printing of character type.
625
626 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
627             Christoph Weinmann  <christoph.t.weinmann@intel.com>
628             Bernhard Heckel  <bernhard.heckel@intel.com>
629
630         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
631         to maintain proper indentation when printing pointers/refs.
632
633 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
634
635         GDB 8.0.1 released.
636
637 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
638
639         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
640
641 2017-09-05  Tom Tromey  <tom@tromey.com>
642
643         * parse.c (funcall_chain): Now a std::vector.
644         (start_arglist, end_arglist): Simplify.
645         (free_funcalls): Remove.
646         (parse_exp_in_context_1): Remove cleanup.
647
648 2017-09-05  Tom Tromey  <tom@tromey.com>
649
650         * go-exp.y (go_parse): Don't create a cleanup.
651
652 2017-09-05  Tom Tromey  <tom@tromey.com>
653
654         * d-exp.y (PrimaryExpression): Use std::string.
655         (d_parse): Don't create a cleanup.
656
657 2017-09-05  Tom Tromey  <tom@tromey.com>
658
659         * utils.c (do_clear_parser_state): Remove.
660         (make_cleanup_clear_parser_state): Remove.
661         * p-exp.y (pascal_parse): Use scoped_restore.
662         * m2-exp.y (m2_parse): Use scoped_restore.
663         * f-exp.y (f_parse): Use scoped_restore.
664         * d-exp.y (d_parse): Use scoped_restore.
665         * c-exp.y (c_parse): Use scoped_restore.
666         * ada-exp.y (ada_parse): Use scoped_restore.
667         * utils.h (make_cleanup_clear_parser_state): Remove.
668
669 2017-09-06  Keith Seitz  <keiths@redhat.com>
670
671         * dwarf2read.c (dw2_linkage_name_attr): New function.
672         (dw2_linkage_name): New function.
673         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
674         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
675         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
676
677 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
678
679         * config/djgpp/djconfig.sh: Correct shell portability issue.
680
681 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
682
683         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
684
685 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
686
687         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
688         * NEWS: Mention new FreeBSD/mips native configuration.
689         * configure.host: Add aarch64*-*-freebsd*.
690         * configure.nat: Likewise.
691         * aarch64-fbsd-nat.c: New file.
692
693 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
694
695         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
696         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
697         * NEWS: Mention new FreeBSD/aarch64 target.
698         * configure.tgt: Add aarch64*-*-freebsd*.
699         * aarch64-fbsd-tdep.c: New file.
700         * aarch64-fbsd-tdep.h: New file.
701
702 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
703
704         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
705
706 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
707
708         * parse.c (find_minsym_type_and_address): Don't relocate addresses
709         of TLS symbols.
710
711 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
712
713         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
714         call.
715
716 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
717
718         * infrun.c (follow_exec): Call add_thread after
719         target_find_description.
720
721 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
722
723         * infrun.c (handle_inferior_event_1): When exec'ing, read
724         stop_pc after follow_exec.
725
726 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
727
728         * remote.c (process_g_packet): Update error message.
729
730 2017-09-05  Yao Qi  <yao.qi@linaro.org>
731
732         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
733         targets.
734
735 2017-09-05  Pedro Alves  <palves@redhat.com>
736
737         * eval.c (eval_call, evaluate_funcall): New functions, factored
738         out from ...
739         (evaluate_subexp_standard): ... this.
740
741 2017-09-05  Yao Qi  <yao.qi@linaro.org>
742
743         * amd64-tdep.c (amd64_target_description): Create target
744         descriptions.
745         (_initialize_amd64_tdep): Don't call functions
746         initialize_tdesc_amd64_*.  Add self tests.
747         * arch/amd64.c (amd64_create_target_description): Add parameter
748         is_linux.  Call set_tdesc_osabi if is_linux is true.
749         * arch/amd64.h (amd64_create_target_description): Update the
750         declaration.
751         * arch/i386.c (i386_create_target_description): Add parameter
752         is_linux.  Call set_tdesc_osabi if is_linux is true.
753         * arch/i386.h (i386_create_target_description): Update
754         declaration.
755         * configure.tgt: Add i386.o to gdb_target_obs.
756         * features/Makefile (XMLTOC): Remove i386/*.xml.
757         * features/i386/amd64-avx-avx512.c: Remove.
758         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
759         * features/i386/amd64-avx-mpx.c: Remove.
760         * features/i386/amd64-avx.c: Remove.
761         * features/i386/amd64-mpx.c: Remove.
762         * features/i386/amd64.c: Remove.
763         * features/i386/i386-avx-avx512.c: Remove.
764         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
765         * features/i386/i386-avx-mpx.c: Remove.
766         * features/i386/i386-avx.c: Remove.
767         * features/i386/i386-mmx.c: Remove.
768         * features/i386/i386-mpx.c: Remove.
769         * features/i386/i386.c: Remove.
770         * i386-tdep.c: Don't include features/i386/i386*.c., include
771         target-descriptions.h and arch/i386.h.
772         (i386_target_description): Create target descriptions.
773         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
774         functions.  Do self tests.
775
776 2017-09-05  Yao Qi  <yao.qi@linaro.org>
777
778         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
779         * features/i386/amd64-avx-avx512-linux.c: Removed.
780         * features/i386/amd64-avx-linux.c: Removed.
781         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
782         * features/i386/amd64-avx-mpx-linux.c: Removed.
783         * features/i386/amd64-linux.c: Removed.
784         * features/i386/amd64-mpx-linux.c: Removed.
785         * features/i386/x32-avx-avx512-linux.c: Removed.
786         * features/i386/x32-avx-linux.c: Removed.
787         * features/i386/x32-linux.c: Removed.
788
789 2017-09-05  Yao Qi  <yao.qi@linaro.org>
790
791         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
792         features/i386/*.c.
793         (amd64_linux_read_description): Call
794         amd64_create_target_description.
795         * arch/amd64.c: New file.
796         * arch/amd64.h: New file.
797         * configure.tgt (x86_64-*-linux*): Append amd64.o.
798         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
799
800 2017-09-05  Yao Qi  <yao.qi@linaro.org>
801
802         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
803         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
804         (amd64_linux_read_description): Create target descriptions.
805         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
806         functions.  Add unit tests.
807         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
808         x32-core.xml.
809         * features/i386/64bit-avx.c: Generated.
810         * features/i386/64bit-avx512.c: Generated.
811         * features/i386/64bit-core.c: Generated.
812         * features/i386/64bit-linux.c: Generated.
813         * features/i386/64bit-mpx.c: Generated.
814         * features/i386/64bit-pkeys.c: Generated.
815         * features/i386/64bit-segments.c: Generated.
816         * features/i386/64bit-sse.c: Generated.
817         * features/i386/x32-core.c: Generated.
818         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
819         c files for amd64-linux and x32-linux.
820
821 2017-09-05  Yao Qi  <yao.qi@linaro.org>
822
823         * amd64-linux-tdep.c (amd64_linux_read_description): New
824         function.
825         (amd64_linux_core_read_description): Call
826         amd64_linux_read_description.
827         (amd64_linux_init_abi): Likewise.
828         (amd64_x32_linux_init_abi): Likewise.
829         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
830         * x86-linux-nat.c (x86_linux_read_description): Call
831         amd64_linux_read_description.
832
833 2017-09-05  Yao Qi  <yao.qi@linaro.org>
834
835         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
836         comments.
837
838 2017-09-05  Yao Qi  <yao.qi@linaro.org>
839
840         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
841         * features/i386/i386-avx-avx512-linux.c: Remove.
842         * features/i386/i386-avx-linux.c: Remove.
843         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
844         * features/i386/i386-avx-mpx-linux.c: Remove.
845         * features/i386/i386-linux.c: Remove.
846         * features/i386/i386-mmx-linux.c: Remove.
847         * features/i386/i386-mpx-linux.c: Remove.
848
849 2017-09-05  Yao Qi  <yao.qi@linaro.org>
850
851         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
852         (SFILES): Add arch/i386.c.
853         (HFILES_NO_SRCDIR): Add arch/i386.h.
854         * arch/i386.c: New file.
855         * arch/i386.h: New file.
856         * arch/tdesc.h (allocate_target_description): Declare.
857         (set_tdesc_architecture): Declare.
858         (set_tdesc_osabi): Declare.
859         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
860         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
861         include arch/i386.h.
862         (i386_linux_read_description): Remove code and call
863         i386_create_target_description.
864         (set_tdesc_architecture): New function.
865         (set_tdesc_osabi): New function.
866         * target-descriptions.h (allocate_target_description): Remove.
867
868 2017-09-05  Yao Qi  <yao.qi@linaro.org>
869
870         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
871         * target-descriptions.c (tdesc_create_feature): Likewise, and
872         adjust code.
873         * features/i386/32bit-avx.c: Re-generated.
874         * features/i386/32bit-avx512.c: Re-generated.
875         * features/i386/32bit-core.c: Re-generated.
876         * features/i386/32bit-linux.c: Re-generated.
877         * features/i386/32bit-mpx.c: Re-generated.
878         * features/i386/32bit-pkeys.c: Re-generated.
879         * features/i386/32bit-sse.c: Re-generated.
880
881 2017-09-05  Yao Qi  <yao.qi@linaro.org>
882
883         * regformats/regdef.h (struct reg): Override operator == and !=.
884
885 2017-09-05  Yao Qi  <yao.qi@linaro.org>
886
887         * arch/tdesc.h: New file.
888         * regformats/regdat.sh: Generate code using tdesc_create_reg.
889         * target-descriptions.c: Update comments.
890         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
891         declarations.
892         * features/i386/32bit-avx.c: Re-generated.
893         * features/i386/32bit-avx512.c: Re-generated.
894         * features/i386/32bit-core.c: Re-generated.
895         * features/i386/32bit-linux.c: Re-generated.
896         * features/i386/32bit-mpx.c: Re-generated.
897         * features/i386/32bit-pkeys.c: Re-generated.
898         * features/i386/32bit-sse.c: Re-generated.
899
900 2017-09-05  Yao Qi  <yao.qi@linaro.org>
901
902         * regformats/regdat.sh: Update generated code.
903
904 2017-09-05  Yao Qi  <yao.qi@linaro.org>
905
906         * regformats/regdat.sh: Adjust code order.
907
908 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
909
910         * expprint.c (dump_subexp_body_standard): Use constant format
911         string in fprintf_filtered call.
912
913 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
914
915         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
916         NetBSD/i386.
917         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
918
919 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
920
921         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
922
923 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
924
925         * bsd-kvm.o: Define _KMEMUSER.
926         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
927         * configure: Regenerate.
928
929 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
930
931         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
932         * i386-fbsd-nat.c: Likewise.
933
934 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
935
936         * unittests/array-view-selftests.c: Add include of <array>.
937
938 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
939
940         * spu-tdep.c (flush_ea_cache): Add missing argument to
941         call_function_by_hand.
942
943 2017-09-04  Pedro Alves  <palves@redhat.com>
944
945         * NEWS (Safer support for debugging with no debug info): New.
946
947 2017-09-04  Pedro Alves  <palves@redhat.com>
948
949         * c-exp.y (function_method, function_method_void): Add current
950         instance flags to TYPE_INSTANCE.
951         * dwarf2read.c (check_modifier): New.
952         (compute_delayed_physnames): Assert that only C++ adds delayed
953         physnames.  Mark fn_fields as const/volatile depending on
954         physname.
955         * eval.c (make_params): New type_instance_flags parameter.  Use
956         it as the new type's instance flags.
957         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
958         flags element and pass it to make_params.
959         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
960         instance flags element.
961         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
962         * gdbtypes.h: Include "enum-flags.h".
963         (type_instance_flags): New enum-flags type.
964         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
965         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
966         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
967         (follow_type_instance_flags): New function.
968         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
969         * parser-defs.h (follow_type_instance_flags): Declare.
970         * valops.c (value_struct_elt_for_reference): const/volatile must
971         match too.
972
973 2017-09-04  Pedro Alves  <palves@redhat.com>
974
975         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
976         function/method scopes; lookup the nested name as a function local
977         static variable.
978
979 2017-09-04  Pedro Alves  <palves@redhat.com>
980
981         (%type <voidval>): Add function_method.
982         * c-exp.y (exp): New production for calls with no arguments.
983         (function_method, function_method_void_or_typelist): New
984         productions.
985         (exp): New production for "method()::static_var".
986         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
987         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
988         Handle OP_FUNC_STATIC_VAR.
989         * parse.c (operator_length_standard):
990         Handle OP_FUNC_STATIC_VAR.
991
992 2017-09-04  Pedro Alves  <palves@redhat.com>
993
994         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
995         handling.
996         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
997         Ditto.
998         * parse.c (operator_length_standard, operator_check_standard):
999         Ditto.
1000         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
1001
1002 2017-09-04  Pedro Alves  <palves@redhat.com>
1003
1004         * ax-gdb.c: Include "typeprint.h".
1005         (gen_expr_for_cast): New function.
1006         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
1007         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
1008         type is unknown.
1009         * dwarf2read.c (new_symbol_full): Fallback to int instead of
1010         nodebug_data_symbol.
1011         * eval.c: Include "typeprint.h".
1012         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
1013         Error out if symbol has unknown type.
1014         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
1015         evaluate_subexp_for_cast.
1016         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
1017         OP_VAR_MSYM_VALUE.
1018         (evaluate_subexp_for_cast): New function.
1019         * gdbtypes.c (init_nodebug_var_type): New function.
1020         (objfile_type): Use it to initialize types of variables with no
1021         debug info.
1022         * typeprint.c (error_unknown_type): New.
1023         * typeprint.h (error_unknown_type): New declaration.
1024         * compile/compile-c-types.c (convert_type_basic): Handle
1025         TYPE_CODE_ERROR; warn and fallback to int for variables with
1026         unknown type.
1027
1028 2017-09-04  Pedro Alves  <palves@redhat.com>
1029
1030         * eval.c (evaluate_var_value): New function, factored out from ...
1031         (evaluate_subexp_standard): ... here.
1032
1033 2017-09-04  Pedro Alves  <palves@redhat.com>
1034
1035         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
1036         Remove useless assignments to 'op'.
1037
1038 2017-09-04  Pedro Alves  <palves@redhat.com>
1039
1040         * eval.c (eval_skip_value): New function.
1041         (evaluate_subexp_standard): Use it.
1042
1043 2017-09-04  Pedro Alves  <palves@redhat.com>
1044
1045         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
1046         function name from symbol/minsym and pass it to
1047         error_call_unknown_return_type.
1048
1049 2017-09-04  Pedro Alves  <palves@redhat.com>
1050
1051         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
1052         * ax-gdb.c (gen_msym_var_ref): New function.
1053         (gen_expr): Handle OP_VAR_MSYM_VALUE.
1054         * eval.c (evaluate_var_msym_value): New function.
1055         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
1056         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
1057         to call_function_by_hand.
1058         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1059         Handle OP_VAR_MSYM_VALUE.
1060         (union exp_element) <msymbol>: New field.
1061         * minsyms.h (struct type): Forward declare.
1062         (find_minsym_type_and_address): Declare.
1063         * parse.c (write_exp_elt_msym): New function.
1064         (write_exp_msymbol): Delete, refactored as ...
1065         (find_minsym_type_and_address): ... this new function.
1066         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
1067         (operator_length_standard, operator_check_standard): Handle
1068         OP_VAR_MSYM_VALUE.
1069         * std-operator.def (OP_VAR_MSYM_VALUE): New.
1070
1071 2017-09-04  Pedro Alves  <palves@redhat.com>
1072
1073         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
1074         TYPE_GNU_IFUNC specially here.  Throw error if return type is
1075         unknown.
1076         * ada-typeprint.c (print_func_type): Handle functions with unknown
1077         return type.
1078         * c-typeprint.c (c_type_print_base): Handle functions and methods
1079         with unknown return type.
1080         * compile/compile-c-symbols.c (convert_symbol_bmsym)
1081         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
1082         * compile/compile-c-types.c: Include "objfiles.h".
1083         (convert_func): For functions with unknown return type, warn and
1084         default to int.
1085         * compile/compile-object-run.c (compile_object_run): Adjust call
1086         to call_function_by_hand_dummy.
1087         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
1088         call_function_by_hand.
1089         * eval.c (evaluate_subexp_standard): Adjust calls to
1090         call_function_by_hand.  Handle functions and methods with unknown
1091         return type.  Pass expect_type to call_function_by_hand.
1092         * f-typeprint.c (f_type_print_base): Handle functions with unknown
1093         return type.
1094         * gcore.c (call_target_sbrk): Adjust call to
1095         call_function_by_hand.
1096         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
1097         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
1098         an integer address type instead of nodebug.
1099         * guile/scm-value.c (gdbscm_value_call): Adjust call to
1100         call_function_by_hand.
1101         * infcall.c (error_call_unknown_return_type): New function.
1102         (call_function_by_hand): New "default_return_type" parameter.
1103         Pass it down.
1104         (call_function_by_hand_dummy): New "default_return_type"
1105         parameter.  Use it instead of defaulting to int.  If there's no
1106         default and the return type is unknown, throw an error.  If
1107         there's a default return type, and the called function has no
1108         debug info, then assume the function is prototyped.
1109         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
1110         New "default_return_type" parameter.
1111         (error_call_unknown_return_type): New declaration.
1112         * linux-fork.c (call_lseek): Cast return type of lseek.
1113         (inferior_call_waitpid, checkpoint_command): Adjust calls to
1114         call_function_by_hand.
1115         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
1116         calls to call_function_by_hand.
1117         * m2-typeprint.c (m2_procedure): Handle functions with unknown
1118         return type.
1119         * objc-lang.c (lookup_objc_class, lookup_child_selector)
1120         (value_nsstring, print_object_command): Adjust calls to
1121         call_function_by_hand.
1122         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
1123         functions with unknown return type.
1124         (pascal_type_print_func_varspec_suffix): New function.
1125         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
1126         TYPE_CODE_METHOD>: Use it.
1127         * python/py-value.c (valpy_call): Adjust call to
1128         call_function_by_hand.
1129         * rust-lang.c (rust_evaluate_funcall): Adjust call to
1130         call_function_by_hand.
1131         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
1132         call_function_by_hand.
1133         * valops.c (value_allocate_space_in_inferior): Adjust call to
1134         call_function_by_hand.
1135         * typeprint.c (type_print_unknown_return_type): New function.
1136         * typeprint.h (type_print_unknown_return_type): New declaration.
1137
1138 2017-09-04  Pedro Alves  <palves@redhat.com>
1139
1140         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
1141         types with more than one parameter as prototyped.
1142
1143 2017-09-04  Pedro Alves  <palves@redhat.com>
1144
1145         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
1146         (disassemble_command): Use gdb_disassembly_flags instead of bare
1147         int.
1148         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
1149         (dump_insns, do_mixed_source_and_assembly_deprecated)
1150         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
1151         Use gdb_disassembly_flags instead of bare int.
1152         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
1153         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
1154         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
1155         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
1156         (enum gdb_disassembly_flag): ... values of this new enumeration.
1157         (gdb_disassembly_flags): Define.
1158         (gdb_disassembly)
1159         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
1160         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
1161         gdb_disassembly_flags instead of bare int.
1162         * record-btrace.c (btrace_insn_history)
1163         (record_btrace_insn_history, record_btrace_insn_history_range)
1164         (record_btrace_insn_history_from): Use gdb_disassembly_flags
1165         instead of bare int.
1166         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
1167         Use gdb_disassembly_flags instead of bare int.
1168         * target-debug.h (target_debug_print_gdb_disassembly_flags):
1169         Define.
1170         * target-delegates.c: Regenerate.
1171         * target.c (target_insn_history, target_insn_history_from)
1172         (target_insn_history_range): Use gdb_disassembly_flags instead of
1173         bare int.
1174         * target.h: Include "disasm.h".
1175         (struct target_ops) <to_insn_history, to_insn_history_from,
1176         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
1177         int.
1178         (target_insn_history, target_insn_history_from)
1179         (target_insn_history_range): Use gdb_disassembly_flags instead of
1180         bare int.
1181
1182 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
1183
1184         * cli/cli-script.c (build_command_line): For if/while commands,
1185         check whether args is empty.
1186
1187 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
1188
1189         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
1190         (enum command_control_type): Likewise.
1191         (struct command_line): Likewise.
1192         (free_command_lines): Likewise.
1193         (struct command_lines_deleter): Likewise.
1194         (command_line_up): Likewise.
1195         (read_command_lines): Likewise.
1196         (read_command_lines_1): Likewise.
1197         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
1198         (enum command_control_type): Likewise.
1199         (struct command_line): Likewise.
1200         (free_command_lines): Likewise.
1201         (struct command_lines_deleter): Likewise.
1202         (command_line_up): Likewise.
1203         (read_command_lines): Likewise.
1204         (read_command_lines_1): Likewise.
1205         * breakpoint.h: Include cli/cli-script.h.
1206         * extension-priv.h: Likewise.
1207         * gdbcmd.h: Likewise.
1208
1209 2017-09-04  Pedro Alves  <palves@redhat.com>
1210
1211         * ada-lang.c (is_known_support_routine): Move sal declaration to
1212         where it is initialized.
1213         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
1214         (parse_breakpoint_sals, decode_static_tracepoint_spec)
1215         (clear_command, update_static_tracepoint): Remove init_sal
1216         references.  Move declarations closer to initializations.
1217         * cli/cli-cmds.c (list_command): Move sal declarations closer to
1218         initializations.
1219         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
1220         references.  Move sal declarations closer to initializations.
1221         * frame.c (find_frame_sal): Return a symtab_and_line via function
1222         return instead of output parameter.  Remove init_sal references.
1223         * frame.h (find_frame_sal): Return a symtab_and_line via function
1224         return instead of output parameter.
1225         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
1226         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
1227         instead of memset.
1228         (gdbscm_find_pc_line): Remove init_sal reference.
1229         * infcall.c (call_function_by_hand_dummy): Remove init_sal
1230         references.  Move declarations closer to initializations.
1231         * infcmd.c (set_step_frame): Update.  Move declarations closer to
1232         initializations.
1233         (finish_backward): Remove init_sal references.  Move declarations
1234         closer to initializations.
1235         * infrun.c (process_event_stop_test, handle_step_into_function)
1236         (insert_hp_step_resume_breakpoint_at_frame)
1237         (insert_step_resume_breakpoint_at_caller): Likewise.
1238         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
1239         (symbol_to_sal): Likewise.
1240         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
1241         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
1242         to its initialization.
1243         * reverse.c (save_bookmark_command): Use new/delete.  Remove
1244         init_sal references.  Move declarations closer to initializations.
1245         * source.c (get_current_source_symtab_and_line): Remove brace
1246         initialization.
1247         (set_current_source_symtab_and_line): Now takes the sal by const
1248         reference.  Remove brace initialization.
1249         (line_info): Remove init_sal reference.
1250         * source.h (set_current_source_symtab_and_line): Now takes a
1251         symtab_and_line via const reference.
1252         * stack.c (set_current_sal_from_frame): Adjust.
1253         (print_frame_info): Adjust.
1254         (get_last_displayed_sal): Return the sal via function return
1255         instead of via output parameter.  Simplify.
1256         (frame_info): Adjust.
1257         * stack.h (get_last_displayed_sal): Return the sal via function
1258         return instead of via output parameter.
1259         * symtab.c (init_sal): Delete.
1260         (find_pc_sect_line): Remove init_sal references.  Move
1261         declarations closer to initializations.
1262         (find_function_start_sal): Remove init_sal references.  Move
1263         declarations closer to initializations.
1264         * symtab.h (struct symtab_and_line): In-class initialize all
1265         fields.
1266         * tracepoint.c (set_traceframe_context)
1267         (print_one_static_tracepoint_marker): Remove init_sal references.
1268         Move declarations closer to initializations.
1269         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
1270         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
1271         declarations closer to initializations.
1272         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
1273         init_sal references.  Adjust.
1274
1275 2017-09-04  Pedro Alves  <palves@redhat.com>
1276
1277         * ax-gdb.c (agent_command_1): Use range-for.
1278         * break-catch-throw.c (re_set_exception_catchpoint): Update.
1279         * breakpoint.c: Include "common/array-view.h".
1280         (init_breakpoint_sal, create_breakpoint_sal): Change sals
1281         parameter from struct symtabs_and_lines to
1282         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
1283         (breakpoint_sals_to_pc): Change sals parameter from struct
1284         symtabs_and_lines to std::vector reference.
1285         (check_fast_tracepoint_sals): Change sals parameter from struct
1286         symtabs_and_lines to std::array_view.  Use range-for.
1287         (decode_static_tracepoint_spec): Return a std::vector instead of
1288         symtabs_and_lines.  Update.
1289         (create_breakpoint): Update.
1290         (break_range_command, until_break_command, clear_command): Update.
1291         (base_breakpoint_decode_location, bkpt_decode_location)
1292         (bkpt_probe_create_sals_from_location)
1293         (bkpt_probe_decode_location, tracepoint_decode_location)
1294         (tracepoint_probe_decode_location)
1295         (strace_marker_create_sals_from_location): Return a std::vector
1296         instead of symtabs_and_lines.
1297         (strace_marker_create_breakpoints_sal): Update.
1298         (strace_marker_decode_location): Return a std::vector instead of
1299         symtabs_and_lines.  Update.
1300         (update_breakpoint_locations): Change struct symtabs_and_lines
1301         parameters to gdb::array_view.  Adjust.
1302         (location_to_sals): Return a std::vector instead of
1303         symtabs_and_lines.  Update.
1304         (breakpoint_re_set_default): Use std::vector instead of struct
1305         symtabs_and_lines.
1306         (decode_location_default): Return a std::vector instead of
1307         symtabs_and_lines.  Update.
1308         * breakpoint.h: Include "common/array-view.h".
1309         (struct breakpoint_ops) <decode_location>: Now returns a
1310         std::vector instead of returning a symtabs_and_lines via output
1311         parameter.
1312         (update_breakpoint_locations): Change sals parameters to use
1313         gdb::array_view.
1314         * cli/cli-cmds.c (edit_command, list_command): Update to use
1315         std::vector and gdb::array_view.
1316         (ambiguous_line_spec): Adjust to use gdb::array_view and
1317         range-for.
1318         (compare_symtabs): Rename to ...
1319         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
1320         const reference and adjust.
1321         (filter_sals): Rewrite using std::vector and standard algorithms.
1322         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
1323         (jump_command): Update to use std::vector.
1324         * linespec.c (struct linespec_state) <canonical_names>: Update
1325         comment.
1326         (add_sal_to_sals_basic): Delete.
1327         (add_sal_to_sals, filter_results, convert_results_to_lsals)
1328         (decode_line_2, create_sals_line_offset)
1329         (convert_address_location_to_sals, convert_linespec_to_sals)
1330         (convert_explicit_location_to_sals, parse_linespec)
1331         (event_location_to_sals, decode_line_full, decode_line_1)
1332         (decode_line_with_current_source)
1333         (decode_line_with_last_displayed, decode_objc)
1334         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
1335         (linespec_result::~linespec_result): Adjust to use std::vector
1336         instead of symtabs_and_lines.
1337         * linespec.h (linespec_sals::sals): Now a std::vector.
1338         (struct linespec_result): Use std::vector, bool, and in-class
1339         initialization.
1340         (decode_line_1, decode_line_with_current_source)
1341         (decode_line_with_last_displayed): Return std::vector.
1342         * macrocmd.c (info_macros_command): Use std::vector.
1343         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
1344         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
1345         std::vector.
1346         * probe.h (parse_probes): Return a std::vector.
1347         * python/python.c (gdbpy_decode_line): Use std::vector and
1348         gdb::array_view.
1349         * source.c (select_source_symtab, line_info): Use std::vector.
1350         * stack.c (func_command): Use std::vector.
1351         * symtab.h (struct symtabs_and_lines): Delete.
1352         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
1353
1354 2017-09-04  Pedro Alves  <palves@redhat.com>
1355
1356         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1357         unittests/array-view-selftests.c.
1358         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
1359         * common/array-view.h: New file.
1360         * unittests/array-view-selftests.c: New file.
1361
1362 2017-09-04  Pedro Alves  <palves@redhat.com>
1363
1364         * cli/cli-cmds.c (edit_command): Pass message to
1365         ambiguous_line_spec.
1366         (list_command): Pass message to ambiguous_line_spec.  Say
1367         "first"/"last" instead of "start" and "end" to be consistent with
1368         the manual.
1369         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
1370         them to print formatted message.
1371
1372 2017-09-04  Pedro Alves  <palves@redhat.com>
1373
1374         * btrace.c (ftrace_add_pt): Pass btrace_insn to
1375         ftrace_update_insns by reference instead of pointer.
1376
1377 2017-09-04  Yao Qi  <yao.qi@linaro.org>
1378
1379         * i386-go32-tdep.c: Include x86-xstate.h.
1380         (i386_go32_init_abi): Call i386_target_description.
1381         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
1382         if xcr0 is X86_XSTATE_X87_MASK.
1383         * i386-tdep.h (tdesc_i386): Remove the declaration.
1384         (tdesc_i386_mmx): Likewise.
1385
1386 2017-09-04  Yao Qi  <yao.qi@linaro.org>
1387
1388         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
1389         X86_XSTATE_SSE_MASK instead of 0.
1390
1391 2017-09-04  Yao Qi  <yao.qi@linaro.org>
1392
1393         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
1394         i386_target_description.
1395         * i386-fbsd-nat.c (i386fbsd_read_description): Call
1396         i386_target_description.
1397         * i386-tdep.c (i386_gdbarch_init): Likewise.
1398
1399 2017-09-04  Yao Qi  <yao.qi@linaro.org>
1400
1401         * amd64-darwin-tdep.c: Include "x86-xstate.h".
1402         (x86_darwin_init_abi_64): Call amd64_target_description.
1403         * amd64-dicos-tdep.c: Likewise.
1404         * amd64-fbsd-nat.c: Likewise.
1405         * amd64-fbsd-tdep.c: Likewise.
1406         * amd64-nbsd-tdep.c: Likewise.
1407         * amd64-obsd-tdep.c: Likewise.
1408         * amd64-sol2-tdep.c: Likewise.
1409         * amd64-windows-tdep.c: Likewise.
1410         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
1411
1412 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
1413
1414         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
1415         (btrace_function) <insn>: Change type to use std::vector.
1416         * btrace.c (ftrace_debug, ftrace_call_num_insn,
1417         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
1418         ftrace_update_insns, ftrace_compute_global_level_offset,
1419         btrace_stitch_bts, btrace_clear, btrace_insn_get,
1420         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
1421         change to std::vector.
1422         (ftrace_update_insns): Adjust to change to std::vector, change
1423         type of INSN parameter.
1424         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
1425         * record-btrace.c (btrace_call_history_insn_range,
1426         btrace_compute_src_line_range,
1427         record_btrace_frame_prev_register): Adjust to change to
1428         std::vector.
1429         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
1430         to change to std::vector.
1431
1432 2017-09-03  Tom Tromey  <tom@tromey.com>
1433
1434         * corefile.c (reopen_exec_file): Use std::string.
1435
1436 2017-09-03  Tom Tromey  <tom@tromey.com>
1437
1438         * compile/compile.c (compile_register_name_mangled): Return
1439         std::string.
1440         * compile/compile-loc2c.c (pushf_register_address): Update.
1441         (pushf_register): Update.
1442         * compile/compile-c-types.c (convert_array): Update.
1443         * compile/compile-c-symbols.c (generate_vla_size): Update.
1444         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
1445         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
1446         (convert_one_symbol): Update.
1447         (generate_c_for_for_one_variable): Update.
1448         * compile/compile-c-support.c (c_get_range_decl_name): Return a
1449         std::string.
1450         (generate_register_struct): Update.
1451         * compile/compile-internal.h (c_get_range_decl_name): Return a
1452         std::string.
1453         (compile_register_name_mangled): Return std::string.
1454
1455 2017-09-03  Tom Tromey  <tom@tromey.com>
1456
1457         * utils.c (perror_string): Return a std::string.
1458         (throw_perror_with_name, perror_warning_with_name): Update.
1459
1460 2017-09-03  Tom Tromey  <tom@tromey.com>
1461
1462         * demangle.c (demangle_command): Use std::string,
1463         unique_xmalloc_ptr.
1464
1465 2017-09-03  Tom Tromey  <tom@tromey.com>
1466
1467         * cli/cli-setshow.c (do_set_command): Use std::string.
1468
1469 2017-09-03  Tom Tromey  <tom@tromey.com>
1470
1471         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
1472
1473 2017-09-03  Tom Tromey  <tom@tromey.com>
1474
1475         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
1476
1477 2017-09-03  Tom Tromey  <tom@tromey.com>
1478
1479         * mi/mi-cmd-env.c (env_execute_cli_command): Use
1480         gdb::unique_xmalloc_ptr.
1481
1482 2017-09-03  Tom Tromey  <tom@tromey.com>
1483
1484         * thread.c (print_thread_info_1): Use string_printf.
1485         (thread_apply_command, thread_apply_all_command): Use
1486         std::string.
1487
1488 2017-09-03  Tom Tromey  <tom@tromey.com>
1489
1490         * valprint.c (val_print_string): Update.
1491         * gdbcore.h (memory_error_message): Return std::string.
1492         * corefile.c (memory_error_message): Return std::string.
1493         (memory_error): Update.
1494         * breakpoint.c (insert_bp_location): Update.
1495
1496 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
1497
1498         * target/waitstatus.h (target_waitstatus_to_string): Change
1499         return type to std::string.
1500         * target/waitstatus.c (target_waitstatus_to_string): Return
1501         std::string.
1502         * target.h (target_waitstatus_to_string): Remove declaration.
1503         * infrun.c (resume, clear_proceed_status_thread,
1504         print_target_wait_results, do_target_wait, save_waitstatus,
1505         stop_all_threads): Adjust.
1506         * record-btrace.c (record_btrace_wait): Adjust.
1507         * target-debug.h
1508         (target_debug_print_struct_target_waitstatus_p): Adjust.
1509
1510 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
1511
1512         PR gdb/22046
1513         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
1514         detection.
1515
1516 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1517
1518         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
1519         for setting/unsetting environment variables on the remote target.
1520         (New remote packets): Add entries for QEnvironmentHexEncoded,
1521         QEnvironmentUnset and QEnvironmentReset.
1522         * common/environ.c (gdb_environ::operator=): Extend method to
1523         handle m_user_set_env_list and m_user_unset_env_list.
1524         (gdb_environ::clear): Likewise.
1525         (match_var_in_string): Change type of first parameter from 'char
1526         *' to 'const char *'.
1527         (gdb_environ::set): Extend method to handle
1528         m_user_set_env_list and m_user_unset_env_list.
1529         (gdb_environ::unset): Likewise.
1530         (gdb_environ::clear_user_set_env): New method.
1531         (gdb_environ::user_set_envp): Likewise.
1532         (gdb_environ::user_unset_envp): Likewise.
1533         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
1534         m_user_unset_env_list on move constructor/assignment.
1535         (unset): Add new default parameter 'update_unset_list = true'.
1536         (clear_user_set_env): New method.
1537         (user_set_envp): Likewise.
1538         (user_unset_envp): Likewise.
1539         (m_user_set_env_list): New std::set.
1540         (m_user_unset_env_list): Likewise.
1541         * common/rsp-low.c (hex2str): New function.
1542         (bin2hex): New overload for bin2hex function.
1543         * common/rsp-low.c (hex2str): New prototype.
1544         (str2hex): New overload prototype.
1545         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
1546         QEnvironmentUnset and QEnvironmentReset.
1547         (remote_protocol_features): Add QEnvironmentHexEncoded,
1548         QEnvironmentUnset and QEnvironmentReset packets.
1549         (send_environment_packet): New function.
1550         (extended_remote_environment_support): Likewise.
1551         (extended_remote_create_inferior): Call
1552         extended_remote_environment_support.
1553         (_initialize_remote): Add QEnvironmentHexEncoded,
1554         QEnvironmentUnset and QEnvironmentReset packet configs.
1555         * unittests/environ-selftests.c (gdb_selftest_env_var):
1556         New variable.
1557         (test_vector_initialization): New function.
1558         (test_init_from_host_environ): Likewise.
1559         (test_reinit_from_host_environ): Likewise.
1560         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
1561         Likewise.
1562         (test_unset_set_empty_vector): Likewise.
1563         (test_vector_clear): Likewise.
1564         (test_std_move): Likewise.
1565         (test_move_constructor):
1566         (test_self_move): Likewise.
1567         (test_set_unset_reset): Likewise.
1568         (run_tests): Rewrite in terms of the functions above.
1569
1570 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
1571
1572         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
1573         (adi_available): Use a temp variable of type CORE_ADDR as argument
1574         3 when calling target_auxv_search.
1575         (adi_normalize_address): Use masks and xor operators to calculate
1576         normalized address.
1577         (adi_read_versions, adi_write_versions, adi_print_versions)
1578         (do_examine, do_assign): Use paddress.
1579
1580 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
1581
1582         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
1583         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
1584         out of loop and add supply of FIR.
1585         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
1586         add collect of FIR.
1587
1588 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
1589
1590         PR gdb/21827
1591         * cli/cli-script.c (define_command): Don't convert command name
1592         to lower case.
1593
1594 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
1595
1596         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
1597         Update all callers accordingly. Remove all code blocks handling
1598         the case where DISPP is not NULL.
1599
1600 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
1601
1602         PR symtab/22003
1603         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
1604         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
1605         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
1606
1607 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
1608
1609         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
1610         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
1611         (read_comp_units_from_section): New parameter abbrev_section, use
1612         read_and_check_comp_unit_head, allocate signatured_type if needed.
1613         (create_all_comp_units): Update read_comp_units_from_section caller.
1614
1615 2017-08-23  Pedro Alves  <palves@redhat.com>
1616
1617         PR remote/21852
1618         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
1619         to null_ptid and switch to thread without reading the registers
1620         after adding the inferior.
1621
1622 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
1623
1624         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
1625         compile-gcc.
1626         * compile/compile.c (compile_gcc, show_compile_gcc): New.
1627         (compile_to_object): Implement compile_gcc.
1628         (_initialize_compile): Install "set compile-gcc".  Initialize
1629         compile_gcc.
1630
1631 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
1632
1633         * compile/compile.c (compile_to_object): Conditionally call
1634         set_verbose.  Conditionally call compile or compile_v0.
1635
1636 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
1637
1638         * sparc64-tdep.h: (adi_normalize_address): New export.
1639         * sparc-nat.h: (open_adi_tag_fd): New export.
1640         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
1641         * sparc64-linux-tdep.c:
1642         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
1643         (sparc64_linux_handle_segmentation_fault): New function.
1644         (sparc64_linux_init_abi): Register
1645         sparc64_linux_handle_segmentation_fault
1646         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
1647         (sparc64_addr_bits_remove): New function.
1648         (sparc64_init_abi): Register sparc64_addr_bits_remove.
1649         (MAX_PROC_NAME_SIZE): New macro.
1650         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
1651         (sparc64adilist): New variable.
1652         (adi_proc_list): New variable.
1653         (find_adi_info): New function.
1654         (add_adi_info): New function.
1655         (get_adi_info_proc): New function.
1656         (get_adi_info): New function.
1657         (info_adi_command): New function.
1658         (read_maps_entry): New function.
1659         (adi_available): New function.
1660         (adi_normalize_address): New function.
1661         (adi_align_address): New function.
1662         (adi_convert_byte_count): New function.
1663         (adi_tag_fd): New function.
1664         (adi_is_addr_mapped): New function.
1665         (adi_read_versions): New function.
1666         (adi_write_versions): New function.
1667         (adi_print_versions): New function.
1668         (do_examine): New function.
1669         (do_assign): New function.
1670         (adi_examine_command): New function.
1671         (adi_assign_command): New function.
1672         (_initialize_sparc64_adi_tdep): New function.
1673
1674 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
1675
1676         * breakpoint.c (breakpoints_info): Rename to ...
1677         (info_breakpoints_command): ... this.
1678         (watchpoints_info): Rename to ...
1679         (info_watchpoints_command): ... this.
1680         (tracepoints_info): Rename to ...
1681         (info_tracepoints_command): ... this.
1682         (_initialize_breakpoint): Adjust.
1683         * dcache.c (dcache_info): Rename to ...
1684         (info_display_command): ... this.
1685         (_initialize_dcache): Adjust.
1686         * frame.h (args_info): Rename to ...
1687         (info_args_command): ... this.
1688         (locals_info): Rename to ...
1689         (info_locals_command): ... this.
1690         * infcmd.c (nofp_registers_info): Rename to ...
1691         (info_registers_command): ... this.
1692         (float_info): Rename to ...
1693         (info_float_command): ... this.
1694         (program_info): Rename to ...
1695         (info_program_command): ... this.
1696         (all_registers_info): Rename to ...
1697         (info_all_registers_command): ... this.
1698         (vector_info): Rename to ...
1699         (info_vector_command): ... this.
1700         (float_info): Rename to ...
1701         (info_float_command): ... this.
1702         (_initialize_infcmd): Adjust.
1703         * inferior.h (term_info): Rename to ...
1704         (info_terminal_command): ... this.
1705         * inflow.c (term_info): Rename to ...
1706         (info_terminal_command): ... this.
1707         (_initialize_inflow): Adjust.
1708         * infrun.c (signals_info): Rename to ...
1709         (info_signals_command): ... this.
1710         (_initialize_infrun): Adjust.
1711         * objc-lang.c (classes_info): Rename to ...
1712         (info_classes_command): ... this.
1713         (selectors_info): Rename to ...
1714         (info_selectors_command): ... this.
1715         (_initialize_objc_language): Adjust.
1716         * printcmd.c (sym_info): Rename to ...
1717         (info_symbol_command): ... this.
1718         (address_info): Rename to ...
1719         (info_address_command): ... this.
1720         (display_info): Rename to ...
1721         (info_display_command): ... this.
1722         (_initialize_printcmd): Adjust.
1723         * reverse.c (bookmarks_info): Rename to ...
1724         (info_breakpoints_command): ... this.
1725         (_initialize_reverse): Adjust.
1726         * ser-go32.c (dos_info): Rename to ...
1727         (info_serial_command): ... this.
1728         (_initialize_ser_dos): Adjust.
1729         * skip.c (skip_info): Rename to ...
1730         (info_skip_command): ... this.
1731         (_initialize_step_skip): Adjust.
1732         * source.c (line_info): Rename to ...
1733         (info_line_command): ... this.
1734         (source_info): Rename to ...
1735         (info_source_command)
1736         * stack.c (frame_info): Rename to ...
1737         (info_frame_command): ... this.
1738         (locals_info): Rename to ...
1739         (info_locals_command): ... this.
1740         (args_info): Rename to ...
1741         (info_args_command): ... this.
1742         (_initialize_stack): Adjust.
1743         * symtab.c (sources_info): Rename to ...
1744         (info_sources_command): ... this.
1745         (variables_info): Rename to ...
1746         (info_variables_command): ... this.
1747         (functions_info): Rename to ...
1748         (info_functions_command): ... this.
1749         (types_info): Rename to ...
1750         (info_types_command): ... this.
1751         (_initialize_symtab): Adjust.
1752         * target.c (target_info): Rename to ...
1753         (info_target_command): ... this.
1754         (initialize_targets): Adjust.
1755         * tracepoint.c (tvariables_info): Rename to ...
1756         (info_tvariables_command): ... this.
1757         (scope_info): Rename to ...
1758         (info_scope_command): ... this.
1759         (trace_dump_actions): Adjust.
1760         (_initialize_tracepoint): Adjust.
1761
1762 2017-08-22  Tom Tromey  <tom@tromey.com>
1763
1764         * breakpoint.h (install_breakpoint): Update.
1765         * breakpoint.c (add_solib_catchpoint): Update.
1766         (install_breakpoint): Change argument to a std::unique_ptr.
1767         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
1768         (create_breakpoint_sal, create_breakpoint): Update.
1769         (watch_command_1, catch_exec_command_1)
1770         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
1771         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
1772         Return the breakpoint.
1773         (set_raw_breakpoint_without_location, set_raw_breakpoint)
1774         (new_single_step_breakpoint): Update.
1775         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
1776         std::unique_ptr.
1777         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
1778         std::unique_ptr.
1779         * break-catch-sig.c (create_signal_catchpoint): Use
1780         std::unique_ptr.
1781         * ada-lang.c (create_ada_exception_catchpoint): Use
1782         std::unique_ptr.
1783
1784 2017-08-22  Tom Tromey  <tom@tromey.com>
1785
1786         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
1787
1788 2017-08-22  Tom Tromey  <tom@tromey.com>
1789
1790         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
1791         (lookup_partial_symbol): Update.
1792
1793 2017-08-22  Tom Tromey  <tom@tromey.com>
1794
1795         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
1796         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
1797         (find_and_open_source, symtab_to_fullname): Update.
1798         * psymtab.c (psymtab_to_fullname): Update.
1799
1800 2017-08-22  Tom Tromey  <tom@tromey.com>
1801
1802         * exec.c (exec_file_attach): Update.
1803         * linux-thread-db.c (try_thread_db_load): Update.
1804         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
1805         * utils.c (gdb_realpath): Change return type.
1806         (gdb_realpath_keepfile): Update.
1807         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
1808         (_initialize_utils): Register the new self test.
1809         * source.c (openp): Update.
1810         (find_and_open_source): Update.
1811         * nto-tdep.c (nto_find_and_open_solib): Update.
1812         * main.c (set_gdb_data_directory): Update.
1813         (captured_main_1): Update.
1814         * dwarf2read.c (dwarf2_get_dwz_file): Update
1815         (dw2_map_symbol_filenames): Update.
1816         * auto-load.c (auto_load_safe_path_vec_update): Update.
1817         (filename_is_in_auto_load_safe_path_vec): Change type of
1818         "filename_realp".
1819         (auto_load_objfile_script): Update.
1820         (file_is_auto_load_safe): Update.  Use std::string.
1821         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
1822
1823 2017-08-22  Tom Tromey  <tom@tromey.com>
1824
1825         * utils.c (gdb_realpath_keepfile): Return a
1826         gdb::unique_xmalloc_ptr.
1827         * exec.c (exec_file_attach): Update.
1828         * utils.h (gdb_realpath_keepfile): Return a
1829         gdb::unique_xmalloc_ptr.
1830
1831 2017-08-22  Tom Tromey  <tom@tromey.com>
1832
1833         * compile/compile.c (compile_file_command): Use
1834         gdb::unique_xmalloc_ptr, std::string.
1835         * utils.c (gdb_abspath): Change return type.
1836         * source.c (openp): Update.
1837         * objfiles.c (allocate_objfile): Update.
1838         * main.c (set_gdb_data_directory): Update.
1839         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
1840
1841 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
1842
1843         * cli-cmds.c (list_commands): List actual code around more than
1844         one location.
1845
1846 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
1847
1848         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
1849
1850 2017-08-21  Pedro Alves  <palves@redhat.com>
1851
1852         PR gdb/19487
1853         * c-exp.y (variable production): Handle function aliases.
1854         * minsyms.c (msymbol_is_text): New function.
1855         * minsyms.h (msymbol_is_text): Declare.
1856         * symtab.c (find_function_alias_target): New function.
1857         * symtab.h (find_function_alias_target): Declare.
1858
1859 2017-08-21  Pedro Alves  <palves@redhat.com>
1860
1861         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
1862         typedefs.
1863         * typeprint.c (whatis_exp): If handling "whatis", and expression
1864         is OP_TYPE, strip one typedef level.  Otherwise don't strip
1865         typedefs here.
1866         * valops.c (value_cast): Save "to" type before resolving
1867         stubs/typedefs.  Use that type as resulting value's type.
1868
1869 2017-08-18  Tom Tromey  <tom@tromey.com>
1870             Pedro Alves  <palves@redhat.com>
1871
1872         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
1873         * sol-thread.c (sol_thread_resume, sol_thread_wait)
1874         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
1875         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
1876         * proc-service.c (ps_xfer_memory): Use scoped_restore.
1877         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
1878         (linux_get_siginfo_data): Add "thread" argument.  Use
1879         scoped_restore.
1880         * linux-nat.c (linux_child_follow_fork)
1881         (check_stopped_by_watchpoint): Use scoped_restore.
1882         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
1883         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
1884         (restore_inferior_ptid, save_inferior_ptid): Remove.
1885         * btrace.c (btrace_fetch): Use scoped_restore.
1886         * bsd-uthread.c (bsd_uthread_fetch_registers)
1887         (bsd_uthread_store_registers): Use scoped_restore.
1888         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
1889         scoped_restore.
1890         * aix-thread.c (aix_thread_resume, aix_thread_wait)
1891         (aix_thread_xfer_partial): Use scoped_restore.
1892         * inferior.h (save_inferior_ptid): Remove.
1893
1894 2017-08-18  Yao Qi  <yao.qi@linaro.org>
1895
1896         PR tdep/21818
1897         * arm-tdep.c (gdb_print_insn_arm): Mark
1898         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
1899
1900 2017-08-18  Yao Qi  <yao.qi@linaro.org>
1901
1902         * NEWS: Mention GDBserver's new option "--selftest".
1903         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
1904         * selftest.c: Move it to common/selftest.c.
1905         * selftest.h: Move it to common/selftest.h.
1906         * selftest-arch.c (reset): New function.
1907         (tests_with_arch): Call reset.
1908
1909 2017-08-18  Yao Qi  <yao.qi@linaro.org>
1910
1911         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
1912         instead of exception_fprintf and printf_filtered.
1913
1914 2017-08-18  Yao Qi  <yao.qi@linaro.org>
1915
1916         * selftest.c (register_self_test): Rename it to
1917         selftests::register_test.
1918         (run_self_tests): selftest::run_tests.
1919         * selftest.h: Update declarations.
1920         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
1921         selftests::register_test_foreach_arch.
1922         * selftest-arch.h: Update declaration.
1923         * aarch64-tdep.c: Update.
1924         * arm-tdep.c: Likewise.
1925         * disasm-selftests.c: Likewise.
1926         * dwarf2loc.c: Likewise.
1927         * dwarf2-frame.c: Likewise.
1928         * findvar.c: Likewise.
1929         * gdbarch-selftests.c: Likewise.
1930         * maint.c (maintenance_selftest): Likewise.
1931         * regcache.c: Likewise.
1932         * rust-exp.y: Likewise.
1933         * selftest-arch.c: Likewise.
1934         * unittests/environ-selftests.c: Likewise.
1935         * unittests/function-view-selftests.c: Likewise.
1936         * unittests/offset-type-selftests.c: Likewise.
1937         * unittests/optional-selftests.c: Likewise.
1938         * unittests/scoped_restore-selftests.c: Likewise.
1939         * utils-selftests.c: Likewise.
1940
1941 2017-08-17  Pedro Alves  <palves@redhat.com>
1942
1943         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
1944         local.
1945
1946 2017-08-17  Pedro Alves  <palves@redhat.com>
1947
1948         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
1949         field.
1950         (reset_die_in_process): Delete, replaced by ...
1951         (process_die_scope): ... this new class.  Make it responsible for
1952         freeing cu->line_header too.
1953         (process_die): Use process_die_scope.
1954         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
1955         cu->line_header_die_owner.  Don't release the line header if it's
1956         owned by the CU.
1957         (setup_type_unit_groups): Make the CU/DIE own the line header.
1958         Don't release the line header here.
1959
1960 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
1961
1962         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
1963
1964 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
1965
1966         * NEWS: Mention new shortcuts for nexti and stepi in TUI
1967         Single-Key mode
1968
1969 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
1970
1971         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
1972         mode command list.
1973
1974 2017-08-15  Stafford Horne  <shorne@gmail.com>
1975
1976         * MAINTAINERS (Write After Approval): Add Stafford Horne.
1977
1978 2017-08-15  Stafford Horne  <shorne@gmail.com>
1979
1980         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
1981
1982 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
1983
1984         PR gdb/21954
1985         * infcmd.c (unset_environment_command): Use the 'clear' method on
1986         the environment instead of resetting it.
1987
1988 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
1989
1990         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
1991         platforms.
1992
1993 2017-08-14  Tom Tromey  <tom@tromey.com>
1994
1995         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
1996         (print_binary_chars): Likewise.
1997         (BITS_IN_BYTES): Remove.
1998
1999 2017-08-14  Tom Tromey  <tom@tromey.com>
2000
2001         PR gdb/21675
2002         * valprint.c (LOW_ZERO): Change value to 034.
2003         (print_octal_chars): Add static_asserts for octal constants.
2004         * printcmd.c (print_scalar_formatted): Add 'd' case.
2005
2006 2017-08-11  Tom Tromey  <tom@tromey.com>
2007
2008         * symfile.c (add_symbol_file_command): Use std::vector.
2009
2010 2017-08-14  Tom Tromey  <tom@tromey.com>
2011
2012         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
2013         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2014         std::move.
2015         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
2016
2017 2017-08-11  Pedro Alves  <palves@redhat.com>
2018
2019         * infrun.c (process_event_stop_test): Adjust
2020         function_name_is_marked_for_skip call.
2021         * skip.c: Include <list>.
2022         (skiplist_entry): Make it a class with private fields, and
2023         getters/setters.
2024         (skiplist_entry_chain): Delete.
2025         (skiplist_entries): New.
2026         (skiplist_entry_count): Delete.
2027         (highest_skiplist_entry_num): New.
2028         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
2029         (add_skiplist_entry): Delete.
2030         (skiplist_entry::skiplist_entry): New.
2031         (skiplist_entry::add_entry): New.
2032         (skip_file_command, skip_function): Adjust.
2033         (compile_skip_regexp): Delete.
2034         (skip_command): Don't compile regexp here.  Adjust to use
2035         skiplist_entry::add_entry.
2036         (skip_info): Adjust to use range-for and getters.
2037         (skip_enable_command, skip_disable_command): Adjust to use
2038         range-for and setters.
2039         (skip_delete_command): Adjust to use std::list.
2040         (add_skiplist_entry): Delete.
2041         (skip_file_p): Delete, refactored as ...
2042         (skiplist_entry::do_skip_file_p): ... this new method.
2043         (skip_gfile_p): Delete, refactored as ...
2044         (skiplist_entry::do_gskip_file_p): ... this new method.
2045         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
2046         (skiplist_entry::skip_function_p): ... this new method.
2047         (function_name_is_marked_for_skip): Now returns bool, and takes
2048         the function sal by const reference.  Adjust to use range-for and
2049         skiplist_entry methods.
2050         (_initialize_step_skip): Remove references to
2051         skiplist_entry_chain, skiplist_entry_count.
2052         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
2053         takes the function sal by const reference.
2054
2055 2017-08-11  Yao Qi  <yao.qi@linaro.org>
2056
2057         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
2058         (dwarf2_frame_cache): Remove reset_cache_cleanup.
2059         (dwarf2_frame_cache):
2060         * frame-unwind.c (frame_unwind_try_unwinder): Catch
2061         RETURN_MASK_ALL and set *this_case to NULL.
2062         * frame-unwind.h: Update comments.
2063
2064 2017-08-11  Yao Qi  <yao.qi@linaro.org>
2065
2066         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
2067         (dwarf2_frame_state_copy_regs): Remove.
2068         (dwarf2_frame_state_free_regs): Remove.
2069         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
2070         (dwarf2_restore_rule): Call method .alloc_regs instead of
2071         dwarf2_frame_state_alloc_regs.
2072         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
2073         constructor.  Call std::move.
2074         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
2075         (dwarf2_frame_cache): Likewise.
2076
2077         [GDB_SELF_TEST]: Include selftest.h and
2078         selftest-arch.h.
2079         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
2080         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
2081         execute_cfa_program_test.
2082
2083         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
2084         copy ctor, assignment operator, move assignment.
2085         <alloc_regs>: New method.
2086         <swap>: New method.
2087         (struct dwarf2_frame_state): Delete dtor.
2088         (dwarf2_frame_state_alloc_regs): Remove declaration.
2089         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
2090         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
2091
2092 2017-08-11  Yao Qi  <yao.qi@linaro.org>
2093
2094         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
2095         (dwarf2_frame_state::dwarf2_frame_state): New.
2096         (dwarf2_frame_state::~dwarf2_frame_state): New.
2097         (dwarf2_fetch_cfa_info): Update.
2098         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
2099         rather than a pointer.  Update code.
2100         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
2101         dtor.
2102         <data_align, code_align, retaddr_column>: Change them to const.
2103         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
2104         to bool.
2105
2106 2017-08-11  Yao Qi  <yao.qi@linaro.org>
2107
2108         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
2109         <loc.exp>: New field.
2110         * dwarf2-frame.c (execute_cfa_program): Update.
2111         (dwarf2_frame_prev_register): Update.
2112
2113 2017-08-10  Pedro Alves  <palves@redhat.com>
2114
2115         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
2116
2117 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
2118
2119         * fbsd-nat.c (struct fbsd_fork_info): Remove.
2120         (fbsd_pending_children): Use std::list.
2121         (fbsd_remember_child): Likewise.
2122         (fbsd_is_child_pending): Likewise.
2123         (fbsd_pending_vfork_done): Use std::forward_list.
2124         (fbsd_add_vfork_done): Likewise.
2125         (fbsd_is_vfork_done_pending): Likewise.
2126         (fbsd_next_vfork_done): Likewise.
2127
2128 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
2129
2130         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
2131         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
2132         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
2133         for `mapfilename'.
2134         (fbsd_xfer_partial): Use gdb::byte_vector.
2135         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
2136
2137 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
2138
2139         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
2140         "filestuff.h".
2141         (fbsd_find_memory_regions): Fix `mapfile' initialization.
2142
2143 2017-08-09  Tom Tromey  <tom@tromey.com>
2144
2145         * skip.c (skiplist_entry): New constructor.
2146         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
2147         (skiplist_entry::file_is_glob): Now bool.
2148         (skiplist_entry::file, skiplist_entry::function): Now
2149         std::string.
2150         (make_skip_entry): Return a unique_ptr.  Use new.
2151         (free_skiplist_entry, free_skiplist_entry_cleanup)
2152         (make_free_skiplist_entry_cleanup): Remove.
2153         (skip_command, skip_disable_command, add_skiplist_entry)
2154         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
2155         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
2156         (function_name_is_marked_for_skip): Update.
2157         (skip_delete_command): Update.  Use delete.
2158
2159 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
2160
2161         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
2162         (aarch64_linux_core_read_description): New function.
2163         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
2164
2165 2017-08-09  Pedro Alves  <palves@redhat.com>
2166
2167         * cp-name-parser.y (cp_comp_to_string): Return a
2168         gdb::unique_xmalloc_ptr<char>.
2169         * cp-support.c (replace_typedefs_qualified_name)
2170         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
2171         (cp_canonicalize_string_full): Use op= instead of explicit
2172         convertion.
2173         (cp_class_name_from_physname, method_name_from_physname)
2174         (cp_func_name, cp_remove_params): Adjust to use
2175         gdb::unique_xmalloc_ptr<char>.
2176         * cp-support.h (cp_comp_to_string): Return a
2177         gdb::unique_xmalloc_ptr<char>.
2178         * python/py-type.c (typy_lookup_type): Adjust to use
2179         gdb::unique_xmalloc_ptr<char>.
2180
2181 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
2182
2183         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
2184
2185 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
2186             Yao Qi  <yao.qi@linaro.org>
2187
2188         * cp-support.c (cp_canonicalize_string_full): Use
2189         gdb::unique_xmalloc_ptr<char>.
2190         (cp_canonicalize_string): Likewise.
2191
2192 2017-08-09  Yao Qi  <yao.qi@linaro.org>
2193
2194         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
2195         * regformats/i386/amd64-avx-avx512.dat: Remove.
2196         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
2197         * regformats/i386/amd64-avx-mpx.dat:Remove.
2198         * regformats/i386/amd64-avx.dat: Remove.
2199         * regformats/i386/amd64-mpx.dat: Remove.
2200         * regformats/i386/i386-avx-avx512.dat: Remove.
2201         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
2202         * regformats/i386/i386-avx-mpx.dat: Remove.
2203         * regformats/i386/i386-mmx.dat: Remove.
2204         * regformats/i386/i386-mpx.dat: Remove.
2205
2206 2017-08-09  Yao Qi  <yao.qi@linaro.org>
2207
2208         * amd64-tdep.h (tdesc_x32): Remove the declaration.
2209         * amd64-tdep.c: Don't include features/i386/x32*.c.
2210         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
2211         functions.
2212         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
2213         and i386/x32-avx-avx512.
2214         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
2215         and i386/x32.xml.
2216         * features/i386/x32-avx-avx512.c: Removed.
2217         * features/i386/x32-avx-avx512.xml: Removed.
2218         * features/i386/x32-avx.c: Removed.
2219         * features/i386/x32-avx.xml: Removed.
2220         * features/i386/x32.c: Removed.
2221         * features/i386/x32.xml: Removed.
2222         * regformats/i386/x32-avx-avx512.dat: Removed.
2223         * regformats/i386/x32-avx.dat: Removed.
2224         * regformats/i386/x32.dat: Removed.
2225
2226 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
2227
2228         PR breakpoints/21886
2229         * mem-break.c (default_memory_insert_breakpoint): Use
2230         `->placed_address' rather than `->reqstd_address' for the
2231         breakpoint location.
2232
2233 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
2234
2235         * arch-utils.c (default_print_insn): Remove arch/mach/endian
2236         assertions.
2237
2238 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
2239
2240         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
2241         a union of `tdep_info', `tdesc_data' and `id'.
2242         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
2243         rather than `info.tdep_info'.
2244         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
2245         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
2246         * i386-tdep.c (i386_gdbarch_init): Likewise.
2247         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
2248         * mips-tdep.c (mips_gdbarch_init): Likewise.
2249         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2250         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
2251         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
2252         `info.tdep_info'.
2253         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
2254         `info.tdep_info'.
2255         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
2256         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
2257         `info.tdep_info'.
2258         * spu-tdep.c (spu_gdbarch_init): Likewise.
2259         * gdbarch.h: Regenerate.
2260
2261 2017-08-07  Leszek Swirski  <leszeks@google.com>
2262
2263         PR symtab/20899
2264         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
2265
2266 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2267
2268         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
2269         (gdbsim_open): Rename gdb_argv args object to argv.
2270
2271 2017-08-05  Tom Tromey  <tom@tromey.com>
2272
2273         * compile/compile-object-load.c (compile_object_load): Use
2274         gdb::unique_xmalloc_ptr.
2275         * cli/cli-dump.c (scan_filename): Rename from
2276         scan_filename_with_cleanup.  Change return type.
2277         (scan_expression): Rename from scan_expression_with_cleanup.
2278         Change return type.
2279         (dump_memory_to_file, dump_value_to_file, restore_command):
2280         Use gdb::unique_xmalloc_ptr.  Update.
2281         * cli/cli-cmds.c (find_and_open_script): Use
2282         gdb::unique_xmalloc_ptr.
2283         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
2284         * symmisc.c (maintenance_print_symbols)
2285         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
2286         * symfile.c (symfile_bfd_open, generic_load)
2287         (add_symbol_file_command, remove_symbol_file_command): Use
2288         gdb::unique_xmalloc_ptr.
2289         * source.c (openp): Use gdb::unique_xmalloc_ptr.
2290         * psymtab.c (maintenance_print_psymbols): Use
2291         gdb::unique_xmalloc_ptr.
2292         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
2293         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
2294         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
2295         (reload_shared_libraries_1): Likewise.
2296
2297 2017-08-05  Tom Tromey  <tom@tromey.com>
2298
2299         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
2300         (rust_op_vector, rust_set_vector): New typedefs.
2301         (current_parser): New global.
2302         (work_obstack): Change to pointer type.  Update all users.
2303         (rust_ast, pstate): Remove globals.
2304         (struct rust_parser): New.
2305         (%union) <params, field_inits>: Change type.
2306         (start, tuple_expr, unit_expr, struct_expr_list, literal)
2307         (field_expr, expr_list, maybe_expr_list, type_list): Update.
2308         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
2309         (convert_params_to_types, convert_params_to_expression): Change
2310         type of "params".
2311         (ast_string): Change type of "fields".
2312         (rust_parse): Make a rust_parser.  Remove cleanups.
2313         (rust_lex_tests): Make and install an auto_obstack.
2314
2315 2017-08-04  Yao Qi  <yao.qi@linaro.org>
2316
2317         * configure.srv (ipa_x32_linux_regobj): New.
2318         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
2319         instead of X86_TDESC_AVX512.
2320         (initialize_low_tracepoint): Call
2321         init_registers_x32_avx_avx512_linux.
2322
2323 2017-08-04  Yao Qi  <yao.qi@linaro.org>
2324
2325         * utils.h (gdb_argv): Add namespace std for nullptr_t.
2326
2327 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
2328
2329         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
2330
2331 2017-08-03  Tom Tromey  <tom@tromey.com>
2332
2333         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
2334         Remove.
2335         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
2336
2337 2017-08-03  Tom Tromey  <tom@tromey.com>
2338
2339         * python/py-param.c (compute_enum_values): Use gdb_argv.
2340
2341 2017-08-03  Tom Tromey  <tom@tromey.com>
2342
2343         * utils.h (struct gdb_argv_deleter): New.
2344         (gdb_argv): New class.
2345         * utils.c (gdb_argv::reset): New method.
2346         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
2347         * tracefile.c (tsave_command): Use gdb_argv.
2348         * top.c (new_ui_command): Use gdb_argv.
2349         * symmisc.c (maintenance_print_symbols)
2350         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
2351         * symfile.c (symbol_file_command, generic_load)
2352         (remove_symbol_file_command): Use gdb_argv.
2353         * stack.c (backtrace_command): Use gdb_argv.
2354         * source.c (add_path, show_substitute_path_command)
2355         (unset_substitute_path_command, set_substitute_path_command):
2356         Use gdb_argv.
2357         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
2358         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
2359         * remote.c (extended_remote_run, remote_put_command)
2360         (remote_get_command, remote_delete_command): Use gdb_argv.
2361         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
2362         (gdbsim_open): Use gdb_argv.
2363         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
2364         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
2365         * procfs.c (procfs_info_proc): Use gdb_argv.
2366         * interps.c (interpreter_exec_cmd): Use gdb_argv.
2367         * infrun.c (handle_command): Use gdb_argv.
2368         * inferior.c (add_inferior_command, clone_inferior_command):
2369         Use gdb_argv.
2370         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
2371         * exec.c (exec_file_command): Use gdb_argv.
2372         * cli/cli-cmds.c (alias_command): Use gdb_argv.
2373         * compile/compile.c (build_argc_argv): Use gdb_argv.
2374
2375 2017-08-03  Tom Tromey  <tom@tromey.com>
2376
2377         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
2378
2379 2017-08-03  Tom Tromey  <tom@tromey.com>
2380
2381         * python/python.c (compute_python_string): Return std::string.
2382         (gdbpy_eval_from_control_command): Update.
2383         (do_start_initialization): Use std::string.
2384         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
2385         xstrprintf.
2386         * python/py-breakpoint.c (local_setattro): Use string_printf, not
2387         xstrprintf.
2388
2389 2017-08-03  Tom Tromey  <tom@tromey.com>
2390
2391         * top.h (do_restore_instream_cleanup): Remove.
2392         * top.c (do_restore_instream_cleanup): Remove.
2393         (read_command_file): Use scoped_restore.
2394         * cli/cli-script.c (execute_user_command): Use scoped_restore.
2395
2396 2017-08-03  Tom Tromey  <tom@tromey.com>
2397
2398         * cli/cli-script.c (execute_user_command)
2399         (execute_control_command): Use scoped_restore.
2400
2401 2017-08-03  Tom Tromey  <tom@tromey.com>
2402
2403         * cli/cli-script.c (do_restore_user_call_depth): Remove.
2404         (execute_user_command): Remove user_call_depth; use
2405         user_args_stack's size instead.
2406
2407 2017-08-03  Tom Tromey  <tom@tromey.com>
2408
2409         * top.h (in_user_command): Remove.
2410         * top.c (in_user_command): Remove.
2411         * cli/cli-script.c (do_restore_user_call_depth)
2412         (execute_user_command): Update.
2413
2414 2017-08-03  Tom Tromey  <tom@tromey.com>
2415
2416         * valops.c (search_struct_method): Use gdb::byte_vector.
2417         * valarith.c (value_concat): Use std::vector.
2418         * target.c (memory_xfer_partial): Use gdb::byte_vector.
2419         (simple_search_memory): Likewise.
2420         * printcmd.c (find_string_backward): Use gdb::byte_vector.
2421         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
2422         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
2423         * elfread.c (elf_rel_plt_read): Use std::string.
2424         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
2425         * cli/cli-dump.c (restore_section_callback): Use
2426         gdb::byte_vector.
2427
2428 2017-08-03  Tom Tromey  <tom@tromey.com>
2429
2430         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
2431
2432 2017-08-03  Tom Tromey  <tom@tromey.com>
2433
2434         * tui/tui-regs.c (tui_restore_gdbout): Remove.
2435         (tui_register_format): Use scoped_restore.
2436
2437 2017-08-03  Tom Tromey  <tom@tromey.com>
2438
2439         * reverse.c (exec_direction_default): Remove.
2440         (exec_reverse_once): Use scoped_restore.
2441         * remote.c (restore_remote_timeout): Remove.
2442         (remote_flash_erase, remote_flash_write, remote_flash_done)
2443         (readchar, remote_serial_write): Use scoped_restore.
2444         * cli/cli-script.c (struct source_cleanup_lines_args)
2445         (source_cleanup_lines): Remove.
2446         (script_from_file): Use scoped_restore.
2447         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
2448         (source_command): Use scoped_restore.
2449
2450 2017-08-03  Tom Tromey  <tom@tromey.com>
2451
2452         * utils.h (make_cleanup_free_so): Remove.
2453         * utils.c (do_free_so, make_cleanup_free_so): Remove.
2454         * solist.h (struct so_deleter): New.
2455         (so_list_up): New typedef.
2456         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
2457
2458 2017-08-03  Tom Tromey  <tom@tromey.com>
2459
2460         * utils.h (make_cleanup_restore_current_language): Remove.
2461         * utils.c (do_restore_current_language)
2462         (make_cleanup_restore_current_language): Remove.
2463         * parse.c (parse_exp_in_context_1)
2464         (parse_expression_with_language): Use
2465         scoped_restore_current_language.
2466         * mi/mi-main.c (mi_cmd_execute): Use
2467         scoped_restore_current_language.
2468         * language.h (scoped_restore_current_language): New class.
2469
2470 2017-08-03  Tom Tromey  <tom@tromey.com>
2471
2472         * compile/compile.c (cleanup_unlink_file): Remove.
2473         (compile_to_object): Use gdb::unlinker.
2474         (eval_compile_command): Likewise.
2475
2476 2017-08-03  Tom Tromey  <tom@tromey.com>
2477
2478         * utils.h (make_cleanup_fclose): Remove.
2479         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
2480
2481 2017-08-03  Tom Tromey  <tom@tromey.com>
2482
2483         * top.c (open_terminal_stream): Return gdb_file_up.
2484         (new_ui_command): Update.
2485
2486 2017-08-03  Tom Tromey  <tom@tromey.com>
2487
2488         * source.c (print_source_lines_base, forward_search_command)
2489         (reverse_search_command): Use gdb_file_up.
2490
2491 2017-08-03  Tom Tromey  <tom@tromey.com>
2492
2493         * fbsd-nat.c (fbsd_find_memory_regions): Update.
2494
2495 2017-08-03  Tom Tromey  <tom@tromey.com>
2496
2497         * cli/cli-cmds.c (find_and_open_script): Change return type.
2498         Remove "streamp" and "full_path" parameters.
2499         (source_script_with_search): Update.
2500         * auto-load.c (source_script_file): Update.
2501         * cli/cli-cmds.h (find_and_open_script): Change type.
2502         (open_script): New struct.
2503
2504 2017-08-03  Tom Tromey  <tom@tromey.com>
2505
2506         * xml-support.c (xml_fetch_content_from_file): Update.
2507         * ui-file.c (stdio_file::open): Update.
2508         * tracefile-tfile.c (tfile_start): Update.
2509         * remote.c (remote_file_put, remote_file_get): Update.
2510         * nat/linux-procfs.c (linux_proc_get_int)
2511         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
2512         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
2513         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
2514         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
2515         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
2516         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
2517         * linux-nat.c (linux_proc_pending_signals): Update.
2518         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
2519         (file_closer): Remove.
2520         * compile/compile.c (compile_to_object): Update.
2521         * common/filestuff.h (struct gdb_file_deleter): New.
2522         (gdb_file_up): New typedef.
2523         (gdb_fopen_cloexec): Change return type.
2524         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
2525         * cli/cli-dump.c (fopen_with_cleanup): Remove.
2526         (dump_binary_file, restore_binary_file): Update.
2527         * auto-load.c (auto_load_objfile_script_1): Update.
2528
2529 2017-08-03  Tom Tromey  <tom@tromey.com>
2530
2531         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
2532         (info_static_tracepoint_markers_command): Likewise.
2533         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
2534         * skip.c (skip_info): Use ui_out_emit_table.
2535         * progspace.c (print_program_space): Use ui_out_emit_table.
2536         * osdata.c (info_osdata): Use ui_out_emit_table.
2537         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
2538         ui_out_emit_table.
2539         * linux-thread-db.c (info_auto_load_libthread_db): Use
2540         ui_out_emit_table.
2541         * inferior.c (print_inferior): Use ui_out_emit_table.
2542         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
2543         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
2544         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
2545         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
2546         * ui-out.h (class ui_out_emit_table): New.
2547
2548 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
2549
2550         * mips-tdep.c (mips_fpu_type_str): New function.
2551         (mips_dump_tdep): Call it.
2552
2553 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
2554
2555         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
2556         `->mips_fpu_type'.
2557
2558 2017-07-31  Xavier Roirand  <roirand@adacore.com>
2559
2560         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
2561
2562 2017-07-27  Xavier Roirand  <roirand@adacore.com>
2563
2564         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
2565
2566 2017-07-26  Yao Qi  <yao.qi@linaro.org>
2567
2568         * cli/cli-cmds.c (maintenancechecklist): New variable.
2569         * gdbcmd.h (maintenancechecklist): Declare it.
2570         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
2571         Call i386_linux_read_description with different masks.
2572         * maint.c (maintenance_check_command): New function.
2573         (_initialize_maint_cmds): Call add_prefix_cmd.
2574         * target-descriptions.c (tdesc_reg): override operator != and ==.
2575         (tdesc_type): Likewise.
2576         (tdesc_feature): Likewise.
2577         (target_desc): Likewise.
2578         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
2579         (maintenance_check_xml_descriptions): New function.
2580         (_initialize_target_descriptions) Add command "xml-descriptions".
2581         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
2582
2583 2017-07-26  Yao Qi  <yao.qi@linaro.org>
2584
2585         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
2586         Include features/i386/32bit-*.c.
2587         (i386_linux_read_description): Generate target description if it
2588         doesn't exist.
2589         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
2590         functions.
2591         * features/i386/32bit-linux.c: Re-generated.
2592         * features/i386/32bit-sse.c: Likewise.
2593         * target-descriptions.c (print_c_feature::visit): Print code to
2594         set register number if needed.
2595         (print_c_feature) <m_next_regnum>: New field.
2596
2597 2017-07-26  Yao Qi  <yao.qi@linaro.org>
2598
2599         * features/Makefile (CFILES): Rename with TDESC_CFILES.
2600         (FEATURE_XMLFILES): New.
2601         (FEATURE_CFILES): New.
2602         New rules.
2603         (clean-cfiles): Remove generated c files.
2604         * features/i386/32bit-avx.c: Generated.
2605         * features/i386/32bit-avx512.c: Generated.
2606         * features/i386/32bit-core.c: Generated.
2607         * features/i386/32bit-linux.c: Generated.
2608         * features/i386/32bit-mpx.c: Generated.
2609         * features/i386/32bit-pkeys.c: Generated.
2610         * features/i386/32bit-sse.c: Generated.
2611         * target-descriptions.c: Include algorithm.
2612         (tdesc_element_visitor): Add method visit_end.
2613         (print_c_tdesc): Implement visit_end.
2614         (print_c_tdesc:: m_filename_after_features): Move it to
2615         protected.
2616         (print_c_feature): New class.
2617         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
2618         name starts with "i386/32bit-".
2619
2620 2017-07-26  Yao Qi  <yao.qi@linaro.org>
2621
2622         * target-descriptions.c (tdesc_element_visitor): New class.
2623         (tdesc_element): New class.
2624         (tdesc_reg): Inherit from tdesc_element.
2625         (tdesc_reg::accept): New function.
2626         (tdesc_type): Inherit from tdesc_element.
2627         (tdesc_type::accept): New function.
2628         (tdesc_feature): Inherit from tdesc_element.
2629         (tdesc_feature::accept): New function.
2630         (target_desc): Inherit from tdesc_element.
2631         (target_desc::target_desc): New.
2632         (target_desc::~target_desc): New.
2633         (target_desc::accept): New.
2634         (allocate_target_description): Use new.
2635         (free_target_description): Use delete.
2636         (print_c_tdesc): New class.
2637         (maint_print_c_tdesc_cmd): Adjust.
2638
2639         * features/aarch64.c: Re-generated.
2640         * features/arc-arcompact.c: Re-generated.
2641         * features/arc-v2.c: Re-generated.
2642         * features/arm/arm-with-iwmmxt.c: Re-generated.
2643         * features/arm/arm-with-m.c: Re-generated.
2644         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
2645         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
2646         * features/arm/arm-with-neon.c: Re-generated.
2647         * features/arm/arm-with-vfpv2.c: Re-generated.
2648         * features/arm/arm-with-vfpv3.c: Re-generated.
2649         * features/i386/amd64-avx-avx512.c: Re-generated.
2650         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
2651         * features/i386/amd64-avx.c: Re-generated.
2652         * features/i386/amd64-avx-linux.c: Re-generated.
2653         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
2654         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
2655         * features/i386/amd64-avx-mpx.c: Re-generated.
2656         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
2657         * features/i386/amd64.c: Re-generated.
2658         * features/i386/amd64-linux.c: Re-generated.
2659         * features/i386/amd64-mpx.c: Re-generated.
2660         * features/i386/amd64-mpx-linux.c: Re-generated.
2661         * features/i386/i386-avx-avx512.c: Re-generated.
2662         * features/i386/i386-avx-avx512-linux.c: Re-generated.
2663         * features/i386/i386-avx.c: Re-generated.
2664         * features/i386/i386-avx-linux.c: Re-generated.
2665         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
2666         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
2667         * features/i386/i386-avx-mpx.c: Re-generated.
2668         * features/i386/i386-avx-mpx-linux.c: Re-generated.
2669         * features/i386/i386.c: Re-generated.
2670         * features/i386/i386-linux.c: Re-generated.
2671         * features/i386/i386-mmx.c: Re-generated.
2672         * features/i386/i386-mmx-linux.c: Re-generated.
2673         * features/i386/i386-mpx.c: Re-generated.
2674         * features/i386/i386-mpx-linux.c: Re-generated.
2675         * features/i386/x32-avx-avx512.c: Re-generated.
2676         * features/i386/x32-avx-avx512-linux.c: Re-generated.
2677         * features/i386/x32-avx.c: Re-generated.
2678         * features/i386/x32-avx-linux.c: Re-generated.
2679         * features/i386/x32.c: Re-generated.
2680         * features/i386/x32-linux.c: Re-generated.
2681         * features/microblaze.c: Re-generated.
2682         * features/microblaze-with-stack-protect.c: Re-generated.
2683         * features/mips64-dsp-linux.c: Re-generated.
2684         * features/mips64-linux.c: Re-generated.
2685         * features/mips-dsp-linux.c: Re-generated.
2686         * features/mips-linux.c: Re-generated.
2687         * features/nds32.c: Re-generated.
2688         * features/nios2.c: Re-generated.
2689         * features/nios2-linux.c: Re-generated.
2690         * features/rs6000/powerpc-32.c: Re-generated.
2691         * features/rs6000/powerpc-32l.c: Re-generated.
2692         * features/rs6000/powerpc-403.c: Re-generated.
2693         * features/rs6000/powerpc-403gc.c : Re-generated.
2694         * features/rs6000/powerpc-405.c: Re-generated.
2695         * features/rs6000/powerpc-505.c: Re-generated.
2696         * features/rs6000/powerpc-601.c: Re-generated.
2697         * features/rs6000/powerpc-602.c: Re-generated.
2698         * features/rs6000/powerpc-603.c: Re-generated.
2699         * features/rs6000/powerpc-604.c: Re-generated.
2700         * features/rs6000/powerpc-64.c: Re-generated.
2701         * features/rs6000/powerpc-64l.c: Re-generated.
2702         * features/rs6000/powerpc-7400.c: Re-generated.
2703         * features/rs6000/powerpc-750.c: Re-generated.
2704         * features/rs6000/powerpc-860.c: Re-generated.
2705         * features/rs6000/powerpc-altivec32.c: Re-generated.
2706         * features/rs6000/powerpc-altivec32l.c: Re-generated.
2707         * features/rs6000/powerpc-altivec64.c: Re-generated.
2708         * features/rs6000/powerpc-altivec64l.c: Re-generated.
2709         * features/rs6000/powerpc-cell32l.c: Re-generated.
2710         * features/rs6000/powerpc-cell64l.c: Re-generated.
2711         * features/rs6000/powerpc-e500.c: Re-generated.
2712         * features/rs6000/powerpc-e500l.c: Re-generated.
2713         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
2714         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
2715         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
2716         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
2717         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
2718         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
2719         * features/rs6000/powerpc-vsx32.c: Re-generated.
2720         * features/rs6000/powerpc-vsx32l.c: Re-generated.
2721         * features/rs6000/powerpc-vsx64.c: Re-generated.
2722         * features/rs6000/powerpc-vsx64l.c: Re-generated.
2723         * features/rs6000/rs6000.c: Re-generated.
2724         * features/s390-linux32.c: Re-generated.
2725         * features/s390-linux32v1.c: Re-generated.
2726         * features/s390-linux32v2.c: Re-generated.
2727         * features/s390-linux64.c: Re-generated.
2728         * features/s390-linux64v1.c: Re-generated.
2729         * features/s390-linux64v2.c: Re-generated.
2730         * features/s390-te-linux64.c: Re-generated.
2731         * features/s390-tevx-linux64.c: Re-generated.
2732         * features/s390-vx-linux64.c: Re-generated.
2733         * features/s390x-linux64.c: Re-generated.
2734         * features/s390x-linux64v1.c: Re-generated.
2735         * features/s390x-linux64v2.c: Re-generated.
2736         * features/s390x-te-linux64.c: Re-generated.
2737         * features/s390x-tevx-linux64.c: Re-generated.
2738         * features/s390x-vx-linux64.c: Re-generated.
2739         * features/sparc/sparc32-solaris.c: Re-generated.
2740         * features/sparc/sparc64-solaris.c: Re-generated.
2741         * features/tic6x-c62x.c: Re-generated.
2742         * features/tic6x-c62x-linux.c: Re-generated.
2743         * features/tic6x-c64x.c: Re-generated.
2744         * features/tic6x-c64x-linux.c: Re-generated.
2745         * features/tic6x-c64xp.c: Re-generated.
2746         * features/tic6x-c64xp-linux.c: Re-generated.
2747
2748 2017-07-26  Yao Qi  <yao.qi@linaro.org>
2749
2750         * i386-linux-tdep.c (i386_linux_read_description): New function.
2751         (i386_linux_core_read_description): Call
2752         i386_linux_read_description.
2753         * i386-linux-tdep.h (i386_linux_read_description): Declare.
2754         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
2755         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
2756         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
2757         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
2758         * x86-linux-nat.c (x86_linux_read_description): Call
2759         i386_linux_read_description.
2760
2761 2017-07-26  Yao Qi  <yao.qi@linaro.org>
2762
2763         * NEWS: Mention it.
2764         * features/Makefile (%.c: %.xml): Pass the xml file name to
2765         command "maint print c-tdesc".
2766         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
2767         name from 'arg'.
2768
2769 2017-07-26  Yao Qi  <yao.qi@linaro.org>
2770
2771         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
2772         in-class initialization.
2773         (tdesc_create_feature): Call new instead of XCNEW.
2774         (free_target_description): Ue delete.
2775
2776 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
2777
2778         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
2779
2780 2017-07-25  Yao Qi  <yao.qi@linaro.org>
2781
2782         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
2783         constant.
2784         (amd64_x32_init_abi): Likewise.
2785         * amd64-tdep.h (amd64_init_abi): Update declaration.
2786         (amd64_x32_init_abi): Likewise.
2787
2788 2017-07-25  Yao Qi  <yao.qi@linaro.org>
2789
2790         PR tdep/21717
2791         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
2792         condition for FPSCR.
2793         (arm_linux_store_inferior_registers): Likewise.
2794
2795 2017-07-22  Tom Tromey  <tom@tromey.com>
2796
2797         * break-catch-syscall.c (struct catch_syscall_inferior_data)
2798         <syscalls_counts>: Now a std::vector.
2799         (get_catch_syscall_inferior_data): Use "new".
2800         (catch_syscall_inferior_data_cleanup): Use "delete".
2801         (insert_catch_syscall, remove_catch_syscall)
2802         (clear_syscall_counts): Update.
2803
2804 2017-07-22  Tom Tromey  <tom@tromey.com>
2805
2806         * break-catch-syscall.c (syscall_catchpoint)
2807         <syscalls_to_be_caught>: Now a std::vector<int>
2808         (~syscall_catchpoint): Remove.
2809         (insert_catch_syscall, remove_catch_syscall)
2810         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
2811         (print_mention_catch_syscall, print_recreate_catch_syscall):
2812         Update.
2813         (create_syscall_event_catchpoint): Change type of "filter"
2814         parameter.
2815         (catch_syscall_split_args): Return a std::vector.
2816         (catch_syscall_command_1, catching_syscall_number_1): Update.
2817
2818 2017-07-22  Tom Tromey  <tom@tromey.com>
2819
2820         * break-catch-throw.c (struct exception_catchpoint)
2821         <exception_rx>: Now a std::string.
2822         (~exception_catchpoint): Remove.
2823         (print_one_detail_exception_catchpoint): Update.
2824         (handle_gnu_v3_exceptions): Change type of except_rx.
2825         (extract_exception_regexp): Return a std::string.
2826         (catch_exception_command_1): Update.
2827
2828 2017-07-22  Tom Tromey  <tom@tromey.com>
2829
2830         * break-catch-sig.c (gdb_signal_type): Remove typedef.
2831         (struct signal_catchpoint) <signals_to_be_caught>: Now a
2832         std::vector.
2833         <catch_all>: Now a bool.
2834         (~signal_catchpoint): Remove.
2835         (signal_catchpoint_insert_location)
2836         (signal_catchpoint_remove_location)
2837         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
2838         (signal_catchpoint_print_mention)
2839         (signal_catchpoint_print_recreate)
2840         (signal_catchpoint_explains_signal): Update.
2841         (create_signal_catchpoint): Change type of "filter" and
2842         "catch_all".
2843         (catch_signal_split_args): Return a std::vector.  Change type of
2844         "catch_all".
2845         (catch_signal_command): Update.
2846
2847 2017-07-20  Pedro Alves  <palves@redhat.com>
2848
2849         * ada-lang.c (ada_language_defn): Make extern.
2850         (_initialize_ada_language): Remove add_language call.
2851         * c-lang.c (c_language_defn, cplus_language_defn)
2852         (asm_language_defn, minimal_language_defn): Make extern.
2853         (_initialize_c_language): Delete.
2854         * completer.c (compare_cstrings): Delete, moved to utils.h.
2855         * d-lang.c (d_language_defn): Make extern.
2856         (_initialize_d_language): Remove add_language calls.
2857         * defs.h (enum language): Add comment.
2858         * f-lang.c (f_language_defn): Make extern.
2859         (_initialize_f_language): Remove add_language call.
2860         * go-lang.c (go_language_defn): Make extern.
2861         (_initialize_go_language): Remove add_language call.
2862         * language.c: Include <algorithm>.
2863         (languages): Redefine as const array.
2864         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
2865         (set_language_command): Handle "local".  Use for-range loop.
2866         (set_language): Remove loop.
2867         (language_enum): Rewrite.
2868         (language_def, language_str): Remove loops.
2869         (add_language): Delete.
2870         (add_set_language_command): New, based on add_languages.
2871         (skip_language_trampoline): Adjust.
2872         (local_language_defn): Delete.
2873         (language_gdbarch_post_init): Adjust.
2874         (_initialize_language): Remove add_language calls.  Call
2875         add_set_language_command.
2876         * language.h (add_language): Delete.
2877         (auto_language_defn)
2878         (unknown_language_defn, minimal_language_defn, ada_language_defn)
2879         (asm_language_defn, c_language_defn, cplus_language_defn)
2880         (d_language_defn, f_language_defn, go_language_defn)
2881         (m2_language_defn, objc_language_defn, opencl_language_defn)
2882         (pascal_language_defn, rust_language_defn): Declare.
2883         * m2-lang.c (m2_language_defn): Make extern.
2884         (_initialize_m2_language): Remove add_language call.
2885         * objc-lang.c (objc_language_defn): Make extern.
2886         (_initialize_objc_language): Remove add_language call.
2887         * opencl-lang.c (opencl_language_defn): Make extern.
2888         (_initialize_opencl_language): Remove add_language call.
2889         * p-lang.c (pascal_language_defn): Make extern.
2890         (_initialize_pascal_language): Delete.
2891         * rust-lang.c (rust_language_defn): Make extern.
2892         (_initialize_rust_language): Delete.
2893         * utils.h (compare_cstrings): New static inline function.
2894
2895 2017-07-20  Pedro Alves  <palves@redhat.com>
2896
2897         * ada-lang.c (ada_to_fixed_type_1): Adjust.
2898         (get_var_value): Constify parameters.
2899         (get_int_var_value): Change prototype.
2900         (to_fixed_range_type): Adjust.
2901         * ada-lang.h (get_int_var_value): Change prototype.
2902
2903 2017-07-20  Pedro Alves  <palves@redhat.com>
2904
2905         * dwarf2read.c (dw2_lookup_symbol): Use
2906         SYMBOL_MATCHES_SEARCH_NAME.
2907         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
2908
2909 2017-07-20  Pedro Alves  <palves@redhat.com>
2910
2911         * block.c (block_iter_name_step, block_iter_name_first)
2912         (block_iter_name_next): Delete.
2913         (block_lookup_symbol_primary): Adjust to use
2914         dict_iter_match_first/dict_iter_match_next.
2915         * block.h (block_iter_name_first, block_iter_name_next): Delete
2916         declarations.
2917         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
2918         dict_iter_match_first/dict_iter_match_next.
2919
2920 2017-07-20  Pedro Alves  <palves@redhat.com>
2921
2922         * cp-support.c (cp_find_first_component_aux): Add missing case for
2923         end of string.
2924
2925 2017-07-18  David Blaikie  <dblaikie@gmail.com>
2926
2927         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
2928         of dwo_cu's dwo_file.
2929
2930 2017-07-18  Yao Qi  <yao.qi@linaro.org>
2931
2932         * remote.c (store_registers_using_G): Remove one line comment.
2933
2934 2017-07-18  Yao Qi  <yao.qi@linaro.org>
2935
2936         * regcache.c (regcache_cpy): Simplify it.
2937         (regcache::cpy_no_passthrough): Remove it.
2938         * regcache.h (cpy_no_passthrough): Remove it.
2939         (regcache_dup, regcache_cpy): Update comments.
2940
2941 2017-07-18  Pedro Alves  <palves@redhat.com>
2942
2943         * remote-sim.c (sim_command_completer): Adjust to work with a
2944         completion_tracker instead of a VEC.
2945
2946 2017-07-17  Pedro Alves  <palves@redhat.com>
2947
2948         * completer.c (complete_source_filenames): New function.
2949         (complete_address_and_linespec_locations): New function.
2950         (location_completer): Use complete_address_and_linespec_locations.
2951         (completion_tracker::build_completion_result): Honor the tracker's
2952         request to suppress append.
2953         * completer.h (completion_tracker::suppress_append_ws)
2954         (completion_tracker::set_suppress_append_ws): New methods.
2955         (completion_tracker::m_suppress_append_ws): New field.
2956         (complete_source_filenames): New declaration.
2957         * linespec.c (linespec_complete_what): New.
2958         (struct ls_parser) <complete_what, completion_word,
2959         completion_quote_char, completion_quote_end, completion_tracker>:
2960         New fields.
2961         (string_find_incomplete_keyword_at_end): New.
2962         (linespec_lexer_lex_string): Record quote char.  If in completion
2963         mode, don't throw.
2964         (linespec_lexer_consume_token): Advance the completion word point.
2965         (linespec_lexer_peek_token): Save/restore completion info.
2966         (save_stream_and_consume_token): New.
2967         (set_completion_after_number): New.
2968         (linespec_parse_basic): Set what to complete next depending on
2969         token.  Handle function and label completions specially.
2970         (parse_linespec): Disable objc shortcut in completion mode.  Set
2971         what to complete next depending on token type.  Skip keyword if in
2972         completion mode.
2973         (complete_linespec_component, linespec_complete): New.
2974         * linespec.h (linespec_complete): Declare.
2975
2976 2017-07-17  Pedro Alves  <palves@redhat.com>
2977
2978         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
2979         Handle 'operator<' / 'operator<<'.
2980
2981 2017-07-17  Pedro Alves  <palves@redhat.com>
2982
2983         * completer.c (collect_explicit_location_matches): Handle
2984         MATCH_LABEL.
2985         (convert_explicit_location_to_linespec): New, factored out from
2986         ...
2987         (convert_explicit_location_to_sals): ... this.
2988         (complete_label): New.
2989         (linespec_complete_label, find_label_symbols_in_block): New.
2990         (find_label_symbols): Add completion_mode parameter and adjust to
2991         call find_label_symbols_in_block.
2992         * linespec.h (linespec_complete_label): Declare.
2993
2994 2017-07-17  Pedro Alves  <palves@redhat.com>
2995
2996         * ada-lang.c (ada_collect_symbol_completion_matches): Add
2997         complete_symbol_mode parameter.
2998         * cli/cli-cmds.c (complete_command): Get the completion result out
2999         of the handle_brkchars tracker if used a custom word point.
3000         * completer.c: Include "linespec.h".
3001         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
3002         (advance_to_expression_complete_word_point): New.
3003         (completion_tracker::completes_to_completion_word): New.
3004         (complete_files_symbols): Pass down
3005         complete_symbol_mode::EXPRESSION.
3006         (explicit_options, probe_options): New.
3007         (collect_explicit_location_matches): Complete on the
3008         explictit_loc->foo instead of word.  Use
3009         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
3010         keyword and options completions.
3011         (backup_text_ptr): Delete.
3012         (skip_keyword): New.
3013         (complete_explicit_location): Remove 'word' parameter.  Add
3014         language, quoted_arg_start and quoted_arg_end parameters.
3015         Rewrite, parsing left to right.
3016         (location_completer): Rewrite.
3017         (location_completer_handle_brkchars): New function.
3018         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
3019         (enum complete_line_internal_reason): Adjust comments.
3020         (completion_tracker::discard_completions): New.
3021         (completer_handle_brkchars_func_for_completer): Handle
3022         location_completer.
3023         (gdb_custom_word_point_brkchars)
3024         (gdb_org_rl_basic_quote_characters): New.
3025         (gdb_completion_word_break_characters_throw)
3026         (completion_find_completion_word): Handle trackers that use a
3027         custom word point.
3028         (completion_tracker::advance_custom_word_point_by): New.
3029         (completion_tracker::build_completion_result): Don't rely on
3030         readline appending the quote char.
3031         (gdb_rl_attempted_completion_function_throw): Handle trackers that
3032         use a custom word point.
3033         (gdb_rl_attempted_completion_function): Restore
3034         rl_basic_quote_characters.
3035         * completer.h (class completion_tracker): Extend intro comment.
3036         (completion_tracker::set_quote_char)
3037         (completion_tracker::quote_char)
3038         (completion_tracker::set_use_custom_word_point)
3039         (completion_tracker::use_custom_word_point)
3040         (completion_tracker::custom_word_point)
3041         (completion_tracker::set_custom_word_point)
3042         (completion_tracker::advance_custom_word_point_by)
3043         (completion_tracker::completes_to_completion_word)
3044         (completion_tracker::discard_completions): New methods.
3045         (completion_tracker::m_quote_char)
3046         (completion_tracker::m_use_custom_word_point)
3047         (completion_tracker::m_custom_word_point): New fields.
3048         (advance_to_expression_complete_word_point): Declare.
3049         * f-lang.c (f_collect_symbol_completion_matches): Add
3050         complete_symbol_mode parameter.
3051         * language.h (struct language_defn)
3052         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
3053         parameter.
3054         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
3055         (linespec_complete_function): New function.
3056         (linespec_lexer_lex_keyword): Adjust.
3057         * linespec.h (linespec_keywords, linespec_complete_function): New
3058         declarations.
3059         * location.c (find_end_quote): New function.
3060         (explicit_location_lex_one): Add explicit_completion_info
3061         parameter.  Save quoting info.  Don't throw if being called for
3062         completion.  Don't handle Ada operators here.
3063         (is_cp_operator, skip_op_false_positives, first_of)
3064         (explicit_location_lex_one_function): New function.
3065         (string_to_explicit_location): Replace 'dont_throw' parameter with
3066         an explicit_completion_info pointer parameter.  Handle it.  Don't
3067         use explicit_location_lex_one to lex function names.  Use
3068         explicit_location_lex_one_function instead.
3069         * location.h (struct explicit_completion_info): New.
3070         (string_to_explicit_location): Replace 'dont_throw' parameter with
3071         an explicit_completion_info pointer parameter.
3072         * symtab.c (default_collect_symbol_completion_matches_break_on):
3073         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
3074         (default_collect_symbol_completion_matches)
3075         (collect_symbol_completion_matches): Add complete_symbol_mode
3076         parameter.
3077         (collect_symbol_completion_matches_type): Pass down
3078         complete_symbol_mode::EXPRESSION.
3079         (collect_file_symbol_completion_matches): Add complete_symbol_mode
3080         parameter.  Handle LINESPEC mode.
3081         * symtab.h (complete_symbol_mode): New.
3082         (default_collect_symbol_completion_matches_break_on)
3083         (default_collect_symbol_completion_matches)
3084         (collect_symbol_completion_matches)
3085         (collect_file_symbol_completion_matches): Add complete_symbol_mode
3086         parameter.
3087
3088 2017-07-17  Pedro Alves  <palves@redhat.com>
3089
3090         * utils.c (enum class strncmp_iw_mode): New.
3091         (strcmp_iw): Rename to ...
3092         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
3093         parameters.  Handle them.
3094         (strncmp_iw): New.
3095         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
3096         * utils.h (strncmp_iw): Declare.
3097         (strcmp_iw): Move describing comments here.
3098
3099 2017-07-17  Pedro Alves  <palves@redhat.com>
3100
3101         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
3102         CP_OPERATOR_STR.
3103         * c-typeprint.c (is_type_conversion_operator): Use
3104         CP_OPERATOR_STR.
3105         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
3106         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
3107         CP_OPERATOR_LEN.
3108         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
3109         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
3110         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
3111         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
3112         CP_OPERATOR_STR.
3113         * location.c: Include "cp-support.h".
3114         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
3115         CP_OPERATOR_STR.
3116         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
3117         CP_OPERATOR_LEN.
3118
3119 2017-07-17  Pedro Alves  <palves@redhat.com>
3120
3121         * cli/cli-cmds.c (complete_command): Use a completion tracker
3122         along with completion_find_completion_word for handle_brkchars
3123         phase.
3124         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
3125         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
3126         (struct gdb_rl_completion_word_info): New.
3127         (gdb_rl_find_completion_word): New.
3128         (completion_find_completion_word): New.
3129         * completer.h (completion_find_completion_word): Declare.
3130
3131 2017-07-17  Pedro Alves  <palves@redhat.com>
3132
3133         * ada-lang.c (symbol_completion_match): Adjust comments.
3134         (symbol_completion_add): Replace vector parameter with
3135         completion_tracker parameter.  Use it.
3136         (ada_make_symbol_completion_list): Rename to...
3137         (ada_collect_symbol_completion_matches): ... this.  Add
3138         completion_tracker parameter and use it.
3139         (ada_language_defn): Adjust.
3140         * break-catch-syscall.c (catch_syscall_completer): Adjust
3141         prototype and work with completion_tracker instead of VEC.
3142         * breakpoint.c (condition_completer): Adjust prototype and work
3143         with completion_tracker instead of VEC.
3144         * c-lang.c (c_language_defn, cplus_language_defn)
3145         (asm_language_defn, minimal_language_defn): Adjust to renames.
3146         * cli/cli-cmds.c (complete_command): Rework using
3147         completion_tracker.  Catch exceptions when completing.
3148         * cli/cli-decode.c (integer_unlimited_completer)
3149         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
3150         with completion_tracker instead of VEC.
3151         * command.h (struct completion_tracker): Forward declare.
3152         (completer_ftype, completer_handle_brkchars_ftype): Change
3153         types.
3154         (complete_on_cmdlist, complete_on_enum): Adjust.
3155         * completer.c: Include <algorithm>.
3156         (struct gdb_completer_state): New.
3157         (current_completion): New global.
3158         (readline_line_completion_function): Delete.
3159         (noop_completer, filename_completer)
3160         (filename_completer_handle_brkchars, complete_files_symbols)
3161         (linespec_location_completer): Adjust to work with a
3162         completion_tracker instead of a VEC.
3163         (string_or_empty): New.
3164         (collect_explicit_location_matches): Adjust to work with a
3165         completion_tracker instead of a VEC.
3166         (explicit_location_completer): Rename to ...
3167         (complete_explicit_location): ... this and adjust to work with a
3168         completion_tracker instead of a VEC.
3169         (location_completer): Adjust to work with a completion_tracker
3170         instead of a VEC.
3171         (add_struct_fields): Adjust to work with a completion_list instead
3172         of VEC.
3173         (expression_completer): Rename to ...
3174         (complete_expression): ... this and adjust to work with a
3175         completion_tracker instead of a VEC.  Use complete_files_symbols.
3176         (expression_completer): Reimplement on top of complete_expression.
3177         (symbol_completer): Adjust to work with a completion_tracker
3178         instead of a VEC.
3179         (enum complete_line_internal_reason): Add describing comments.
3180         (complete_line_internal_normal_command): Adjust to work with a
3181         completion_tracker instead of a VEC.
3182         (complete_line_internal): Rename to ...
3183         (complete_line_internal_1): ... this and adjust to work with a
3184         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
3185         handle_brkchars phase.
3186         (new_completion_tracker): Delete.
3187         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
3188         complete_line_internal_1.
3189         (free_completion_tracker): Delete.
3190         (INITIAL_COMPLETION_HTAB_SIZE): New.
3191         (completion_tracker::completion_tracker)
3192         (completion_tracker::~completion_tracker): New.
3193         (maybe_add_completion): Delete.
3194         (completion_tracker::maybe_add_completion)
3195         (completion_tracker::add_completion)
3196         (completion_tracker::add_completions): New.
3197         (throw_max_completions_reached_error): Delete.
3198         (complete_line): Adjust to work with a completion_tracker instead
3199         of a VEC.  Don't create a completion_tracker_t or check for max
3200         completions here.
3201         (command_completer, command_completer_handle_brkchars)
3202         (signal_completer, reg_or_group_completer_1)
3203         (reg_or_group_completer, default_completer_handle_brkchars):
3204         Adjust to work with a completion_tracker.
3205         (gdb_completion_word_break_characters_throw): New.
3206         (gdb_completion_word_break_characters): Reimplement.
3207         (line_completion_function): Delete.
3208         (completion_tracker::recompute_lowest_common_denominator)
3209         (expand_preserving_ws)
3210         (completion_tracker::build_completion_result)
3211         (completion_result::completion_result)
3212         (completion_result::completion_result)
3213         (completion_result::~completion_result)
3214         (completion_result::completion_result)
3215         (completion_result::release_match_list, compare_cstrings)
3216         (completion_result::sort_match_list)
3217         (completion_result::reset_match_list)
3218         (gdb_rl_attempted_completion_function_throw)
3219         (gdb_rl_attempted_completion_function): New.
3220         * completer.h (completion_list, struct completion_result)
3221         (class completion_tracker): New.
3222         (complete_line): Add completion_tracker parameter.
3223         (readline_line_completion_function): Delete.
3224         (gdb_rl_attempted_completion_function): New.
3225         (noop_completer, filename_completer, expression_completer)
3226         (location_completer, symbol_completer, command_completer)
3227         (signal_completer, reg_or_group_completer): Update prototypes.
3228         (completion_tracker_t, new_completion_tracker)
3229         (make_cleanup_free_completion_tracker): Delete.
3230         (enum maybe_add_completion_enum): Delete.
3231         (maybe_add_completion): Delete.
3232         (throw_max_completions_reached_error): Delete.
3233         * corefile.c (complete_set_gnutarget): Adjust to work with a
3234         completion_tracker instead of a VEC.
3235         * cp-abi.c (cp_abi_completer): Adjust to work with a
3236         completion_tracker instead of a VEC.
3237         * d-lang.c (d_language_defn): Adjust.
3238         * disasm.c (disassembler_options_completer): Adjust to work with a
3239         completion_tracker instead of a VEC.
3240         * f-lang.c (f_make_symbol_completion_list): Rename to ...
3241         (f_collect_symbol_completion_matches): ... this.  Adjust to work
3242         with a completion_tracker instead of a VEC.
3243         (f_language_defn): Adjust.
3244         * go-lang.c (go_language_defn): Adjust.
3245         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
3246         Adjust to work with a completion_tracker instead of a VEC.
3247         * infrun.c (handle_completer): Likewise.
3248         * interps.c (interpreter_completer): Likewise.
3249         * interps.h (interpreter_completer): Likewise.
3250         * language.c (unknown_language_defn, auto_language_defn)
3251         (local_language_defn): Adjust.
3252         * language.h (language_defn::la_make_symbol_completion_list):
3253         Rename to ...
3254         (language_defn::la_collect_symbol_completion_matches): ... this
3255         and adjust to work with a completion_tracker instead of a VEC.
3256         * m2-lang.c (m2_language_defn): Adjust.
3257         * objc-lang.c (objc_language_defn): Adjust.
3258         * opencl-lang.c (opencl_language_defn): Adjust.
3259         * p-lang.c (pascal_language_defn): Adjust.
3260         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
3261         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
3262         with a completion_tracker.
3263         * rust-lang.c (rust_language_defn): Adjust.
3264         * symtab.c (free_completion_list, do_free_completion_list)
3265         (return_val, completion_tracker): Delete.
3266         (completion_list_add_name, completion_list_add_symbol)
3267         (completion_list_add_msymbol, completion_list_objc_symbol)
3268         (completion_list_add_fields, add_symtab_completions): Add
3269         completion_tracker parameter and use it.
3270         (default_make_symbol_completion_list_break_on_1): Rename to...
3271         (default_collect_symbol_completion_matches_break_on): ... this.
3272         Add completion_tracker parameter and use it instead of allocating
3273         a completion tracker here.
3274         (default_make_symbol_completion_list_break_on): Delete old
3275         implementation.
3276         (default_make_symbol_completion_list): Delete.
3277         (default_collect_symbol_completion_matches): New.
3278         (make_symbol_completion_list): Delete.
3279         (collect_symbol_completion_matches): New.
3280         (make_symbol_completion_type): Rename to ...
3281         (collect_symbol_completion_matches_type): ... this.  Add
3282         completion_tracker parameter and use it instead of VEC.
3283         (make_file_symbol_completion_list_1): Rename to...
3284         (collect_file_symbol_completion_matches): ... this.  Add
3285         completion_tracker parameter and use it instead of VEC.
3286         (make_file_symbol_completion_list): Delete.
3287         (add_filename_to_list): Use completion_list instead of a VEC.
3288         (add_partial_filename_data::list): Now a completion_list.
3289         (make_source_files_completion_list): Work with a completion_list
3290         instead of a VEC.
3291         * symtab.h: Include "completer.h".
3292         (default_make_symbol_completion_list_break_on)
3293         (default_make_symbol_completion_list, make_symbol_completion_list)
3294         (make_symbol_completion_type, make_file_symbol_completion_list)
3295         (make_source_files_completion_list): Delete.
3296         (default_collect_symbol_completion_matches_break_on)
3297         (default_collect_symbol_completion_matches)
3298         (collect_symbol_completion_matches)
3299         (collect_symbol_completion_matches_type)
3300         (collect_file_symbol_completion_matches)
3301         (make_source_files_completion_list): New.
3302         * top.c (init_main): Don't install a rl_completion_entry_function
3303         hook.  Install a rl_attempted_completion_function hook instead.
3304         * tui/tui-layout.c (layout_completer): Adjust to work with a
3305         completion_tracker.
3306         * tui/tui-regs.c (tui_reggroup_completer):
3307         * tui/tui-win.c (window_name_completer, focus_completer)
3308         (winheight_completer): Adjust to work with a completion_tracker.
3309         * value.c: Include "completer.h".
3310         (complete_internalvar): Adjust to work with a completion_tracker.
3311         * value.h (complete_internalvar): Likewise.
3312
3313 2017-07-17  Pedro Alves  <palves@redhat.com>
3314
3315         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
3316         renames.
3317         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
3318         comments to completer_ftype's declaration.
3319         <completer_handle_brkchars>: Change type to
3320         completer_handle_brkchars_ftype.
3321         * command.h (completer_ftype): Add describing comment and give
3322         names to parameters.
3323         (completer_ftype_void): Rename to ...
3324         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
3325         (set_cmd_completer_handle_brkchars): Adjust.
3326         * completer.c (filename_completer_handle_brkchars): New function.
3327         (complete_line_internal_normal_command): New function, factored
3328         out from ...
3329         (complete_line_internal): ... here.
3330         (command_completer_handle_brkchars)
3331         (default_completer_handle_brkchars)
3332         (completer_handle_brkchars_func_for_completer): New functions.
3333         * completer.h (set_gdb_completion_word_break_characters): Delete
3334         declaration.
3335         (completer_handle_brkchars_func_for_completer): New declaration.
3336         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
3337         completer_handle_brkchars_func_for_completer.
3338
3339 2017-07-17  Pedro Alves  <palves@redhat.com>
3340
3341         * completer.c (symbol_completer): New function, based on
3342         make_symbol_completion_list_fn.
3343         * completer.h (symbol_completer): New declaration.
3344         * guile/scm-cmd.c (cmdscm_completers): Adjust.
3345         * python/py-cmd.c (completers): Adjust.
3346         * symtab.c (make_symbol_completion_list_fn): Delete.
3347         * symtab.h (make_symbol_completion_list_fn): Delete.
3348         * cli/cli-decode.c (add_cmd): Adjust.
3349
3350 2017-07-17  Pedro Alves  <palves@redhat.com>
3351
3352         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
3353         * dwarf2read.c: Include "filename-seen-cache.h".
3354         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
3355         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
3356         * filename-seen-cache.c: New file.
3357         * filename-seen-cache.h: New file.
3358         * symtab.c: Include "filename-seen-cache.h".
3359         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
3360         (create_filename_seen_cache, clear_filename_seen_cache)
3361         (delete_filename_seen_cache, filename_seen): Delete, parts moved
3362         to filename-seen-cache.h/filename-seen-cache.c.
3363         (output_source_filename, sources_info)
3364         (maybe_add_partial_symtab_filename)
3365         (make_source_files_completion_list): Adjust to use
3366         filename_seen_cache.
3367
3368 2017-07-17  Pedro Alves  <palves@redhat.com>
3369
3370         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
3371         fields.
3372         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
3373         dwarf2_debug_sections*)): New.
3374         (dwarf2_per_objfile::dwarf2_per_objfile(const
3375         dwarf2_per_objfile&)): Declare as deleted.
3376         (dwarf2_per_objfile::operator=): Declare as deleted.
3377         (dwarf2_per_objfile::dwarf2_per_objfile)
3378         (dwarf2_per_objfile::~dwarf2_per_objfile)
3379         (dwarf2_per_objfile::free_cached_comp_units): New.
3380         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
3381         ctor.  Call dwarf2_per_objfile's ctor manually.
3382         (dwarf2_locate_sections): Deleted/refactored as ...
3383         (dwarf2_per_objfile::locate_sections): ... this new method.
3384         (free_cached_comp_units): Defer to
3385         dwarf2_per_objfile::free_cached_comp_units.
3386         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
3387
3388 2017-07-14  Tom Tromey  <tom@tromey.com>
3389
3390         PR rust/21764:
3391         * rust-exp.y (convert_ast_to_expression): Add "want_type"
3392         parameter.
3393         <UNOP_SIZEOF>: Split into separate case.
3394         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
3395
3396 2017-07-14  Tom Tromey  <tom@tromey.com>
3397
3398         PR rust/21763:
3399         * symtab.c (symbol_matches_domain): Add language_rust to special
3400         case.
3401         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
3402         treat LOC_TYPEDEF symbols as variables.
3403
3404 2017-07-14  Pedro Alves  <palves@redhat.com>
3405
3406         * symtab.c (make_file_symbol_completion_list_1): Iterate over
3407         symtabs matching all symtabs with SRCFILE as file name instead of
3408         only considering the first hit, with lookup_symtab.
3409
3410 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
3411
3412         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
3413         operator_name parameters.
3414         (gen_expr): Update function call.
3415
3416 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
3417
3418         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
3419         parameter.
3420         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
3421         Likewise.
3422         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
3423         parameter, use agent_expr::gdbarch instead, update function
3424         calls.
3425         (locexpr_tracepoint_var_ref): Likewise.
3426         (loclist_tracepoint_var_ref): Likewise.
3427         * ax-gdb.c (gen_trace_static_fields): Likewise.
3428         (gen_traced_pop): Likewise.
3429         (gen_frame_args_address): Likewise.
3430         (gen_frame_locals_address): Likewise.
3431         (gen_var_ref): Likewise.
3432         (gen_struct_ref_recursive): Likewise.
3433         (gen_static_field): Likewise.
3434         (gen_maybe_namespace_elt): Likewise.
3435         (gen_expr): Likewise.
3436         (gen_trace_for_var): Likewise.
3437         (gen_trace_for_expr): Likewise.
3438         (gen_trace_for_return_address): Likewise.
3439
3440 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
3441
3442         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
3443         parameter.
3444         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
3445
3446 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
3447
3448         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
3449         from ax, update calls.
3450         (gen_usual_arithmetic): Likewise.
3451         (gen_integral_promotions): Likewise.
3452         (gen_bitfield_ref): Likewise.
3453         (gen_primitive_field): Likewise.
3454         (gen_struct_ref_recursive): Likewise.
3455         (gen_struct_ref): Likewise.
3456         (gen_maybe_namespace_elt): Likewise.
3457         (gen_struct_elt_for_reference): Likewise.
3458         (gen_namespace_elt): Likewise.
3459         (gen_aggregate_elt_ref): Likewise.
3460         (gen_expr): Get gdbarch from ax, update calls.
3461         (gen_expr_binop_rest): Likewise.
3462
3463 2017-07-13  Pedro Alves  <palves@redhat.com>
3464
3465         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
3466         as default tdesc.
3467         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
3468         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
3469         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
3470         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
3471         tdep.
3472         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
3473         Get final tdesc from the tdep.
3474         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
3475         default tdesc.
3476         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3477         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3478         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
3479         Use it as default tdesc.
3480         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
3481         down to amd_init_abi.  No longer handle fallback tdesc here.
3482         * amd64-tdep.h (tdesc_x32): Declare.
3483         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
3484         parameter.
3485         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
3486         as default tdesc.
3487
3488 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3489
3490         * s390-linux-tdep.c (s390_process_record): Add support for
3491         instructions new in arch12.
3492
3493 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
3494
3495         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
3496         PT_GETFSBASE and PT_GETGSBASE.
3497         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
3498         PT_SETGSBASE.
3499
3500 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
3501
3502         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
3503         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
3504         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
3505         those rules.
3506         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
3507         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
3508         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
3509         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
3510         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
3511         * features/i386/amd64.xml: Add 64bit-segments.xml.
3512         * features/i386/amd64-avx-avx512.c: Regenerated.
3513         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
3514         * features/i386/amd64-avx-mpx.c: Regenerated.
3515         * features/i386/amd64-avx.c: Regenerated.
3516         * features/i386/amd64-mpx.c: Regenerated.
3517         * features/i386/amd64.c: Regenerated.
3518         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
3519         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
3520         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
3521         * regformats/i386/amd64-avx.dat: Regenerated.
3522         * regformats/i386/amd64-mpx.dat: Regenerated.
3523         * regformats/i386/amd64.dat: Regenerated.
3524
3525 2017-07-10  Yao Qi  <yao.qi@linaro.org>
3526
3527         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
3528         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
3529
3530 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
3531
3532         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
3533         unsetenv.
3534         * gnulib/aclocal.m4: Regenerate.
3535         * gnulib/config.in: Regenerate.
3536         * gnulib/configure: Regenerate.
3537         * gnulib/import/Makefile.am: Regenerate.
3538         * gnulib/import/Makefile.in: Regenerate.
3539         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3540         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3541         * gnulib/import/m4/environ.m4: New file.
3542         * gnulib/import/m4/setenv.m4: New file.
3543         * gnulib/import/setenv.c: New file.
3544         * gnulib/import/unsetenv.c: New file.
3545
3546 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
3547
3548         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
3549         address when op is DW_OP_addr.
3550
3551 2017-07-09  Tom Tromey  <tom@tromey.com>
3552
3553         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
3554         check and apply to outer type.
3555
3556 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
3557
3558         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
3559         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
3560         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
3561         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
3562
3563 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
3564
3565         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
3566
3567 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
3568
3569         * corelow.c (get_core_siginfo): Remove.
3570         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
3571         instead of get_core_siginfo.
3572         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
3573         * gdbarch.h: Re-generate.
3574         * gdbarch.c: Re-generate.
3575         * linux-tdep.c (linux_core_xfer_siginfo): New.
3576         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
3577
3578 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
3579
3580         * corelow.c (thread_section_name): Move to ...
3581         * gdbcore.h (thread_section_name): ... here.
3582
3583 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
3584
3585         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
3586         (struct siginfo32): New.
3587         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
3588         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
3589         via ptrace(PT_LWPINFO).
3590
3591 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
3592
3593         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
3594         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
3595         (fbsd_get_siginfo_type): New.
3596         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
3597         (_initialize_fbsd_tdep): New.
3598
3599 2017-07-06  David Blaikie  <dblaikie@gmail.com>
3600
3601         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
3602         a singular dwo_unit*) to support multiple CUs in the same way that
3603         multiple TUs are supported.
3604         (create_cus_hash_table): Replace create_dwo_cu with a function for
3605         parsing multiple CUs from a DWO file.
3606         (open_and_init_dwo_file): Use create_cus_hash_table rather than
3607         create_dwo_cu.
3608         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
3609         htab_find, rather than comparing the signature to a singleton CU in
3610         the dwo_file.
3611
3612 2017-07-06  Pedro Alves  <palves@redhat.com>
3613
3614         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
3615
3616 2017-07-04  Pedro Alves  <palves@redhat.com>
3617
3618         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
3619         * gdbtypes.h (TYPE_STATIC): Delete.
3620         (struct fn_field) <is_public, is_abstract, is_static, is_final,
3621         is_synchronized, is_native>: Delete.
3622         <dummy>: Bump.
3623         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
3624         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
3625         (TYPE_FN_FIELD_ABSTRACT): Delete.
3626
3627 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
3628
3629         * buffer.h (buffer_finish): Fix spelling mistakes.
3630
3631 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
3632
3633         * .dir-locals.el: Automatically switch to C-style comments in
3634         versions of Emacs that support the feature.
3635
3636 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
3637             Pedro Alves  <palves@redhat.com>
3638
3639         PR cli/21688
3640         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
3641         (process_next_line): New variable 'inline_cmd'.
3642         Adjust 'if' clauses for "python", "compile" and "guile" to use
3643         'command_name_equals' and check for '!inline_cmd'.
3644
3645 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
3646
3647         PR cli/21688
3648         * cli/cli-script.c (command_name_equals_not_inline): New function.
3649         (process_next_line): Adjust 'if' clauses for "python", "compile"
3650         and "guile" to use command_name_equals_not_inline.
3651
3652 2017-06-29  Pedro Alves  <palves@redhat.com>
3653
3654         * completer.c (expression_completer): Call
3655         linespec_location_completer instead of location_completer.
3656
3657 2017-06-29  Pedro Alves  <palves@redhat.com>
3658
3659         * completer.c (expression_completer): Remove code that recomputes
3660         'text' from 'word'.
3661
3662 2017-06-29  Yao Qi  <yao.qi@linaro.org>
3663
3664         * regformats/regdat.sh: Generate code with
3665         "ifndef IN_PROCESS_AGENT".
3666
3667 2017-06-28  Pedro Alves  <palves@redhat.com>
3668
3669         * command.h: Include "common/scoped_restore.h".
3670
3671 2017-06-28  Yao Qi  <yao.qi@linaro.org>
3672
3673         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
3674         instead of obstack_grow.
3675
3676 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
3677
3678         PR gdb/21337
3679         * symfile.c (reread_symbols): Call objfiles_changed just before
3680         read_symbols.
3681
3682 2017-06-27  Pedro Alves  <palves@redhat.com>
3683
3684         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
3685         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
3686         (completion_list_add_symbol, completion_list_add_msymbol):
3687         ... these new functions.
3688         (add_symtab_completions)
3689         (default_make_symbol_completion_list_break_on_1): Adjust.
3690
3691 2017-06-27  Pedro Alves  <palves@redhat.com>
3692
3693         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
3694         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
3695         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
3696         dtor.
3697         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
3698         'storage_obstack' field an auto_obstack.  In-class initialize all
3699         non-bitfield fields.  Make minsyms_read bool.
3700         * symfile.c (read_symbols): Adjust.
3701
3702 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
3703
3704         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
3705         (gdbsim_store_register): Likewise.
3706
3707 2017-06-27  Pedro Alves  <palves@redhat.com>
3708
3709         * c-exp.y (name_obstack): Now an auto_obstack.
3710         (yylex): Use auto_obstack::clear.
3711         (c_parse): Use auto_obstack::clear instead of reinitializing and
3712         freeing the obstack.
3713         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
3714         * d-exp.y (name_obstack): Now an auto_obstack.
3715         (yylex): Use auto_obstack::clear.
3716         (d_parse): Use auto_obstack::clear instead of reinitializing and
3717         freeing the obstack.
3718         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
3719         auto_obstack.
3720         * dwarf2read.c (create_addrmap_from_index)
3721         (dwarf2_build_psymtabs_hard)
3722         (update_enumeration_type_from_children): Likewise.
3723         * gdb_obstack.h (auto_obstack): New type.
3724         * go-exp.y (name_obstack): Now an auto_obstack.
3725         (build_packaged_name): Use auto_obstack::clear.
3726         (go_parse): Use auto_obstack::clear instead of reinitializing and
3727         freeing the obstack.
3728         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
3729         auto_obstack.
3730         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
3731         * rust-exp.y (work_obstack): Now an auto_obstack.
3732         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
3733         reinitializing and freeing the obstack.
3734         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
3735         (host_char_to_target): Use auto_obstack.
3736         * utils.h (make_cleanup_obstack_free): Delete declaration.
3737         * valprint.c (generic_emit_char, generic_printstr): Use
3738         auto_obstack.
3739
3740 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3741
3742         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
3743         thread.
3744         (darwin_init_thread_list): Don't update dummy thread.
3745         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
3746
3747 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
3748
3749         * record-full.c (netorder16): Remove.
3750
3751 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
3752
3753         * common/diagnostics.h: Define macros for GCC.
3754         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
3755         * common/vec.h: Include diagnostics.h.
3756         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
3757         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
3758         warning.
3759
3760 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
3761
3762         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
3763         New macro.
3764         * ada-lex.l: Ignore deprecated register warnings.
3765
3766 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
3767
3768         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
3769         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
3770
3771 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
3772
3773         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
3774         its own line.
3775
3776 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
3777
3778         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
3779
3780 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
3781
3782         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
3783         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
3784         (xtensa_register_read_masked): Likewise.
3785
3786 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3787
3788         * common/environ.c (gdb_environ::unset): Update comment.
3789
3790 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
3791
3792         * python/py-unwind.c (pyuw_sniffer): Allocate space for
3793         registers.
3794
3795 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
3796
3797         * record-full.c (record_full_exec_insn): Use byte_vector.
3798
3799 2017-06-22  Yao Qi  <yao.qi@linaro.org>
3800
3801         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
3802         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
3803
3804 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
3805
3806         * remote.c (cached_reg): Move from here...
3807         * regcache.h (cached_reg): ...to here.
3808         * python/py-unwind.c (struct reg_info): Remove.
3809         (cached_frame_info): Use cached_reg_t.
3810         (pyuw_prev_register): Likewise.
3811         (pyuw_sniffer): Use cached_reg_t and allocate registers.
3812         (pyuw_dealloc_cache): Free all registers.
3813
3814 2017-06-22  Pedro Alves  <palves@redhat.com>
3815             Simon Marchi  <simon.marchi@ericsson.com>
3816
3817         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
3818         warning.
3819         * common/diagnostics.h: New file.
3820
3821 2017-06-22  Pedro Alves  <palves@redhat.com>
3822
3823         * common/agent.h: Add include guards.
3824
3825 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
3826
3827         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
3828         talk about addressable units instead of bytes.
3829
3830 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
3831
3832         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
3833         of '::const_iterator'.
3834
3835 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
3836
3837         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3838         'unittests/environ-selftests.c'.
3839         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
3840         * charset.c (find_charset_names): Declare object 'iconv_env'.
3841         Update code to use 'iconv_env' object.  Remove call to
3842         'free_environ'.
3843         * common/environ.c: Include <utility>.
3844         (make_environ): Delete function.
3845         (free_environ): Delete function.
3846         (gdb_environ::clear): New function.
3847         (gdb_environ::operator=): New function.
3848         (gdb_environ::get): Likewise.
3849         (environ_vector): Delete function.
3850         (set_in_environ): Delete function.
3851         (gdb_environ::set): New function.
3852         (unset_in_environ): Delete function.
3853         (gdb_environ::unset): New function.
3854         (gdb_environ::envp): Likewise.
3855         * common/environ.h: Include <vector>.
3856         (struct gdb_environ): Delete; transform into...
3857         (class gdb_environ): ... this class.
3858         (free_environ): Delete prototype.
3859         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
3860         environ_vector): Likewise.
3861         * infcmd.c (run_command_1): Update code to call
3862         'envp' from 'gdb_environ' class.
3863         (environment_info): Update code to call methods from 'gdb_environ'
3864         class.
3865         (unset_environment_command): Likewise.
3866         (path_info): Likewise.
3867         (path_command): Likewise.
3868         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
3869         (inferior::inferior): Initialize 'environment' using the host's
3870         information.
3871         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
3872         Include "environ.h".
3873         (class inferior) <environment>: Change type from 'struct
3874         gdb_environ' to 'gdb_environ'.
3875         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
3876         methods from 'gdb_environ' class.
3877         * solib.c (solib_find_1): Likewise
3878         * unittests/environ-selftests.c: New file.
3879
3880 2017-06-20  Yao Qi  <yao.qi@linaro.org>
3881
3882         * features/i386/i386-linux.xml: Exchange the order of including
3883         32bit-linux.xml and 32bit-sse.xml.
3884         * features/i386/i386-linux.c: Regenerated.
3885
3886 2017-06-20  Yao Qi  <yao.qi@linaro.org>
3887
3888         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
3889         Delete copy ctor and assignment operator.
3890         (tdesc_type): Likewise.
3891         (tdesc_feature): Likewise.
3892         (tdesc_free_reg): Remove.
3893         (tdesc_create_reg): Use new.
3894         (tdesc_free_type): Remove.
3895         (tdesc_create_vector): Use new.
3896         (tdesc_create_union): Likewise.
3897         (tdesc_create_flags): Likewise.
3898         (tdesc_create_enum): Likewise.
3899         (tdesc_free_feature): Delete.
3900         (free_target_description): Use delete.
3901
3902 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
3903
3904         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
3905         registers.
3906
3907 2017-06-19  Pedro Alves  <palves@redhat.com>
3908
3909         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
3910         after gdb::unlinker.
3911
3912 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
3913
3914         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
3915         gdb_environ to access an environment variable.
3916
3917 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
3918
3919         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
3920         gdb_byte*.
3921
3922 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
3923
3924         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
3925
3926 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
3927
3928         * configure: Re-generate.
3929         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
3930
3931 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
3932
3933         * configure: Re-generate.
3934         * warning.m4: Pass -Werror to compiler when checking for
3935         supported warning flags.
3936
3937 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
3938
3939         * Makefile.in (COMPILE.pre): Add "-x c++".
3940
3941 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
3942             Pedro Alves  <palves@redhat.com>
3943             Yao Qi  <yao.qi@linaro.org>
3944
3945         * defs.h (RequireLongest): New.
3946         (extract_integer): Declare function template.
3947         (extract_signed_integer): Remove the declaration, but define it
3948         static inline.
3949         (extract_unsigned_integer): Likewise.
3950         (store_integer): Declare function template.
3951         (store_signed_integer): Remove the declaration, but define it
3952         static inline.
3953         (store_unsigned_integer): Likewise.
3954         * findvar.c (extract_integer): New function template.
3955         (extract_signed_integer): Remove.
3956         (extract_unsigned_integer): Remove.
3957         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
3958         instantiations.
3959         (store_integer): New function template.
3960         (store_signed_integer): Remove.
3961         (store_unsigned_integer): Remove.
3962         (store_integer): Explicit instantiations.
3963         * regcache.c (regcache_raw_read_signed): Update.
3964         (regcache::raw_read): New function.
3965         (regcache::raw_read_signed): Remove.
3966         (regcache::raw_read_unsigned): Remove.
3967         (regcache_raw_read_unsigned): Update.
3968         (regcache_raw_write_unsigned): Update.
3969         (regcache::raw_write_signed): Remove.
3970         (regcache::raw_write): New function.
3971         (regcache_cooked_read_signed): Update.
3972         (regcache::raw_write_unsigned): Remove.
3973         (regcache::cooked_read_signed): Remove.
3974         (regcache_cooked_read_unsigned): Update.
3975         (regcache::cooked_read_unsigned): Remove.
3976         (regcache_cooked_write_signed): Update.
3977         (regcache_cooked_write_unsigned): Update.
3978         * regcache.h (regcache) <raw_read_signed>: Remove.
3979         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
3980         <raw_read, raw_write>: New.
3981         <cooked_read_signed, cooked_write_signed>: Remove.
3982         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
3983         <cooked_read, cooked_write>: New.
3984         * sh64-tdep.c (sh64_pseudo_register_read): Update.
3985         (sh64_pseudo_register_write): Update.
3986
3987 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
3988
3989         * arc-tdep.c (arc_disassembler_options): New variable.
3990         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
3991         of default_print_insn.
3992         (arc_delayed_print_insn): Set info->section when needed,
3993         use default_print_insn to retrieve a disassembler.
3994
3995 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
3996
3997         PR gdb/21574
3998         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
3999         to mention $SHELL and startup-with-shell.
4000
4001 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
4002
4003         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
4004
4005 2017-06-14  Yao Qi  <yao.qi@linaro.org>
4006
4007         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
4008         default_print_insn instead of print_insn_aarch64.
4009         * arm-tdep.c (gdb_print_insn_arm): Call
4010         default_print_insn instead of print_insn_big_arm
4011         and print_insn_little_arm.
4012         * i386-tdep.c (i386_print_insn): Call default_print_insn
4013         instead of print_insn_i386.
4014         * ia64-tdep.c (ia64_print_insn): Call
4015         default_print_insn instead of print_insn_ia64.
4016         * mips-tdep.c (gdb_print_insn_mips): Call
4017         default_print_insn instead of print_insn_big_mips
4018         and print_insn_little_mips.
4019         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
4020         instead of print_insn_spu.
4021
4022 2017-06-14  Pedro Alves  <palves@redhat.com>
4023
4024         * ada-lang.c: Include "common/byte-vector.h".
4025         (ada_value_primitive_packed_val): Use gdb::byte_vector.
4026         * charset.c (wchar_iterator::iterate): Resize the vector instead
4027         of reserving it.
4028         * common/byte-vector.h: Include "common/def-vector.h".
4029         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
4030         * cli/cli-dump.c: Include "common/byte-vector.h".
4031         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
4032         * common/byte-vector.h: New file.
4033         * common/def-vector.h: New file.
4034         * common/default-init-alloc.h: New file.
4035         * dwarf2loc.c: Include "common/byte-vector.h".
4036         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
4037         instead of reserving it.
4038         * dwarf2read.c: Include "common/byte-vector.h".
4039         (data_buf::m_vec): Now a gdb::byte_vector.
4040         * gdb_regex.c: Include "common/def-vector.h".
4041         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
4042         * mi/mi-main.c: Include "common/byte-vector.h".
4043         (mi_cmd_data_read_memory): Use gdb::byte_vector.
4044         * printcmd.c: Include "common/byte-vector.h".
4045         (print_scalar_formatted): Use gdb::byte_vector.
4046         * valprint.c: Include "common/byte-vector.h".
4047         (maybe_negate_by_bytes, print_decimal_chars): Use
4048         gdb::byte_vector.
4049
4050 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4051
4052         * darwin-nat.c: Include "nat/fork-inferior.h".
4053
4054 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4055
4056         * configure.nat: Factor out Darwin bits that are not
4057         architecture-specific.  Add fork-inferior.o.
4058
4059 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4060
4061         * configure.nat: Factor out AIX bits that are not
4062         architecture-specific.  Add fork-inferior.o.
4063
4064 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4065
4066         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
4067         (read_pieced_value, write_pieced_value): ...here.  Reduce to
4068         wrappers that just call rw_pieced_value.
4069
4070 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4071
4072         * dwarf2loc.c (write_pieced_value): When writing the data for a
4073         memory piece, use write_memory_with_notification instead of
4074         write_memory.
4075
4076 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4077
4078         * valops.c (read_value_memory): Change embedded_offset to
4079         represent a bit offset instead of a byte offset.
4080         * value.h (read_value_memory): Adjust comment.
4081
4082 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4083
4084         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
4085         dest_offset_bits and source_offset_bits.
4086         (write_pieced_value): Likewise.
4087
4088 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4089
4090         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
4091         given by DW_OP_bit_piece.
4092         (write_pieced_value): Likewise.
4093
4094 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4095
4096         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
4097         some other preparations to the places where sufficient information
4098         is available.
4099         (write_pieced_value): Likewise.
4100
4101 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4102
4103         * dwarf2loc.c (bits_to_bytes): New function.
4104         (read_pieced_value): Fix offset calculations for register pieces
4105         on big-endian targets.
4106         (write_pieced_value): Likewise.
4107
4108 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4109
4110         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
4111         (write_pieced_value): Likewise.
4112
4113 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4114
4115         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
4116         transfer the source value's least significant bits, instead of its
4117         lowest-addressed ones.  Rename type_len to max_offset.
4118         (read_pieced_value): Mirror above changes to write_pieced_value as
4119         applicable.
4120
4121 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4122
4123         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
4124         truncate full bytes from dest_offset_bits before using it as an
4125         offset into the buffer.
4126
4127 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4128
4129         * dwarf2loc.c (write_pieced_value): Include transfer size in
4130         byte-wise check.
4131
4132 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4133
4134         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
4135         calculation of this_size.
4136
4137 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4138
4139         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
4140         when targeting a bit-field.
4141         (write_pieced_value): Likewise.
4142
4143 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4144
4145         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
4146         (allocate_piece_closure): Drop addr_size parameter.
4147         (dwarf2_evaluate_loc_desc_full): Adjust call to
4148         allocate_piece_closure.
4149
4150 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4151
4152         PR gdb/21226
4153         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
4154         the LSB end, independent of endianness.
4155
4156 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4157
4158         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
4159         size capping.
4160
4161 2017-06-13  Yao Qi  <yao.qi@linaro.org>
4162
4163         * mips-linux-nat.c: Move include features/mips*-linux.c to
4164         mips-linux-tdep.c.
4165         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
4166         to mips-linux-tdep.c.
4167         * mips-linux-tdep.c: Include features/mips*-linux.c
4168         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
4169         functions.
4170         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
4171         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
4172         (tdesc_mips64_dsp_linux): Declare.
4173
4174 2017-06-12  Tom Tromey  <tom@tromey.com>
4175
4176         * valprint.h (val_print_type_code_int): Remove.
4177         * valprint.c (generic_val_print_int): Always call
4178         val_print_scalar_formatted.
4179         (val_print_type_code_int): Remove.
4180         * printcmd.c (print_scalar_formatted): Handle options->format==0.
4181         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
4182         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
4183         * ada-valprint.c (ada_val_print_num): Use
4184         val_print_scalar_formatted.
4185
4186 2017-06-12  Tom Tromey  <tom@tromey.com>
4187
4188         * printcmd.c (print_scalar_formatted): Unify the two switches.
4189         Don't convert scalars to LONGEST.
4190
4191 2017-06-12  Tom Tromey  <tom@tromey.com>
4192
4193         PR exp/16225:
4194         * valprint.h (print_decimal_chars): Update.
4195         * valprint.c (maybe_negate_by_bytes): New function.
4196         (print_decimal_chars): Add "is_signed" argument.
4197         * printcmd.c (print_scalar_formatted): Update.
4198
4199 2017-06-12  Tom Tromey  <tom@tromey.com>
4200
4201         PR exp/16225:
4202         * valprint.h (print_binary_chars, print_hex_chars): Update.
4203         * valprint.c (val_print_type_code_int): Update.
4204         (print_binary_chars): Add "zero_pad" argument.
4205         (emit_octal_digit): New function.
4206         (print_octal_chars): Don't zero-pad.
4207         (print_decimal_chars): Likewise.
4208         (print_hex_chars): Add "zero_pad" argument.
4209         * sh64-tdep.c (sh64_do_fp_register): Update.
4210         * regcache.c (regcache::dump): Update.
4211         * printcmd.c (print_scalar_formatted): Update.
4212         * infcmd.c (default_print_one_register_info): Update.
4213
4214 2017-06-12  Pedro Alves  <palves@redhat.com>
4215             Alan Hayward  <alan.hayward@arm.com>
4216
4217         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
4218         (mips_eabi_push_dummy_call): Rename local 'regsize' to
4219         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
4220         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
4221         Assert that abi_regsize bytes fit in 'ref_valbuf'.
4222
4223 2017-06-12  Pedro Alves  <palves@redhat.com>
4224
4225         * dwarf2read.c (mapped_symtab::data): Now a vector of
4226         symtab_index_entry instead of vector of
4227         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
4228         whether an element's name is NULL instead of checking whether the
4229         element itself is NULL.
4230         (find_slot): Change return type.  Adjust.
4231         (hash_expand, , add_index_entry, uniquify_cu_indices)
4232         (write_hash_table): Adjust.
4233
4234 2017-06-12  Pedro Alves  <palves@redhat.com>
4235
4236         * dwarf2read.c (recursively_count_psymbols): New function.
4237         (write_psymtabs_to_index): Call it to compute number of psyms and
4238         pass estimate size of psyms_seen to unordered_set's ctor.
4239
4240 2017-06-12  Pedro Alves  <palves@redhat.com>
4241
4242         * dwarf2read.c (write_hash_table): Check if key already exists
4243         before emplacing.
4244
4245 2017-06-12  Pedro Alves  <palves@redhat.com>
4246
4247         * dwarf2read.c (data_buf::append_space): Rename to...
4248         (data_buf::grow): ... this, and make private.  Adjust all callers.
4249         (data_buf::append_uint): New method.
4250         (add_address_entry, write_one_signatured_type)
4251         (write_psymtabs_to_index): Use it.
4252
4253 2017-06-12  Pedro Alves  <palves@redhat.com>
4254
4255         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
4256         (file_write (FILE *, const std::vector<Elem>&)): Delete.
4257         (data_buf::file_write): Call ::fwrite directly.
4258
4259 2017-06-12  Pedro Alves  <palves@redhat.com>
4260
4261         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
4262         std::vector::erase.
4263
4264 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
4265
4266         Code cleanup: C++ify .gdb_index producer.
4267         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
4268         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
4269         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
4270         (create_strtab, add_string): Remove.
4271         (file_write, data_buf): New.
4272         (struct symtab_index_entry): Use std::vector for cu_indices.
4273         (struct mapped_symtab): Use std::vector for data.
4274         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
4275         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
4276         Remove.
4277         (find_slot): Change return type.  Update it to the new data structures.
4278         (hash_expand, add_index_entry): Update it to the new data structures.
4279         (offset_type_compare): Remove.
4280         (uniquify_cu_indices): Update it to the new data structures.
4281         (c_str_view, c_str_view_hasher, vector_hasher): New.
4282         (add_indices_to_cpool): Remove.
4283         (write_hash_table): Update it to the new data structures.
4284         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
4285         (eq_psymtab_cu_index): Remove.
4286         (psym_index_map): New typedef.
4287         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
4288         reference and std::unordered_map for cu_index_htab.
4289         (add_address_entry, add_address_entry_worker, write_address_map)
4290         (write_psymbols): Update it to the new data structures.
4291         (write_obstack): Remove.
4292         (struct signatured_type_index_data): Change types_list to a data_buf
4293         reference and psyms_seen to a std::unordered_set reference.
4294         (write_one_signatured_type, recursively_write_psymbols)
4295         (write_psymtabs_to_index): Update it to the new data structures.
4296
4297 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
4298
4299         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
4300         separate-debug-file commands.
4301         * symfile.h (separate_debug_file_debug): New global.
4302         * symfile.c (separate_debug_file_debug): New global.
4303         (separate_debug_file_exists, find_separate_debug_file): Add
4304         debug output.
4305         (_initialize_symfile): Add "set debug separate-debug-file"
4306         command.
4307         * build-id.c (build_id_to_debug_bfd,
4308         find_separate_debug_file_by_buildid): Add debug output.
4309
4310 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
4311
4312         * gdbarch.sh (displaced_step_free_closure): Remove.
4313         * gdbarch.h, gdbarch.c: Re-generate.
4314         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
4315         displaced_step_free_closure.
4316         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
4317         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
4318         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4319         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
4320         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
4321         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
4322         * arch-utils.h (simple_displaced_step_free_closure): Remove.
4323         * arch-utils.c (simple_displaced_step_free_closure): Remove.
4324         * infrun.c (displaced_step_clear): Call xfree instead of
4325         gdbarch_displaced_step_free_closure.
4326
4327 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
4328
4329         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
4330         NULL".
4331
4332 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
4333
4334         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
4335         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
4336         (mn10300_push_dummy_call): Likewise.
4337
4338 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
4339
4340         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
4341
4342 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
4343
4344         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
4345
4346 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
4347
4348         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
4349         able to start inferiors using a shell.
4350         (New remote packets): Announce new packet "QStartupWithShell".
4351         * remote.c: Add PACKET_QStartupWithShell.
4352         (extended_remote_create_inferior): Handle new
4353         PACKET_QStartupWithShell.
4354         (remote_protocol_features) <QStartupWithShell>: New entry for
4355         PACKET_QStartupWithShell.
4356         (_initialize_remote): Call "add_packet_config_cmd" for
4357         QStartupShell.
4358
4359 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
4360             Pedro Alves  <palves@redhat.com>
4361
4362         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
4363         and "nat/fork-inferior.h".
4364         * common/common-inferior.h: New file, with contents from
4365         "gdb/inferior.h".
4366         * commom/common-utils.c: Include "common-utils.h".
4367         (stringify_argv): New function.
4368         * common/common-utils.h (stringify_argv): New prototype.
4369         * configure.nat: Add "fork-inferior.o" as a dependency for
4370         "*linux*", "fbsd*" and "nbsd*" hosts.
4371         * corefile.c (get_exec_file): Update comment.
4372         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
4373         instead of "startup_inferior".
4374         (darwin_create_inferior): Call "add_thread_silent" after
4375         "fork_inferior".
4376         * fork-child.c: Cleanup unnecessary includes.
4377         (SHELL_FILE): Move to "common/common-fork-child.c".
4378         (environ): Likewise.
4379         (exec_wrapper): Initialize.
4380         (get_exec_wrapper): New function.
4381         (breakup_args): Move to "common/common-fork-child.c"; rename to
4382         "breakup_args_for_exec".
4383         (escape_bang_in_quoted_argument): Move to
4384         "common/common-fork-child.c".
4385         (saved_ui): New variable.
4386         (prefork_hook): New function.
4387         (postfork_hook): Likewise.
4388         (postfork_child_hook): Likewise.
4389         (gdb_startup_inferior): Likewise.
4390         (fork_inferior): Move to "common/common-fork-child.c".  Update
4391         function to support gdbserver.
4392         (startup_inferior): Likewise.
4393         * gdbcore.h (get_exec_file): Remove declaration.
4394         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
4395         instead of "startup_inferior".  Call "add_thread_silent" after
4396         "fork_inferior".
4397         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
4398         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
4399         instead of "startup_inferior".  Call "add_thread_silent" after
4400         "fork_inferior".
4401         * inferior.h: Include "common-inferior.h".
4402         (trace_start_error): Move to "common/common-utils.h".
4403         (trace_start_error_with_name): Likewise.
4404         (fork_inferior): Move prototype to "nat/fork-inferior.h".
4405         (startup_inferior): Likewise.
4406         (gdb_startup_inferior): New prototype.
4407         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
4408         * nat/fork-inferior.h: New file.
4409         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
4410         instead of "startup_inferior".  Call "add_thread_silent" after
4411         "fork_inferior".
4412         * target.h (target_terminal_init): Move prototype to
4413         "target/target.h".
4414         (target_terminal_inferior): Likewise.
4415         (target_terminal_ours): Likewise.
4416         * target/target.h (target_terminal_init): New prototype, moved
4417         from "target.h".
4418         (target_terminal_inferior): Likewise.
4419         (target_terminal_ours): Likewise.
4420         * utils.c (gdb_flush_out_err): New function.
4421
4422 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
4423
4424         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
4425         * common/common-gdbthread.h: New file, with parts from
4426         "gdb/gdbthread.h".
4427         * gdbthread.h: Include "common-gdbthread.h".
4428         (switch_to_thread): Moved to "common/common-gdbthread.h".
4429
4430 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
4431
4432         * Makefile.in (SFILES): Add "common/job-control.c".
4433         (HFILES_NO_SRCDIR): Add "common/job-control.h".
4434         (COMMON_OBS): Add "job-control.o".
4435         * common/job-control.c: New file, with contents from
4436         "gdb/inflow.c".
4437         * common/job-control.h: New file, with contents from "terminal.h".
4438         * fork-child.c: Include "job-control.h".
4439         * inflow.c: Include "job-control.h".
4440         (gdb_setpgid): Move to "common/common-inflow.c".
4441         (_initialize_inflow): Move setting of "job_control" to
4442         "handle_job_control".
4443         * terminal.h (job_control): Moved to "common/common-terminal.h".
4444         (gdb_setpgid): Likewise.
4445         * top.c: Include "job_control.h".
4446         * utils.c: Likewise.
4447         (job_control): Moved to "job-control.c".
4448
4449 2017-06-07  Pedro Alves  <palves@redhat.com>
4450
4451         * Makefile.in (SFILES): Add gdb_regex.c.
4452         (COMMON_OBS): Add gdb_regex.o.
4453         * ada-lang.c (ada_add_standard_exceptions)
4454         (ada_add_exceptions_from_frame, name_matches_regex)
4455         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
4456         parameter type to compiled_regex.  Adjust.
4457         (ada_exceptions_list): Use compiled_regex.
4458         * break-catch-throw.c (exception_catchpoint::pattern): Now a
4459         std::unique_ptr<compiled_regex>.
4460         (exception_catchpoint::~exception_catchpoint): Remove regfree
4461         call.
4462         (check_status_exception_catchpoint): Adjust to use compiled_regex.
4463         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
4464         * breakpoint.c (solib_catchpoint::compiled): Now a
4465         std::unique_ptr<compiled_regex>.
4466         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
4467         (check_status_catch_solib): Adjust to use compiled_regex.
4468         (add_solib_catchpoint): Adjust to use compiled_regex.
4469         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
4470         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
4471         compiled_regex reference.  Adjust to use it.
4472         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
4473         declaration.  Include "gdb_regex.h".
4474         (apropos_cmd): Change regex parameter to compiled_regex reference.
4475         * gdb_regex.c: New file.
4476         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
4477         declarations.
4478         (class compiled_regex): New.
4479         * linux-tdep.c: Include "common/gdb_optional.h".
4480         (struct mapping_regexes): New, factored out from
4481         mapping_is_anonymous_p, and adjusted to use compiled_regex.
4482         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
4483         gdb::optional and remove cleanups.  Adjust to compiled_regex.
4484         * probe.c: Include "common/gdb_optional.h".
4485         (collect_probes): Use compiled_regex and gdb::optional and remove
4486         cleanups.
4487         * skip.c: Include "common/gdb_optional.h".
4488         (skiplist_entry::compiled_function_regexp): Now a
4489         gdb::optional<compiled_regex>.
4490         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
4491         (free_skiplist_entry): Remove regfree call.
4492         (compile_skip_regexp, skip_rfunction_p): Adjust to use
4493         compiled_regex and gdb::optional.
4494         * symtab.c: Include "common/gdb_optional.h".
4495         (search_symbols): Use compiled_regex and gdb::optional.
4496         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
4497         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
4498         to gdb_regex.c.
4499
4500 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
4501
4502         * regcache.c (regcache::save): Avoid buffer use.
4503         (regcache::dump): Likewise.
4504
4505 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
4506
4507         * sh-tdep.c (sh_pseudo_register_read): Remove
4508         MAX_REGISTER_SIZE.
4509         (sh_pseudo_register_write): Likewise.
4510         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
4511         (sh64_pseudo_register_write): Likewise
4512
4513 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
4514
4515         * aarch64-tdep.c (aarch64_store_return_value): Use
4516         V_REGISTER_SIZE.
4517         (aarch64_pseudo_read_value): Likewise.
4518         (aarch64_pseudo_write): Likewise.
4519
4520 2017-06-06  Yao Qi  <yao.qi@linaro.org>
4521
4522         * regformats/regdef.h (set_register_cache): Remove the
4523         declaration.
4524
4525 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
4526
4527         * frame.c (frame_unwind_register_signed): Use
4528         frame_unwind_register_value.
4529
4530 2017-06-06  Pedro Alves  <palves@redhat.com>
4531
4532         PR breakpoints/21553
4533         * breakpoint.c (create_breakpoints_sal_default)
4534         (init_breakpoint_sal, create_breakpoint_sal): Use
4535         gdb::unique_xmalloc_ptr for string parameters.
4536         (create_breakpoint): Constify 'extra_string' and 'cond_string'
4537         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
4538         (base_breakpoint_create_breakpoints_sal)
4539         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
4540         (strace_marker_create_breakpoints_sal)
4541         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
4542         string parameters.
4543         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
4544         gdb::unique_xmalloc_ptr for string parameters.
4545         (create_breakpoint): Constify 'extra_string' and 'cond_string'
4546         parameters.
4547
4548 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
4549
4550         * alpha-tdep.c (alpha_register_to_value): Use
4551         get_frame_register_value.
4552         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
4553
4554 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
4555
4556         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
4557         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
4558         (ia64_value_to_register): Likewise.
4559         (ia64_extract_return_value): Likewise.
4560         (ia64_store_return_value): Likewise.
4561         (ia64_push_dummy_call): Likewise.
4562
4563 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
4564
4565         GDB 8.0 released.
4566
4567 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
4568
4569         * x86-linux-nat.c (struct arch_lwp_info): Remove.
4570
4571 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
4572
4573         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
4574         parameter.
4575         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
4576
4577 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
4578
4579         * event-loop.c (poll_timers): Unallocate timer using delete
4580         instead of xfree.
4581
4582 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
4583
4584         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
4585         (struct breakpoint) <~breakpoint>: New.
4586         (struct watchpoint): Inherit from breakpoint.
4587         <~watchpoint>: New.
4588         <base>: Remove.
4589         (struct tracepoint): Inherit from breakpoint.
4590         <base>: Remove.
4591         * breakpoint.c (longjmp_breakpoint_ops): Remove.
4592         (struct longjmp_breakpoint): Inherit from breakpoint.
4593         <~longjmp_breakpoint>: New.
4594         <base>: Remove.
4595         (new_breakpoint_from_type): Remove casts.
4596         (watchpoint_in_thread_scope): Remove reference to base field.
4597         (watchpoint_del_at_next_stop): Likewise.
4598         (update_watchpoint): Likewise.
4599         (watchpoint_check): Likewise.
4600         (bpstat_check_watchpoint): Likewise.
4601         (set_longjmp_breakpoint): Likewise.
4602         (struct fork_catchpoint): Inherit from breakpoint.
4603         <base>: Remove.
4604         (struct solib_catchpoint): Inherit from breakpoint.
4605         <~solib_catchpoint>: New.
4606         <base>: Remove.
4607         (dtor_catch_solib): Change to ...
4608         (solib_catchpoint::~solib_catchpoint): ... this.
4609         (breakpoint_hit_catch_solib): Remove reference to base field.
4610         (add_solib_catchpoint): Likewise.
4611         (create_fork_vfork_event_catchpoint): Likewise.
4612         (struct exec_catchpoint): Inherit from breakpoint.
4613         <~exec_catchpoint>: New.
4614         <base>: Remove.
4615         (dtor_catch_exec): Change to ...
4616         (exec_catchpoint::~exec_catchpoint): ... this.
4617         (dtor_watchpoint): Change to ...
4618         (watchpoint::~watchpoint): ... this.
4619         (watch_command_1): Remove reference to base field.
4620         (catch_exec_command_1): Likewise.
4621         (base_breakpoint_dtor): Change to ...
4622         (breakpoint::~breakpoint): ... this.
4623         (base_breakpoint_ops): Remove dtor field value.
4624         (longjmp_bkpt_dtor): Change to ...
4625         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
4626         (strace_marker_create_breakpoints_sal): Remove reference to base
4627         field.
4628         (delete_breakpoint): Don't manually call breakpoint destructor.
4629         (create_tracepoint_from_upload): Remove reference to base field.
4630         (trace_pass_set_count): Likewise.
4631         (initialize_breakpoint_ops): Don't initialize
4632         momentary_breakpoint_ops, don't set dtors.
4633         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
4634         <~ada_catchpoint>: New.
4635         <base>: Remove.
4636         (create_excep_cond_exprs): Remove reference to base field.
4637         (dtor_exception): Change to ...
4638         (ada_catchpoint::~ada_catchpoint): ... this.
4639         (dtor_catch_exception): Remove.
4640         (dtor_catch_exception_unhandled): Remove.
4641         (dtor_catch_assert): Remove.
4642         (create_ada_exception_catchpoint): Remove reference to base
4643         field.
4644         (initialize_ada_catchpoint_ops): Don't set dtors.
4645         * break-catch-sig.c (struct signal_catchpoint): Inherit from
4646         breakpoint.
4647         <~signal_catchpoint>: New.
4648         <base>: Remove.
4649         (signal_catchpoint_dtor): Change to ...
4650         (signal_catchpoint::~signal_catchpoint): ... this.
4651         (create_signal_catchpoint): Remove reference to base field.
4652         (initialize_signal_catchpoint_ops): Don't set dtor.
4653         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
4654         from breakpoint.
4655         <~syscall_catchpoint>: New.
4656         <base>: Remove.
4657         (dtor_catch_syscall): Change to ...
4658         (syscall_catchpoint::~syscall_catchpoint): ... this.
4659         (create_syscall_event_catchpoint): Remove reference to base
4660         field.
4661         (initialize_syscall_catchpoint_ops): Don't set dtor.
4662         * break-catch-throw.c (struct exception_catchpoint): Inherit
4663         from breakpoint.
4664         <~exception_catchpoint>: New.
4665         <base>: Remove.
4666         (dtor_exception_catchpoint): Change to ...
4667         (exception_catchpoint::~exception_catchpoint): ... this.
4668         (handle_gnu_v3_exceptions): Remove reference to base field.
4669         (initialize_throw_catchpoint_ops): Don't set dtor.
4670         * ctf.c (ctf_get_traceframe_address): Remove reference to base
4671         field.
4672         * remote.c (remote_get_tracepoint_status): Likewise.
4673         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
4674         * tracefile.c (tracefile_fetch_registers): Likewise.
4675         * tracepoint.c (actions_command): Likewise.
4676         (validate_actionline): Likewise.
4677         (tfind_1): Likewise.
4678         (get_traceframe_location): Likewise.
4679         (find_matching_tracepoint_location): Likewise.
4680         (parse_tracepoint_status): Likewise.
4681         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
4682
4683 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
4684
4685         * breakpoint.c (struct longjmp_breakpoint): New struct.
4686         (is_tracepoint_type): Change return type to bool.
4687         (is_longjmp_type): New function.
4688         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
4689         (set_raw_breakpoint_without_location): Use
4690         new_breakpoint_from_type.
4691         (set_raw_breakpoint): Likewise.
4692
4693 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
4694
4695         * breakpoint.c (new_breakpoint_from_type): New function.
4696         (create_breakpoint_sal): Use new_breakpoint_from_type and
4697         unique_ptr.
4698         (create_breakpoint): Likewise.
4699
4700 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
4701
4702         * memattr.c (mem_info_command): Rename to ...
4703         (info_mem_command): ... this.
4704         (mem_enable_command): Rename to ...
4705         (enable_mem_command): ... this.
4706         (mem_disable_command): Rename to ...
4707         (disable_mem_command): ... this.
4708         (mem_delete_command): Rename to ...
4709         (delete_mem_command): ... this.
4710         (_initialize_mem): Adjust function names.
4711
4712 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
4713
4714         * btrace.c (handle_pt_insn_events): New.
4715         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
4716         STATUS.  Split into this and ...
4717         (handle_pt_insn_event_flags): ... this.
4718
4719 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
4720
4721         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
4722         and struct pt_insn.resynced.
4723         * configure: Regenerated.
4724         * config.in: Regenerated.
4725
4726 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4727
4728         * btrace.c (ftrace_find_call_by_number): New function.
4729         (ftrace_new_function): Store objects, not pointers.
4730         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
4731         ftrace_new_gap, ftrace_update_function,
4732         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
4733         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
4734         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
4735         btrace_ends_with_single_insn, btrace_call_get): Account for
4736         btrace_thread_info::functions now storing objects.
4737         * btrace.h (struct btrace_thread_info): Add constructor.
4738         (struct btrace_thread_info) <functions>: Make std::vector.
4739         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
4740         Initialize with default values.
4741         * record-btrace.c (record_btrace_frame_sniffer): Account for
4742         btrace_thread_info::functions now storing objects.
4743
4744 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4745
4746         * btrace.c: Remove typedef bfun_s.
4747         (ftrace_new_gap): Directly add gaps to the list of gaps.
4748         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
4749         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
4750         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
4751         instead of gdb VEC.
4752
4753 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4754
4755         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
4756         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
4757         with btrace_thread_info::next_segment and
4758         btrace_thread_info::prev_segment.
4759         * btrace.h: Remove struct btrace_func_link.
4760         (struct btrace_function): Replace pair of function segment pointers
4761         with pair of indices.
4762         * python/py-record-btrace.c (btpy_call_prev_sibling,
4763         btpy_call_next_sibling): Replace references to
4764         btrace_thread_info::segment with btrace_thread_info::next_segment and
4765         btrace_thread_info::prev_segment.
4766         * record-btrace.c (record_btrace_frame_this_id): Use
4767         btrace_find_call_by_number.
4768
4769 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4770
4771         * btrace.c (ftrace_new_function, ftrace_fixup_level,
4772         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
4773         btrace_insn_next, btrace_insn_prev): Remove references to
4774         btrace_thread_info::flow.
4775         * btrace.h (struct btrace_function): Remove FLOW.
4776
4777 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4778
4779         * btrace.c (ftrace_find_call_by_number): New function.
4780         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
4781         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
4782         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
4783         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
4784         index.
4785         * btrace.h (struct btrace_function): Turn UP into an index.
4786         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
4787         as an index.
4788         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
4789         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
4790         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
4791
4792 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4793
4794         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
4795         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
4796         ftrace_update_function, ftrace_compute_global_level_offset,
4797         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
4798         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
4799         btrace_insn_end, btrace_is_empty): Remove references to
4800         btrace_thread_info::begin and btrace_thread_info::end.
4801         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
4802         (struct btrace_thread_info) <functions>: Adjust comment.
4803         * record-btrace.c (record_btrace_start_replaying): Remove reference to
4804         btrace_thread_info::begin.
4805
4806 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4807
4808         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
4809         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
4810         ftrace_update_function): Remove arguments that implicitly were always
4811         BTINFO->END.
4812         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
4813         Don't pass BTINFO->END.
4814
4815 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4816
4817         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
4818         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
4819         btrace_find_insn_by_number): Replace function segment pointer with
4820         index.
4821         (btrace_insn_cmp): Simplify.
4822         * btrace.h: (struct btrace_insn_iterator) Rename index to
4823         insn_index.  Replace function segment pointer with index into function
4824         segment vector.
4825         * record-btrace.c (record_btrace_call_history): Replace function
4826         segment pointer use with index.
4827         (record_btrace_frame_sniffer): Retrieve function call segment through
4828         vector.
4829         (record_btrace_set_replay): Remove defunc't safety check.
4830
4831 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4832
4833         * btrace.c (btrace_ends_with_single_insn): New function.
4834         (btrace_call_get, btrace_call_number, btrace_call_begin,
4835         btrace_call_end, btrace_call_next, btrace_call_prev,
4836         btrace_find_call_by_number): Use index into call segment vector
4837         instead of pointer.
4838         (btrace_call_cmp): Simplify.
4839         * btrace.h (struct btrace_call_iterator): Replace function call segment
4840         pointer with index into vector.
4841         * record-btrace.c (record_btrace_call_history): Use index instead of
4842         pointer.
4843
4844 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4845
4846         * btrace.c (btrace_insn_begin, btrace_insn_end,
4847         btrace_find_insn_by_number): Add btinfo to iterator.
4848         * btrace.h (struct btrace_insn_iterator): Add btinfo.
4849
4850 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4851
4852         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
4853         and save pointers directly.
4854         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
4855         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
4856         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
4857         changed signature of functions.
4858         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
4859         (btrace_fetch): Remove code that adds btrace_function pointers to
4860         vector of btrace_functions.
4861         (btrace_clear): Simplify freeing vector of btrace_functions.
4862
4863 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4864
4865         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
4866         Replace VEC_* with std::vector functions.
4867         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
4868         (struct btrace_thread_info)<functions>: Change type to std::vector.
4869
4870 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4871
4872         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
4873         "Removed targets and native configurations" up.  Merge duplicate
4874         "New commands" sub-sections.  Add "New options" sub-sections.
4875
4876 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
4877
4878         * defs.h (copy_integer_to_size): New declaration.
4879         * findvar.c (copy_integer_to_size): New function.
4880         (do_cint_test): New selftest function.
4881         (copy_integer_to_size_test): Likewise.
4882         (_initialize_findvar): Likewise.
4883         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
4884         (mips_fbsd_collect_reg): Use raw_collect_integer.
4885         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
4886         (mips64_fill_gregset): Use raw_collect_integer
4887         (mips64_fill_fpregset): Use raw_supply_integer.
4888         * regcache.c (regcache::raw_supply_integer): New function.
4889         (regcache::raw_collect_integer): Likewise.
4890         * regcache.h: (regcache::raw_supply_integer): New declaration.
4891         (regcache::raw_collect_integer): Likewise.
4892
4893 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4894
4895         * Makefile.in (SFILES): Add gdbarch-selftests.c.
4896         (COMMON_OBS): Add gdbarch-selftests.o.
4897         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
4898         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
4899         * gdbarch-selftests.c: New file.
4900         * regcache.h (regcache) <~regcache>: Mark it virtual if
4901         GDB_SELF_TEST.
4902         <raw_write>: Likewise.
4903
4904 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4905
4906         * regcache.c (current_regcache): Change it to
4907         regcache::current_regcache.
4908         (regcache_observer_target_changed): Update.
4909         (regcache_thread_ptid_changed): Make it a regcache static
4910         method.
4911         (regcache_thread_ptid_changed): Update.
4912         (class regcache_access): New.
4913         (current_regcache_test): Update.
4914         (_initialize_regcache): Update.
4915         * regcache.h: Include forward_list.
4916         (regcache): Declare regcache_thread_ptid_changed and declare
4917         registers_changed_ptid as friend.
4918
4919 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4920
4921         * i387-tdep.c (i387_register_to_value): Use register_size
4922         instead of TYPE_LENGTH.
4923         * m68k-tdep.c (m68k_register_to_value): Likewise.
4924
4925 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4926
4927         * i387-tdep.c (i387_convert_register_p): Return false if type
4928         code isn't TYPE_CODE_FLT.
4929
4930 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4931
4932         * alpha-tdep.c (alpha_convert_register_p): Return true if type
4933         length is 4.
4934         (alpha_register_to_value): Remove type length check.
4935         (alpha_value_to_register): Likewise.
4936
4937 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4938
4939         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
4940         TYPE_CODE_FLT.
4941
4942 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4943
4944         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
4945         TYPE_CODE_FLT or not.
4946
4947 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4948
4949         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
4950         * avr-tdep.c (avr_gdbarch_init): Likewise.
4951         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
4952         * cris-tdep.c (cris_gdbarch_init): Likewise.
4953         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4954         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
4955         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
4956         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
4957         * mep-tdep.c (mep_gdbarch_init): Likewise.
4958         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
4959         * mips-tdep.c (mips_gdbarch_init): Likewise.
4960         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
4961         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
4962         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
4963         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
4964         * v850-tdep.c (v850_gdbarch_init): Likewise.
4965
4966 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4967
4968         * selftest-arch.c (tests_with_arch): Call registers_changed
4969         and reinit_frame_cache.
4970         * selftest.c (run_self_tests): Likewise.
4971
4972 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4973
4974         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
4975         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
4976
4977 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4978
4979         * rl78-tdep.c (rl78_gdbarch_init): Don't call
4980         set_gdbarch_print_insn.
4981
4982 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4983
4984         * h8300-tdep.c (h8300_gdbarch_init): Don't call
4985         set_gdbarch_print_insn.
4986
4987 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4988
4989         * alpha-tdep.c (alpha_gdbarch_init): Don't call
4990         set_gdbarch_print_insn.
4991         * arc-tdep.c (arc_gdbarch_init): Likewise.
4992         * arch-utils.c: include dis-asm.h.
4993         (default_print_insn): New function.
4994         * arch-utils.h (default_print_insn): Declare.
4995         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
4996         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
4997         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
4998         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
4999         * frv-tdep.c (frv_gdbarch_init): Likewise.
5000         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5001         * gdbarch.sh (print_insn): Use default_print_insn.
5002         * gdbarch.c: Regenerated.
5003         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
5004         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
5005         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5006         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
5007         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5008         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
5009         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
5010         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
5011         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
5012         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5013         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5014         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5015         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5016         * mt-tdep.c (mt_gdbarch_init): Likewise.
5017         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5018         * nios2-tdep.c (nios2_print_insn): Remove.
5019         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
5020         * rx-tdep.c (rx_gdbarch_init): Likewise.
5021         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5022         * score-tdep.c (score_print_insn): Remove.
5023         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
5024         * sh-tdep.c (sh_gdbarch_init): Likewise.
5025         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5026         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5027         * tic6x-tdep.c (tic6x_print_insn): Remove.
5028         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
5029         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
5030         * v850-tdep.c (v850_gdbarch_init): Likewise.
5031         * vax-tdep.c (vax_gdbarch_init): Likewise.
5032         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
5033         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
5034
5035 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
5036
5037         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
5038         (MIPS_FP0_REGNUM): Remove.
5039         (MIPS_FSR_REGNUM): Remove.
5040         (mips_fbsd_supply_fpregs): Use mips_regnum.
5041         (mips_fbsd_supply_gregs): Likewise.
5042         (mips_fbsd_collect_fpregs): Likewise.
5043         (mips_fbsd_collect_gregs): Likewise.
5044
5045 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
5046
5047         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
5048         (getpfpregs_supplies): New function.
5049         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
5050         getfpregs_supplies.
5051         (mips_fbsd_store_inferior_registers): Likewise.
5052
5053 2017-05-22  Pedro Alves <palves@redhat.com>
5054
5055         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
5056         maintainer.
5057
5058 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
5059
5060         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
5061         (store_register): Likewise.
5062         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
5063         (get_decimal_float_return_value): Likewise.
5064         (do_ppc_sysv_return_value): Likewise.
5065         (ppc64_sysv_abi_push_integer): Likewise.
5066         (ppc64_sysv_abi_push_freg): Likewise.
5067         (ppc64_sysv_abi_return_value_base): Likewise.
5068         (ppc64_sysv_abi_return_value): Likewise.
5069         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
5070         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
5071         * rs6000-nat.c: Likewise.
5072         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
5073         (rs6000_value_to_register): Likewise.
5074         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
5075
5076 2017-05-21  Tom Tromey  <tom@tromey.com>
5077
5078         PR rust/21466:
5079         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
5080         arrays as "[T]", not "[T; ]".
5081
5082 2017-05-19  Tom Tromey  <tom@tromey.com>
5083
5084         PR rust/21484:
5085         * rust-lang.c (exp_descriptor_rust): New function.
5086         (rust_language_defn): Use it.
5087         * p-lang.c (pascal_language_defn): Update.
5088         * opencl-lang.c (opencl_language_defn): Update.
5089         * objc-lang.c (objc_language_defn): Update.
5090         * m2-lang.c (m2_language_defn): Update.
5091         * language.h (struct language_defn)
5092         <la_watch_location_expression>: New member.
5093         * language.c (unknown_language_defn, auto_language_defn)
5094         (local_language_defn): Update.
5095         * go-lang.c (go_language_defn): Update.
5096         * f-lang.c (f_language_defn): Update.
5097         * d-lang.c (d_language_defn): Update.
5098         * c-lang.h (c_watch_location_expression): Declare.
5099         * c-lang.c (c_watch_location_expression): New function.
5100         (c_language_defn, cplus_language_defn, asm_language_defn)
5101         (minimal_language_defn): Use it.
5102         * breakpoint.c (watch_command_1): Call
5103         la_watch_location_expression.
5104         * ada-lang.c (ada_language_defn): Update.
5105
5106 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5107
5108         PR tui/21482
5109         * gdb_curses.h (NOMACROS): Define.
5110         (NCURSES_NOMACROS): Define.
5111
5112 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5113
5114         PR tui/21482
5115         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
5116         arg to char *.
5117         * tui/tui-wingeneral.c (box_win): Likewise.
5118         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
5119         (tui_show_source_line): Likewise.
5120         (tui_show_exec_info_content): Likewise.
5121
5122 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
5123
5124         * sparc-tdep.c (sparc_structure_return_p)
5125         (sparc_arg_on_registers_p): New functions.
5126         (sparc32_store_arguments): Use them.
5127         * sparc64-tdep.c (sparc64_16_byte_align_p)
5128         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
5129         Handle TYPE_CODE_ARRAY.
5130
5131 2017-05-17  Yao Qi  <yao.qi@linaro.org>
5132
5133         * cli/cli-decode.c (add_alias_cmd): New function.
5134         * command.h (add_alias_cmd): Declare.
5135         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
5136         instead call add_alias_cmd.
5137
5138 2017-05-17  Pedro Alves  <palves@redhat.com>
5139
5140         * Makefile.in (nat_extra_makefile_frag): Rename to ...
5141         (nat_makefile_frag): ... this.  All references updated.
5142         * configure.ac: Likewise.
5143         * configure.nat: Likewise.  Enhance comments.
5144         * configure: Regenerate.
5145
5146 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5147
5148         * procfs.c (procfs_create_inferior): Change prototype to match
5149         definition.
5150
5151 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
5152
5153         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
5154         C++ compiler warning.
5155
5156 2017-05-12  Tom Tromey  <tom@tromey.com>
5157
5158         PR rust/21483:
5159         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
5160         recurse, just call value_struct_elt directly.
5161
5162 2017-05-12  Tom Tromey  <tom@tromey.com>
5163
5164         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
5165         OP_RUST_ARRAY>: Fix.
5166
5167 2017-05-12  Tom Tromey  <tom@tromey.com>
5168
5169         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
5170
5171 2017-05-09  Yao Qi  <yao.qi@linaro.org>
5172
5173         * regcache.c: Include <forward_list>.
5174         (struct regcache_list): Remove.
5175         (current_regcache): Update.
5176         (get_thread_arch_aspace_regcache): Update for std::forward_list.
5177         (regcache_thread_ptid_changed): Likewise.
5178         (registers_changed_ptid): Likewise.
5179         (current_regcache_size): Likewise.
5180
5181 2017-05-09  Yao Qi  <yao.qi@linaro.org>
5182
5183         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
5184         (current_regcache_size): New function.
5185         (current_regcache_test): New function.
5186         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
5187
5188 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
5189
5190         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
5191         (print_gp_register_row): Use get_frame_register_value.
5192
5193 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
5194
5195         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
5196         (mips_supply_fpregset): Likewise.
5197         (mips64_supply_gregset): Likewise.
5198
5199 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
5200
5201         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
5202         regcache->raw_supply_zeroed.
5203
5204 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
5205
5206         * configure.nat: Rearrange 'case' statements to match
5207         host before cpu.
5208
5209 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
5210
5211         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
5212         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
5213         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
5214         "@nat_extra_makefile_frag@".
5215         (Makefile): Remove dependency on "@frags@".
5216         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
5217         (data-directory/Makefile): Likewise.
5218         * config/aarch64/linux.mh: Deleted; moved contents to
5219         "gdb/configure.nat".
5220         * config/alpha/alpha-linux.mh: Likewise.
5221         * config/alpha/nbsd.mh: Likewise.
5222         * config/arm/linux.mh: Likewise.
5223         * config/arm/nbsdelf.mh: Likewise.
5224         * config/i386/cygwin.mh: Likewise.
5225         * config/i386/cygwin64.mh: Likewise.
5226         * config/i386/darwin.mh: Likewise.
5227         * config/i386/fbsd.mh: Likewise.
5228         * config/i386/fbsd64.mh: Likewise.
5229         * config/i386/go32.mh: Likewise.
5230         * config/i386/i386gnu.mh: Likewise.
5231         * config/i386/i386sol2.mh: Likewise.
5232         * config/i386/linux.mh: Likewise.
5233         * config/i386/linux64.mh: Likewise.
5234         * config/i386/mingw.mh: Likewise.
5235         * config/i386/mingw64.mh: Likewise.
5236         * config/i386/nbsd64.mh: Likewise.
5237         * config/i386/nbsdelf.mh: Likewise.
5238         * config/i386/nto.mh: Likewise.
5239         * config/i386/obsd.mh: Likewise.
5240         * config/i386/obsd64.mh: Likewise.
5241         * config/i386/sol2-64.mh: Likewise.
5242         * config/ia64/linux.mh: Likewise.
5243         * config/m32r/linux.mh: Likewise.
5244         * config/m68k/linux.mh: Likewise.
5245         * config/m68k/nbsdelf.mh: Likewise.
5246         * config/m68k/obsd.mh: Likewise.
5247         * config/m88k/obsd.mh: Likewise.
5248         * config/mips/fbsd.mh: Likewise.
5249         * config/mips/linux.mh: Likewise.
5250         * config/mips/nbsd.mh: Likewise.
5251         * config/mips/obsd64.mh: Likewise.
5252         * config/pa/linux.mh: Likewise.
5253         * config/pa/nbsd.mh: Likewise.
5254         * config/pa/obsd.mh: Likewise.
5255         * config/powerpc/aix.mh: Likewise.
5256         * config/powerpc/fbsd.mh: Likewise.
5257         * config/powerpc/linux.mh: Likewise.
5258         * config/powerpc/nbsd.mh: Likewise.
5259         * config/powerpc/obsd.mh: Likewise.
5260         * config/powerpc/ppc64-linux.mh: Likewise.
5261         * config/powerpc/spu-linux.mh: Likewise.
5262         * config/s390/linux.mh: Likewise.
5263         * config/sh/nbsd.mh: Likewise.
5264         * config/sparc/fbsd.mh: Likewise.
5265         * config/sparc/linux.mh: Likewise.
5266         * config/sparc/linux64.mh: Likewise.
5267         * config/sparc/nbsd64.mh: Likewise.
5268         * config/sparc/nbsdelf.mh: Likewise.
5269         * config/sparc/obsd64.mh: Likewise.
5270         * config/sparc/sol2.mh: Likewise.
5271         * config/tilegx/linux.mh: Likewise.
5272         * config/vax/nbsdelf.mh: Likewise.
5273         * config/vax/obsd.mh: Likewise.
5274         * config/xtensa/linux.mh: Likewise.
5275         * config/i386/i386gnu.mn: New file, with excerpts from
5276         "config/i386/i386gnu.mh".
5277         * configure: Regenerate.
5278         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
5279         *.mh files under "gdb/config".
5280         * configure.nat: New file, with contents from the
5281         "gdb/config/*/*.mh" files.
5282
5283 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
5284
5285         * btrace.c (btrace_clear): Free insn vector.
5286
5287 2017-05-05  Pedro Alves  <palves@redhat.com>
5288
5289         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
5290         * configure: Regenerate.
5291
5292 2017-05-04  Pedro Alves  <palves@redhat.com>
5293
5294         * Makefile.in (SFILES): Add progspace-and-thread.c.
5295         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
5296         (COMMON_OBS): Add progspace-and-thread.o.
5297         * breakpoint.c: Include "progspace-and-thread.h".
5298         (update_inserted_breakpoint_locations)
5299         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
5300         Use scoped_restore_current_pspace_and_thread.
5301         (create_std_terminate_master_breakpoint): Use
5302         scoped_restore_current_program_space.
5303         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
5304         (print_breakpoint_location): Use
5305         scoped_restore_current_program_space.
5306         (bp_loc_is_permanent): Use
5307         scoped_restore_current_pspace_and_thread.
5308         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
5309         (download_tracepoint_locations): Use
5310         scoped_restore_current_pspace_and_thread.
5311         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
5312         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
5313         (enum step_over_calls_kind): Moved from inferior.h.
5314         (class scoped_restore_current_thread): New class.
5315         * gdbthread.h (make_cleanup_restore_current_thread): Delete
5316         declaration.
5317         (scoped_restore_current_thread): New class.
5318         * infcmd.c: Include "common/gdb_optional.h".
5319         (continue_1, proceed_after_attach): Use
5320         scoped_restore_current_thread.
5321         (notice_new_inferior): Use scoped_restore_current_thread.
5322         * inferior.c: Include "progspace-and-thread.h".
5323         (restore_inferior, save_current_inferior): Delete.
5324         (add_inferior_command, clone_inferior_command): Use
5325         scoped_restore_current_pspace_and_thread.
5326         * inferior.h (scoped_restore_current_inferior): New class.
5327         * infrun.c: Include "progspace-and-thread.h" and
5328         "common/gdb_optional.h".
5329         (follow_fork_inferior): Use
5330         scoped_restore_current_pspace_and_thread.
5331         (scoped_restore_exited_inferior): New class.
5332         (handle_vfork_child_exec_or_exit): Use
5333         scoped_restore_exited_inferior,
5334         scoped_restore_current_pspace_and_thread,
5335         scoped_restore_current_thread and scoped_restore.
5336         (fetch_inferior_event): Use scoped_restore_current_thread.
5337         * linespec.c (decode_line_full, decode_line_1): Use
5338         scoped_restore_current_program_space.
5339         * mi/mi-main.c: Include "progspace-and-thread.h".
5340         (exec_continue): Use scoped_restore_current_thread.
5341         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
5342         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
5343         * proc-service.c (ps_pglobal_lookup): Use
5344         scoped_restore_current_program_space.
5345         * progspace-and-thread.c: New file.
5346         * progspace-and-thread.h: New file.
5347         * progspace.c (release_program_space, clone_program_space): Use
5348         scoped_restore_current_program_space.
5349         (restore_program_space, save_current_program_space)
5350         (save_current_space_and_thread): Delete.
5351         (switch_to_program_space_and_thread): Moved to
5352         progspace-and-thread.c.
5353         * progspace.h (save_current_program_space)
5354         (save_current_space_and_thread): Delete declarations.
5355         (scoped_restore_current_program_space): New class.
5356         * remote.c (remote_btrace_maybe_reopen): Use
5357         scoped_restore_current_thread.
5358         * symtab.c: Include "progspace-and-thread.h".
5359         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
5360         * thread.c (print_thread_info_1): Use
5361         scoped_restore_current_thread.
5362         (struct current_thread_cleanup): Delete.
5363         (do_restore_current_thread_cleanup)
5364         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
5365         (scoped_restore_current_thread::~scoped_restore_current_thread):
5366         ... this new dtor.
5367         (make_cleanup_restore_current_thread): Rename/convert to ...
5368         (scoped_restore_current_thread::scoped_restore_current_thread):
5369         ... this new ctor.
5370         (thread_apply_all_command): Use scoped_restore_current_thread.
5371         (thread_apply_command): Use scoped_restore_current_thread.
5372         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
5373         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
5374
5375 2017-05-04  Pedro Alves  <palves@redhat.com>
5376
5377         * thread.c (make_cleanup_restore_current_thread): Move
5378         find_thread_ptid call before the is_stopped call.  Assert that the
5379         thread is found.  Replace is_stopped call by checking the thread's
5380         state directly.  Remove unnecessary NULL-thread check.
5381
5382 2017-05-04  Pedro Alves  <palves@redhat.com>
5383
5384         * corelow.c (thread_section_name): New class.
5385         (get_core_register_section, get_core_siginfo): Use it.
5386
5387 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5388
5389         * corelow.c (sniff_core_bfd): Remove extra semicolon.
5390         (get_core_register_section): Remove xfree of NULL pointer.
5391
5392 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
5393
5394         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
5395         * regcache.c (regcache::raw_supply_zeroed): New function.
5396         * regcache.h (regcache::raw_supply_zeroed): New declaration.
5397
5398 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
5399
5400         * gdbarch.sh: Remove commented out definition of
5401         TARGET_CHAR_BIT.
5402         * gdbarch.h: Re-generate.
5403
5404 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
5405
5406         * configure: Regenerate.
5407
5408 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
5409
5410         * solib-target.c (solib_target_relocate_section_addresses):
5411         Remove num_section_bases, num_bases, segment_bases variables.
5412
5413 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
5414
5415         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
5416
5417 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
5418
5419         * solib-target.c: Include <vector>
5420         (struct lm_info_target) <~lm_info_target>: Remove.
5421         <segment_bases, section_bases>: Change type to
5422         std::vector<CORE_ADDR>.
5423         (library_list_start_segment, library_list_start_section,
5424         library_list_end_library,
5425         solib_target_relocate_section_addresses): Adjust.
5426
5427 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
5428
5429         * gdbarch.sh (software_single_step): Change return type to
5430         std::vector<CORE_ADDR>.
5431         * gdbarch.c, gdbarch.h: Re-generate.
5432         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
5433         Adjust.
5434         (arm_deal_with_atomic_sequence_raw): Adjust.
5435         (thumb_get_next_pcs_raw): Adjust.
5436         (arm_get_next_pcs_raw): Adjust.
5437         (arm_get_next_pcs): Adjust.
5438         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
5439         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
5440         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
5441         (alpha_software_single_step): Adjust.
5442         * alpha-tdep.h (alpha_software_single_step): Adjust.
5443         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
5444         * arm-tdep.c (arm_software_single_step): Adjust.
5445         (arm_breakpoint_kind_from_current_state): Adjust.
5446         * arm-tdep.h (arm_software_single_step): Adjust.
5447         * breakpoint.c (insert_single_step_breakpoint): Adjust.
5448         * cris-tdep.c (cris_software_single_step): Adjust.
5449         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
5450         (micromips_deal_with_atomic_sequence): Adjust.
5451         (deal_with_atomic_sequence): Adjust.
5452         (mips_software_single_step): Adjust.
5453         * mips-tdep.h (mips_software_single_step): Adjust.
5454         * moxie-tdep.c (moxie_software_single_step): Adjust.
5455         * nios2-tdep.c (nios2_software_single_step): Adjust.
5456         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
5457         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
5458         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
5459         * s390-linux-tdep.c (s390_software_single_step): Adjust.
5460         * sparc-tdep.c (sparc_software_single_step): Adjust.
5461         * spu-tdep.c (spu_software_single_step): Adjust.
5462         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
5463
5464 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
5465
5466         * gdbarch.sh: Use semi-colon as field separator instead of colon.
5467         * gdbarch.h: Re-generate.
5468
5469 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
5470
5471         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
5472         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
5473         * python/py-instruction.c, python/py-instruction.h: New file.
5474         * python/py-record.c: Add py-instruction.h include.
5475         (gdbpy_initialize_record): Make gdb.Instruction a super class of
5476         gdb.RecordInstruction.
5477         * python/python-internal.h: Add gdbpy_initialize_instruction
5478         declaration.
5479         * python/python.c (do_start_initialization): Add
5480         gdbpy_initialize_instruction.
5481
5482 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
5483
5484         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
5485         Remove.
5486         (btrace_func_from_recpy_func): New function.
5487         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
5488         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
5489         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
5490         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
5491         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
5492         Also, use new helper functions.
5493         (btpy_list_item): Use new helper functions.
5494         (recpy_bt_function_call_history): Use new type name.
5495         (btpy_call_getset): Remove.
5496         (gdbpy_initialize_btrace): Remove code to initialize
5497         gdb.BtraceFunctionCall.
5498         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
5499         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
5500         recpy_bt_func_prev, recpy_bt_func_next): New export.
5501         * python/py-record.c (recpy_func_type): New static object.
5502         (recpy_func_new, recpy_func_level, recpy_func_symbol,
5503         recpy_func_instructions, recpy_func_up, recpy_func_prev,
5504         recpy_func_next): New function.
5505         (recpy_element_hash, recpy_element_richcompare): Updated comment.
5506         (recpy_func_getset): New static object.
5507         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
5508         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
5509
5510 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
5511
5512         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
5513         (btpy_object, btpy_insn_type, btpy_new): Remove.
5514         (btpy_list_object): Use gdb.RecordInstruction type instead of
5515         gdb.BtraceInstruction type.
5516         (btrace_insn_from_recpy_insn): New function.
5517         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
5518         btpy_new.
5519         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
5520         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
5521         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
5522         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
5523         instead of btpy_object.
5524         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
5525         btpy_insn_data, btpy_insn_decode): Rename to ...
5526         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
5527         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
5528         recpy_bt_insn_decode): This.  Also, use new helper functions.
5529         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
5530         recpy_insn_type.
5531         (btpy_insn_getset): Remove.
5532         (gdbpy_initialize_btrace): Remove code to initialize
5533         gdb.BtraceInstruction.  Use recpy_element_object.
5534         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
5535         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
5536         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
5537         * python/py-record.c (recpy_insn_type): New static object.
5538         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
5539         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
5540         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
5541         New function.
5542         (recpy_insn_getset): New static object.
5543         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
5544         * python/py-record.h (recpy_element_object): New typedef.
5545         (recpy_insn_type, recpy_insn_new): New export.
5546
5547 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
5548
5549         * py-record-btrace.c (btpy_insn_new): Removed.
5550         (btpy_insn_or_gap_new): New function.
5551         (btpy_insn_error): Removed.
5552         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
5553         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
5554         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
5555         btpy_insn_or_gap_new instead of btpy_insn_new.
5556         (btpy_insn_getset): Remove btpy_insn_error.
5557         * py-record.c (recpy_gap_type): New static object.
5558         (recpy_gap_object): New typedef.
5559         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
5560         recpy_gap_reason_string): New function.
5561         (recpy_gap_getset): New static object.
5562         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
5563         * py-record.h (recpy_gap_new): New export.
5564
5565 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
5566
5567         * python/py-record.c (recpy_ptid): Remove.
5568         (recpy_record_getset): Remove recpy_ptid.
5569
5570 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
5571
5572         * btrace.c (btrace_fetch): Set inferior_ptid.
5573         * python/py-record-btrace.c: Add "py-record.h" include.
5574         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
5575         recpy_bt_end, recpy_bt_instruction_history,
5576         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
5577         in gdb.Record object instead of current ptid.
5578         * python/py-record.c: Include new "py-record.h" file.
5579         (recpy_record_object): Moved to py-record.h.
5580         * python/py-record.h: New file.
5581
5582 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
5583
5584         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
5585         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
5586         indentation.
5587
5588 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
5589
5590         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
5591         the past maintainers section.
5592
5593 2017-04-28  Yao Qi  <yao.qi@linaro.org>
5594
5595         * infcmd.c (get_return_value): Use regcache ctor, and remove
5596         cleanup.
5597
5598 2017-04-28  Yao Qi  <yao.qi@linaro.org>
5599             Pedro Alves  <palves@redhat.com>
5600
5601         * regcache.c (regcache::regcache): New tag dispatch ctor.
5602         (do_cooked_read): Moved above.
5603         (regcache_dup): Use the tag dispatch ctor..
5604         * regcache.h (regcache): Declare ctor, delete copy ctor and
5605         assignment operator, remove friend regcache_dup.
5606
5607 2017-04-28  Yao Qi  <yao.qi@linaro.org>
5608
5609         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
5610         call method save instead of regcache_cpy.
5611         * regcache.h (struct regcache): Make regcache_dup a friend.
5612
5613 2017-04-28  Yao Qi  <yao.qi@linaro.org>
5614
5615         * regcache.c (struct regcache): Move to regcache.h
5616         (regcache::arch): New method.
5617         (regcache_get_ptid): Update.
5618         (get_regcache_arch): Call arch method.
5619         (get_regcache_aspace): Call method aspace.
5620         (register_buffer): Change it to method.
5621         (regcache_save): Change it to regcache::save.
5622         (regcache_restore): Likewise.
5623         (regcache_cpy_no_passthrough): Remove the declaration.
5624         (regcache_cpy): Call methods restore and cpy_no_passthrough.
5625         (regcache_cpy_no_passthrough): Change it to method
5626         cpy_no_passthrough.
5627         (regcache_register_status): Change it to method
5628         get_register_status.
5629         (regcache_invalidate): Change it to method invalidate.
5630         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
5631         (regcache_raw_update): Change it to method raw_update.
5632         (regcache_raw_read): Likewise.
5633         (regcache_raw_read_signed): Likewise.
5634         (regcache_raw_read_unsigned): Likewise.
5635         (regcache_raw_write_signed): Likewise.
5636         (regcache_raw_write_unsigned): Likewise.
5637         (regcache_cooked_read): Likewise.
5638         (regcache_cooked_read_value): Likewise.
5639         (regcache_cooked_read_signed): Likewise.
5640         (regcache_cooked_read_unsigned): Likewise.
5641         (regcache_cooked_write_signed): Likewise.
5642         (regcache_cooked_write_unsigned): Likewise.
5643         (regcache_raw_set_cached_value): Likewise.
5644         (regcache_raw_write): Likewise.
5645         (regcache_cooked_write): Likewise.
5646         (regcache_xfer_part): Likewise.
5647         (regcache_raw_read_part): Likewise.
5648         (regcache_raw_write_part): Likewise.
5649         (regcache_cooked_read_part): Likewise.
5650         (regcache_cooked_write_part): Likewise.
5651         (regcache_raw_supply): Likewise.
5652         (regcache_raw_collect): Likewise.
5653         (regcache_transfer_regset): Likewise.
5654         (regcache_supply_regset): Likewise.
5655         (regcache_collect_regset): Likewise.
5656         (regcache_debug_print_register): Likewise.
5657         (enum regcache_dump_what): Move it to regcache.h.
5658         (regcache_dump): Change it to method dump.
5659         * regcache.h (enum regcache_dump_what): New.
5660         (class regcache): New.
5661         * target.c (target_fetch_registers): Call method
5662         debug_print_register.
5663         (target_store_registers): Likewise.
5664
5665 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
5666
5667         * windows-nat.c (struct lm_info_windows): Initialize field.
5668         (windows_make_so): Allocate lm_info_windows with new.
5669         (windows_free_so): Free lm_info_windows with delete.
5670
5671 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
5672
5673         * solib-darwin.c (struct lm_info_darwin): Initialize field.
5674         (darwin_current_sos): Allocate lm_info_darwin with new, remove
5675         cleanup.
5676         (darwin_free_so): Free lm_info_darwin with delete.
5677
5678 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
5679
5680         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
5681         <l_addr_p>: Change type to bool.
5682         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
5683         (svr4_free_so): Free lm_info_svr4 with delete.
5684         (svr4_copy_library_list): Replace memcpy with call to copy
5685         constructor.
5686         (library_list_start_library, svr4_default_sos): Allocate
5687         lm_info_svr4 with new.
5688
5689 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
5690
5691         * solib-target.c (struct lm_info_target): Add destructor,
5692         initialize fields.
5693         <name>: Change type to std::string.
5694         (library_list_start_library): Allocate lm_info_target with new.
5695         (solib_target_free_library_list): Free lm_info_target with
5696         delete.
5697         (solib_target_current_sos): Adapt to std::string.
5698         (solib_target_free_so): Free lm_info_target with delete.
5699
5700 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
5701
5702         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
5703         fields.
5704         (frv_current_sos): Allocate lm_info_frv with new.
5705         (frv_relocate_main_executable): Free lm_info_frv with delete,
5706         allocate with new.
5707         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
5708
5709 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
5710
5711         * solib-frv.c (struct lm_info_frv): Fix indentation.
5712
5713 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
5714
5715         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
5716         map field.
5717         (dsbt_current_sos): Allocate lm_info_dsbt with new.
5718         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
5719         and allocate with new.
5720         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
5721
5722 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
5723
5724         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
5725         <filename, member_name>: Change type to std::string.
5726         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
5727         (library_list_start_library): Allocate lm_info_aix with new.
5728         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
5729         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
5730         with copy constructor.
5731
5732 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
5733
5734         * solist.h (struct lm_info): Remove.
5735         (struct lm_info_base): New class.
5736         (struct so_list) <lm_info>: Change type to lm_info_base *.
5737         * nto-tdep.c (struct lm_info): Remove.
5738         (lm_addr): Adjust.
5739         * solib-aix.c (struct lm_info): Rename to ...
5740         (struct lm_info_aix): ... this.  Extend lm_info_base.
5741         (lm_info_p): Rename to ...
5742         (lm_info_aix_p): ... this, and adjust.
5743         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
5744         solib_aix_parse_libraries, library_list_start_library,
5745         solib_aix_free_library_list, solib_aix_parse_libraries,
5746         solib_aix_get_library_list,
5747         solib_aix_relocate_section_addresses, solib_aix_free_so,
5748         solib_aix_get_section_offsets,
5749         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
5750         Adjust.
5751         (struct solib_aix_inferior_data) <library_list>: Adjust.
5752         * solib-darwin.c (struct lm_info): Rename to ...
5753         (struct lm_info_darwin): ... this.  Extend lm_info_base.
5754         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
5755         * solib-dsbt.c (struct lm_info): Rename to ...
5756         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
5757         (struct dsbt_info) <main_executable_lm_info): Adjust.
5758         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
5759         dsbt_relocate_section_addresses): Adjust.
5760         * solib-frv.c (struct lm_info): Rename to ...
5761         (struct lm_info_frv): ... this.  Extend lm_info_base.
5762         (main_executable_lm_info): Adjust.
5763         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
5764         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
5765         find_canonical_descriptor_in_load_object,
5766         frv_fdpic_find_canonical_descriptor): Adjust.
5767         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
5768         to lm_info_svr4.
5769         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
5770         svr4_clear_so, svr4_copy_library_list,
5771         library_list_start_library, svr4_default_sos, svr4_read_so_list,
5772         svr4_current_sos, svr4_fetch_objfile_link_map,
5773         solist_update_incremental): Adjust.
5774         * solib-svr4.h (struct lm_info_svr4): Move here from
5775         solib-svr4.c.
5776         * solib-target.c (struct lm_info): Rename to ...
5777         (struct lm_info_target): ... this.  Extend lm_info_base.
5778         (lm_info_p): Rename to ...
5779         (lm_info_target_p): ... this.
5780         (solib_target_parse_libraries, library_list_start_segment,
5781         library_list_start_section, library_list_start_library,
5782         library_list_end_library, solib_target_free_library_list,
5783         solib_target_current_sos, solib_target_free_so,
5784         solib_target_relocate_section_addresses): Adjust.
5785         * windows-nat.c (struct lm_info): Rename to ...
5786         (struct lm_info_windows): ... this.  Extend lm_info_base.
5787         (windows_make_so, handle_load_dll, handle_unload_dll,
5788         windows_xfer_shared_libraries): Adjust.
5789
5790 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
5791
5792         * solib-darwin.c (struct darwin_so_list): Remove.
5793         (darwin_current_sos): Allocate an so_list object instead of a
5794         darwin_so_list, separately allocate an lm_info object.
5795         (darwin_free_so): Free lm_info.
5796
5797 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
5798
5799         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
5800         with fprintf_filtered.
5801
5802 2017-04-28  Yao Qi  <yao.qi@linaro.org>
5803
5804         * regcache.c (regcache::regcache): New function.
5805         (regcache::~regcache): New function.
5806         (regcache_xmalloc_1): Remove.
5807         (regcache_xmalloc): Call new regcache.
5808         (regcache_xfree): Call delete regcache.
5809         (get_thread_arch_aspace_regcache): Call new regcache.
5810
5811 2017-04-28  Yao Qi  <yao.qi@linaro.org>
5812
5813         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
5814         lwp instead of ptid_get_lwp.
5815
5816 2017-04-28  Yao Qi  <yao.qi@linaro.org>
5817
5818         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
5819         lwp_info instead of getting from inferior_ptid.
5820
5821 2017-04-27  Keith Seitz  <keiths@redhat.com>
5822
5823         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
5824         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
5825         (CV_CONVERSION_BADNESS): Define.
5826         (rank_one_type): Remove overly restrictive rvalue reference
5827         rank checks.
5828         Add cv-qualifier checks and subranks for type equality.
5829         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
5830         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
5831         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
5832
5833 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
5834
5835         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
5836         count when creating the object.
5837
5838 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
5839             Ulrich Weigand  <uweigand@de.ibm.com>
5840
5841         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
5842         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
5843         is used in AIX.
5844         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
5845         (process_xcoff_symbol): Likewise.
5846         (scan_xcoff_symtab): Likewise.
5847
5848 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
5849
5850         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
5851         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
5852         (ia64_access_reg): Use get_frame_register_unsigned.
5853         (ia64_access_rse_reg): Likewise.
5854         (ia64_libunwind_frame_prev_register): Likewise.
5855
5856 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
5857
5858         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
5859         * gdbarch.c: Regenerated.
5860         * gdbarch.h: Regenerated.
5861         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
5862         visibility external.
5863         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
5864         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
5865         (enum cfa_how_kind): Move to ...
5866         (struct dwarf2_frame_state_reg_info): Likewise.
5867         (struct dwarf2_frame_state): Likewise.
5868         * dwarf2-frame.h: ... here.
5869         (dwarf2_frame_state_alloc_regs): New declaration.
5870         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
5871         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
5872
5873 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
5874
5875         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
5876         regcache_raw_read_unsigned.
5877         (xtensa_pseudo_register_write): Likewise.
5878
5879 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
5880
5881         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
5882         (nds32_pseudo_register_write): Likewise.
5883
5884 2017-04-25  Yao Qi  <yao.qi@linaro.org>
5885
5886         * regcache.c (struct regcache) <readonly_p>: Change its type
5887         to bool.
5888         (regcache_xmalloc_1): Update parameter type and callers update.
5889
5890 2017-04-25  Yao Qi  <yao.qi@linaro.org>
5891
5892         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
5893         set_gdbarch_wchar_bit.
5894         * arm-tdep.c (arm_gdbarch_init): Likewise.
5895
5896 2017-04-25  Pedro Alves  <palves@redhat.com>
5897
5898         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
5899         (BothAreRelocatable, memcopy, memmove): Don't define.
5900         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
5901         macros.
5902
5903 2017-04-25  Pedro Alves  <palves@redhat.com>
5904
5905         * common/common-defs.h: Include "common/poison.h".
5906         * common/function-view.h: (Not, Or, Requires): Move to traits.h
5907         and adjust.
5908         * common/poison.h: New file.
5909         * common/traits.h: Include <type_traits>.
5910         (Not, Or, Requires): New, moved from common/function-view.h.
5911
5912 2017-04-25  Pedro Alves  <palves@redhat.com>
5913
5914         * breakpoint.h (struct breakpoint): In-class initialize all
5915         fields.  Make boolean fields "bool".
5916         * breakpoint.c (init_raw_breakpoint_without_location): Remove
5917         memset call and initializations no longer necessary.
5918
5919 2017-04-25  Pedro Alves  <palves@redhat.com>
5920
5921         * btrace.c (pt_btrace_insn_flags): Change parameter type to
5922         reference.
5923         (pt_btrace_insn): New function.
5924         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
5925
5926 2017-04-25  Pedro Alves  <palves@redhat.com>
5927
5928         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
5929         "base" field and inherit from "bp_location" instead.  Add
5930         non-default ctor.
5931         (allocate_location_exception): Use new non-default ctor.
5932         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
5933         (init_bp_location): Convert to ...
5934         (bp_location::bp_location): ... this new ctor, and remove memset
5935         call.
5936         (base_breakpoint_allocate_location): Use the new non-default ctor.
5937         * breakpoint.h (bp_location): Now a class.  Declare default and
5938         non-default ctors.  In-class initialize all members.
5939         (init_bp_location): Remove declaration.
5940
5941 2017-04-25  Pedro Alves  <palves@redhat.com>
5942
5943         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
5944         assignment operator.
5945
5946 2017-04-24  Yao Qi  <yao.qi@linaro.org>
5947
5948         * doublest.c (convert_doublest_to_floatformat): Call
5949         floatformat_totalsize_bytes.
5950
5951 2017-04-22  Tom Tromey  <tom@tromey.com>
5952
5953         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5954         ui_out_emit_list.
5955         * stack.c (print_frame): Use ui_out_emit_list.
5956         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
5957         ui_out_emit_list.
5958         * mi/mi-main.c (print_one_inferior)
5959         (mi_cmd_data_list_register_names)
5960         (mi_cmd_data_list_register_values, mi_cmd_list_features)
5961         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
5962         ui_out_emit_list.
5963         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
5964         (mi_output_solib_attribs): Use ui_out_emit_list,
5965         ui_out_emit_tuple.
5966         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
5967         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
5968         (mi_cmd_stack_list_args, list_args_or_locals): Use
5969         ui_out_emit_list.
5970         * disasm.c (do_assembly_only): Use ui_out_emit_list.
5971         * breakpoint.c (print_solib_event, output_thread_groups): Use
5972         ui_out_emit_list.
5973
5974 2017-04-22  Tom Tromey  <tom@tromey.com>
5975
5976         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
5977         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
5978         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
5979
5980 2017-04-22  Tom Tromey  <tom@tromey.com>
5981
5982         * tracepoint.c (tvariables_info_1)
5983         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
5984
5985 2017-04-22  Tom Tromey  <tom@tromey.com>
5986
5987         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
5988         annotate_arg_emitter.
5989         * breakpoint.c (print_mention_watchpoint)
5990         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
5991         * annotate.h (struct annotate_arg_emitter): New.
5992
5993 2017-04-22  Tom Tromey  <tom@tromey.com>
5994
5995         * record-btrace.c (record_btrace_insn_history)
5996         (record_btrace_insn_history_range, record_btrace_call_history)
5997         (record_btrace_call_history_range): Use ui_out_emit_tuple.
5998         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
5999         ui_out_emit_tuple.
6000         * stack.c (print_frame_info): Use ui_out_emit_tuple.
6001         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
6002         * skip.c (skip_info): Use ui_out_emit_tuple.
6003         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
6004         * progspace.c (print_program_space): Use ui_out_emit_tuple.
6005         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
6006         * osdata.c (info_osdata): Use ui_out_emit_tuple.
6007         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6008         ui_out_emit_tuple.
6009         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
6010         (output_register, mi_cmd_data_read_memory)
6011         (mi_cmd_data_read_memory_bytes, mi_load_progress)
6012         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
6013         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
6014         Use ui_out_emit_tuple.
6015         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
6016         ui_out_emit_tuple.
6017         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
6018         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
6019         * linux-thread-db.c (info_auto_load_libthread_db): Use
6020         ui_out_emit_tuple.
6021         * inferior.c (print_inferior): Use ui_out_emit_tuple.
6022         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
6023         * disasm.c (do_mixed_source_and_assembly_deprecated)
6024         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
6025         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
6026         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
6027         * breakpoint.c (print_one_breakpoint_location)
6028         (print_one_breakpoint): Use ui_out_emit_tuple.
6029         * auto-load.c (print_script, info_auto_load_cmd): Use
6030         ui_out_emit_tuple.
6031         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
6032
6033 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
6034
6035         * thread.c (print_thread_info_1): Remove dead code.
6036
6037 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
6038
6039         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
6040         GDB_SELF_TEST.
6041         * arm-tdep.c (selftests::arm_record_test): Likewise.
6042
6043 2017-04-21  Yao Qi  <yao.qi@linaro.org>
6044
6045         * regcache.c (regcache_restore): Remove argument 2.  Replace
6046         argument 3 with regcache.  Get register status from
6047         src->register_status and get register contents from
6048         register_buffer (src, regnum).
6049         (regcache_cpy): Update.
6050
6051 2017-04-19  Pedro Alves  <palves@redhat.com>
6052
6053         * gdbthread.h (thread): Add missing closing parenthesis in
6054         comment.
6055
6056 2017-04-19  Pedro Alves  <palves@redhat.com>
6057
6058         * common/refcounted-object.h: New file.
6059         * gdbthread.h: Include "common/refcounted-object.h".
6060         (thread_info): Inherit from refcounted_object and add comments.
6061         (thread_info::incref, thread_info::decref)
6062         (thread_info::m_refcount): Delete.
6063         (thread_info::deletable): Use the refcounted_object::refcount()
6064         method.
6065         * inferior.c (current_inferior_): Add comment.
6066         (set_current_inferior): Increment/decrement refcounts.
6067         (prune_inferiors, remove_inferior_command): Skip inferiors marked
6068         not-deletable instead of comparing with the current inferior.
6069         (initialize_inferiors): Increment the initial inferior's refcount.
6070         * inferior.h (struct inferior): Forward declare.
6071         Include "common/refcounted-object.h".
6072         (current_inferior, set_current_inferior): Move declaration to
6073         before struct inferior's definition, and fix comment.
6074         (inferior): Inherit from refcounted_object.  Add comments.
6075         * thread.c (switch_to_thread_no_regs): Reference the thread's
6076         inferior pointer directly instead of doing a ptid lookup.
6077         (switch_to_no_thread): New function.
6078         (switch_to_thread(thread_info *)): New function, factored out
6079         from ...
6080         (switch_to_thread(ptid_t)): ... this.
6081         (restore_current_thread): Delete.
6082         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
6083         fields, and add 'inf' field.
6084         (do_restore_current_thread_cleanup): Check whether old->inf is
6085         alive instead of looking up an inferior by ptid.  Use
6086         switch_to_thread and switch_to_no_thread.
6087         (restore_current_thread_cleanup_dtor): Use old->inf directly
6088         instead of lookup up an inferior by id.  Decref the inferior.
6089         Don't restore 'removable'.
6090         (make_cleanup_restore_current_thread): Same the inferior pointer
6091         in old, instead of the inferior number.  Incref the inferior.
6092         Don't save/clear 'removable'.
6093
6094 2017-04-19  Pedro Alves  <palves@redhat.com>
6095
6096         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6097         unittests/scoped_restore-selftests.c.
6098         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
6099         * common/scoped_restore.h (scoped_restore_base): Make "class".
6100         (scoped_restore_base::release): New public method.
6101         (scoped_restore_base::scoped_restore_base): New protected ctor.
6102         (scoped_restore_base::m_saved_var): New protected field.
6103         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
6104         scoped_restore_base base class instead of m_saved_var directly.
6105         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
6106         (scoped_restore_tmpl::scoped_restore_tmpl(const
6107         scoped_restore_tmpl<T>&)): Likewise.
6108         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
6109         method.
6110         (scoped_restore_tmpl::saved_var): New method.
6111         (scoped_restore_tmpl::m_saved_var): Delete.
6112         * inferior.h (inferior::detaching): Now a bool.
6113         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
6114         cleanup.
6115         * unittests/scoped_restore-selftests.c: New file.
6116
6117 2017-04-19  Pedro Alves  <palves@redhat.com>
6118
6119         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
6120         Re-sort in alphabetic order.
6121
6122 2017-04-18  Pedro Alves  <palves@redhat.com>
6123
6124         * xml-support.c (obstack_xml_printf): Delete.
6125         * xml-support.h (obstack_xml_printf): Delete.
6126
6127 2017-04-18  Pedro Alves  <palves@redhat.com>
6128
6129         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
6130         vdebug, verror, body_text, start_element, end_element, name,
6131         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
6132         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
6133         is_xinclude>: Make private and add m_ prefix.
6134         (gdb_xml_parser::body_text): New method, based on ...
6135         (gdb_xml_body_text): ... this.  Adjust.
6136         (gdb_xml_parser::vdebug): New method, based on ...
6137         (gdb_xml_debug): ... this.  Adjust.
6138         (gdb_xml_parser::verror): New method, based on ...
6139         (gdb_xml_error): ... this.  Adjust.
6140         (gdb_xml_parser::start_element): New method, based on ...
6141         (gdb_xml_start_element): ... this.  Adjust.
6142         (gdb_xml_start_element_wrapper): Defer to
6143         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
6144         (gdb_xml_parser::end_element): New method, based on ...
6145         (gdb_xml_end_element_wrapper): ... this.  Adjust.
6146         (gdb_xml_parser::~gdb_xml_parser): Adjust.
6147         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
6148         (gdb_xml_parser::use_dtd): New method, based on ...
6149         (gdb_xml_use_dtd): ... this.  Adjust.
6150         (gdb_xml_parser::parse): New method, based on ...
6151         (gdb_xml_parse): ... this.  Adjust.
6152         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
6153         (xinclude_start_include): Adjust to call the parser's name method.
6154         (xml_xinclude_default, xml_xinclude_start_doctype)
6155         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
6156         method.
6157         (xml_process_xincludes): Adjust to call parser methods.
6158         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
6159         declarations.
6160
6161 2017-04-18  Pedro Alves  <palves@redhat.com>
6162
6163         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
6164         gdb::optional<std::string>.
6165         * xml-support.c: Include <string>.
6166         (scope_level::scope_level(scope_level &&))
6167         (scope_level::~scope_level): Delete.
6168         (scope_level::body): Now a std::string.
6169         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
6170         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
6171         parameter.
6172         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
6173         (xinclude_parsing_data::output): Now a std::string reference.
6174         (xinclude_start_include): Adjust.
6175         (xml_xinclude_default): Adjust.
6176         (xml_process_xincludes): Add 'output' parameter, and return bool.
6177         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
6178         and return bool.
6179         * xml-tdesc.c: Include <unordered_map> and <string>.
6180         (tdesc_xml_cache): Delete.
6181         (tdesc_xml_cache_s): Delete.
6182         (xml_cache): Now an std::unordered_map.
6183         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
6184         (target_fetch_description_xml): Change return type to
6185         gdb::optional<std::string>, and adjust.
6186         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
6187         (target_fetch_description_xml): Change return type to
6188         gdb::optional<std::string>.
6189
6190 2017-04-18  Pedro Alves  <palves@redhat.com>
6191
6192         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6193         unittests/optional-selftests.c.
6194         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
6195         * unittests/optional-selftests.c: New file.
6196         * unittests/optional/assignment/1.cc: New file.
6197         * unittests/optional/assignment/2.cc: New file.
6198         * unittests/optional/assignment/3.cc: New file.
6199         * unittests/optional/assignment/4.cc: New file.
6200         * unittests/optional/assignment/5.cc: New file.
6201         * unittests/optional/assignment/6.cc: New file.
6202         * unittests/optional/assignment/7.cc: New file.
6203         * unittests/optional/cons/copy.cc: New file.
6204         * unittests/optional/cons/default.cc: New file.
6205         * unittests/optional/cons/move.cc: New file.
6206         * unittests/optional/cons/value.cc: New file.
6207         * unittests/optional/in_place.cc: New file.
6208         * unittests/optional/observers/1.cc: New file.
6209         * unittests/optional/observers/2.cc: New file.
6210
6211 2017-04-18  Pedro Alves  <palves@redhat.com>
6212
6213         * common/gdb_optional.h: Include common/traits.h.
6214         (in_place_t): New type.
6215         (in_place): New constexpr variable.
6216         (optional::optional): Remove member initialization of
6217         m_instantiated.
6218         (optional::optional(in_place_t...)): New constructor.
6219         (optional::~optional): Use reset.
6220         (optional::optional(const optional&)): New.
6221         (optional::optional(const optional&&)): New.
6222         (optional::optional(T &)): New.
6223         (optional::optional(T &&)): New.
6224         (operator::operator=(const optional &)): New.
6225         (operator::operator=(optional &&)): New.
6226         (operator::operator= (const T &))
6227         (operator::operator= (T &&))
6228         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
6229         (operator::reset): New.
6230         (operator::m_instantiated):: Add in-class initializer.
6231         * common/traits.h: Include <type_traits>.
6232         (struct And): New types.
6233
6234 2017-04-18  Pedro Alves  <palves@redhat.com>
6235
6236         * xml-support.c: Include <vector>.
6237         (scope_level::scope_level(const gdb_xml_element *))
6238         (scope_level::scope_level(scope_level&&)): New.
6239         (scope_level::~scope_level): New.
6240         (scope_level_s): Delete.
6241         (gdb_xml_parser::scopes): Now a std::vector.
6242         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
6243         Use std::vector.
6244         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
6245         scope cleanup code.
6246         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
6247         of the scopes member.  Use std::vector::emplace_back.
6248
6249 2017-04-18  Pedro Alves  <palves@redhat.com>
6250
6251         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
6252         a bool.
6253         (gdb_xml_end_element): Change type of first parameter.
6254         (gdb_xml_cleanup): Rename to ...
6255         (gdb_xml_parser::~gdb_xml_parser): ... this.
6256         (gdb_xml_create_parser_and_cleanup): Delete with ...
6257         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
6258         to this new ctor.
6259         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
6260         using gdb_xml_create_parser_and_cleanup.
6261         (xinclude_parsing_data): Add ctor/dtor.
6262         (xml_xinclude_cleanup): Delete.
6263         (xml_process_xincludes): Create a local xinclude_parsing_data
6264         instead of heap-allocating one.  Create a local gdb_xml_parser
6265         instead of heap-allocating one with
6266         gdb_xml_create_parser_and_cleanup.
6267
6268 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
6269
6270         PR threads/20743
6271         * fbsd-nat.c (resume_one_thread_cb): Remove.
6272         (resume_all_threads_cb): Remove.
6273         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
6274         iterate_over_threads.
6275
6276 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
6277
6278         * NEWS: Create a new section for the next release branch.
6279         Rename the section of the current branch, now that it has
6280         been cut.
6281
6282 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
6283
6284         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
6285         * version.in: Bump version to 8.0.50.DATE-git.
6286
6287 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
6288
6289         PR gdb/21385
6290         * windows-nat.c (windows_create_inferior): Declare 'allargs'
6291         independently of the host, and fix build breakage on Cygwin.
6292
6293 2017-04-13  Pedro Alves  <palves@redhat.com>
6294
6295         * inferior.c (free_inferior): Convert to ...
6296         (inferior::~inferior): ... this dtor.
6297         (inferior::inferior): New ctor, factored out from ...
6298         (add_inferior_silent): ... here.  Allocate the inferior with a new
6299         expression.
6300         (delete_inferior): Call delete instead of free_inferior.
6301         * inferior.h (gdb_environ, continuation): Forward declare.
6302         (inferior): Now a class.  Add in-class initialization to all
6303         members.  Make boolean fields bool, except 'detaching'.
6304         (inferior::inferior): New explicit ctor.
6305         (inferior::~inferior): New.
6306
6307 2017-04-13  Pedro Alves  <palves@redhat.com>
6308
6309         * inferior.c (init_inferior_list): Delete.
6310         * inferior.h (init_inferior_list): Delete.
6311
6312 2017-04-13  Pedro Alves  <palves@redhat.com>
6313
6314         PR threads/13217
6315         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
6316         (top level): Call it twice, with different thread sets.
6317
6318 2017-04-13  Pedro Alves  <palves@redhat.com>
6319
6320         * thread.c: Include <algorithm>.
6321         (thread_array_cleanup): Delete.
6322         (scoped_inc_dec_ref): New class.
6323         (live_threads_count): New function.
6324         (set_thread_refcount): Delete.
6325         (tp_array_compar_ascending): Now a bool.
6326         (tp_array_compar): Convert to a std::sort comparison function.
6327         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
6328         and live_threads_count.
6329
6330 2017-04-13  Pedro Alves  <palves@redhat.com>
6331
6332         * infrun.c (follow_fork_inferior): Also switch the current
6333         inferior.
6334
6335 2017-04-13  Pedro Alves  <palves@redhat.com>
6336
6337         * breakpoint.c (watch_command_1): Save watchpoint-frame info
6338         before calling create_internal_breakpoint.
6339
6340 2017-04-13  Pedro Alves  <palves@redhat.com>
6341
6342         * fork-child.c (execv_argv): New class.
6343         (breakup_args): Refactored as ...
6344         (execv_argv::init_for_no_shell): .. this method of execv_argv.
6345         Copy arguments to storage and replace separators with NULL
6346         terminators in place.
6347         (escape_bang_in_quoted_argument): Adjust to return bool.
6348         (execv_argv::execv_argv): New ctor.
6349         (execv_argv::init_for_shell): New method, factored out from
6350         fork_inferior.  Don't strdup strings into the vector.
6351         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
6352         Remove free_vector_argv call.
6353
6354 2017-04-13  Yao Qi  <yao.qi@linaro.org>
6355
6356         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
6357         tdep->rx_psw_type.
6358
6359 2017-04-13  Yao Qi  <yao.qi@linaro.org>
6360
6361         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
6362         * rx-tdep.c (rx_gdbarch_init): Likewise.
6363
6364 2017-04-13  Pedro Alves  <palves@redhat.com>
6365
6366         * breakpoint.h (struct breakpoint): Reindent.
6367
6368 2017-04-13  Pedro Alves  <palves@redhat.com>
6369
6370         * breakpoint.c (bp_location): Rename to ...
6371         (bp_locations): ... this.  All references updated.
6372         (bp_location_count): Rename to ...
6373         (bp_locations_count): ... this.  All references updated.
6374         (bp_location_placed_address_before_address_max): Rename to ...
6375         (bp_locations_placed_address_before_address_max): ... this.  All
6376         references updated.
6377         (bp_location_shadow_len_after_address_max): Rename to ...
6378         (bp_locations_shadow_len_after_address_max): ... this.  All
6379         references updated.
6380         (bp_location_compare_addrs): Rename to ...
6381         (bp_locations_compare_addrs): ... this.  All references updated.
6382         (bp_location_compare):Rename to ...
6383         (bp_locations_compare): ... this.  All references updated.
6384         (bp_location_target_extensions_update): Rename to ...
6385         (bp_locations_target_extensions_update): ... this.  All references
6386         updated.
6387
6388 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
6389
6390         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
6391         * common/common.m4: Check headers 'termios.h', 'termio.h' and
6392         'sgtty.h'.
6393         * common/gdb_termios.h: New file, with parts of "terminal.h".
6394         * inflow.c: Include "gdb_termios.h".
6395         * ser-unix.c: Include "gdb_termios.h".
6396         * terminal.h: Move terminal-related defines to
6397         "common/gdb_termios.h".
6398
6399 2017-04-12  Tom Tromey  <tom@tromey.com>
6400
6401         * probe.c (parse_probes): Update.
6402         * location.h (delete_event_location): Don't declare.
6403         (event_location_deleter::operator()): Update.
6404         * location.c (event_location_deleter::operator()): Rename from
6405         delete_event_location.
6406         * linespec.h (linespec_result) <location>: Change type to
6407         event_location_up.
6408         * linespec.c (canonicalize_linespec, event_location_to_sals)
6409         (decode_objc): Update.
6410         (linespec_result): Don't call delete_event_location.
6411         * breakpoint.c (create_breakpoints_sal)
6412         (bkpt_probe_create_sals_from_location)
6413         (strace_marker_create_sals_from_location): Update.
6414
6415 2017-04-12  Tom Tromey  <tom@tromey.com>
6416
6417         * linespec.h (struct linespec_result): Add constructor and
6418         destructor.
6419         (init_linespec_result, destroy_linespec_result)
6420         (make_cleanup_destroy_linespec_result): Don't declare.
6421         * linespec.c (init_linespec_result): Remove.
6422         (linespec_result::~linespec_result): Rename from
6423         destroy_linespec_result.  Update.
6424         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
6425         Remove.
6426         * breakpoint.c (create_breakpoint, break_range_command)
6427         (decode_location_default): Update.
6428         * ax-gdb.c (agent_command_1): Update.
6429
6430 2017-04-12  Tom Tromey  <tom@tromey.com>
6431
6432         * remote.c (remote_download_tracepoint): Update.
6433         * python/py-breakpoint.c (bppy_get_location): Update.
6434         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
6435         (gdbscm_breakpoint_location): Update.
6436         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
6437         * breakpoint.h (struct breakpoint) <location, location_range_end>:
6438         Change type to event_location_up.
6439         * breakpoint.c (create_overlay_event_breakpoint)
6440         (create_longjmp_master_breakpoint)
6441         (create_std_terminate_master_breakpoint)
6442         (create_exception_master_breakpoint)
6443         (breakpoint_event_location_empty_p, print_breakpoint_location)
6444         (print_one_breakpoint_location, create_thread_event_breakpoint)
6445         (init_breakpoint_sal, create_breakpoint)
6446         (print_recreate_ranged_breakpoint, break_range_command)
6447         (init_ada_exception_breakpoint, say_where): Update.
6448         (base_breakpoint_dtor): Don't call delete_event_location.
6449         (bkpt_print_recreate, tracepoint_print_recreate)
6450         (dprintf_print_recreate, update_static_tracepoint)
6451         (breakpoint_re_set_default): Update.
6452
6453 2017-04-12  Tom Tromey  <tom@tromey.com>
6454
6455         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
6456         type of "to_do".  Update.
6457         (compute_stack_depth): Use std::vector.
6458
6459 2017-04-12  Tom Tromey  <tom@tromey.com>
6460
6461         * printcmd.c (find_instruction_backward): Use std::vector.
6462
6463 2017-04-12  Tom Tromey  <tom@tromey.com>
6464
6465         * symfile.c (objfilep): Remove typedef.
6466         (reread_symbols): Use a std::vector.
6467
6468 2017-04-12  Tom Tromey  <tom@tromey.com>
6469
6470         * mi/mi-main.c (exec_direction_forward): Remove.
6471         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
6472         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6473         scoped_restore.
6474         * guile/guile.c (guile_repl_command, guile_command)
6475         (gdbscm_execute_gdb_command): Use scoped_restore.
6476         * go-exp.y (go_parse): Use scoped_restore.
6477         * d-exp.y (d_parse): Use scoped_restore.
6478         * cli/cli-decode.c (cmd_func): Use scoped_restore.
6479         * c-exp.y (c_parse): Use scoped_restore.
6480
6481 2017-04-12  Tom Tromey  <tom@tromey.com>
6482
6483         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
6484         (mi_parse): Update return type.
6485         (mi_parse_free): Remove.
6486         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
6487         (mi_parse::~mi_parse): Rename from mi_parse_free.
6488         (mi_parse_cleanup): Remove.
6489         (mi_parse): Return a unique_ptr.  Use new.
6490         * mi/mi-main.c (mi_execute_command): Update.
6491
6492 2017-04-12  Tom Tromey  <tom@tromey.com>
6493
6494         * location.c (explicit_location_lex_one): Return a
6495         unique_xmalloc_ptr.
6496         (string_to_explicit_location): Update.  Remove cleanups.
6497
6498 2017-04-12  Tom Tromey  <tom@tromey.com>
6499
6500         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
6501         (compare_value_and_voffset): Change type.  Update.
6502         (compute_vtable_size): Change type of "offset_vec".
6503         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
6504         (gnuv3_get_typeid): Remove extraneous declaration.
6505
6506 2017-04-12  Tom Tromey  <tom@tromey.com>
6507
6508         * charset.h (wchar_iterator): Fix comment.
6509
6510 2017-04-12  Tom Tromey  <tom@tromey.com>
6511
6512         * charset.c (iconv_wrapper): New class.
6513         (cleanup_iconv): Remove.
6514         (convert_between_encodings): Use it.
6515
6516 2017-04-12  Tom Tromey  <tom@tromey.com>
6517
6518         * symfile.h (increment_reading_symtab): Update type.
6519         * symfile.c (decrement_reading_symtab): Remove.
6520         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
6521         * psymtab.c (psymtab_to_symtab): Update.
6522         * dwarf2read.c (dw2_instantiate_symtab): Update.
6523
6524 2017-04-12  Tom Tromey  <tom@tromey.com>
6525
6526         * jit.c (struct jit_reader): Declare separately.  Add constructor
6527         and destructor.  Change type of "handle".
6528         (loaded_jit_reader): Define separately.
6529         (jit_reader_load): Update.  New "new".
6530         (jit_reader_unload_command): Use "delete".
6531         * gdb-dlfcn.h (struct dlclose_deleter): New.
6532         (gdb_dlhandle_up): New typedef.
6533         (gdb_dlopen, gdb_dlsym): Update types.
6534         (gdb_dlclose): Remove.
6535         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
6536         (gdb_dlsym): Change type of "handle".
6537         (make_cleanup_dlclose): Remove.
6538         (dlclose_deleter::operator()): Rename from gdb_dlclose.
6539         * compile/compile-c-support.c (load_libcc): Update.
6540
6541 2017-04-12  Tom Tromey  <tom@tromey.com>
6542
6543         * symtab.h (find_pcs_for_symtab_line): Change return type.
6544         * symtab.c (find_pcs_for_symtab_line): Change return type.
6545         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
6546         type of "vec".  Update.
6547         (ltpy_get_pcs_for_line): Update.
6548         * linespec.c (decode_digits_ordinary): Update.
6549
6550 2017-04-12  Tom Tromey  <tom@tromey.com>
6551
6552         * tracepoint.c (actions_command): Update.
6553         * python/python.c (python_command, python_interactive_command):
6554         Update.
6555         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6556         * guile/guile.c (guile_command): Update.
6557         * defs.h (read_command_lines, read_command_lines_1): Return
6558         command_line_up.
6559         (command_lines_deleter): New struct.
6560         (command_line_up): New typedef.
6561         * compile/compile.c (compile_code_command)
6562         (compile_print_command): Update.
6563         * cli/cli-script.h (get_command_line, copy_command_lines): Return
6564         command_line_up.
6565         (make_cleanup_free_command_lines): Remove.
6566         * cli/cli-script.c (get_command_line, read_command_lines_1)
6567         (copy_command_lines): Return command_line_up.
6568         (while_command, if_command, read_command_lines, define_command)
6569         (document_command): Update.
6570         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
6571         Remove.
6572         * breakpoint.h (breakpoint_set_commands): Change type of
6573         "commands".
6574         * breakpoint.c (breakpoint_set_commands): Change type of
6575         "commands".  Update.
6576         (do_map_commands_command, update_dprintf_command_list)
6577         (create_tracepoint_from_upload): Update.
6578
6579 2017-04-12  Tom Tromey  <tom@tromey.com>
6580
6581         * tracepoint.c (scope_info): Update.
6582         * spu-tdep.c (spu_catch_start): Update.
6583         * python/python.c (gdbpy_decode_line): Update.
6584         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
6585         * python/py-breakpoint.c (bppy_init): Update.
6586         * probe.c (parse_probes): Update.
6587         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
6588         * location.h (event_location_deleter): New struct.
6589         (event_location_up): New typedef.
6590         (new_linespec_location, new_address_location, new_probe_location)
6591         (new_explicit_location, copy_event_location)
6592         (string_to_event_location, string_to_event_location_basic)
6593         (string_to_explicit_location): Update return type.
6594         (make_cleanup_delete_event_location): Remove.
6595         * location.c (new_linespec_location, new_address_location)
6596         (new_probe_location, new_explicit_location, copy_event_location):
6597         Return event_location_up.
6598         (delete_event_location_cleanup)
6599         (make_cleanup_delete_event_location): Remove.
6600         (string_to_explicit_location, string_to_event_location_basic)
6601         (string_to_event_location): Return event_location_up.
6602         * linespec.c (canonicalize_linespec, event_location_to_sals)
6603         (decode_line_with_current_source)
6604         (decode_line_with_last_displayed, decode_objc): Update.
6605         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
6606         * completer.c (location_completer): Update.
6607         * cli/cli-cmds.c (edit_command, list_command): Update.
6608         * breakpoint.c (create_overlay_event_breakpoint)
6609         (create_longjmp_master_breakpoint)
6610         (create_std_terminate_master_breakpoint)
6611         (create_exception_master_breakpoint)
6612         (create_thread_event_breakpoint): Update.
6613         (init_breakpoint_sal): Update.  Remove some dead code.
6614         (create_breakpoint_sal): Change type of "location".  Update.
6615         (create_breakpoints_sal, create_breakpoint, break_command_1)
6616         (dprintf_command, break_range_command, until_break_command)
6617         (init_ada_exception_breakpoint)
6618         (strace_marker_create_sals_from_location)
6619         (update_static_tracepoint, trace_command, ftrace_command)
6620         (strace_command, create_tracepoint_from_upload): Update.
6621         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6622         * ax-gdb.c (agent_command_1): Update.
6623
6624 2017-04-12  Pedro Alves  <palves@redhat.com>
6625
6626         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
6627         * configure.tgt: Handle i[34567]86-*-go32* and
6628         i[34567]86-*-msdosdjgpp*.
6629         * i386-tdep.c (i386_svr4_reg_to_regnum):
6630         Make extern.
6631         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
6632         i386-go32-tdep.c.
6633         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
6634         * i386-go32-tdep.c: New file.
6635         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
6636         declarations.
6637
6638 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
6639
6640         * aix-thread.c (pd_status2str): Change return type to const char *.
6641
6642 2017-04-12  Pedro Alves  <palves@redhat.com>
6643
6644         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
6645         calls to set_gdbarch_gnu_triplet_regexp.
6646
6647 2017-04-12  Pedro Alves  <palves@redhat.com>
6648
6649         PR gdb/21323
6650         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
6651         New enum value.
6652         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
6653         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
6654         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
6655         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
6656         * gdbarch.h, gdbarch.c: Regenerate.
6657         * aarch64-tdep.c (aarch64_gdbarch_init): Override
6658         gdbarch_wchar_bit and gdbarch_wchar_signed.
6659         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
6660         * arm-tdep.c (arm_gdbarch_init): Likewise.
6661         * avr-tdep.c (avr_gdbarch_init): Likewise.
6662         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
6663         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
6664         * i386-tdep.c (i386_go32_init_abi): Likewise.
6665         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6666         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6667         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6668         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
6669         * sh-tdep.c (sh_gdbarch_init): Likewise.
6670         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6671         * sparc64-tdep.c (sparc64_init_abi): Likewise.
6672         * windows-tdep.c (windows_init_abi): Likewise.
6673         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6674
6675 2017-04-12  Pedro Alves  <palves@redhat.com>
6676
6677         PR c++/21323
6678         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
6679         cplus_primitive_type_char32_t>: New enum values.
6680         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
6681         and cplus_primitive_type_char32_t.
6682         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
6683         32, use the archtecture's built-in type for char16_t and char32_t,
6684         respectively.  Otherwise, fallback to init_integer_type as before,
6685         but make the type unsigned, and issue a complaint.
6686         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
6687
6688 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
6689
6690         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
6691         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
6692
6693 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
6694
6695         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
6696         'const char *'.
6697
6698 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
6699
6700         * common/common-utils.c (free_vector_argv): New function.
6701         * common/common-utils.h: Include <vector>.
6702         (free_vector_argv): New prototype.
6703         * darwin-nat.c (darwin_create_inferior): Rewrite function
6704         prototype in order to constify "exec_file" and accept a
6705         "std::string" for "allargs".
6706         * fork-child.c: Include <vector>.
6707         (breakup_args): Rewrite function, using C++.
6708         (fork_inferior): Rewrite function header, constify "exec_file_arg"
6709         and accept "std::string" for "allargs".  Update the code to
6710         calculate "argv" based on "allargs".  Update calls to "exec_fun"
6711         and "execvp".
6712         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
6713         order to constify "exec_file" and accept a "std::string" for
6714         "allargs".
6715         * go32-nat.c (go32_create_inferior): Likewise.
6716         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
6717         * infcmd.c (run_command_1): Constify "exec_file".  Use
6718         "std::string" for inferior arguments.
6719         * inferior.h (fork_inferior): Update prototype.
6720         * linux-nat.c (linux_nat_create_inferior): Rewrite function
6721         prototype in order to constify "exec_file" and accept a
6722         "std::string" for "allargs".
6723         * nto-procfs.c (procfs_create_inferior): Likewise.
6724         * procfs.c (procfs_create_inferior): Likewise.
6725         * remote-sim.c (gdbsim_create_inferior): Likewise.
6726         * remote.c (extended_remote_run): Update code to accept
6727         "std::string" as argument.
6728         (extended_remote_create_inferior): Rewrite function prototype in
6729         order to constify "exec_file" and accept a "std::string" for
6730         "allargs".
6731         * rs6000-nat.c (super_create_inferior): Likewise.
6732         (rs6000_create_inferior): Likewise.
6733         * target.h (struct target_ops) <to_create_inferior>: Likewise.
6734         * windows-nat.c (windows_create_inferior): Likewise.
6735
6736 2017-04-11  Pedro Alves  <palves@redhat.com>
6737
6738         * thread.c: Fix whitespace throughout.
6739
6740 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
6741
6742         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
6743
6744 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
6745
6746         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
6747
6748 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
6749
6750         PR gdb/21364
6751         * osdata.c (info_osdata): Check if 'type' is an empty string
6752         instead of NULL.
6753
6754 2017-04-10  Pedro Alves  <palves@redhat.com>
6755
6756         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
6757         (ptid_to_global_thread_id, in_thread_list)
6758         (do_captured_list_thread_ids, set_resumed, set_running)
6759         (set_executing, set_stop_requested, finish_thread_state)
6760         (validate_registers_access, can_access_registers_ptid)
6761         (print_thread_info_1, switch_to_thread)
6762         (do_restore_current_thread_cleanup)
6763         (make_cleanup_restore_current_thread, thread_command)
6764         (thread_name_command): Use operator== instead of ptid_equal.
6765
6766 2017-04-10  Pedro Alves  <palves@redhat.com>
6767
6768         * thread.c (struct current_thread_cleanup) <next>: Delete field.
6769         (current_thread_cleanup_chain): Delete.
6770         (restore_current_thread_cleanup_dtor)
6771         (make_cleanup_restore_current_thread): Remove references to
6772         current_thread_cleanup_chain.
6773
6774 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
6775
6776         * msp430-tdep.c (msp430_pseudo_register_read): Never return
6777         REG_UNKNOWN.
6778
6779 2017-04-10  Yao Qi  <yao.qi@linaro.org>
6780
6781         PR gdb/19942
6782         * gdbthread.h (thread_info::deletable): New method.
6783         (thread_info::incref): New method.
6784         (thread_info::decref): New method.
6785         (thread_info::refcount): Move it to private.
6786         * infrun.c (save_stop_context): Call inc_refcount.
6787         (release_stop_context_cleanup): Likewise.
6788         * thread.c (set_thread_exited): New function.
6789         (init_thread_list): Delete "tp" only it is deletable, otherwise
6790         call set_thread_exited.
6791         (delete_thread_1): Call set_thread_exited.
6792         (current_thread_cleanup) <inferior_pid>: Remove.
6793         <thread>: New field.
6794         (restore_current_thread_ptid_changed): Removed.
6795         (do_restore_current_thread_cleanup): Adjust.
6796         (restore_current_thread_cleanup_dtor): Don't call
6797         find_thread_ptid.
6798         (set_thread_refcount): Use dec_refcount.
6799         (make_cleanup_restore_current_thread): Adjust.
6800         (thread_apply_all_command): Call inc_refcount.
6801         (_initialize_thread): Don't call
6802         observer_attach_thread_ptid_changed.
6803
6804 2017-04-10  Yao Qi  <yao.qi@linaro.org>
6805
6806         * thread.c (delete_thread_1): Hoist code on marking thread as
6807         exited.
6808
6809 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
6810
6811         * windows-nat.c (windows_detach): Initialize ptid with
6812         minus_one_ptid.
6813
6814 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
6815
6816         * unittests/ptid-selftests.c: Fix erroneous assert messages.
6817
6818 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
6819
6820         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
6821         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
6822         (bfin_pseudo_register_write): Likewise
6823
6824 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
6825
6826         * common/ptid.h (struct ptid): Change to...
6827         (class ptid_t): ... this.
6828         <ptid_t>: New constructors.
6829         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
6830         matches>: New methods.
6831         <make_null, make_minus_one>: New static methods.
6832         <pid>: Rename to...
6833         <m_pid>: ...this.
6834         <lwp>: Rename to...
6835         <m_lwp>: ...this.
6836         <tid>: Rename to...
6837         <m_tid>: ...this.
6838         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
6839         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
6840         as references, move comment to class ptid_t.
6841         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
6842         ptid_t static methods.
6843         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
6844         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
6845         Take ptid arguments as references, implement using ptid_t methods.
6846         * unittests/ptid-selftests.c: New file.
6847         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6848         unittests/ptid-selftests.c.
6849         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
6850
6851 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
6852
6853         * python/python.c (python_run_simple_file): Cast mode literal to
6854         non-const char pointer as expected by PyFile_FromString.
6855
6856 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
6857
6858         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
6859         minus_one_ptid and null_ptid.
6860
6861 2017-04-05  Pedro Alves  <palves@redhat.com>
6862
6863         * warning.m4 (build_warnings): Remove -Wno-write-strings.
6864         * configure: Regenerate.
6865
6866 2017-04-05  Pedro Alves  <palves@redhat.com>
6867
6868         * ada-exp.y (yyerror): Constify.
6869         * ada-lang.c (bound_name, get_selections)
6870         (ada_variant_discrim_type)
6871         (ada_variant_discrim_name, ada_value_struct_elt)
6872         (ada_lookup_struct_elt_type, is_unchecked_variant)
6873         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
6874         (catch_ada_exception_command_split)
6875         (catch_ada_assert_command_split, catch_assert_command)
6876         (ada_op_name): Constify.
6877         * ada-lang.h (ada_yyerror, get_selections)
6878         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
6879         * arc-tdep.c (arc_print_frame_cache): Constify.
6880         * arm-tdep.c (arm_skip_stub): Constify.
6881         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
6882         (gen_aggregate_elt_ref): Constify.
6883         * bcache.c (print_bcache_statistics): Constify.
6884         * bcache.h (print_bcache_statistics): Constify.
6885         * break-catch-throw.c (catch_exception_command_1):
6886         * breakpoint.c (struct ep_type_description::description):
6887         Constify.
6888         (add_solib_catchpoint): Constify.
6889         (catch_fork_command_1): Add cast.
6890         (add_catch_command): Constify.
6891         * breakpoint.h (add_catch_command, add_solib_catchpoint):
6892         Constify.
6893         * bsd-uthread.c (bsd_uthread_state): Constify.
6894         * buildsym.c (patch_subfile_names): Constify.
6895         * buildsym.h (next_symbol_text_func, patch_subfile_names):
6896         Constify.
6897         * c-exp.y (yyerror): Constify.
6898         (token::oper): Constify.
6899         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
6900         * c-varobj.c (cplus_describe_child): Constify.
6901         * charset.c (find_charset_names): Add cast.
6902         (find_charset_names): Constify array and add const_cast.
6903         * cli/cli-cmds.c (complete_command, cd_command): Constify.
6904         (edit_command): Constify.
6905         * cli/cli-decode.c (lookup_cmd): Constify.
6906         * cli/cli-dump.c (dump_memory_command, dump_value_command):
6907         Constify.
6908         (struct dump_context): Constify.
6909         (add_dump_command, restore_command): Constify.
6910         * cli/cli-script.c (get_command_line): Constify.
6911         * cli/cli-script.h (get_command_line): Constify.
6912         * cli/cli-utils.c (check_for_argument): Constify.
6913         * cli/cli-utils.h (check_for_argument): Constify.
6914         * coff-pe-read.c (struct read_pe_section_data): Constify.
6915         * command.h (lookup_cmd): Constify.
6916         * common/print-utils.c (decimal2str): Constify.
6917         * completer.c (gdb_print_filename): Constify.
6918         * corefile.c (set_gnutarget): Constify.
6919         * cp-name-parser.y (yyerror): Constify.
6920         * cp-valprint.c (cp_print_class_member): Constify.
6921         * cris-tdep.c (cris_register_name, crisv32_register_name):
6922         Constify.
6923         * d-exp.y (yyerror): Constify.
6924         (struct token::oper): Constify.
6925         * d-lang.h (d_yyerror): Constify.
6926         * dbxread.c (struct header_file_location::name): Constify.
6927         (add_old_header_file, add_new_header_file, last_function_name)
6928         (dbx_next_symbol_text, add_bincl_to_list)
6929         (find_corresponding_bincl_psymtab, set_namestring)
6930         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
6931         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
6932         * defs.h (command_line_input, print_address_symbolic)
6933         (deprecated_readline_begin_hook): Constify.
6934         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
6935         Constify.
6936         * event-top.c (handle_line_of_input): Constify and add cast.
6937         * exceptions.c (catch_errors): Constify.
6938         * exceptions.h (catch_errors): Constify.
6939         * expprint.c (print_subexp_standard, op_string, op_name)
6940         (op_name_standard, dump_raw_expression, dump_raw_expression):
6941         * expression.h (op_name, op_string, dump_raw_expression):
6942         Constify.
6943         * f-exp.y (yyerror): Constify.
6944         (struct token::oper): Constify.
6945         (struct f77_boolean_val::name): Constify.
6946         * f-lang.c (f_word_break_characters): Constify.
6947         * f-lang.h (f_yyerror): Constify.
6948         * fork-child.c (fork_inferior): Add cast.
6949         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
6950         (new_variant): Constify.
6951         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
6952         * gdbarch.c: Regenerate.
6953         * gdbcore.h (set_gnutarget): Constify.
6954         * go-exp.y (yyerror): Constify.
6955         (token::oper): Constify.
6956         * go-lang.h (go_yyerror): Constify.
6957         * go32-nat.c (go32_sysinfo): Constify.
6958         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
6959         * guile/scm-cmd.c (cmdscm_function): Constify.
6960         * guile/scm-param.c (pascm_param_value): Constify.
6961         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
6962         (h8300sx_register_name): Constify.
6963         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
6964         Constify.
6965         * ia64-tdep.c (ia64_register_names): Constify.
6966         * infcmd.c (construct_inferior_arguments): Constify.
6967         (path_command, attach_post_wait): Constify.
6968         * language.c (show_range_command, show_case_command)
6969         (unk_lang_error): Constify.
6970         * language.h (language_defn::la_error)
6971         (language_defn::la_name_of_this): Constify.
6972         * linespec.c (decode_line_2): Constify.
6973         * linux-thread-db.c (thread_db_err_str): Constify.
6974         * lm32-tdep.c (lm32_register_name): Constify.
6975         * m2-exp.y (yyerror): Constify.
6976         * m2-lang.h (m2_yyerror): Constify.
6977         * m32r-tdep.c (m32r_register_names): Constify and make static.
6978         * m68hc11-tdep.c (m68hc11_register_names): Constify.
6979         * m88k-tdep.c (m88k_register_name): Constify.
6980         * macroexp.c (appendmem): Constify.
6981         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
6982         (upgrade_type, parse_external, parse_partial_symbols)
6983         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
6984         (new_symbol): Constify.
6985         * memattr.c (mem_info_command): Constify.
6986         * mep-tdep.c (register_name_from_keyword): Constify.
6987         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
6988         Constify.
6989         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
6990         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
6991         * mi/mi-main.c (captured_mi_execute_command): Constify and add
6992         cast.
6993         (mi_execute_async_cli_command): Constify.
6994         * mips-tdep.c (mips_register_name): Constify.
6995         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
6996         (am33_register_name, am33_2_register_name)
6997         * moxie-tdep.c (moxie_register_names): Constify.
6998         * nat/linux-osdata.c (osdata_type): Constify fields.
6999         * nto-tdep.c (nto_parse_redirection): Constify.
7000         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
7001         (lookup_child_selector): Constify.
7002         (objc_methcall::name): Constify.
7003         * objc-lang.h (lookup_objc_class, lookup_child_selector)
7004         (lookup_struct_typedef): Constify.
7005         * objfiles.c (pc_in_section): Constify.
7006         * objfiles.h (pc_in_section): Constify.
7007         * p-exp.y (struct token::oper): Constify.
7008         (yyerror): Constify.
7009         * p-lang.h (pascal_yyerror): Constify.
7010         * parser-defs.h (op_name_standard): Constify.
7011         (op_print::string): Constify.
7012         (exp_descriptor::op_name): Constify.
7013         * printcmd.c (print_address_symbolic): Constify.
7014         * psymtab.c (print_partial_symbols): Constify.
7015         * python/py-breakpoint.c (stop_func): Constify.
7016         (bppy_get_expression): Constify.
7017         * python/py-cmd.c (cmdpy_completer::name): Constify.
7018         (cmdpy_function): Constify.
7019         * python/py-event.c (evpy_add_attribute)
7020         (gdbpy_initialize_event_generic): Constify.
7021         * python/py-event.h (evpy_add_attribute)
7022         (gdbpy_initialize_event_generic): Constify.
7023         * python/py-evts.c (add_new_registry): Constify.
7024         * python/py-finishbreakpoint.c (outofscope_func): Constify.
7025         * python/py-framefilter.c (get_py_iter_from_func): Constify.
7026         * python/py-inferior.c (get_buffer): Add cast.
7027         * python/py-param.c (parm_constant::name): Constify.
7028         * python/py-unwind.c (fprint_frame_id): Constify.
7029         * python/python.c (gdbpy_parameter_value): Constify.
7030         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
7031         * remote.c (memory_packet_config::name): Constify.
7032         (show_packet_config_cmd, remote_write_bytes)
7033         (remote_buffer_add_string):
7034         * reverse.c (exec_reverse_once): Constify.
7035         * rs6000-tdep.c (variant::name, variant::description): Constify.
7036         * rust-exp.y (rustyyerror): Constify.
7037         * rust-lang.c (rust_op_name): Constify.
7038         * rust-lang.h (rustyyerror): Constify.
7039         * serial.h (serial_ops::name): Constify.
7040         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
7041         (sh_sh3e_register_name, sh_sh2e_register_name)
7042         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
7043         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
7044         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
7045         (sh_sh4al_dsp_register_name): Constify.
7046         * sh64-tdep.c (sh64_register_name): Constify.
7047         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
7048         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
7049         * stabsread.c (patch_block_stabs, read_type_number)
7050         (ref_map::stabs, ref_add, process_reference)
7051         (symbol_reference_defined, define_symbol, define_symbol)
7052         (error_type, read_type, read_member_functions, read_cpp_abbrev)
7053         (read_one_struct_field, read_struct_fields, read_baseclasses)
7054         (read_tilde_fields, read_struct_type, read_array_type)
7055         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
7056         (read_huge_number, read_range_type, read_args, common_block_start)
7057         (find_name_end): Constify.
7058         * stabsread.h (common_block_start, define_symbol)
7059         (process_one_symbol, symbol_reference_defined, ref_add):
7060         * symfile.c (get_section_index, add_symbol_file_command):
7061         * symfile.h (get_section_index): Constify.
7062         * target-descriptions.c (tdesc_type::name): Constify.
7063         (tdesc_free_type): Add cast.
7064         * target.c (find_default_run_target):
7065         (add_deprecated_target_alias, find_default_run_target)
7066         (target_announce_detach): Constify.
7067         (do_option): Constify.
7068         * target.h (add_deprecated_target_alias): Constify.
7069         * thread.c (print_thread_info_1): Constify.
7070         * top.c (deprecated_readline_begin_hook, command_line_input):
7071         Constify.
7072         (init_main): Add casts.
7073         * top.h (handle_line_of_input): Constify.
7074         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
7075         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
7076         (tfind_command): Rename to ...
7077         (tfind_command_1): ... this and constify.
7078         (tfind_command): New function.
7079         (tfind_end_command, tfind_start_command): Adjust.
7080         (encode_source_string): Constify.
7081         * tracepoint.h (encode_source_string): Constify.
7082         * tui/tui-data.c (tui_partial_win_by_name): Constify.
7083         * tui/tui-data.h (tui_partial_win_by_name): Constify.
7084         * tui/tui-source.c (tui_set_source_content_nil): Constify.
7085         * tui/tui-source.h (tui_set_source_content_nil): Constify.
7086         * tui/tui-win.c (parse_scrolling_args): Constify.
7087         * tui/tui-windata.c (tui_erase_data_content): Constify.
7088         * tui/tui-windata.h (tui_erase_data_content): Constify.
7089         * tui/tui-winsource.c (tui_erase_source_content): Constify.
7090         * tui/tui.c (tui_enable): Add cast.
7091         * utils.c (defaulted_query): Constify.
7092         (init_page_info): Add cast.
7093         (puts_debug, subset_compare): Constify.
7094         * utils.h (subset_compare): Constify.
7095         * varobj.c (varobj_format_string): Constify.
7096         * varobj.h (varobj_format_string): Constify.
7097         * vax-tdep.c (vax_register_name): Constify.
7098         * windows-nat.c (windows_detach): Constify.
7099         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
7100         * xml-support.c (gdb_xml_end_element): Constify.
7101         * xml-tdesc.c (tdesc_start_reg): Constify.
7102         * xstormy16-tdep.c (xstormy16_register_name): Constify.
7103         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
7104         * xtensa-tdep.h (xtensa_register_t::name): Constify.
7105
7106 2017-04-05  Pedro Alves  <palves@redhat.com>
7107
7108         * proc-api.c (struct trans): Constify.
7109         (procfs_note): Constify.
7110         * proc-events.c (struct trans, syscall_table):
7111         * proc-flags.c (struct trans): Constify.
7112         * proc-utils.h (procfs_note): Constify.
7113         * proc-why.c (struct trans): Constify.
7114         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
7115         (procfs_detach): Constify.
7116         * sol-thread.c (struct string_map): Constify.
7117         (td_err_string, td_state_string): Constify.
7118
7119 2017-04-05  Pedro Alves  <palves@redhat.com>
7120
7121         * proc-api.c (procfs_filename): Don't initialize
7122         procfs_filename.
7123         (prepare_to_trace): Assume procfs_filename is non-NULL.
7124         (_initialize_proc_api): Give procfs_filename a default value here.
7125
7126 2017-04-05  Pedro Alves  <palves@redhat.com>
7127
7128         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
7129         'cond_string' parameter.
7130         (extract_exception_regexp): Constify 'string' parameter.
7131         (catch_exception_command_1): Constify.
7132         * breakpoint.c (init_catchpoint)
7133         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
7134         parameter.
7135         (ep_parse_optional_if_clause, catch_fork_command_1)
7136         (catch_exec_command_1): Constify.
7137         * breakpoint.h (init_catchpoint): Constify 'cond_string'
7138         parameter.
7139         (ep_parse_optional_if_clause): Constify.
7140         * cli/cli-utils.c (remove_trailing_whitespace)
7141         (check_for_argument): Constify.
7142         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
7143         non-const overload.
7144         (check_for_argument): Likewise.
7145
7146 2017-04-05  Pedro Alves  <palves@redhat.com>
7147
7148         * event-top.c (command_line_handler): Add cast to execute_command
7149         call.
7150         * record-btrace.c (cmd_record_btrace_bts_start)
7151         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
7152         (cmd_record_btrace_start): Add cast to execute_command call.
7153         * record-full.c (record_full_goto_insn):
7154         * record.c (record_start, record_stop): Add cast to
7155         execute_command_to_string calls.
7156         (cmd_record_start): Add cast to execute_command calls.
7157
7158 2017-04-05  Pedro Alves  <palves@redhat.com>
7159
7160         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
7161         static inline function.
7162         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
7163         array and use gdb_PyArg_ParseTupleAndKeywords.
7164         * python/py-cmd.c (cmdpy_init): Likewise.
7165         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
7166         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
7167         (infpy_search_memory): Likewise.
7168         * python/py-objfile.c (objfpy_add_separate_debug_file)
7169         (gdbpy_lookup_objfile): Likewise.
7170         * python/py-symbol.c (gdbpy_lookup_symbol)
7171         (gdbpy_lookup_global_symbol): Likewise.
7172         * python/py-type.c (gdbpy_lookup_type): Likewise.
7173         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
7174         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
7175         Likewise.
7176
7177 2017-04-05  Pedro Alves  <palves@redhat.com>
7178
7179         * python/python-internal.h (gdb_PyGetSetDef): New type.
7180         * python/py-block.c (block_object_getset)
7181         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
7182         * python/py-event.c (event_object_getset)
7183         (finish_breakpoint_object_getset): Likewise.
7184         * python/py-inferior.c (inferior_object_getset): Likewise.
7185         * python/py-infthread.c (thread_object_getset): Likewise.
7186         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
7187         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
7188         * python/py-objfile.c (objfile_getset): Likewise.
7189         * python/py-progspace.c (pspace_getset): Likewise.
7190         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
7191         Likewise.
7192         * python/py-record.c (recpy_record_getset): Likewise.
7193         * python/py-symbol.c (symbol_object_getset): Likewise.
7194         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
7195         Likewise.
7196         * python/py-type.c (type_object_getset, field_object_getset):
7197         Likewise.
7198         * python/py-value.c (value_object_getset): Likewise.
7199
7200 2017-04-05  Pedro Alves  <palves@redhat.com>
7201
7202         * python/python-internal.h (gdb_PyObject_CallMethod)
7203         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
7204         New functions.
7205         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
7206         (PySys_GetObject, PySys_SetPath): New macros.
7207
7208 2017-04-05  Pedro Alves  <palves@redhat.com>
7209
7210         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
7211         info_osdata_command.
7212         * osdata.c (info_osdata_command): Rename to ...
7213         (info_osdata): ... this.  Constify 'type' parameter, and remove
7214         the 'from_tty' parameter.  Accept NULL TYPE.
7215         (info_osdata_command): New function.
7216         * osdata.h (info_osdata_command): Remove declaration.
7217         (info_osdata): New declaration.
7218
7219 2017-04-05  Pedro Alves  <palves@redhat.com>
7220
7221         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
7222         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
7223         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
7224         parameter.
7225         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
7226         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
7227         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
7228         parameter.
7229         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
7230         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
7231         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
7232         (mi_cmd_file_list_exec_source_files)
7233         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
7234         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7235         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
7236         parameter.
7237         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
7238         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
7239         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
7240         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
7241         (mi_cmd_stack_info_frame): Constify 'command' parameter.
7242         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
7243         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
7244         'command' parameter.
7245         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
7246         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
7247         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
7248         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
7249         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
7250         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
7251         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
7252         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
7253         (mi_cmd_var_set_update_range): Constify 'command' parameter.
7254         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
7255         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
7256         parameter.
7257         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
7258         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
7259         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
7260         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
7261         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
7262         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
7263         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
7264         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
7265         (mi_cmd_data_list_changed_registers)
7266         (mi_cmd_data_write_register_values)
7267         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
7268         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
7269         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
7270         (mi_cmd_list_features, mi_cmd_list_target_features)
7271         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
7272         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
7273         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
7274         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
7275         (mi_cmd_trace_frame_collected): Constify 'command'
7276         parameter.
7277         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
7278         'command' parameter.
7279
7280 2017-04-05  Pedro Alves  <palves@redhat.com>
7281
7282         * ada-lang.c (ada_completer_word_break_characters): Now a const
7283         array.
7284         (ada_get_gdb_completer_word_break_characters): Constify.
7285         * completer.c (gdb_completer_command_word_break_characters)
7286         (gdb_completer_file_name_break_characters)
7287         (gdb_completer_quote_characters): Now const arrays.
7288         (get_gdb_completer_quote_characters): Constify.
7289         (set_rl_completer_word_break_characters): New function.
7290         (set_gdb_completion_word_break_characters)
7291         (complete_line_internal): Use it.
7292         * completer.h (get_gdb_completer_quote_characters): Constify.
7293         (set_rl_completer_word_break_characters): Declare.
7294         * f-lang.c (f_word_break_characters): Constify.
7295         * language.c (default_word_break_characters): Constify.
7296         * language.h (language_defn::la_word_break_characters): Constify.
7297         (default_word_break_characters): Constify.
7298         * top.c (init_main): Use set_rl_completer_word_break_characters.
7299
7300 2017-04-05  Pedro Alves  <palves@redhat.com>
7301
7302         * aix-thread.c (aix_thread_pid_to_str)
7303         (aix_thread_extra_thread_info): Constify.
7304         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
7305         * bsd-uthread.c (bsd_uthread_extra_thread_info)
7306         (bsd_uthread_pid_to_str): Constify.
7307         * corelow.c (core_pid_to_str): Constify.
7308         * darwin-nat.c (darwin_pid_to_str): Constify.
7309         * fbsd-nat.c (fbsd_pid_to_str): Constify.
7310         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
7311         Constify.
7312         * gnu-nat.c (gnu_pid_to_str): Constify.
7313         * go32-nat.c (go32_pid_to_str): Constify.
7314         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
7315         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
7316         * inferior.c (inferior_pid_to_str): Constify.
7317         * linux-nat.c (linux_nat_pid_to_str): Constify.
7318         * linux-tdep.c (linux_core_pid_to_str): Constify.
7319         * linux-thread-db.c (thread_db_pid_to_str)
7320         (thread_db_extra_thread_info): Constify.
7321         * nto-tdep.c (nto_extra_thread_info): Constify.
7322         * nto-tdep.h (nto_extra_thread_info): Constify.
7323         * obsd-nat.c (obsd_pid_to_str): Constify.
7324         * procfs.c (procfs_pid_to_str): Constify.
7325         * ravenscar-thread.c (ravenscar_extra_thread_info)
7326         (ravenscar_pid_to_str): Constify.
7327         * remote-sim.c (gdbsim_pid_to_str): Constify.
7328         * remote.c (remote_threads_extra_info, remote_pid_to_str):
7329         Constify.
7330         * sol-thread.c (solaris_pid_to_str): Constify.
7331         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
7332         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
7333         * target.c (default_pid_to_str, target_pid_to_str)
7334         (normal_pid_to_str, default_pid_to_str): Constify.
7335         * target.h (target_ops::to_pid_to_str)
7336         (target_ops::to_extra_thread_info): Constify.
7337         (target_pid_to_str, normal_pid_to_str): Constify.
7338         * windows-nat.c (windows_pid_to_str): Constify.
7339         * gdbarch.sh (core_pid_to_str): Constify.
7340         * target-delegates.c: Regenerate.
7341         * gdbarch.h, gdbarch.c: Regenerate.
7342
7343 2017-04-05  Pedro Alves  <palves@redhat.com>
7344
7345         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
7346         the memory of the temporary warning_pre_print override.
7347         * utils.c (warning_pre_print): Constify.
7348         * utils.h (warning_pre_print): Constify.
7349
7350 2017-04-05  Pedro Alves  <palves@redhat.com>
7351
7352         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
7353         (shell_command): New function.
7354         (make_command): Use std::string.
7355         (init_cli_cmds): Register shell_command instead of shell_escape.
7356
7357 2017-04-05  Pedro Alves  <palves@redhat.com>
7358
7359         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
7360         * tracepoint.c (default_collect): Don't initialize.
7361
7362 2017-04-05  Pedro Alves  <palves@redhat.com>
7363
7364         * macroexp.c (macro_buffer::shared): Now a bool.
7365         (init_buffer): Update.
7366         (init_shared_buffer): Constify 'addr' parameter.
7367         (substitute_args, expand, macro_expand, macro_expand_next): Remove
7368         casts.
7369
7370 2017-04-05  Pedro Alves  <palves@redhat.com>
7371
7372         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
7373         * disasm.c (set_disassembler_options): Constify local.
7374         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
7375
7376 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
7377
7378         PR gdb/21352
7379         * tracefile.c (tsave_command): Fix argument parsing for '-r'
7380         option.
7381
7382 2017-04-05  Yao Qi  <yao.qi@linaro.org>
7383
7384         * frame.c (frame_unwind_register_unsigned): Call
7385         frame_unwind_register_value.
7386
7387 2017-04-05  Yao Qi  <yao.qi@linaro.org>
7388
7389         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
7390         Use gdb_test_multiple, and don't match anchor.
7391
7392 2017-04-05  Pedro Alves  <palves@redhat.com>
7393
7394         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
7395         (Write After Approval): Remove Simon Marchi.
7396
7397 2017-04-05  Pedro Alves  <palves@redhat.com>
7398
7399         * common/gdb_optional.h (optional::optional): Make constexpr and
7400         initialize m_dummy.
7401
7402 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
7403
7404         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
7405         (amd64fbsd_jmp_buf_reg_offset): Remove.
7406         (amd64fbsd_supply_uthread): Remove function.
7407         (amd64fbsd_collect_uthread): Remove function.
7408         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
7409         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
7410         (x86_64-*-freebsd*): Remove bsd-uthread.o.
7411         (fbsd-nat.c): Update comment.
7412         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
7413         (i386fbsd_jmp_buf_reg_offset): Remove.
7414         (i386fbsd_supply_uthread): Remove function.
7415         (i386fbsd_collect_uthread): Remove function.
7416         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
7417
7418 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
7419
7420         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
7421         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
7422         * NEWS: Mention that support for FreeBSD/alpha was removed.
7423         * alpha-fbsd-tdep.c: Delete file.
7424         * config/alpha/fbsd.mh: Delete file.
7425         * configure.host: Delete alpha*-*-freebsd* and
7426         alpha*-*-kfreebsd*-gnu.
7427         * configure.tgt: Delete alpha*-*-freebsd* and
7428         alpha*-*-kfreebsd*-gnu.
7429
7430 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
7431
7432         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
7433         amd64bsd_store_inferior_registers): Use ptid from regcache.
7434
7435 2017-04-04  Pedro Alves  <palves@redhat.com>
7436
7437         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
7438         data fields, make them private and add "m_" prefixes.
7439         (lnp_state_machine::lnp_state_machine): New ctor.
7440         (record_line, check_line_address, handle_set_discriminator)
7441         (handle_set_address, handle_advance_pc, handle_special_opcode)
7442         (handle_advance_line, handle_set_file, handle_negate_stmt)
7443         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
7444         (end_sequence, advance_line): New methods.
7445         (m_gdbarch, m_record_lines_p): New fields.
7446         (lnp_reader_state): Delete.
7447         (dwarf_record_line): Rename to ...
7448         (lnp_state_machine::record_line): ... adjust.
7449         (init_lnp_state_machine): Delete.
7450         (lnp_state_machine::lnp_state_machine): New.
7451         (check_line_address): Rename to ...
7452         (lnp_state_machine::check_line_address): This.
7453         (dwarf_decode_lines_1): Remove reference to "reader_state".
7454         Adjust lnp_state_machine having a non-default ctor.  Use bool.
7455         State machine internal state manipulation moved to
7456         lnp_state_machine methods.
7457
7458 2017-04-04  Pedro Alves  <palves@redhat.com>
7459
7460         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7461         unittests/offset-type-selftests.c.
7462         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
7463         * common/offset-type.h: New file.
7464         * common/preprocessor.h: New file.
7465         * common/traits.h: New file.
7466         * common/valid-expr.h: New file.
7467         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
7468         sect_offset and cu_offset strong typedefs throughout.
7469         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
7470         typedefs throughout.
7471         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
7472         sect_offset and cu_offset strong typedefs throughout.
7473         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
7474         typedefs throughout.
7475         * gdbtypes.h: Include "common/offset-type.h".
7476         (cu_offset): Now an offset type (strong typedef) instead of a
7477         struct.
7478         (sect_offset): Likewise.
7479         (union call_site_parameter_u): Rename "param_offset" field to
7480         "param_cu_off".
7481         * unittests/offset-type-selftests.c: New file.
7482
7483 2017-04-04  Pedro Alves  <palves@redhat.com>
7484
7485         * common/underlying.h: New file.
7486         * dwarf2read.c: Include "common/gdb_optional.h" and
7487         "common/underlying.h".
7488         (dir_index, file_name_index): New types.
7489         (file_entry): Use them.
7490         (file_entry::include): Use to_underlying.
7491         (line_header::add_file_name): Use dir_index.
7492         (read_formatted_entries): Use gdb::optional.  Read form before
7493         writting to file_entry.
7494         (dwarf_decode_line_header): Use dir_index.
7495         (lnp_state_machine::current_file): Use to_underlying.
7496         (lnp_state_machine::file): Change type to file_name_index.
7497         (dwarf_record_line): Use to_underlying.
7498         (init_lnp_state_machine): Use file_name_index.
7499         (dwarf_decode_lines_1): Use dir_index and file_name_index.
7500
7501 2017-04-04  Pedro Alves  <palves@redhat.com>
7502
7503         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
7504         operator bool, has_value and get methods.
7505
7506 2017-04-04  Pedro Alves  <palves@redhat.com>
7507
7508         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
7509         fields.
7510         (line_header): Initialize all data fields.  Change type of
7511         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
7512         Change type of include_dirs to std::vector<const char *>.  Remove
7513         num_include_dirs, include_dirs_size.  Change type of file_names to
7514         std::vector<file_entry>.  Remove num_file_names, file_names_size.
7515         (line_header::line_header): New.
7516         (line_header::add_include_dir, line_header::add_file_name): New
7517         methods.
7518         (line_header::include_dir_at): Remove NULL check.
7519         (line_header::file_name_at): Add const overload.
7520         (line_header_up): New unique_ptr typedef.
7521         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
7522         std::vector.  Remove free_line_header call.
7523         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
7524         free_line_header call.
7525         (free_cu_line_header): Delete.
7526         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
7527         (setup_type_unit_groups): Use line_header_up instead of cleanups.
7528         Adjust to use std::vector.
7529         (free_line_header): Delete.
7530         (free_line_header_voidp): Use delete.
7531         (add_include_dir): Replace with ...
7532         (line_header::add_include_dir): ... this method.  Use std::vector.
7533         (add_file_name): Replace with ...
7534         (line_header::add_file_name): ... this method.  Use std::vector.
7535         (add_include_dir_stub): Delete.
7536         (read_formatted_entries): Remove memset.
7537         (dwarf_decode_line_header): Return a line_header_up instead of a
7538         raw pointer.  Remove cleanup handling.  Pass lambdas to
7539         read_formatted_entries.  Adjust to use line_header methods.
7540         (dwarf_decode_lines_1): Adjust to use line_header methods.
7541         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
7542         use std::vector.
7543
7544 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
7545
7546         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
7547         instead of struct ptid.
7548
7549 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
7550
7551         * frame.c (get_frame_register_bytes): Unwind using value.
7552         (put_frame_register_bytes): Likewise.
7553
7554 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
7555
7556         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
7557         aggregate-like.
7558
7559 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
7560
7561         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
7562
7563 2017-03-29  Yao Qi  <yao.qi@linaro.org>
7564
7565         * gdbthread.h (struct thread_info): Declare constructor and
7566         destructor.  Add some in-class member initializers.
7567         * thread.c (free_thread): Remove.
7568         (init_thread_list): Call delete instead of free_thread.
7569         (new_thread): Call thread_info constructor.
7570         (thread_info::thread_info): New function.
7571         (thread_info::~thread_info): New function.
7572         (delete_thread_1): Call delete instead of free_thread.
7573         (make_cleanup_restore_current_thread): Move tp and frame to
7574         inner block.
7575
7576 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
7577
7578         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
7579         (arc_skip_prologue): Likewise.
7580         (arc_make_frame_cache): Likewise.
7581         (arc_pv_get_operand): New function.
7582         (arc_is_in_prologue): Likewise.
7583         (arc_analyze_prologue): Likewise.
7584         (arc_print_frame_cache): Likewise.
7585         (MAX_PROLOGUE_LENGTH): New constant.
7586
7587 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
7588
7589         * configure.tgt: Add arc-insn.o.
7590         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
7591         (dump_arc_instruction_command): New function.
7592         (arc_fprintf_disasm): Likewise.
7593         (arc_disassemble_info): Likewise.
7594         (arc_insn_get_operand_value): Likewise.
7595         (arc_insn_get_operand_value_signed): Likewise.
7596         (arc_insn_get_memory_base_reg): Likewise.
7597         (arc_insn_get_memory_offset): Likewise.
7598         (arc_insn_get_branch_target): Likewise.
7599         (arc_insn_dump): Likewise.
7600         (arc_insn_get_linear_next_pc): Likewise.
7601         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
7602         (arc_disassemble_info): Likewise.
7603         (arc_insn_get_branch_target): Likewise.
7604         (arc_insn_get_linear_next_pc): Likewise.
7605         * NEWS: Mention new "maint print arc arc-instruction".
7606
7607 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
7608
7609         * arc-tdep (maintenance_print_arc_list): New variable.
7610         (maintenance_print_arc_command): New function.
7611
7612 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
7613
7614         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
7615         Add "limm" and "reserved".
7616         (arc_cannot_fetch_register, arc_cannot_store_register): Add
7617         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
7618         * arc-tdep.h (arc_regnum): Likewise.
7619
7620 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
7621
7622         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
7623         for THREADPTR register.
7624         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
7625         register.
7626         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
7627         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
7628         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
7629
7630 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
7631
7632         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
7633         registers above gdbarch_num_regs (gdbarch) as privileged in
7634         call0 ABI.
7635
7636 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
7637
7638         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
7639         for a single specified register or for all registers in
7640         a0_base..a0_base + C0_NREGS range.
7641         (supply_gregset_reg): Call regcache_raw_supply for a single
7642         specified register or for all registers in a0_base..a0_base +
7643         C0_NREGS range.
7644
7645 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
7646
7647         * arch/xtensa.h (C0_NREGS): Add definition.
7648         * xtensa-tdep.c (C0_NREGS): Remove definition.
7649
7650 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
7651
7652         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
7653         Drop xtensa_default_isa initialization.
7654         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
7655
7656 2017-03-27  Pedro Alves  <palves@redhat.com>
7657
7658         * dwarf2read.c (file_entry) <dir_index>: Add comment.
7659         (file_entry::include_dir): New method.
7660         (line_header::include_dir_at, line_header::file_name_at): New
7661         methods.
7662         (setup_type_unit_groups, setup_type_unit_groups)
7663         (psymtab_include_file_name): Simplify using the new methods.
7664         (lnp_state_machine) <the_line_header>: New field.
7665         <file>: Add comment.
7666         (lnp_state_machine::current_file): New method.
7667         (dwarf_record_line): Simplify using the new methods.
7668         (init_lnp_state_machine): Initialize the "the_line_header" field.
7669         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
7670         Simplify using the new methods.
7671
7672 2017-03-27  Pedro Alves  <palves@redhat.com>
7673
7674         * cp-name-parser.y (make_empty): Delete.
7675         (demangler_special, nested_name, ptr_operator, array_indicator)
7676         (direct_declarator, declarator_1): Use fill_comp instead of
7677         make_empty.
7678
7679 2017-03-27  Pedro Alves  <palves@redhat.com>
7680
7681         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
7682         to ATTRIBUTE_PRINTF.
7683         * solib-target.c (library_list_start_list): Print "string" not
7684         "version".
7685         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
7686         gdb_xml_error call.
7687
7688 2017-03-27  Pedro Alves  <palves@redhat.com>
7689
7690         * dwarf2read.c (struct file_and_directory): New.
7691         (dwarf2_get_dwz_file): Adjust to use std::string.
7692         (dw2_get_file_names_reader): Adjust to use file_and_directory.
7693         (find_file_and_directory): Adjust to return a file_and_directory
7694         object.
7695         (read_file_scope): Adjust to use file_and_directory.  Remove
7696         make_cleanup/do_cleanups calls.
7697         (open_and_init_dwp_file): Adjust to use std::string.  Remove
7698         make_cleanup/do_cleanups calls.
7699         * python/python.c (do_start_initialization): Adjust to ldirname
7700         returning a std::string.
7701         * utils.c (ldirname): Now returns a std::string.
7702         * utils.h (ldirname): Change return type to std::string.
7703         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
7704         returning a std::string.
7705         * xml-tdesc.c (file_read_description_xml): Likewise.
7706
7707 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
7708
7709         * regcache.c (regcache_debug_print_register): New function.
7710         * regcache.h (regcache_debug_print_register): New declaration.
7711         * target.c (debug_print_register): Remove.
7712         (target_fetch_registers): Call regcache_debug_print_register.
7713         (target_store_registers): Likewise.
7714
7715 2017-03-24  Pádraig Brady  <pbrady@fb.com>
7716
7717         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
7718         reference beyond the 'lh->include_dirs' array before accessing to
7719         it.
7720         (psymtab_include_file_name): Likewise.
7721         (dwarf_decode_lines_1): Likewise.
7722         (dwarf_decode_lines): Likewise.
7723         (file_file_name): Likewise.
7724
7725 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
7726
7727         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
7728         inferior_ptid.
7729         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
7730         ps_lsetfpregs): Likewise.
7731         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
7732         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
7733         ps_lsetfpregs): Likewise.
7734         * target.c (target_fetch_registers, target_store_registers):
7735         Remove asserts.
7736
7737 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
7738
7739         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
7740
7741 2017-03-23  Yao Qi  <yao.qi@linaro.org>
7742
7743         * aarch64-tdep.c (aarch64_process_record_test): Declare.
7744         (_initialize_aarch64_tdep): Register it.
7745         (aarch64_record_load_store): Handle PRFM instruction.
7746         (aarch64_process_record_test): New function.
7747
7748 2017-03-23  Yao Qi  <yao.qi@linaro.org>
7749
7750         * aarch64-tdep.c (aarch64_record_load_store): Fix code
7751         indentation.
7752
7753 2017-03-23  Yao Qi  <yao.qi@linaro.org>
7754
7755         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
7756
7757 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
7758
7759         python/python.c (do_start_initialization): Fix memory leak.
7760
7761 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
7762
7763         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
7764         using get_ptrace_pid.
7765         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
7766         inferior_ptid.
7767         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
7768         inferior_ptid instead of pid.
7769
7770 2017-03-22  Yao Qi  <yao.qi@linaro.org>
7771
7772         * aarch64-tdep.c: Wrap locally used classes in anonymous
7773         namespace.
7774         * arm-tdep.c: Likewise.
7775         * linespec.c: Likewise.
7776         * ui-out.c: Likewise.
7777
7778 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
7779
7780         PR gdb/19637
7781         * python/lib/gdb/printer/bound_registers.py: Import sys.
7782
7783 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
7784
7785         * windows-nat.c (do_windows_fetch_inferior_registers): Add
7786         windows_thread_info parameter and use it instead of
7787         current_thread.
7788         (windows_fetch_inferior_registers): Don't set current_thread,
7789         pass the thread to do_windows_fetch_inferior_registers.  Use
7790         ptid from regcache instead of inferior_ptid.
7791         (do_windows_store_inferior_registers): Add windows_thread_info
7792         parameter and use it instead of current_thread.
7793         (windows_store_inferior_registers): Don't set current_thread,
7794         pass the thread to do_windows_store_inferior_registers.  Use
7795         ptid from regcache instead of inferior_ptid.
7796
7797 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
7798
7799         * ser-mingw.c (ser_windows_raw): Remove reference to
7800         struct serial::current_timeout.
7801
7802 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
7803
7804         PR tdep/20928
7805         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
7806         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
7807         (sparc64_fsr_type): Fix %fsr decoding.
7808
7809 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
7810
7811         * python/py-record-btrace.c (btpy_insn_data): Change return type
7812         for Python 2.
7813
7814 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
7815
7816         * spu-linux-nat.c (spu_fetch_inferior_registers,
7817         spu_store_inferior_registers): Use ptid from regcache, set and
7818         restore inferior_ptid.
7819         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
7820         Likewise.
7821
7822 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
7823
7824         * i386-linux-nat.c (fetch_register, store_register,
7825         i386_linux_fetch_inferior_registers,
7826         i386_linux_store_inferior_registers): Use ptid from regcache.
7827         * ia64-linux-nat.c (ia64_linux_fetch_register,
7828         ia64_linux_store_register): Likewise.
7829         * inf-ptrace.c (inf_ptrace_fetch_register,
7830         inf_ptrace_store_register): Likewise.
7831         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
7832         m32r_linux_store_inferior_registers): Likewise.
7833         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
7834         m68kbsd_store_inferior_registers): Likewise.
7835         * m68k-linux-nat.c (fetch_register, store_register,
7836         m68k_linux_fetch_inferior_registers,
7837         m68k_linux_store_inferior_registers): Likewise.
7838         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
7839         m88kbsd_store_inferior_registers): Likewise.
7840         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
7841         mips_fbsd_store_inferior_registers): Likewise.
7842         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
7843         mips64_linux_regsets_store_registers): Likewise.
7844         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
7845         mipsnbsd_store_inferior_registers): Likewise.
7846         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
7847         mips64obsd_store_inferior_registers): Likewise.
7848         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
7849         Likewise.
7850         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
7851         ppcfbsd_store_inferior_registers): Likewise.
7852         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
7853         ppc_linux_store_inferior_registers): Likewise.
7854         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
7855         ppcnbsd_store_inferior_registers): Likewise.
7856         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
7857         ppcobsd_store_registers): Likewise.
7858         * procfs.c (procfs_fetch_registers, procfs_store_registers):
7859         Likewise.
7860         * ravenscar-thread.c (ravenscar_fetch_registers,
7861         ravenscar_store_registers, ravenscar_prepare_to_store):
7862         Likewise.
7863         * record-btrace.c (record_btrace_fetch_registers,
7864         record_btrace_store_registers, record_btrace_prepare_to_store):
7865         Likewise.
7866         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
7867         Lookup inferior using ptid from regcache, instead of
7868         current_inferior.
7869         * remote.c (remote_fetch_registers, remote_store_registers): Use
7870         ptid from regcache.
7871         * rs6000-nat.c (fetch_register, store_register): Likewise.
7872         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
7873         s390_linux_store_inferior_registers): Likewise.
7874         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
7875         shnbsd_store_inferior_registers): Likewise.
7876         * sol-thread.c (sol_thread_fetch_registers,
7877         sol_thread_store_registers): Likewise.
7878         * sparc-nat.c (sparc_fetch_inferior_registers,
7879         sparc_store_inferior_registers): Likewise.
7880         * tilegx-linux-nat.c (fetch_inferior_registers,
7881         store_inferior_registers): Likewise.
7882         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
7883         vaxbsd_store_inferior_registers): Likewise.
7884         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
7885         store_xtregs): Likewise.
7886
7887 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
7888
7889         PR gdb/14441
7890         * NEWS: Mention support for rvalue references in GDB and python.
7891         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
7892         supports both lvalue and rvalue references.
7893
7894 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
7895
7896         PR gdb/14441
7897         * gdbtypes.c (rank_one_type): Implement overloading
7898         resolution rules regarding rvalue references.
7899
7900 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
7901
7902         PR gdb/14441
7903         * aarch64-tdep.c (aarch64_type_align)
7904         (aarch64_extract_return_value, aarch64_store_return_value): Change
7905         lvalue reference type checks to general reference type checks.
7906         * amd64-tdep.c (amd64_classify): Likewise.
7907         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
7908         Likewise.
7909         * arm-tdep.c (arm_type_align, arm_extract_return_value)
7910         (arm_store_return_value): Likewise.
7911         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
7912         * c-typeprint.c (c_print_type): Likewise.
7913         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
7914         (cplus_number_of_children, cplus_describe_child): Likewise.
7915         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
7916         * completer.c (expression_completer): Likewise.
7917         * cp-support.c (make_symbol_overload_list_adl_namespace):
7918         Likewise.
7919         * darwin-nat-info.c (info_mach_region_command): Likewise.
7920         * dwarf2loc.c (entry_data_value_coerce_ref)
7921         (value_of_dwarf_reg_entry): Likewise.
7922         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
7923         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
7924         Likewise.
7925         * findvar.c (extract_typed_address, store_typed_address):
7926         Likewise.
7927         * gdbtypes.c (rank_one_type): Likewise.
7928         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
7929         * infcall.c (value_arg_coerce): Likewise.
7930         * language.c (pointer_type): Likewise.
7931         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
7932         Likewise.
7933         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
7934         * mn10300-tdep.c (mn10300_type_align): Likewise.
7935         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
7936         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
7937         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
7938         Likewise.
7939         * printcmd.c (print_formatted, x_command): Likewise.
7940         * python/py-type.c (typy_get_composite, typy_template_argument):
7941         Likewise.
7942         * python/py-value.c (valpy_referenced_value)
7943         (valpy_get_dynamic_type, value_has_field): Likewise.
7944         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
7945         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
7946         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
7947         * spu-tdep.c (spu_scalar_value_p): Likewise.
7948         * symtab.c (lookup_symbol_aux): Likewise.
7949         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
7950         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
7951         Likewise.
7952         * valops.c (value_cast_pointers, value_cast)
7953         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
7954         (value_struct_elt, value_struct_elt_bitpos)
7955         (value_find_oload_method_list, find_overload_match)
7956         (value_rtti_indirect_type): Likewise.
7957         * valprint.c (val_print_scalar_type_p, generic_val_print):
7958         Likewise.
7959         * value.c (value_actual_type, value_as_address, unpack_long)
7960         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
7961         (coerce_ref): Likewise.
7962         * varobj.c (varobj_get_value_type): Likewise.
7963
7964 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
7965
7966         PR gdb/14441
7967         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
7968         table of constants.
7969         * python/lib/gdb/command/explore.py: Support exploring values
7970         of rvalue reference types.
7971         * python/lib/gdb/types.py: Implement get_basic_type() for
7972         rvalue reference types.
7973         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
7974         constant.
7975         * python/py-value.c (valpy_getitem): Add an rvalue reference
7976         check.
7977         (valpy_reference_value): Add new parameter "refcode".
7978         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
7979         New wrappers for valpy_reference_value().
7980         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
7981         (gdbpy_invoke_xmethod): Likewise.
7982
7983 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
7984
7985         PR gdb/14441
7986         * dwarf2read.c (process_die, read_type_die_1): Handle the
7987         DW_TAG_rvalue_reference_type DIE.
7988         (read_tag_reference_type): Add new parameter "refcode".
7989
7990 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
7991
7992         PR gdb/14441
7993         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
7994         (c_type_print_modifier, c_type_print_varspec_suffix)
7995         (c_type_print_base): Support printing rvalue reference types.
7996         * c-valprint.c (c_val_print, c_value_print): Support printing
7997         rvalue reference values.
7998
7999 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8000
8001         PR gdb/14441
8002         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
8003         typename.
8004         * cp-support.c (replace_typedefs): Handle
8005         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
8006         * python/py-type.c (typy_lookup_type): Likewise.
8007
8008 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8009
8010         PR gdb/14441
8011         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
8012         * parse.c (insert_type): Change assert statement.
8013         (follow_types): Handle rvalue reference types.
8014         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
8015         constant.
8016
8017 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8018
8019         PR gdb/14441
8020         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
8021         value_ref() interface.
8022         * c-valprint.c (c_value_print): Likewise.
8023         * infcall.c (value_arg_coerce): Likewise.
8024         * python/py-value.c (valpy_reference_value): Likewise.
8025         * valops.c (value_cast, value_reinterpret_cast)
8026         (value_dynamic_cast, typecmp): Likewise.
8027         (value_ref): Parameterize by kind of return value reference type.
8028         * value.h (value_ref): Add new parameter "refcode".
8029
8030 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8031
8032         PR gdb/14441
8033         * dwarf2read.c (read_tag_reference_type): Use
8034         lookup_lvalue_reference_type() instead of lookup_reference_type().
8035         * eval.c (evaluate_subexp_standard): Likewise.
8036         * f-exp.y: Likewise.
8037         * gdbtypes.c (make_reference_type, lookup_reference_type):
8038         Generalize with rvalue reference types.
8039         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
8040         convenience wrappers for lookup_reference_type().
8041         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
8042         reference kind parameter.
8043         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
8044         wrappers for lookup_reference_type().
8045         * guile/scm-type.c (gdbscm_type_reference): Use
8046         lookup_lvalue_reference_type() instead of lookup_reference_type().
8047         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
8048         * parse.c (follow_types): Likewise.
8049         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
8050         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
8051         Likewise.
8052         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
8053         (gdbpy_invoke_xmethod): Likewise.
8054         * stabsread.c: Provide extra argument to make_reference_type()
8055         call.
8056         * valops.c (value_ref, value_rtti_indirect_type): Use
8057         lookup_lvalue_reference_type() instead of lookup_reference_type().
8058
8059 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8060
8061         PR gdb/14441
8062         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
8063         (TYPE_IS_REFERENCE): New macro.
8064         (struct type): Add rvalue_reference_type field.
8065         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
8066
8067 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
8068
8069         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
8070         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
8071         New function definition.
8072         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
8073         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
8074         New function declaration.
8075         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
8076         * mi/mi-interp.h: New file.
8077         * solib.c (info_sharedlibrary_command): Replace for loop with
8078         ALL_SO_LIBS macro
8079         * solib.h (update_solib_list): New function declaration.
8080         (so_list_head): Move macro.
8081         * solist.h (ALL_SO_LIBS): New macro.
8082
8083 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
8084
8085         * infcmd.c (post_create_inferior): Remove unused argument in
8086         call to solib_add.
8087         * remote.c (remote_start_remote): Likewise.
8088         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
8089         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
8090         (enable_break): Likewise.
8091         * solib.c (update_solib_list): Remove unused target argument
8092         and its documentation.
8093         (solib_add): Remove unused target argument.  Remove unused
8094         argument in call to update_solib_list.
8095         (info_sharedlibrary_command): Remove unused argument in call
8096         to update_solib_list.
8097         (sharedlibrary_command): Remove unused argument in call to
8098         solib_add.
8099         (handle_solib_event): Likewise.
8100         (reload_shared_libraries): Likewise.
8101         * solib.h (solib_add): Remove unused target argument.
8102
8103 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8104
8105         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
8106         (s390_displaced_step_fixup): Cover relative branches with the
8107         default fixup handling.  This fixes lack of support for some
8108         relative branch instructions.
8109
8110 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8111
8112         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
8113         ptid from regcache.
8114
8115 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8116
8117         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
8118         i386_darwin_store_inferior_registers): Use ptid from regcache.
8119
8120 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8121
8122         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
8123         i386bsd_store_inferior_registers): Use ptid from regcache.
8124
8125 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8126
8127         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
8128         hppaobsd_store_registers): Use ptid from regcache.
8129
8130 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8131
8132         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
8133         hppanbsd_store_registers): Use ptid from regcache.
8134
8135 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8136
8137         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
8138         from regcache.  Use get_ptrace_pid.
8139
8140 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8141
8142         * corelow.c (get_core_register_section): Use ptid from regcache,
8143         update doc.
8144
8145 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8146
8147         * bsd-uthread.c (bsd_uthread_fetch_registers,
8148         bsd_uthread_store_registers): Use ptid from regcache, set and
8149         restore inferior_ptid.
8150
8151 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8152
8153         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
8154         fetch_fp_regs, store_register, store_regs, store_fp_register,
8155         store_fp_regs): Use ptid from regcache.
8156
8157 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8158
8159         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
8160         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
8161         store_vfp_regs): Use ptid from regcache.
8162
8163 2017-03-17  Pedro Alves  <palves@redhat.com>
8164
8165         PR remote/21188
8166         * ser-base.c (ser_base_wait_for): Add comment.
8167         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
8168         version.
8169         * ser-unix.c (hardwire_raw): Remove reference to
8170         scb->current_timeout.
8171         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
8172         (hardwire_ops): Install ser_base_readchar instead of
8173         hardwire_readchar.
8174         * serial.h (struct serial) <current_timeout, timeout_remaining>:
8175         Remove fields.
8176
8177 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
8178
8179         PR gdb/19637
8180         * python/lib/gdb/printer/bound_registers.py: Add support for
8181         Python 3.
8182
8183 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8184
8185         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
8186         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
8187         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
8188         byte_offset to subobj_byte_offset.  Fix the handling of
8189         DWARF_VALUE_STACK on big-endian targets when coming via an
8190         implicit pointer.
8191         (dwarf2_evaluate_loc_desc): Adjust call to
8192         dwarf2_evaluate_loc_desc_full.
8193         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
8194         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
8195
8196 2017-03-16  Yao Qi  <yao.qi@linaro.org>
8197
8198         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
8199         and REVSH instructions.
8200
8201 2017-03-16  Yao Qi  <yao.qi@linaro.org>
8202
8203         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
8204         (arm_record_test): Declare.
8205         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
8206         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
8207         align with the manual.
8208         (thumb_record_misc): Adjust the code order to align with the
8209         manual.
8210         (thumb2_record_decode_insn_handler): Fix instruction matching.
8211         (instruction_reader_thumb): New class.
8212         (arm_record_test): New function.
8213
8214 2017-03-16  Yao Qi  <yao.qi@linaro.org>
8215
8216         * arm-tdep.c (abstract_memory_reader): New class.
8217         (instruction_reader): New class.
8218         (extract_arm_insn): Add argument 'reader'.  Callers updated.
8219         (decode_insn): Likewise.
8220
8221 2017-03-16  Doug Evans  <dje@google.com>
8222
8223         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
8224         member.  Change type of TYPE member to SCM.  All uses updated.
8225         (lsscm_make_lazy_string_smob): Add assert.
8226         (lsscm_make_lazy_string): Flag bad length values.
8227         (lsscm_elt_type): New function.
8228         (gdbscm_lazy_string_to_value): Rewrite to use
8229         lsscm_safe_lazy_string_to_value.
8230         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
8231         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
8232         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
8233         in incoming type.
8234         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
8235         * guile/scm-type.c (tyscm_scm_to_type): New function.
8236
8237 2017-03-15  Doug Evans  <dje@google.com>
8238
8239         PR python/17728, python/18439, python/18779
8240         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
8241         member.  Change type of TYPE member to PyObject *.  All uses updated.
8242         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
8243         (gdbpy_create_lazy_string_object): Flag bad length values.
8244         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
8245         Handle typedefs in incoming type.
8246         (stpy_lazy_string_elt_type): New function.
8247         (gdbpy_extract_lazy_string): Call it.
8248         * python/py-value.c (valpy_lazy_string): Flag bad length values.
8249         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
8250         typedefs in incoming type.
8251
8252 2017-03-16  Doug Evans  <dje@google.com>
8253
8254         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
8255         * guile/scm-type.c (tyscm_scm_to_type): New function.
8256
8257 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
8258
8259         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
8260         "ULONGEST" for "skip".
8261
8262 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8263
8264         PR gdb/21220
8265         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
8266         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
8267         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
8268         over ptrace peek/poke until end of buffer or error.
8269
8270 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
8271
8272         * parse.c (length_of_subexp): Make static.
8273         * parser-defs.h (length_of_subexp): Remove.
8274
8275 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8276
8277         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
8278         as well.
8279
8280 2017-03-14  Pedro Alves  <palves@redhat.com>
8281
8282         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
8283         (main): Use std::unique_ptr.  Remove calls to
8284         cp_demangled_name_parse_free.
8285
8286 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
8287
8288         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
8289         alphabsd_store_inferior_registers): Use regcache->ptid instead
8290         of inferior_ptid.
8291
8292 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
8293
8294         * aix-thread.c (aix_thread_fetch_registers,
8295         aix_thread_store_registers): Use regcache->ptid instead of
8296         inferior_ptid.
8297
8298 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
8299
8300         * aarch64-linux-nat.c (fetch_gregs_from_thread,
8301         store_gregs_to_thread, fetch_fpregs_from_thread,
8302         store_fpregs_to_thread): Use regcache->ptid instead of
8303         inferior_ptid.
8304
8305 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
8306
8307         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
8308         amd64_linux_fetch_inferior_registers): Use regcache->ptid
8309         instead of inferior_ptid.
8310
8311 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
8312
8313         * target.c (target_fetch_registers, target_store_registers): Add
8314         assert.
8315
8316 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
8317
8318         * regcache.h (regcache_get_ptid): New function.
8319         * regcache.c (regcache_get_ptid): New function.
8320
8321 2017-03-13  Mark Wielaard  <mark@klomp.org>
8322
8323         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
8324
8325 2017-03-10  Keith Seitz  <keiths@redhat.com>
8326
8327         PR c++/8218
8328         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
8329
8330 2017-03-08  Pedro Alves  <palves@redhat.com>
8331
8332         PR gdb/18360
8333         * infrun.c (start_step_over, do_target_resume, resume)
8334         (restart_threads): Assert we're not resuming a thread that is
8335         meant to be stopped.
8336         (infrun_thread_stop_requested_callback): Delete.
8337         (infrun_thread_stop_requested): If the thread is internally
8338         stopped, queue a pending stop event and clear the thread's
8339         inline-frame state.
8340         (handle_stop_requested): New function.
8341         (handle_syscall_event, handle_inferior_event_1): Use
8342         handle_stop_requested.
8343         (handle_stop_requested): New function.
8344         (handle_signal_stop): Set the thread's stop_signal here instead of
8345         at caller.
8346         (finish_step_over): Clear step over info unconditionally.
8347         (handle_signal_stop): If the user had interrupted the event
8348         thread, consider the stop a random signal.
8349         (handle_signal_stop) <signal arrived while stepping over
8350         breakpoint>: Don't restart threads here.
8351         (stop_waiting): Don't clear step-over info here.
8352
8353 2017-03-08  Pedro Alves  <palves@redhat.com>
8354
8355         PR 21206
8356         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
8357         goes to argument 2, not 1.
8358
8359 2017-03-08  Pedro Alves  <palves@redhat.com>
8360
8361         PR cli/21218
8362         * top.c (gdb_readline_wrapper): Avoid passing NULL to
8363         display_gdb_prompt.
8364         (command_line_input): Add comment.
8365
8366 2017-03-08  Pedro Alves  <palves@redhat.com>
8367
8368         PR tui/21216
8369         * tui/tui-file.c (tui_file::write): New.
8370         * tui/tui-file.h (tui_file): Override "write".
8371         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
8372         factored out from ...
8373         (tui_puts): ... here.
8374         (tui_putc): Use them.
8375         (tui_write): New function.
8376         * tui/tui-io.h (tui_write): Declare.
8377
8378 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8379
8380         * Makefile.in (SFILES): Replace "environ.c" with
8381         "common/environ.c".
8382         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
8383         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
8384         to...
8385         * common/environ.c: ... here.
8386         * environ.h: Moved to...
8387         * common/environ.h: ... here.
8388
8389 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
8390
8391         * gdbarch.sh (pstring_ptr): New static function.
8392         (gdbarch_disassembler_options): Use it.
8393         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
8394         not valid_disassembler_option->name.
8395         * gdbarch.c: Regenerate.
8396
8397 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
8398
8399         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
8400
8401 2017-03-07  Pedro Alves  <palves@redhat.com>
8402
8403         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
8404
8405 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
8406
8407         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
8408         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
8409         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
8410         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
8411
8412 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
8413
8414         * xtensa-linux-nat.c (fetch_gregs): Remove const.
8415
8416 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
8417
8418         * remote.c (remote_add_target_side_commands): Use range-based
8419         for loop.
8420
8421 2017-03-03  Yao Qi  <yao.qi@linaro.org>
8422
8423         PR gdb/21165
8424         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
8425         value is lazy.
8426         * valprint.c (common_val_print): Likewise.
8427
8428 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
8429
8430         * NEWS: Mention new set/show disassembler-options commands.
8431         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
8432         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
8433         (prospective_options): New static variable.
8434         (gdb_disassembler::gdb_disassembler): Initialize
8435         m_di.disassembler_options.
8436         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
8437         (get_disassembler_options): New function.
8438         (set_disassembler_options): Likewise.
8439         (set_disassembler_options_sfunc): Likewise.
8440         (show_disassembler_options_sfunc): Likewise.
8441         (disassembler_options_completer): Likewise.
8442         (_initialize_disasm): Likewise.
8443         * disasm.h (get_disassembler_options): New prototype.
8444         (set_disassembler_options): Likewise.
8445         * gdbarch.sh (gdbarch_disassembler_options): New variable.
8446         (gdbarch_verify_disassembler_options): Likewise.
8447         * gdbarch.c: Regenerate.
8448         * gdbarch.h: Likewise.
8449         * arm-tdep.c (num_disassembly_options): Delete.
8450         (set_disassembly_style): Likewise.
8451         (arm_disassembler_options): New static variable.
8452         (set_disassembly_style_sfunc): Convert short style name into long
8453         option name.  Call set_disassembler_options.
8454         (show_disassembly_style_sfunc): New function.
8455         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
8456         set_gdbarch_verify_disassembler_options.
8457         (_initialize_arm_tdep): Delete regnames variable and update callers.
8458         (arm_disassembler_options): Initialize.
8459         (disasm_options): New variable.
8460         (num_disassembly_options): Rename from this...
8461         (num_disassembly_styles): ...to this.  Compute by scanning through
8462         disasm_options.
8463         (valid_disassembly_styles): Initialize using disasm_options.
8464         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
8465         set_arm_regname_option.
8466         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
8467         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
8468         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
8469         set_gdbarch_verify_disassembler_options.
8470         * s390-tdep.c (s390_disassembler_options): New static variable.
8471         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
8472         set_gdbarch_verify_disassembler_options.
8473
8474 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
8475
8476         * remote.c (remote_add_target_side_condition): Remove "struct"
8477         keyword from range-based for loop.
8478
8479 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
8480
8481         * remote.c (remote_add_target_side_condition): Use range-based
8482         for loop.  Update comment.
8483
8484 2017-02-27  Yao Qi  <yao.qi@linaro.org>
8485
8486         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
8487
8488 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
8489
8490         * regcache.c (regcache_raw_update): New function.
8491         (regcache_raw_read): Move code to regcache_raw_update.
8492         * regcache.h (regcache_raw_update): New declaration.
8493         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
8494
8495 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
8496
8497         * dwarf2read.c (create_debug_type_hash_table): Initialize
8498         header.signature and header.type_offset_in_tu.
8499
8500 2017-02-24  Pedro Alves  <palves@redhat.com>
8501
8502         * symtab.c (make_file_symbol_completion_list_1): Use
8503         add_symtab_completions.
8504
8505 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
8506
8507         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
8508
8509 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
8510
8511         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
8512         I386_MAX_REGISTER_SIZE.
8513         (i386_pseudo_register_write): Likewise.
8514         (i386_process_record): Likewise.
8515         * i387-tdep.c (i387_supply_xsave): Likewise.
8516         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
8517         (store_register): Likewise.
8518
8519 2017-02-23  Pedro Alves  <palves@redhat.com>
8520
8521         * ada-lang.c: Include "common/function-view.h".
8522         (ada_iterate_over_symbols): Adjust to use function_view as
8523         callback type.
8524         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
8525         (ada_make_symbol_completion_list): Use a lambda.
8526         (ada_exc_search_name_matches): Delete.
8527         (name_matches_regex): New.
8528         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
8529         * compile/compile-c-support.c: Include "common/function-view.h".
8530         (print_one_macro): Change prototype to accept a ui_file pointer.
8531         (write_macro_definitions): Use a lambda.
8532         * dwarf2read.c: Include "common/function-view.h".
8533         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
8534         (dw2_expand_symtabs_matching): Adjust to use function_view as
8535         callback type.
8536         * language.h: Include "common/function-view.h".
8537         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
8538         function_view as callback type.
8539         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
8540         * linespec.c: Include "common/function-view.h".
8541         (collect_info::add_symbol): New method.
8542         (struct symbol_and_data_callback, iterate_inline_only, struct
8543         symbol_matcher_data, iterate_name_matcher): Delete.
8544         (iterate_over_all_matching_symtabs): Adjust to use function_view
8545         as callback type and lambdas.
8546         (iterate_over_file_blocks): Adjust to use function_view as
8547         callback type.
8548         (decode_compound_collector): Now a class with private fields.
8549         (decode_compound_collector::release_symbols): New method.
8550         (collect_one_symbol): Rename to...
8551         (decode_compound_collector::operator()): ... this and adjust.
8552         (lookup_prefix_sym): decode_compound_collector construction bits
8553         move to decode_compound_collector ctor.  Pass the
8554         decode_compound_collector object directly as callback.  Remove
8555         cleanups and use decode_compound_collector::release_symbols
8556         instead.
8557         (symtab_collector): Now a class with private fields.
8558         (symtab_collector::release_symtabs): New method.
8559         (add_symtabs_to_list): Rename to...
8560         (symtab_collector::operator()): ... this and adjust.
8561         (collect_symtabs_from_filename): symtab_collector construction
8562         bits move to symtab_collector ctor.  Pass the symtab_collector
8563         object directly as callback.  Remove cleanups and use
8564         symtab_collector::release_symtabs instead.
8565         (collect_symbols): Delete.
8566         (add_matching_symbols_to_info): Use lambdas.
8567         * macrocmd.c (print_macro_callback): Delete.
8568         (info_macro_command): Use a lambda.
8569         (info_macros_command): Pass print_macro_definition as callable
8570         directly.
8571         (print_one_macro): Remove 'ignore' parameter.
8572         (macro_list_command): Adjust.
8573         * macrotab.c (macro_for_each_data::fn): Now a function_view.
8574         (macro_for_each_data::user_data): Delete field.
8575         (foreach_macro): Adjust to call the function_view.
8576         (macro_for_each): Adjust to use function_view as callback type.
8577         (foreach_macro_in_scope): Adjust to call the function_view.
8578         (macro_for_each_in_scope): Adjust to use function_view as callback
8579         type.
8580         * macrotab.h: Include "common/function-view.h".
8581         (macro_callback_fn): Declare a prototype instead of a pointer.
8582         Remove "user_data" parameter.
8583         (macro_for_each, macro_for_each_in_scope): Adjust to use
8584         function_view as callback type.
8585         * psymtab.c (partial_map_expand_apply)
8586         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
8587         Adjust to use function_view as callback type and to return bool.
8588         (psym_expand_symtabs_matching): Adjust to use function_view as
8589         callback types.
8590         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
8591         to use function_view as callback type and to return bool.
8592         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
8593         callback types.
8594         * symfile.c (expand_symtabs_matching): Adjust to use function_view
8595         as callback types.
8596         * symfile.h: Include "common/function-view.h".
8597         (expand_symtabs_file_matcher_ftype)
8598         (expand_symtabs_symbol_matcher_ftype)
8599         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
8600         return bool.
8601         (quick_symbol_functions::map_symtabs_matching_filename)
8602         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
8603         function_view as callback type and return bool.
8604         (expand_symtabs_matching): Adjust to use function_view as callback
8605         type.
8606         (maintenance_expand_name_matcher)
8607         (maintenance_expand_file_matcher): Delete.
8608         (maintenance_expand_symtabs): Use lambdas.
8609         * symtab.c (iterate_over_some_symtabs): Adjust to use
8610         function_view as callback types and return bool.
8611         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
8612         of a cleanup.
8613         (lookup_symtab_callback): Delete.
8614         (lookup_symtab): Use a lambda.
8615         (iterate_over_symbols): Adjust to use function_view as callback
8616         type.
8617         (struct search_symbols_data, search_symbols_file_matches)
8618         (search_symbols_name_matches): Delete.
8619         (search_symbols): Use a pair of lambdas.
8620         (struct add_name_data, add_macro_name, symbol_completion_matcher)
8621         (symtab_expansion_callback): Delete.
8622         (default_make_symbol_completion_list_break_on_1): Use lambdas.
8623         * symtab.h: Include "common/function-view.h".
8624         (iterate_over_some_symtabs): Adjust to use function_view as
8625         callback type and return bool.
8626         (iterate_over_symtabs): Adjust to use function_view as callback
8627         type.
8628         (symbol_found_callback_ftype): Remove 'data' parameter and return
8629         bool.
8630         (iterate_over_symbols): Adjust to use function_view as callback
8631         type.
8632
8633 2017-02-23  Pedro Alves  <palves@redhat.com>
8634
8635         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
8636         (%.o) <unittests/%.c>: New pattern.
8637         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
8638         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
8639         * common/function-view.h: New file.
8640         * unittests/function-view-selftests.c: New file.
8641         * configure: Regenerate.
8642
8643 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
8644
8645         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
8646         inferior_ptid.
8647         * go32-nat.c (go32_thread_alive): Likewise.
8648
8649 2017-02-23  Yao Qi  <yao.qi@linaro.org>
8650
8651         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
8652         delete.
8653
8654 2017-02-23  Yao Qi  <yao.qi@linaro.org>
8655
8656         * varobj.c (varobj_clear_saved_item): Use delete instead of
8657         xfree.
8658         (update_dynamic_varobj_children): Likewise.
8659
8660 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
8661
8662         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
8663
8664 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
8665
8666         * common/enum-flags.h (enum_flags::enum_flags): Initialize
8667         m_enum_value to 0 in default constructor.
8668
8669 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
8670
8671         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
8672         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
8673         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
8674         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
8675         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
8676         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
8677         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
8678         IS_STORE_CONDITIONAL_INSN.
8679
8680 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
8681
8682         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
8683
8684 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
8685
8686         * NEWS (Changes since GDB 7.12): Add DWARF-5.
8687
8688 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
8689
8690         * dwarf2read.c (skip_one_die, read_attribute_value)
8691         (dwarf2_const_value_attr, dump_die_shallow)
8692         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8693         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
8694
8695 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
8696
8697         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
8698         (dwarf_parse_macro_header): Accept DWARF version 5.
8699         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
8700
8701 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
8702
8703         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
8704         DW_AT_GNU_*.
8705         * common/common-exceptions.h (enum errors): Likewise.
8706         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
8707         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
8708         (dwarf_expr_context::execute_stack_op): Likewise.
8709         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
8710         Likewise.
8711         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
8712         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
8713         (show_entry_values_debug, call_site_to_target_addr)
8714         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
8715         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
8716         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
8717         (value_of_dwarf_block_entry, indirect_pieced_value)
8718         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
8719         (disassemble_dwarf_expression): Likewise.
8720         * dwarf2read.c (process_die, inherit_abstract_dies)
8721         (read_call_site_scope): Likewise.
8722         * gdbtypes.h (struct func_type, struct call_site_parameter)
8723         (struct call_site): Likewise.
8724         * stack.c (read_frame_arg): Likewise.
8725         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
8726
8727 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
8728
8729         * defs.h (read_unsigned_leb128): New declaration.
8730         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
8731         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
8732         (dwarf2_find_location_expression): Call also
8733         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
8734         * dwarf2loc.h (dwarf2_version): New declaration.
8735         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
8736         rnglists.
8737         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
8738         .debug_rnglists.
8739         (struct dwop_section_names): Add loclists_dwo.
8740         (dwop_section_names): Add .debug_loclists.dwo.
8741         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
8742         (struct dwarf2_per_cu_data): Add dwarf_version.
8743         (struct dwo_sections): Add loclists.
8744         (struct attr_abbrev): Add implicit_const.
8745         (read_indirect_line_string): New declaration.
8746         (read_unsigned_leb128): Delete declaration.
8747         (rcuh_kind): New definition.
8748         (read_and_check_comp_unit_head): Change parameter
8749         is_debug_types_section to section_kind.
8750         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
8751         (read_comp_unit_head): Change parameter abfd to section, add parameter
8752         section_kind.  Handle DWARF-5.
8753         (error_check_comp_unit_head): Accept also DWARF version 5.
8754         (read_and_check_comp_unit_head): Change parameter
8755         is_debug_types_section to section_kind.
8756         (read_and_check_type_unit_head): Delete function.
8757         (read_abbrev_offset): Handle DWARF-5.
8758         (create_debug_type_hash_table): Add parameter section_kind.  Process
8759         only DW_UT_type.  Use signature and type_offset_in_tu from struct
8760         comp_unit_head.
8761         (create_debug_types_hash_table): Update create_debug_type_hash_table
8762         caller.
8763         (create_all_type_units): Call create_debug_type_hash_table.
8764         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
8765         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
8766         caller.
8767         (skip_one_die): Handle DW_FORM_implicit_const.
8768         (dwarf2_rnglists_process): New function.
8769         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
8770         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
8771         (read_attribute_value): Handle DW_FORM_implicit_const,
8772         DW_FORM_line_strp.
8773         (read_attribute): Handle DW_FORM_implicit_const.
8774         (read_indirect_string_at_offset_from): New function from
8775         read_indirect_string_at_offset.
8776         (read_indirect_string_at_offset): Call
8777         read_indirect_string_at_offset_from.
8778         (read_indirect_line_string_at_offset): New function.
8779         (read_indirect_string): New function comment.
8780         (read_indirect_line_string): New function.
8781         (read_unsigned_leb128): Make it global.
8782         (dwarf2_string_attr): Handle DWARF-5.
8783         (add_include_dir_stub, read_formatted_entries): New functions.
8784         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
8785         Handle DWARF-5.
8786         (per_cu_header_read_in): Update read_comp_unit_head caller.
8787         (dwarf2_version): New function.
8788         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
8789         rnglists.
8790         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
8791         fields.
8792
8793 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
8794
8795         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
8796
8797 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
8798
8799         * dwarf2read.c (dwarf2_ranges_process): New function from
8800         dwarf2_ranges_read.
8801         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
8802         dwarf2_ranges_process.
8803
8804 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
8805
8806         * dwarf2read.c (create_debug_type_hash_table): New function from
8807         create_debug_types_hash_table.
8808         (create_debug_types_hash_table): Call create_debug_type_hash_table.
8809         (create_all_type_units, open_and_init_dwo_file): Update
8810         create_debug_types_hash_table callers.
8811
8812 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8813
8814         PR gdb/16188
8815         * fork-child.c (trace_start_error): Fix thinko.  va_end should
8816         refer to 'ap', not 'args'.
8817
8818 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8819             Pedro Alves  <palves@redhat.com>
8820
8821         PR gdb/16188
8822         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
8823         calls succeeded.
8824         * fork-child.c (trace_start_error): New function.
8825         (trace_start_error_with_name): Likewise.
8826         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
8827         * inf-ptrace.c (inf_ptrace_me): Likewise.
8828         * inferior.h (trace_start_error): New prototype.
8829         (trace_start_error_with_name): Likewise.
8830
8831 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
8832
8833         PR gdb/21164
8834         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
8835         NULL before using it.
8836         * symmisc.c (maintenance_print_symbols): Likewise.
8837         (maintenance_print_msymbols): Likewise.
8838
8839 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
8840
8841         * NEWS: Add record Python bindings entry.
8842
8843 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
8844
8845         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
8846         py-record-full.o.
8847         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
8848         * python/py-record-btrace.c, python/py-record-btrace.h,
8849         python/py-record-full.c, python/py-record-full.h: New file.
8850         * python/py-record.c: Add include for py-record-btrace.h and
8851         py-record-full.h.
8852         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
8853         recpy_instruction_history, recpy_function_call_history, recpy_begin,
8854         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
8855         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
8856         New definition.
8857         (gdbpy_initialize_btrace): New export.
8858         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
8859
8860 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
8861
8862         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
8863         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
8864         * python/py-record.c: New file.
8865         * python/python-internal.h (gdbpy_start_recording,
8866         gdbpy_current_recording, gdpy_stop_recording,
8867         gdbpy_initialize_record): New export.
8868         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
8869         (python_GdbMethods): Add gdbpy_start_recording,
8870         gdbpy_current_recording and gdbpy_stop_recording.
8871
8872 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
8873
8874         * record-btrace.c (record_btrace_record_method): New function.
8875         (init_record_btrace_ops): Initialize to_record_method.
8876         * record-full.c (record_full_record_method): New function.
8877         (init_record_full_ops, init_record_full_core_ops): Add
8878         record_full_record_method.
8879         * record.h (enum record_method): New enum.
8880         * target-debug.h (target_debug_print_enum_record_method: New define.
8881         * target-delegates.c: Regenerate.
8882         * target.c (target_record_method): New function.
8883         * target.h: Include record.h.
8884         (struct target_ops) <to_record_method>: New field.
8885         (target_record_method): New export.
8886
8887 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
8888
8889         * record.h (record_start, record_stop): New export.
8890         * record.c (record_start, record_stop): New function.
8891
8892 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
8893
8894         * btrace.c (btrace_fetch): Copy function call segments pointer
8895         into a vector.
8896         (btrace_clear): Clear the vector.
8897         (btrace_find_insn_by_number): Use binary search to find the correct
8898         function call segment.
8899         * btrace.h (brace_fun_p): New typedef.
8900         (struct btrace_thread_info) <functions>: New field.
8901
8902 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
8903
8904         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
8905         * btrace.c (btrace_decode_error): ... here.  New function.
8906         * btrace.h (btrace_decode_error): New export.
8907
8908 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
8909
8910         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
8911         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
8912         btrace_find_insn_by_number): Remove special case for gaps.
8913         * btrace.h (btrace_insn_get_error): New export.
8914         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
8915         * record-btrace.c (btrace_insn_history): Print number for gaps.
8916         (record_btrace_info, record_btrace_goto): Handle gaps.
8917
8918 2017-02-14  Tom Tromey  <tom@tromey.com>
8919
8920         PR python/13598:
8921         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
8922         event.
8923         * python/py-evts.c (gdbpy_initialize_py_events): Add
8924         before_prompt registry.
8925         * python/py-events.h (events_object) <before_prompt>: New field.
8926
8927 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
8928
8929         * btrace.c (ftrace_new_switch): Preserve up link and flags.
8930
8931 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
8932
8933         * symfile (_initialize_symfile): Add usage text to the load command's
8934         help text.
8935
8936 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
8937
8938         * utils.c (defaulted_query): Don't query on secondary UIs.
8939
8940 2017-02-10  Tom Tromey  <tom@tromey.com>
8941
8942         * rust-lang.c (rust_get_disr_info): Remove unused variable.
8943
8944 2017-02-10  Tom Tromey  <tom@tromey.com>
8945
8946         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
8947         "cleanup" local.
8948         * python/py-type.c (typy_legacy_template_argument): Remove
8949         unnecessary "cleanup" local.
8950
8951 2017-02-10  Tom Tromey  <tom@tromey.com>
8952
8953         * python/python.c (do_start_initialization): New function, from
8954         _initialize_python.
8955         (_initialize_python): Call do_start_initialization.
8956         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
8957         goto.
8958
8959 2017-02-10  Tom Tromey  <tom@tromey.com>
8960
8961         * python/py-prettyprint.c (pretty_print_one_value): Use
8962         gdbpy_ref.
8963
8964 2017-02-10  Tom Tromey  <tom@tromey.com>
8965
8966         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
8967         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
8968         gdbpy_ref.
8969         * python/py-type.c (field_new): Use gdbpy_ref.
8970         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
8971         gdbpy_ref.
8972         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
8973         (py_free_pspace): Likewise.
8974         (pspace_to_pspace_object): Likewise.
8975         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
8976         (py_free_objfile): Likewise.
8977         (objfile_to_objfile_object): Likewise.
8978         * python/py-inferior.c (delete_thread_object): Use
8979         gdbpy_ref.
8980         (infpy_read_memory): Likewise.
8981         (py_free_inferior): Likewise.
8982         * python/py-evtregistry.c (create_eventregistry_object): Use
8983         gdbpy_ref.
8984         * python/py-event.c (create_event_object): Use gdbpy_ref.
8985
8986 2017-02-10  Tom Tromey  <tom@tromey.com>
8987
8988         * python/py-ref.h (gdbpy_ref_policy): Now a template.
8989         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
8990         used.
8991         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
8992         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
8993         python/py-exitedevent.c, python/py-finishbreakpoint.c,
8994         python/py-framefilter.c, python/py-function.c,
8995         python/py-inferior.c, python/py-infevents.c,
8996         python/py-linetable.c, python/py-newobjfileevent.c,
8997         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
8998         python/py-signalevent.c, python/py-stopevent.c,
8999         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
9000         python/py-unwind.c, python/py-utils.c, python/py-value.c,
9001         python/py-varobj.c, python/py-xmethods.c, python/python.c,
9002         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
9003
9004 2017-02-10  Tom Tromey  <tom@tromey.com>
9005
9006         * ui-out.h (ui_out_emit_type): New class.
9007         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
9008         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
9009         and ui_out_emit_tuple.
9010         (enumerate_locals): Likewise.
9011         (py_mi_print_variables, py_print_locals, py_print_args): Use
9012         ui_out_emit_list.
9013         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
9014         ui_out_emit_list.
9015         * common/gdb_optional.h: New file.
9016
9017 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
9018
9019         * MAINTAINERS (Write After Approval): Update my e-mail address.
9020
9021 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
9022
9023         PR gdb/21122
9024         * breakpoint.c (_initialize_breakpoint): Update the help description
9025         of the 'commands' command to indicate that it takes a list argument.
9026
9027 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
9028
9029         * interps.c (current_interp_set_logging): Remove "return".
9030
9031 2017-02-09  Gary Benson  <gbenson@redhat.com>
9032
9033         * symtab.c (add_symtab_completions): Prevent NULL pointer
9034         dereference.
9035
9036 2017-02-08  Pedro Alves  <palves@redhat.com>
9037
9038         * interps.c (interp::interp): Remove reference to quiet_p.
9039         (interp_set): Make static.  Remove dead "Switching to" output
9040         code.
9041         (interp_quiet_p, interp_set_quiet): Delete.
9042         (interpreter_exec_cmd): Don't set the interpreter quiet.
9043         * interps.h (interp_quiet_p): Make static.
9044         (class interp) <quiet_p>: Remove field
9045
9046 2017-02-08  Jerome Guitton  <guitton@adacore.com>
9047
9048         * cli/cli-decode.c (find_command_name_length): Make it extern.
9049         * cli/cli-decode.h (find_command_name_length): Declare.
9050         * cli/cli-script.c (command_name_equals, line_first_arg):
9051         New functions.
9052         (process_next_line): Use cli-decode to parse command names.
9053         (build_command_line): Make args a constant pointer.
9054
9055 2017-02-08  Jerome Guitton  <guitton@adacore.com>
9056
9057         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
9058         Remove case-insensitive search.
9059
9060 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
9061
9062         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
9063         at the end of the line.  Avoids an ARI warning.
9064
9065 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
9066
9067         * NEWS: Mention support for record/replay of Intel 64 rdrand and
9068         rdseed instructions.
9069         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
9070
9071 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
9072
9073         PR tdep/20936
9074         Provide and use sparc32 and sparc64 target description XML files.
9075         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
9076         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
9077         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
9078         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
9079         * features/sparc/sparc32-solaris.xml: New file.
9080         * features/sparc/sparc64-solaris.xml: New file.
9081         * features/sparc/sparc32-solaris.c: Generated.
9082         * features/sparc/sparc64-solaris.c: Generated.
9083         * sparc-tdep.h: Account for differences in target descriptions.
9084         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
9085         (sparc32_register_type): Use target provided registers.
9086         (validate_tdesc_registers): New function.
9087         (sparc32_gdbarch_init): Use tdesc_has_registers.
9088         Set pseudoregister functions.
9089         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
9090         (sparc64_register_type): Use target provided registers.
9091         (sparc64_init_abi): Set pseudoregister functions.
9092
9093 2017-02-03  Tom Tromey  <tom@tromey.com>
9094
9095         PR rust/21097:
9096         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
9097         with a single member.
9098
9099 2017-02-03  Pedro Alves  <palves@redhat.com>
9100
9101         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
9102         (cli_interp_base::~cli_interp_base): New.
9103         (cli_interp): New struct.
9104         (as_cli_interp): Cast the interp itself to cli_interp.
9105         (cli_interpreter_pre_command_loop): Rename to ...
9106         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
9107         parameter.
9108         (cli_interpreter_init): Rename to ...
9109         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
9110         boolean.  Make extern.
9111         (cli_interpreter_resume): Rename to ...
9112         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
9113         extern.
9114         (cli_interpreter_suspend): Rename to ...
9115         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
9116         extern.
9117         (cli_interpreter_exec): Rename to ...
9118         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
9119         extern.
9120         (cli_interpreter_supports_command_editing): Rename to ...
9121         (cli_interp_base::supports_command_editing): ... this.  Remove
9122         'interp' parameter.  Make extern.
9123         (cli_ui_out): Rename to ...
9124         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
9125         Make extern.
9126         (cli_set_logging): Rename to ...
9127         (cli_interp_base::set_logging): ... this.  Remove 'interp'
9128         parameter.  Make extern.
9129         (cli_interp_procs): Delete.
9130         (cli_interp_factory): Adjust to use "new".
9131         * cli/cli-interp.h: Include "interps.h".
9132         (struct cli_interp_base): New struct.
9133         * interps.c (struct interp): Delete.  Fields moved to interps.h.
9134         (interp_new): Delete.
9135         (interp::interp, interp::~interp): New.
9136         (interp_set): Use bool, and return void.  Assume the interpreter
9137         has suspend, init and resume methods, and that the all return
9138         void.
9139         (set_top_level_interpreter): interp_set returns void.
9140         (interp_ui_out): Adapt.
9141         (current_interp_set_logging): Adapt.
9142         (interp_data): Delete.
9143         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
9144         (interp_exec): Adapt.
9145         (top_level_interpreter_data): Delete.
9146         * interps.h (interp_init_ftype, interp_resume_ftype)
9147         (interp_suspend_ftype, interp_exec_ftype)
9148         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
9149         (class interp): New.
9150         (interp_new): Delete.
9151         (interp_set): Now returns void.  Use bool.
9152         (interp_data, top_level_interpreter_data): Delete.
9153         * mi/mi-common.h: Include interps.h.
9154         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
9155         init, resume, suspect, exec, interp_ui_out, set_logging and
9156         pre_command_loop methods.
9157         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
9158         (mi_interpreter_init): Rename to ...
9159         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
9160         bool, return void and make extern.  Adjust.
9161         (mi_interpreter_resume): ... Rename to ...
9162         (mi_interp::resume): ... this.  Remove the 'data' parameter,
9163         return void and make extern.  Adjust.
9164         (mi_interpreter_suspend): ... Rename to ...
9165         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
9166         return void and make extern.  Adjust.
9167         (mi_interpreter_exec): ... Rename to ...
9168         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
9169         extern.  Adjust.
9170         (mi_interpreter_pre_command_loop): ... Rename to ...
9171         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
9172         parameter and make extern.
9173         (mi_on_normal_stop_1): Adjust.
9174         (mi_ui_out): Rename to ...
9175         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
9176         parameter and make extern.  Adjust.
9177         (mi_set_logging): Rename to ...
9178         (mi_interp::set_logging): ... this.  Remove the 'interp'
9179         parameter and make extern.  Adjust.
9180         (mi_interp_procs): Delete.
9181         (mi_interp_factory): Adjust to use 'new'.
9182         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
9183         (mi_print_exception, mi_execute_command, mi_load_progress):
9184         Adjust.
9185         * tui/tui-interp.c (tui_interp): New class.
9186         (as_tui_interp): Return a tui_interp pointer.
9187         (tui_on_normal_stop, tui_on_signal_received)
9188         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
9189         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
9190         to use interp::interp_ui_out.
9191         (tui_init): Rename to ...
9192         (tui_interp::init): ... this.  Remove the 'self' parameter, use
9193         bool, return void and make extern.  Adjust.
9194         (tui_resume): Rename to ...
9195         (tui_interp::resume): ... this.  Remove the 'data' parameter,
9196         return void and make extern.  Adjust.
9197         (tui_suspend): Rename to ...
9198         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
9199         return void and make extern.  Adjust.
9200         (tui_ui_out): Rename to ...
9201         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
9202         parameter, and make extern.  Adjust.
9203         (tui_exec): Rename to ...
9204         (tui_interp::exec): ... this.  Remove the 'data' parameter and
9205         make extern.
9206         (tui_interp_procs): Delete.
9207         (tui_interp_factory): Use "new".
9208
9209 2017-02-02  Tom Tromey  <tom@tromey.com>
9210
9211         * rust-exp.y (ends_raw_string, space_then_number)
9212         (rust_identifier_start_p): Return bool.
9213         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
9214         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
9215         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
9216         (rust_chartype_p): Return bool.
9217         (val_print_struct, rust_print_struct_def, rust_print_type):
9218         Update.
9219         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
9220         Return bool.
9221
9222 2017-02-02  Tom Tromey  <tom@tromey.com>
9223
9224         * rust-lang.c: Reindent.
9225
9226 2017-02-02  Tom Tromey  <tom@tromey.com>
9227
9228         * rust-lang.h (rust_crate_for_block): Update.
9229         * rust-lang.c (rust_crate_for_block): Return std::string.
9230         (rust_get_disr_info): Use std:;string, not
9231         gdb::unique_xmalloc_ptr.
9232         * rust-exp.y (crate_name): Update.
9233
9234 2017-02-02  Pedro Alves  <palves@redhat.com>
9235
9236         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
9237         field out of gdb_disassembler_test and make it static.
9238
9239 2017-02-02  Pedro Alves  <palves@redhat.com>
9240
9241         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
9242         mi1_interp and mi_interp fields.
9243
9244 2017-02-02  Pedro Alves  <palves@redhat.com>
9245
9246         * cli/cli-interp.c (struct saved_output_files, saved_output):
9247         Moved from cli/cli-logging.c.
9248         (cli_set_logging): New function.
9249         (cli_interp_procs): Install cli_set_logging.
9250         * cli/cli-interp.h (make_logging_output, cli_set_logging):
9251         Declare.
9252         * cli/cli-logging.c (struct saved_output_files, saved_output):
9253         Moved to cli/cli-interp.c.
9254         (pop_output_files): Don't save outputs here.
9255         (make_logging_output): New function.
9256         (handle_redirections): Don't build tee nor save previous outputs
9257         here.
9258         * interps.c (current_interp_set_logging): Change prototype.
9259         Assume there's always a set_logging_proc method installed.
9260         * interps.h (interp_set_logging_ftype): Change prototype.
9261         (current_interp_set_logging): Change prototype and adjust comment.
9262         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
9263         use make_logging_output.
9264         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
9265 2017-02-02  Pedro Alves  <palves@redhat.com>
9266
9267         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
9268         from ...
9269         (set_logging_overwrite): ... here.
9270         (logging_no_redirect_file): Delete.
9271         (set_logging_redirect): Don't handle redirection on the fly.
9272         Instead warn that "logging off" / "logging on" is necessary.
9273         (pop_output_files): Delete references to logging_no_redirect_file.
9274         (show_logging_command): Always speak in terms of what will happen
9275         once logging is reenabled.
9276
9277 2017-02-02  Pedro Alves  <palves@redhat.com>
9278
9279         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
9280
9281 2017-02-02  Pedro Alves  <palves@redhat.com>
9282
9283         * disasm.c (gdb_pretty_print_insn): Rename to ...
9284         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
9285         Remove gdbarch parameter.  Adapt to clear the object's buffers
9286         instead of allocating new buffers, and to print using the object's
9287         gdb_disassembler instead of calling gdb_print_insn.
9288         (dump_insns): Use gdb_pretty_print_disassembler.
9289         * disasm.h (gdb_pretty_print_insn): Delete declaration.
9290         (gdb_pretty_print_disassembler): New class.
9291         * record-btrace.c (btrace_insn_history): Use
9292         gdb_pretty_print_disassembler.
9293
9294 2017-02-02  Pedro Alves  <palves@redhat.com>
9295
9296         * ada-lang.c (type_as_string): Use string_file.
9297         * ada-valprint.c (ada_print_floating): Use string_file.
9298         * ada-varobj.c (ada_varobj_scalar_image)
9299         (ada_varobj_get_value_image): Use string_file.
9300         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
9301         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
9302         * breakpoint.c (update_inserted_breakpoint_locations)
9303         (insert_breakpoint_locations, reattach_breakpoints)
9304         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
9305         (print_it_watchpoint): Use string_file.
9306         (save_breakpoints): Use stdio_file.
9307         * c-exp.y (oper): Use string_file.
9308         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
9309         tee_file.
9310         (pop_output_files): Use delete.
9311         (handle_redirections): Use stdio_file and tee_file.
9312         * cli/cli-setshow.c (do_show_command): Use string_file.
9313         * compile/compile-c-support.c (c_compute_program): Use
9314         string_file.
9315         * compile/compile-c-symbols.c (generate_vla_size): Take a
9316         'string_file &' instead of a 'ui_file *'.
9317         (generate_c_for_for_one_variable): Take a 'string_file &' instead
9318         of a 'ui_file *'.  Use string_file.
9319         (generate_c_for_variable_locations): Take a 'string_file &'
9320         instead of a 'ui_file *'.
9321         * compile/compile-internal.h (generate_c_for_for_one_variable):
9322         Take a 'string_file &' instead of a 'ui_file *'.
9323         * compile/compile-loc2c.c (push, pushf, unary, binary)
9324         (print_label, pushf_register_address, pushf_register)
9325         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
9326         'ui_file *'.  Adjust.
9327         * compile/compile.c (compile_to_object): Use string_file.
9328         * compile/compile.h (compile_dwarf_expr_to_c)
9329         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
9330         'ui_file *'.
9331         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
9332         (replace_typedefs_qualified_name): Use string_file and
9333         obstack_copy0.
9334         * disasm.c (gdb_pretty_print_insn): Use string_file.
9335         (gdb_disassembly): Adjust reference the null_stream global.
9336         (do_ui_file_delete): Delete.
9337         (gdb_insn_length): Use null_stream.
9338         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
9339         * dwarf2loc.c (dwarf2_compile_property_to_c)
9340         (locexpr_generate_c_location, loclist_generate_c_location): Take a
9341         'string_file &' instead of a 'ui_file *'.
9342         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
9343         * dwarf2read.c (do_ui_file_peek_last): Delete.
9344         (dwarf2_compute_name): Use string_file.
9345         * event-top.c (gdb_setup_readline): Use stdio_file.
9346         * gdbarch.sh (verify_gdbarch): Use string_file.
9347         * gdbtypes.c (safe_parse_type): Use null_stream.
9348         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
9349         string_file.
9350         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
9351         'string_file *' instead of a 'ui_file *'.
9352         (gdbscm_arch_disassemble): Use string_file.
9353         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
9354         * guile/scm-ports.c (class ioscm_file_port): Now a class that
9355         inherits from ui_file.
9356         (ioscm_file_port_delete, ioscm_file_port_rewind)
9357         (ioscm_file_port_put): Delete.
9358         (ioscm_file_port_write): Rename to ...
9359         (ioscm_file_port::write): ... this.  Remove file_port_magic
9360         checks.
9361         (ioscm_file_port_new): Delete.
9362         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
9363         ui_file_up.
9364         * guile/scm-type.c (tyscm_type_name): Use string_file.
9365         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
9366         Use string_file.
9367         * infcmd.c (print_return_value_1): Use string_file.
9368         * infrun.c (print_target_wait_results): Use string_file.
9369         * language.c (add_language): Use string_file.
9370         * location.c (explicit_to_string_internal): Use string_file.
9371         * main.c (captured_main_1): Use null_file.
9372         * maint.c (maintenance_print_architecture): Use stdio_file.
9373         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
9374         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
9375         event_channel>: Change type to mi_console_file pointer.
9376         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
9377         (mi_console_file_delete): Delete.
9378         (struct mi_console_file): Delete.
9379         (mi_console_file_magic): Delete.
9380         (mi_console_file_new): Delete.
9381         (mi_console_file::mi_console_file): New.
9382         (mi_console_file_delete): Delete.
9383         (mi_console_file_fputs): Delete.
9384         (mi_console_file::write): New.
9385         (mi_console_raw_packet): Delete.
9386         (mi_console_file::flush): New.
9387         (mi_console_file_flush): Delete.
9388         (mi_console_set_raw): Rename to ...
9389         (mi_console_file::set_raw): ... this.
9390         * mi/mi-console.h (class mi_console_file): New class.
9391         (mi_console_file_new, mi_console_set_raw): Delete.
9392         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
9393         (mi_set_logging): Use delete and tee_file.  Adjust.
9394         * mi/mi-main.c (output_register): Use string_file.
9395         (mi_cmd_data_evaluate_expression): Use string_file.
9396         (mi_cmd_data_read_memory): Use string_file.
9397         (mi_cmd_execute, print_variable_or_computed): Use string_file.
9398         * mi/mi-out.c (mi_ui_out::main_stream): New.
9399         (mi_ui_out::rewind): Use main_stream and
9400         string_file.
9401         (mi_ui_out::put): Use main_stream and string_file.
9402         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
9403         Allocate a 'string_file' instead.
9404         (mi_out_new): Don't allocate a mem_fileopen stream here.
9405         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
9406         (mi_ui_out::main_stream): Declare method.
9407         * printcmd.c (eval_command): Use string_file.
9408         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
9409         * python/py-arch.c (archpy_disassemble): Use string_file.
9410         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
9411         * python/py-frame.c (frapy_str): Use string_file.
9412         * python/py-framefilter.c (py_print_type, py_print_single_arg):
9413         Use string_file.
9414         * python/py-type.c (typy_str): Use string_file.
9415         * python/py-unwind.c (unwind_infopy_str): Use string_file.
9416         * python/py-value.c (valpy_str): Use string_file.
9417         * record-btrace.c (btrace_insn_history): Use string_file.
9418         * regcache.c (regcache_print): Use stdio_file.
9419         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
9420         * remote.c (escape_buffer): Use string_file.
9421         * rust-lang.c (rust_get_disr_info): Use string_file.
9422         * serial.c (serial_open_ops_1): Use stdio_file.
9423         (do_serial_close): Use delete.
9424         * stack.c (print_frame_arg): Use string_file.
9425         (print_frame_args): Remove local mem_fileopen stream, not used.
9426         (print_frame): Use string_file.
9427         * symmisc.c (maintenance_print_symbols): Use stdio_file.
9428         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
9429         Take a 'string_file *' instead of a 'ui_file *'.
9430         * top.c (new_ui): Use stdio_file and stderr_file.
9431         (free_ui): Use delete.
9432         (execute_command_to_string): Use string_file.
9433         (quit_confirm): Use string_file.
9434         * tracepoint.c (collection_list::append_exp): Use string_file.
9435         * tui/tui-disasm.c (tui_disassemble): Use string_file.
9436         * tui/tui-file.c: Don't include "ui-file.h".
9437         (enum streamtype, struct tui_stream): Delete.
9438         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
9439         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
9440         (tui_file::tui_file): New method.
9441         (tui_file_fputs): Delete.
9442         (tui_file_get_strbuf): Delete.
9443         (tui_file::puts): New method.
9444         (tui_file_adjust_strbuf): Delete.
9445         (tui_file_flush): Delete.
9446         (tui_file::flush): New method.
9447         * tui/tui-file.h: Tweak intro comment.
9448         Include ui-file.h.
9449         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
9450         (tui_file_adjust_strbuf): Delete declarations.
9451         (class tui_file): New class.
9452         * tui/tui-io.c (tui_initialize_io): Use tui_file.
9453         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
9454         (tui_register_format): Use string_stream.
9455         * tui/tui-stack.c (tui_make_status_line): Use string_file.
9456         (tui_get_function_from_frame): Use string_file.
9457         * typeprint.c (type_to_string): Use string_file.
9458         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
9459         (null_stream): New global.
9460         (ui_file_delete): Delete.
9461         (ui_file::ui_file): New.
9462         (null_file_isatty): Delete.
9463         (ui_file::~ui_file): New.
9464         (null_file_rewind): Delete.
9465         (ui_file::printf): New.
9466         (null_file_put): Delete.
9467         (null_file_flush): Delete.
9468         (ui_file::putstr): New.
9469         (null_file_write): Delete.
9470         (ui_file::putstrn): New.
9471         (null_file_read): Delete.
9472         (ui_file::putc): New.
9473         (null_file_fputs): Delete.
9474         (null_file_write_async_safe): Delete.
9475         (ui_file::vprintf): New.
9476         (null_file_delete): Delete.
9477         (null_file::write): New.
9478         (null_file_fseek): Delete.
9479         (null_file::puts): New.
9480         (ui_file_data): Delete.
9481         (null_file::write_async_safe): New.
9482         (gdb_flush, ui_file_isatty): Adjust.
9483         (ui_file_put, ui_file_rewind): Delete.
9484         (ui_file_write): Adjust.
9485         (ui_file_write_for_put): Delete.
9486         (ui_file_write_async_safe, ui_file_read): Adjust.
9487         (ui_file_fseek): Delete.
9488         (fputs_unfiltered): Adjust.
9489         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
9490         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
9491         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
9492         (set_ui_file_data): Delete.
9493         (string_file::~string_file, string_file::write)
9494         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
9495         (do_ui_file_as_string, ui_file_as_string): Delete.
9496         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
9497         (struct mem_file): Delete.
9498         (mem_file_new): Delete.
9499         (stdio_file::stdio_file): New.
9500         (mem_file_delete): Delete.
9501         (stdio_file::stdio_file): New.
9502         (mem_fileopen): Delete.
9503         (stdio_file::~stdio_file): New.
9504         (mem_file_rewind): Delete.
9505         (stdio_file::set_stream): New.
9506         (mem_file_put): Delete.
9507         (stdio_file::open): New.
9508         (mem_file_write): Delete.
9509         (stdio_file_magic, struct stdio_file): Delete.
9510         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
9511         (stdio_file::flush): New.
9512         (stdio_file_read): Rename to ...
9513         (stdio_file::read): ... this.  Adjust.
9514         (stdio_file_write): Rename to ...
9515         (stdio_file::write): ... this.  Adjust.
9516         (stdio_file_write_async_safe): Rename to ...
9517         (stdio_file::write_async_safe) ... this.  Adjust.
9518         (stdio_file_fputs): Rename to ...
9519         (stdio_file::puts) ... this.  Adjust.
9520         (stdio_file_isatty): Delete.
9521         (stdio_file_fseek): Delete.
9522         (stdio_file::isatty): New.
9523         (stderr_file_write): Rename to ...
9524         (stderr_file::write) ... this.  Adjust.
9525         (stderr_file_fputs): Rename to ...
9526         (stderr_file::puts) ... this.  Adjust.
9527         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
9528         (stderr_file::stderr_file): New.
9529         (tee_file_magic): Delete.
9530         (struct tee_file): Delete.
9531         (tee_file::tee_file): New.
9532         (tee_file_new): Delete.
9533         (tee_file::~tee_file): New.
9534         (tee_file_delete): Delete.
9535         (tee_file_flush): Rename to ...
9536         (tee_file::flush): ... this.  Adjust.
9537         (tee_file_write): Rename to ...
9538         (tee_file::write): ... this.  Adjust.
9539         (tee_file::write_async_safe): New.
9540         (tee_file_fputs): Rename to ...
9541         (tee_file::puts): ... this.  Adjust.
9542         (tee_file_isatty): Rename to ...
9543         (tee_file::isatty): ... this.  Adjust.
9544         * ui-file.h (struct obstack, struct ui_file): Don't
9545         forward-declare.
9546         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
9547         (ui_file_write_ftype)
9548         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
9549         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
9550         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
9551         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
9552         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
9553         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
9554         (set_ui_file_fseek): Delete.
9555         (ui_file_data, ui_file_delete, ui_file_rewind)
9556         (struct ui_file): New.
9557         (ui_file_up): New.
9558         (class null_file): New.
9559         (null_stream): Declare.
9560         (ui_file_write_for_put, ui_file_put): Delete.
9561         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
9562         Delete.
9563         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
9564         (gdb_fopen, tee_file_new): Delete.
9565         (struct string_file): New.
9566         (struct stdio_file): New.
9567         (stdio_file_up): New.
9568         (struct stderr_file): New.
9569         (class tee_file): New.
9570         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
9571         of a 'ui_file *'.  Adjust.
9572         * ui-out.h (class ui_out) <field_stream>: Likewise.
9573         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
9574         (null_stream): Delete.
9575         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
9576         Adjust.
9577         * utils.h (struct ui_file): Delete forward declaration..
9578         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
9579         (error_stream): Take a 'string_file &' instead of a
9580         'ui_file *'.
9581         * varobj.c (varobj_value_get_print_value): Use string_file.
9582         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
9583         * gdbarch.c: Regenerate.
9584
9585 2017-02-02  Pedro Alves  <palves@redhat.com>
9586
9587         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
9588         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
9589         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
9590         Adjust to call gdb_print_insn instead of
9591         gdb_disassembler::print_insn.
9592         (dump_insns, do_mixed_source_and_assembly_deprecated)
9593         (do_mixed_source_and_assembly, do_assembly_only): Add back a
9594         'gdbarch' parameter.  Remove gdb_disassembler parameter.
9595         (gdb_disassembly): Don't allocate a gdb_disassembler here.
9596         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
9597         declaration.
9598         (gdb_pretty_print_insn): Re-add declaration.
9599         * record-btrace.c (btrace_insn_history): Don't allocate a
9600         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
9601
9602 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
9603
9604         * disasm.h (gdb_disassembly): Remove file_string parameter.
9605         * disasm.c (gdb_disassembly): Likewise.
9606         * cli/cli-cmds.c (print_disassembly): Adapt.
9607         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
9608         * stack.c (do_gdb_disassembly): Likewise.
9609
9610 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9611
9612         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
9613         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
9614         targets.  And if the implicit value is longer than needed, extract
9615         the first bytes instead of the "least significant" ones.
9616
9617 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
9618
9619         * btrace.c (btrace_enable): Do not call btrace_add_pc for
9620         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
9621         (btrace_fetch): Assert can_access_registers_ptid.
9622         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
9623         validate_registers_access.
9624
9625 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
9626
9627         * gdbthread.h (can_access_registers_ptid): New.
9628         * thread.c (can_access_registers_ptid): New.
9629
9630 2017-02-01  Pedro Alves  <palves@redhat.com>
9631
9632         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
9633
9634 2017-01-31  Pedro Alves  <palves@redhat.com>
9635
9636         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
9637         Fix typos.
9638
9639 2017-01-31  Pedro Alves  <palves@redhat.com>
9640
9641         * stack.c (print_frame_args): Remove local mem_fileopen stream,
9642         not used.
9643
9644 2017-01-31  Pedro Alves  <palves@redhat.com>
9645
9646         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
9647
9648 2017-01-31  Pedro Alves  <palves@redhat.com>
9649
9650         * common/scoped_restore.h
9651         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
9652         change the value's parameter type to T2.
9653         (make_scoped_restore): Likewise.
9654
9655 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
9656             Richard Henderson  <rth@redhat.com>
9657
9658         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
9659         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
9660         GS_BASE for older kernels.
9661         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
9662         GS_BASE for older kernels.
9663         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
9664         and GS_BASE to the offset table.
9665         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
9666         system register group.
9667         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
9668         for older kernels.
9669         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
9670         amd64 ABI.
9671         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
9672         AMD64_GSBASE_REGNUM.
9673         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
9674         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
9675         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
9676         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
9677         i386/64bit-segments.xml in those rules.
9678         * features/i386/64bit-segments.xml: New file.
9679         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
9680         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
9681         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
9682         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
9683         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
9684         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
9685         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
9686         * features/i386/amd64-avx-linux.c: Regenerated.
9687         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
9688         * features/i386/amd64-avx-mpx.c: Regenerated.
9689         * features/i386/amd64-avx512-linux.c: Regenerated.
9690         * features/i386/amd64-linux.c: Regenerated.
9691         * features/i386/amd64-mpx-linux.c: Regenerated.
9692         * features/i386/i386-avx-mpx-linux.c: Regenerated.
9693         * features/i386/i386-avx-mpx.c: Regenerated.
9694         * features/i386/x32-avx-linux.c: Regenerated.
9695         * features/i386/x32-avx512-linux.c: Regenerated.
9696         * regformats/i386/amd64-avx-linux.dat: Regenerated.
9697         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
9698         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
9699         * regformats/i386/amd64-linux.dat: Regenerated.
9700         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
9701         * regformats/i386/x32-avx-linux.dat: Regenerated.
9702         * regformats/i386/x32-avx512-linux.dat: Regenerated.
9703         * regformats/i386/x32-linux.dat: Regenerated.
9704
9705 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
9706
9707         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
9708         Set to AMD64_NUM_REGS.
9709
9710 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
9711
9712         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
9713         that checks validity of a register number.
9714
9715 2017-01-27  Kees Cook  <keescook@google.com>
9716
9717         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
9718         fetch_fpregs if target has fpa registers.
9719         (arm_linux_store_inferior_registers): Call store_fpregs if target
9720         has fpa registers.
9721
9722 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9723
9724         * cris-tdep.c (cris_gdbarch_init): Remove check for
9725         info.byte_order and force it to BFD_ENDIAN_LITTLE.
9726
9727 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
9728
9729         * corelow.c (get_core_register_section): Check for regset
9730         existence before checking for REGSET_VARIABLE_SIZE.
9731
9732 2017-01-26  Yao Qi  <yao.qi@linaro.org>
9733             Pedro Alves  <palves@redhat.com>
9734
9735         PR gdb/20939
9736         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
9737         call memory_error, save memaddr instead.
9738         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
9739         negative, cal memory_error.
9740         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
9741
9742 2017-01-26  Yao Qi  <yao.qi@linaro.org>
9743
9744         * disasm-selftests.c (memory_error_test): New function.
9745         (_initialize_disasm_selftests): Register memory_error_test.
9746
9747 2017-01-26  Yao Qi  <yao.qi@linaro.org>
9748
9749         * Makefile.in (SFILES): Add disasm-selftests.c and
9750         selftest-arch.c.
9751         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
9752         * disasm-selftests.c: New file.
9753         * selftest-arch.c: New file.
9754         * selftest-arch.h: New file.
9755
9756 2017-01-26  Yao Qi  <yao.qi@linaro.org>
9757
9758         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
9759         to bfd_arch_mep.  Don't return 0 if section is not
9760         found.  Call print_insn_mep.
9761
9762 2017-01-26  Pedro Alves  <palves@redhat.com>
9763             Yao Qi  <yao.qi@linaro.org>
9764
9765         * arm-tdep.c: Include "disasm.h".
9766         (gdb_print_insn_arm): Update code to get gdbarch.
9767         * disasm.c (dis_asm_read_memory): Change it to
9768         gdb_disassembler::dis_asm_read_memory.
9769         (dis_asm_memory_error): Likewise.
9770         (dis_asm_print_address): Likewise.
9771         (gdb_pretty_print_insn): Change it to
9772         gdb_disassembler::pretty_print_insn.
9773         (dump_insns): Add one argument gdb_disassemlber.  All
9774         callers updated.
9775         (do_mixed_source_and_assembly_deprecated): Likewise.
9776         (do_mixed_source_and_assembly): Likewise.
9777         (do_assembly_only): Likewise.
9778         (gdb_disassembler::gdb_disassembler): New.
9779         (gdb_disassembler::print_insn): New.
9780         * disasm.h (class gdb_disassembler): New.
9781         (gdb_pretty_print_insn): Remove declaration.
9782         (gdb_disassemble_info): Likewise.
9783         * guile/scm-disasm.c (class gdbscm_disassembler): New.
9784         (gdbscm_disasm_read_memory_worker): Update.
9785         (gdbscm_disasm_read_memory): Update.
9786         (gdbscm_disasm_memory_error): Remove.
9787         (gdbscm_disasm_print_address): Remove.
9788         (gdbscm_disassembler::gdbscm_disassembler): New.
9789         (gdbscm_print_insn_from_port): Update.
9790         * mips-tdep.c: Include disasm.h.
9791         (gdb_print_insn_mips): Update code to get gdbarch.
9792         * record-btrace.c (btrace_insn_history): Update.
9793         * spu-tdep.c: Include disasm.h.
9794         (struct spu_dis_asm_data): Remove.
9795         (struct spu_dis_asm_info): New.
9796         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
9797         SPU id.
9798         (gdb_print_insn_spu): Cast disassemble_info to
9799         spu_dis_asm_info.
9800
9801 2017-01-26  Yao Qi  <yao.qi@linaro.org>
9802
9803         * disasm.c (do_ui_file_delete): Delete.
9804         (gdb_insn_length): Move code creating stream to ...
9805         * utils.c (null_stream): ... here.  New function.
9806         * utils.h (null_stream): Declare.
9807
9808 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
9809
9810         * python/py-inferior.c (find_thread_object): Return directly
9811         from the loop.  Remove "found" variable.
9812
9813 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
9814
9815         GDB 7.12.1 released.
9816
9817 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
9818
9819         * python/py-function.c (fnpy_call): Reorder declarations to have
9820         the gdbpy_enter object declared first.
9821         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
9822
9823 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
9824
9825         PR python/21068
9826         * python/python-internal.h (PyMem_RawMalloc): Define for
9827         Python < 3.4.
9828         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
9829         PyMem_RawMalloc instead of PyMem_Malloc.
9830
9831 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
9832             Luis Machado  <lgustavo@codesourcery.com>
9833
9834         * NEWS (New commands): Mention flash-erase.
9835         (New MI commands): Mention target-flash-erase.
9836         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
9837         command.
9838         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
9839         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
9840         * target.c (flash_erase_command): New function.
9841         (initialize_targets): Add new flash-erase command.
9842         * target.h (flash_erase_command): New declaration.
9843
9844 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
9845
9846         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
9847         HAVE_SYS_PROCFS_H is defined.
9848
9849 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
9850
9851         * remote.c (struct cached_reg): Change data into a pointer.
9852         * (stop_reply_dtr): Free data pointers before deleting vector.
9853         (process_stop_reply): Likewise.
9854         (remote_parse_stop_reply): Allocate space for data
9855
9856 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
9857
9858         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
9859         MAX_REGISTER_SIZE.
9860         (amd64_pseudo_register_read_value): Likewise.
9861         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
9862         (store_register_using_P): Likewise.
9863         * regcache.c (regcache_xfer_part): Likewise.
9864
9865 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
9866
9867         Split real and pseudo registers.
9868         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
9869         (sparc32_pseudo_regnum): New enum.
9870         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
9871         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
9872         (SPARC32_CP0_REGISTERS): New macro.
9873         (sparc32_pseudo_register_name): New function.
9874         (sparc32_register_name): Use sparc32_pseudo_register_name.
9875         (sparc32_pseudo_register_type): New function.
9876         (sparc32_register_type): Use sparc32_pseudo_register_type.
9877         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
9878         pseudo register numbers.
9879         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
9880         (SPARC64_CP0_REGISTERS): New macro.
9881         (sparc64_pseudo_register_name): New function.
9882         (sparc64_register_name): Use sparc64_pseudo_register_name.
9883         (sparc64_pseudo_register_type): New function.
9884         (sparc64_register_type): Use sparc64_pseudo_register_type.
9885         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
9886         pseudo register numbers.
9887         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
9888         sparc64_store_arguments): Handle pseudo register numbers.
9889
9890 2017-01-13  Yao Qi  <yao.qi@linaro.org>
9891
9892         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
9893         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
9894         output.
9895         (getpkt_or_notif_sane_1): Likewise.
9896
9897 2017-01-13  Yao Qi  <yao.qi@linaro.org>
9898
9899         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
9900         of CC.  Pass "-x c++-header" instead of "-x c".
9901
9902 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
9903
9904         * remote.c (remote_can_async_p): Update comment.
9905
9906 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
9907
9908         * linux-nat.c (linux_nat_can_async_p): Update comment.
9909
9910 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
9911
9912         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
9913
9914 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
9915
9916         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
9917
9918 2017-01-10  Tom Tromey  <tom@tromey.com>
9919
9920         * python/py-type.c (typy_legacy_template_argument): Update.
9921         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
9922         ~demangle_parse_info): Declare new members.
9923         (cp_demangled_name_to_comp): Return unique_ptr.
9924         (cp_demangled_name_parse_free)
9925         (make_cleanup_cp_demangled_name_parse_free)
9926         (cp_new_demangle_parse_info): Remove.
9927         * cp-support.c (do_demangled_name_parse_free_cleanup)
9928         (make_cleanup_cp_demangled_name_parse_free): Remove.
9929         (inspect_type, cp_canonicalize_string_full)
9930         (cp_canonicalize_string): Update.
9931         (mangled_name_to_comp): Change return type.
9932         (cp_class_name_from_physname, method_name_from_physname)
9933         (cp_func_name, cp_remove_params): Update.
9934         * cp-name-parser.y (demangle_parse_info): New constructor, from
9935         cp_new_demangle_parse_info.
9936         (~demangle_parse_info): New destructor, from
9937         cp_demangled_name_parse_free.
9938         (cp_merge_demangle_parse_infos): Update.
9939         (cp_demangled_name_to_comp): Change return type.
9940
9941 2017-01-10  Tom Tromey  <tom@tromey.com>
9942
9943         * top.c (prevent_dont_repeat): Change return type.
9944         * python/python.c (execute_gdb_command): Use std::string.
9945         Update.
9946         * guile/guile.c (gdbscm_execute_gdb_command): Update.
9947         * command.h (prevent_dont_repeat): Change return type.
9948         * breakpoint.c (bpstat_do_actions_1): Update.
9949
9950 2017-01-10  Tom Tromey  <tom@tromey.com>
9951
9952         * value.h (scoped_value_mark::~scoped_value_mark): Call
9953         free_to_mark.
9954         (scoped_value_mark::free_to_mark): New method.
9955         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
9956         scoped_value_mark.
9957
9958 2017-01-10  Tom Tromey  <tom@tromey.com>
9959
9960         * python/py-value.c (valpy_dereference, valpy_referenced_value)
9961         (valpy_reference_value, valpy_const_value, valpy_get_address)
9962         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
9963         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
9964         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
9965         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
9966         scoped_value_mark.
9967         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
9968         * value.h (scoped_value_mark): New class.
9969
9970 2017-01-10  Tom Tromey  <tom@tromey.com>
9971
9972         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
9973         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
9974         * psymtab.c (discard_psymtabs_upto): Remove.
9975         (make_cleanup_discard_psymtabs): Remove.
9976         (struct psymtab_state): Remove.
9977
9978 2017-01-10  Tom Tromey  <tom@tromey.com>
9979
9980         * record-full.c (record_full_save_cleanups): Remove.
9981         (record_full_save): Use gdb::unlinker.
9982         * gcore.c (do_bfd_delete_cleanup): Remove.
9983         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
9984         cleanups.
9985         * dwarf2read.c (unlink_if_set): Remove.
9986         (write_psymtabs_to_index): Use gdb::unlinker.
9987         * common/gdb_unlinker.h: New file.
9988
9989 2017-01-10  Tom Tromey  <tom@tromey.com>
9990
9991         * windows-tdep.c (windows_xfer_shared_library): Update.
9992         * windows-nat.c (windows_make_so): Update.
9993         * utils.h (make_cleanup_bfd_unref): Remove.
9994         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
9995         * symfile.h (symfile_bfd_open)
9996         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
9997         * symfile.c (read_symbols, symbol_file_add)
9998         (separate_debug_file_exists): Update.
9999         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
10000         (generic_load, reread_symbols): Update.
10001         * symfile-mem.c (symbol_file_add_from_memory): Update.
10002         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
10003         (spu_symbol_file_add_from_memory): Update.
10004         * solist.h (struct target_so_ops) <bfd_open>: Return
10005         gdb_bfd_ref_ptr.
10006         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
10007         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
10008         gdb_bfd_ref_ptr.
10009         (solib_map_sections, reload_shared_libraries_1): Update.
10010         * solib-svr4.c (enable_break): Update.
10011         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
10012         * solib-frv.c (enable_break2): Update.
10013         * solib-dsbt.c (enable_break): Update.
10014         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
10015         gdb_bfd_ref_ptr.
10016         (darwin_solib_get_all_image_info_addr_at_init): Update.
10017         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
10018         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
10019         * record-full.c (record_full_save): Update.
10020         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
10021         * procfs.c (insert_dbx_link_bpt_in_file): Update.
10022         * minidebug.c (find_separate_debug_file_in_section): Return
10023         gdb_bfd_ref_ptr.
10024         * machoread.c (macho_add_oso_symfile): Change abfd to
10025         gdb_bfd_ref_ptr.
10026         (macho_symfile_read_all_oso): Update.
10027         (macho_check_dsym): Return gdb_bfd_ref_ptr.
10028         (macho_symfile_read): Update.
10029         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
10030         (jit_bfd_try_read_symtab): Update.
10031         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10032         (gdb_bfd_openw, gdb_bfd_openr_iovec)
10033         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
10034         gdb_bfd_ref_ptr.
10035         (gdb_bfd_ref_policy): New struct.
10036         (gdb_bfd_ref_ptr): New typedef.
10037         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10038         (gdb_bfd_openw, gdb_bfd_openr_iovec)
10039         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
10040         gdb_bfd_ref_ptr.
10041         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
10042         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
10043         (gcore_command): Update.
10044         * exec.c (exec_file_attach): Update.
10045         * elfread.c (elf_symfile_read): Update.
10046         * dwarf2read.c (dwarf2_get_dwz_file): Update.
10047         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
10048         (open_and_init_dwo_file): Update.
10049         (open_dwp_file): Return gdb_bfd_ref_ptr.
10050         (open_and_init_dwp_file): Update.
10051         * corelow.c (core_open): Update.
10052         * compile/compile-object-load.c (compile_object_load): Update.
10053         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
10054         * coffread.c (coff_symfile_read): Update.
10055         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
10056         gdb_bfd_ref_ptr.  Rename.
10057         (dump_bfd_file, restore_command): Update.
10058         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
10059         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
10060         (find_separate_debug_file_by_buildid): Update.
10061
10062 2017-01-10  Tom Tromey  <tom@tromey.com>
10063
10064         * common/gdb_ref_ptr.h: New file.
10065         * python/py-ref.h (struct gdbpy_ref_policy): New.
10066         (gdbpy_ref): Now a typedef.
10067
10068 2017-01-10  Tom Tromey  <tom@tromey.com>
10069
10070         * utils.h (make_cleanup_htab_delete): Don't declare.
10071         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
10072         Remove.
10073         * linespec.c (decode_compound_collector): Add constructor,
10074         destructor.
10075         (lookup_prefix_sym): Remove cleanup.
10076         (symtab_collector): Add constructor, destructor.
10077         (collect_symtabs_from_filename): Remove cleanup.
10078         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
10079         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
10080         Use htab_up.
10081         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
10082         * dwarf2read.c (dw2_expand_symtabs_matching)
10083         (dw2_map_symbol_filenames, dwarf_decode_macros)
10084         (write_psymtabs_to_index): Use htab_up.
10085         * dwarf2loc.c (func_verify_no_selftailcall)
10086         (call_site_find_chain_1, func_verify_no_selftailcall)
10087         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
10088         std::vector, gdb::unique_xmalloc_ptr.
10089         (call_sitep): Remove typedef.
10090         (dwarf2_locexpr_baton_eval): Remove unused variable.
10091
10092 2017-01-10  Tom Tromey  <tom@tromey.com>
10093
10094         * python/python-internal.h (make_cleanup_py_decref)
10095         (make_cleanup_py_xdecref): Don't declare.
10096         * python/py-utils.c (py_decref, make_cleanup_py_decref)
10097         (py_xdecref, make_cleanup_py_xdecref): Remove.
10098
10099 2017-01-10  Tom Tromey  <tom@tromey.com>
10100
10101         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
10102         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
10103
10104 2017-01-10  Tom Tromey  <tom@tromey.com>
10105
10106         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
10107
10108 2017-01-10  Tom Tromey  <tom@tromey.com>
10109
10110         * python/py-utils.c (unicode_to_encoded_string)
10111         (python_string_to_target_string)
10112         (python_string_to_target_python_string)
10113         (python_string_to_host_string, gdbpy_obj_to_string)
10114         (get_addr_from_python): Use gdbpy_ref.
10115
10116 2017-01-10  Tom Tromey  <tom@tromey.com>
10117
10118         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
10119         gdbpy_ref.
10120
10121 2017-01-10  Tom Tromey  <tom@tromey.com>
10122
10123         * python/python.c (eval_python_command, gdbpy_decode_line)
10124         (gdbpy_run_events, gdbpy_start_type_printers)
10125         (gdbpy_apply_type_printers): Use gdbpy_ref.
10126
10127 2017-01-10  Tom Tromey  <tom@tromey.com>
10128
10129         * python/py-param.c (get_doc_string, compute_enum_values): Use
10130         gdbpy_ref.
10131
10132 2017-01-10  Tom Tromey  <tom@tromey.com>
10133
10134         * python/py-inferior.c (find_thread_object, build_inferior_list):
10135         Use gdbpy_ref.
10136
10137 2017-01-10  Tom Tromey  <tom@tromey.com>
10138
10139         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
10140
10141 2017-01-10  Tom Tromey  <tom@tromey.com>
10142
10143         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
10144         gdbpy_ref.
10145
10146 2017-01-10  Tom Tromey  <tom@tromey.com>
10147
10148         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
10149         extra incref.
10150         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
10151         Use gdbpy_ref.
10152
10153 2017-01-10  Tom Tromey  <tom@tromey.com>
10154
10155         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
10156         gdbpy_ref.
10157
10158 2017-01-10  Tom Tromey  <tom@tromey.com>
10159
10160         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
10161         decref results of PyArg_ParseTupleAndKeywords.
10162
10163 2017-01-10  Tom Tromey  <tom@tromey.com>
10164
10165         * python/python.c (python_run_simple_file): Use
10166         unique_xmalloc_ptr, gdbpy_ref.
10167
10168 2017-01-10  Tom Tromey  <tom@tromey.com>
10169
10170         * python/py-prettyprint.c (print_stack_unless_memory_error)
10171         (print_string_repr, print_children): Use gdbpy_ref.
10172         (dummy_python_frame): New class.
10173         (dummy_python_frame::dummy_python_frame): Rename from
10174         push_dummy_python_frame.
10175         (py_restore_tstate): Remove.
10176
10177 2017-01-10  Tom Tromey  <tom@tromey.com>
10178
10179         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
10180
10181 2017-01-10  Tom Tromey  <tom@tromey.com>
10182
10183         * python/python.c (ensure_python_env, restore_python_env):
10184         Remove.
10185         * python/python-internal.h (ensure_python_env): Don't declare.
10186         * varobj.h (varobj_ensure_python_env): Don't declare.
10187         * varobj.c (varobj_ensure_python_env): Remove.
10188
10189 2017-01-10  Tom Tromey  <tom@tromey.com>
10190
10191         * varobj.c (varobj_value_get_print_value): Use
10192         gdbpy_enter_varobj.
10193
10194 2017-01-10  Tom Tromey  <tom@tromey.com>
10195
10196         * python/py-prettyprint.c (print_string_repr, print_children):
10197         Update.
10198         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
10199         of "encoding".
10200         * varobj.c (varobj_value_get_print_value): Update.
10201         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
10202
10203 2017-01-10  Tom Tromey  <tom@tromey.com>
10204
10205         * varobj.c (varobj_get_display_hint)
10206         (dynamic_varobj_has_child_method, install_new_value_visualizer)
10207         (varobj_set_visualizer, free_variable): Use
10208         gdbpy_enter_varobj.
10209
10210 2017-01-10  Tom Tromey  <tom@tromey.com>
10211
10212         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
10213         (do_finish_initialization): New function.  Use gdbpy_ref.
10214         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
10215         do_finish_initialization.
10216
10217 2017-01-10  Tom Tromey  <tom@tromey.com>
10218
10219         * python/py-param.c (get_set_value, get_show_value): Use
10220         gdbpy_enter, gdbpy_ref.
10221
10222 2017-01-10  Tom Tromey  <tom@tromey.com>
10223
10224         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
10225
10226 2017-01-10  Tom Tromey  <tom@tromey.com>
10227
10228         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
10229
10230 2017-01-10  Tom Tromey  <tom@tromey.com>
10231
10232         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
10233         Use gdbpy_enter_varobj.
10234
10235 2017-01-10  Tom Tromey  <tom@tromey.com>
10236
10237         * varobj.c (gdbpy_enter_varobj): New constructor.
10238         * python/python-internal.h (gdbpy_enter_varobj): New class.
10239         * python/py-varobj.c (py_varobj_get_iterator): Use
10240         gdbpy_enter_varobj.
10241
10242 2017-01-10  Tom Tromey  <tom@tromey.com>
10243
10244         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
10245         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
10246         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
10247         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
10248         unique_xmalloc_ptr.
10249         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
10250
10251 2017-01-10  Tom Tromey  <tom@tromey.com>
10252
10253         * python/py-xmethods.c (invoke_match_method): Use
10254         gdbpy_ref.
10255
10256 2017-01-10  Tom Tromey  <tom@tromey.com>
10257
10258         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
10259         gdbpy_enter, gdbpy_ref.
10260
10261 2017-01-10  Tom Tromey  <tom@tromey.com>
10262
10263         * python/python.c (python_interactive_command): Use gdbpy_enter.
10264
10265 2017-01-10  Tom Tromey  <tom@tromey.com>
10266
10267         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
10268         gdbpy_ref.
10269
10270 2017-01-10  Tom Tromey  <tom@tromey.com>
10271
10272         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
10273         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
10274
10275 2017-01-10  Tom Tromey  <tom@tromey.com>
10276
10277         * utils.h (htab_deleter): New struct.
10278         (htab_up): New typedef.
10279         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
10280         gdbpy_enter, gdbpy_ref, htab_up.
10281
10282 2017-01-10  Tom Tromey  <tom@tromey.com>
10283
10284         * python/py-unwind.c (pending_frame_invalidate): Remove.
10285         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
10286
10287 2017-01-10  Tom Tromey  <tom@tromey.com>
10288
10289         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
10290         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
10291
10292 2017-01-10  Tom Tromey  <tom@tromey.com>
10293
10294         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
10295
10296 2017-01-10  Tom Tromey  <tom@tromey.com>
10297
10298         * python/python.c (gdbpy_eval_from_control_command)
10299         (gdbpy_source_script, gdbpy_run_events)
10300         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
10301         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
10302         gdbpy_enter.
10303
10304 2017-01-10  Tom Tromey  <tom@tromey.com>
10305
10306         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
10307
10308 2017-01-10  Tom Tromey  <tom@tromey.com>
10309
10310         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
10311
10312 2017-01-10  Tom Tromey  <tom@tromey.com>
10313
10314         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
10315         (python_on_inferior_call_pre, python_on_inferior_call_post)
10316         (python_on_memory_change, python_on_register_change)
10317         (python_inferior_exit, python_new_objfile, add_thread_object)
10318         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
10319
10320 2017-01-10  Tom Tromey  <tom@tromey.com>
10321
10322         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
10323         (bpfinishpy_handle_exit): Use gdbpy_enter.
10324
10325 2017-01-10  Tom Tromey  <tom@tromey.com>
10326
10327         * python/py-cmd.c (cmdpy_destroyer)
10328         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
10329         gdbpy_enter.
10330
10331 2017-01-10  Tom Tromey  <tom@tromey.com>
10332
10333         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
10334         gdbpy_enter.
10335         (gdbpy_breakpoint_has_cond): Likewise.
10336
10337 2017-01-10  Tom Tromey  <tom@tromey.com>
10338
10339         * python/python.c (gdbpy_enter): New constructor.
10340         (~gdbpy_enter): New destructor.
10341         (restore_python_env, ensure_python_env): Rewrite.
10342         * python/python-internal.h (gdbpy_enter): New class.
10343
10344 2017-01-10  Tom Tromey  <tom@tromey.com>
10345
10346         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
10347
10348 2017-01-10  Tom Tromey  <tom@tromey.com>
10349
10350         * python/py-value.c (value_has_field, get_field_flag)
10351         (get_field_type, valpy_getitem, convert_value_from_python): Use
10352         gdbpy_ref.
10353
10354 2017-01-10  Tom Tromey  <tom@tromey.com>
10355
10356         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
10357         gdbpy_ref.
10358
10359 2017-01-10  Tom Tromey  <tom@tromey.com>
10360
10361         * python/py-prettyprint.c (search_pp_list)
10362         (find_pretty_printer_from_objfiles)
10363         (find_pretty_printer_from_progspace)
10364         (find_pretty_printer_from_gdb, find_pretty_printer)
10365         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
10366         gdbpy_ref.
10367
10368 2017-01-10  Tom Tromey  <tom@tromey.com>
10369
10370         * python/py-param.c (call_doc_function): Use gdbpy_ref.
10371
10372 2017-01-10  Tom Tromey  <tom@tromey.com>
10373
10374         * python/py-linetable.c (build_line_table_tuple_from_pcs)
10375         (ltpy_get_all_source_lines): Use gdbpy_ref.
10376
10377 2017-01-10  Tom Tromey  <tom@tromey.com>
10378
10379         * python/py-framefilter.c (extract_sym, extract_value)
10380         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
10381         gdbpy_ref.
10382
10383 2017-01-10  Tom Tromey  <tom@tromey.com>
10384
10385         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
10386
10387 2017-01-10  Tom Tromey  <tom@tromey.com>
10388
10389         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
10390
10391 2017-01-10  Tom Tromey  <tom@tromey.com>
10392
10393         * python/py-function.c (convert_values_to_python, fnpy_init): Use
10394         gdbpy_ref.
10395
10396 2017-01-10  Tom Tromey  <tom@tromey.com>
10397
10398         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
10399
10400 2017-01-10  Tom Tromey  <tom@tromey.com>
10401
10402         * python/py-type.c (convert_field, make_fielditem, typy_fields)
10403         (typy_range): Use gdbpy_ref.
10404
10405 2017-01-10  Tom Tromey  <tom@tromey.com>
10406
10407         * python/py-threadevent.c (create_thread_event_object): Use
10408         gdbpy_ref.
10409         * python/py-stopevent.c (create_stop_event_object): Simplify.
10410         (emit_stop_event): Use gdbpy_ref.
10411         * python/py-signalevent.c (create_signal_event_object): Use
10412         gdbpy_ref.
10413         * python/py-newobjfileevent.c (create_new_objfile_event_object)
10414         (emit_new_objfile_event, create_clear_objfiles_event_object)
10415         (emit_clear_objfiles_event): Use gdbpy_ref.
10416         * python/py-infevents.c (create_inferior_call_event_object)
10417         (create_register_changed_event_object)
10418         (create_memory_changed_event_object, emit_inferior_call_event)
10419         (emit_memory_changed_event, emit_register_changed_event): Use
10420         gdbpy_ref.
10421         * python/py-exitedevent.c (create_exited_event_object)
10422         (emit_exited_event): Use gdbpy_ref.
10423         * python/py-event.h (evpy_emit_event): Remove
10424         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
10425         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
10426         * python/py-continueevent.c (emit_continue_event): Use
10427         gdbpy_ref.
10428         * python/py-breakpoint.c (gdbpy_breakpoint_created)
10429         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
10430         gdbpy_ref.
10431         * python/py-bpevent.c (create_breakpoint_event_object): Use
10432         gdbpy_ref.
10433
10434 2017-01-10  Tom Tromey  <tom@tromey.com>
10435
10436         * python/py-ref.h: New file.
10437
10438 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
10439
10440         * cli-out.c (cli_ui_out::do_redirect): Change return type to
10441         void.
10442         * cli-out.h (cli_ui_out::do_redirect): Likewise.
10443         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
10444         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
10445         * ui-out.c (ui_out::redirect): Likewise.
10446         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
10447         * cli/cli-logging.c (set_logging_redirect): Update call site of
10448         ui_out::redirect.
10449         (handle_redirections): Likewise.
10450         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
10451         * top.c (execute_command_to_string): Likewise.
10452         * utils.c (do_ui_out_redirect_pop): Likewise.
10453
10454 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
10455
10456         * stack.c (_initialize_stack): Update "frame" command help message.
10457
10458 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
10459
10460         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
10461
10462 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10463
10464         * x86-linux-nat.h: Include gdb_proc_service.h.
10465
10466 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10467
10468         * ser-base.h: Include serial.h.
10469
10470 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10471
10472         * ppc-linux-tdep.h: Include ppc-tdep.h.
10473
10474 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10475
10476         * nat/amd64-linux-siginfo.h: Include signal.h.
10477
10478 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10479
10480         * nat/aarch64-linux-hw-point.h: Include break-common.h.
10481
10482 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10483
10484         * mi/mi-parse.h: Include mi-cmds.h.
10485
10486 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10487
10488         * inf-loop.c: Don't include "target.h".
10489         * inf-loop.h: Include it here.
10490
10491 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10492
10493         * dfp.h: Include "dboulest.h" and "expression.h".
10494
10495 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10496
10497         * ax-gdb.h: Include "ax.h".
10498
10499 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10500
10501         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
10502         with nat/gdb_ptrace.h.
10503
10504 2017-01-05  Yao Qi  <yao.qi@linaro.org>
10505
10506         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
10507         new line.
10508         (mips64_fbsd_sigframe_init): Likewise.
10509
10510 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
10511
10512         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
10513         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
10514
10515 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
10516
10517         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
10518         * NEWS: Mention new FreeBSD/mips native configuration.
10519         * config/mips/fbsd.mh: New file.
10520         * configure.host: Add mips*-*-freebsd*.
10521         * mips-fbsd-nat.c: New file.
10522
10523 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
10524
10525         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
10526         (ALLDEPFILES): Add mips-fbsd-tdep.c.
10527         * NEWS: Mention new FreeBSD/mips target.
10528         * configure.tgt: Add mips*-*-freebsd*.
10529         * mips-fbsd-tdep.c: New file.
10530         * mips-fbsd-tdep.h: New file.
10531
10532 2017-01-04  Yao Qi  <yao.qi@linaro.org>
10533
10534         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
10535         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
10536
10537 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
10538
10539         Update copyright year range in all GDB files.
10540
10541 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
10542
10543         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
10544
10545 For older changes see ChangeLog-2016.
10546 \f
10547 Local Variables:
10548 mode: change-log
10549 left-margin: 8
10550 fill-column: 74
10551 version-control: never
10552 coding: utf-8
10553 End: