dwarf2read: Restrict ICC workaround to ICC<14
[external/binutils.git] / gdb / ChangeLog
1 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2             Pedro Alves <palves@redhat.com>
3
4         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
5         producer_is_icc_lt_14.
6         (producer_is_icc_lt_14): New function.
7         (check_producer): Add code for checking version of ICC.
8         (producer_is_icc): Move to producer.c.
9         (read_structure_type): Restrict ICC workaround to ICC<14.
10         * producer.c: Include selftest.h.
11         (producer_is_icc, producer_parsing_tests, _initialize_producer):
12         New functions.
13         * producer.h (producer_is_icc): New declaration.
14
15 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
16
17         * Makefile.in (SFILES): Add producer.c.
18         (COMMON_OBS): Add producer.o
19         * amd64-tdep.c (producer.h): Add new include.
20         * dwarf2read.c (producer.h): Add new include.
21         * producer.c: New file.
22         * producer.h: New file.
23         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
24         producer.c.
25         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
26         producer.h.
27
28 2017-09-26  Matthias Klose  <doko@ubuntu.com>
29
30         * configure.ac: Search ncursesw before ncurses.
31         Check ncursesw/ncurses.h before ncurses/ncurses.h.
32         * gdb_curses.h: Include <ncursesw/ncurses.h>
33         * config.in, configure: Regenerate.
34
35 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
36
37         PR gdb/22185
38         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
39         obsolete.
40         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
41         Remove i386sol2 support.
42         * configure.nat <i386sol2>: Remove.
43         <sol2-64>: Fold into ...
44         <sol2>: ... this.
45         Move common settings to default section.
46         Add sol-thread.o.
47         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
48         x86_64-*-solaris2.1[0-9]*>: Rename to ...
49         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
50         <i[34567]86-*-solaris*>: Remove.
51         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
52
53         * configure.ac: Remove wctype in libw check.
54         (_MSE_INT_H): Don't define on Solaris 7-9.
55         <solaris*>: Remove libthread_db.so.1 check.
56         * configure: Regenerate.
57         * config.in: Regenerate.
58
59         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
60         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
61         (gdb_ps_size_t): Remove.
62         Use base types in users.
63         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
64
65         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
66
67 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
68
69         PR build/22206
70         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
71         (adi_is_addr_mapped): Likewise.
72         (PSR_ICC): Don't redefine.
73         (PSR_IMPL): Likewise.
74
75 2017-09-25  Tom Tromey  <tom@tromey.com>
76
77         * regcache.c (regcache::dump): Use string_printf.
78
79 2017-09-25  Tom Tromey  <tom@tromey.com>
80
81         * regcache.c (class regcache_invalidator): New.
82         (struct register_to_invalidate): Remove.
83         (make_cleanup_regcache_invalidate): Remove.
84         (regcache::raw_write): Use regcache_invalidator.
85
86 2017-09-25  Tom Tromey  <tom@tromey.com>
87
88         * spu-tdep.c (spu2ppu_sniffer): Update.
89         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
90         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
91         Remove.
92         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
93         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
94         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
95         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
96         (frame_pop): Update.
97
98 2017-09-25  Tom Tromey  <tom@tromey.com>
99
100         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
101         * regcache.h (regcache_xfree): Don't declare.
102         * regcache.c (regcache_xfree): Remove.
103         (do_regcache_xfree): Use delete.
104         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
105         * linux-fork.c (free_fork): Use delete.
106         (fork_save_infrun_state): Likewise.
107         * jit.c (jit_dealloc_cache): Use delete.
108         * infrun.c (discard_infcall_suspend_state): Use delete.
109
110 2017-09-25  Tom Tromey  <tom@tromey.com>
111
112         * regcache.h (regcache_xmalloc): Don't declare.
113         (regcache_raw_set_cached_value): Update comment.
114         * regcache.c (regcache_xmalloc): Remove.
115         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
116         * jit.c (jit_frame_sniffer): Use new.
117         * frame.c (frame_save_as_regcache): Use new.
118
119 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
120
121         * NEWS: Advertise support for guarded-storage registers on IBM z.
122
123 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
124
125         * s390-linux-nat.c (have_regset_gs): New static variable.
126         (s390_linux_fetch_inferior_registers): Handle guarded-storage
127         control block and guarded-storage broadcast control regsets.
128         (s390_read_description): Detect whether the target has
129         guarded-storage support, return appropriate tdesc.
130         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
131         (features/s390x-gs-linux64.c): Likewise.
132         (struct gdbarch_tdep) <have_gs>: New field.
133         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
134         (s390_gsbc_regset): New variables.
135         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
136         and s390_gsbc_regset, if applicable.
137         (s390_core_read_description): Check whether core file was from a
138         target with guarded-storage support; include appropriate regsets.
139         (s390_gdbarch_init): Add registers for guarded-storage support.
140         (_initialize_s390_tdep): Initialize new target descriptions that
141         include registers for guarded-storage support.
142         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
143         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
144         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
145         (S390_NUM_REGS): Adjust macro definition.
146         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
147         (tdesc_s390x_gs_linux64): New declarations.
148
149 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
150
151         * features/s390-gs-linux64.xml: New file.
152         * features/s390-gs.xml: New file.
153         * features/s390-gsbc.xml: New file.
154         * features/s390x-gs-linux64.xml: New file.
155         * features/Makefile (WHICH): Add s390-gs-linux64 and
156         s390x-gs-linux64.
157         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
158         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
159         * features/s390-gs-linux64.c: New generated file.
160         * features/s390x-gs-linux64.c: New file.
161         * regformats/s390-gs-linux64.dat: New file.
162         * regformats/s390x-gs-linux64.dat: New file.
163
164 2017-09-23  Tom Tromey  <tom@tromey.com>
165
166         * defs.h (make_cleanup_override_quit_handler): Don't declare.
167
168 2017-09-22  Tom Tromey  <tom@tromey.com>
169
170         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
171         type to scoped_restore_tmpl.
172         <scoped_input_handler>: Initialize m_quit_handler directly.
173
174 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
175
176         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
177         (cd_command): Likewise.  Free "current_directory" before
178         assigning to it.
179         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
180         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
181         * top.c (gdb_dirbuf): Remove global declaration.
182         * top.h (gdb_dirbuf): Likewise.
183
184 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
185
186         * gnulib/aclocal.m4: Regenerate.
187         * gnulib/config.in: Regenerate.
188         * gnulib/configure: Regenerate.
189         * gnulib/import/Makefile.am: Regenerate.
190         * gnulib/import/Makefile.in: Regenerate.
191         * gnulib/import/assure.h: New file.
192         * gnulib/import/at-func.c: Likewise
193         * gnulib/import/chdir-long.c: New file.
194         * gnulib/import/chdir-long.h: New file.
195         * gnulib/import/cloexec.c: New file.
196         * gnulib/import/cloexec.h: New file.
197         * gnulib/import/close.c: New file.
198         * gnulib/import/closedir.c: New file.
199         * gnulib/import/dirent-private.h: New file.
200         * gnulib/import/dup-safer.c: New file.
201         * gnulib/import/dup.c: New file.
202         * gnulib/import/dup2.c: New file.
203         * gnulib/import/error.c: New file.
204         * gnulib/import/error.h: New file.
205         * gnulib/import/exitfail.c: New file.
206         * gnulib/import/exitfail.h: New file.
207         * gnulib/import/fchdir.c: New file.
208         * gnulib/import/fcntl.c: New file.
209         * gnulib/import/fcntl.in.h: New file.
210         * gnulib/import/fd-hook.c: New file.
211         * gnulib/import/fd-hook.h: New file.
212         * gnulib/import/fd-safer.c: New file.
213         * gnulib/import/fdopendir.c: New file.
214         * gnulib/import/filename.h: New file.
215         * gnulib/import/filenamecat-lgpl.c: New file.
216         * gnulib/import/filenamecat.h: New file.
217         * gnulib/import/fstat.c: New file.
218         * gnulib/import/fstatat.c: New file.
219         * gnulib/import/getcwd-lgpl.c: New file.
220         * gnulib/import/getcwd.c: New file.
221         * gnulib/import/getdtablesize.c: New file.
222         * gnulib/import/getlogin_r.c: New file.
223         * gnulib/import/getprogname.c: New file.
224         * gnulib/import/getprogname.h: New file.
225         * gnulib/import/gettext.h: New file.
226         * gnulib/import/glob-libc.h: New file.
227         * gnulib/import/glob.c: New file.
228         * gnulib/import/glob.in.h: New file.
229         * gnulib/import/intprops.h: New file.
230         * gnulib/import/m4/chdir-long.m4: New file.
231         * gnulib/import/m4/close.m4: New file.
232         * gnulib/import/m4/closedir.m4: New file.
233         * gnulib/import/m4/d-ino.m4: New file.
234         * gnulib/import/m4/d-type.m4: New file.
235         * gnulib/import/m4/dup.m4: New file.
236         * gnulib/import/m4/dup2.m4: New file.
237         * gnulib/import/m4/error.m4: New file.
238         * gnulib/import/m4/fchdir.m4: New file.
239         * gnulib/import/m4/fcntl.m4: New file.
240         * gnulib/import/m4/fcntl_h.m4: New file.
241         * gnulib/import/m4/fdopendir.m4: New file.
242         * gnulib/import/m4/filenamecat.m4: New file.
243         * gnulib/import/m4/fstat.m4: New file.
244         * gnulib/import/m4/fstatat.m4: New file.
245         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
246         * gnulib/import/m4/getcwd-path-max.m4: New file.
247         * gnulib/import/m4/getcwd.m4: New file.
248         * gnulib/import/m4/getdtablesize.m4: New file.
249         * gnulib/import/m4/getlogin_r.m4: New file.
250         * gnulib/import/m4/getprogname.m4: New file.
251         * gnulib/import/m4/glob.m4: New file.
252         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
253         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
254         * gnulib/import/m4/mempcpy.m4: New file.
255         * gnulib/import/m4/memrchr.m4: New file.
256         * gnulib/import/m4/mode_t.m4: New file.
257         * gnulib/import/m4/msvc-inval.m4: New file.
258         * gnulib/import/m4/msvc-nothrow.m4: New file.
259         * gnulib/import/m4/open.m4: New file.
260         * gnulib/import/m4/openat.m4: New file.
261         * gnulib/import/m4/opendir.m4: New file.
262         * gnulib/import/m4/readdir.m4: New file.
263         * gnulib/import/m4/realloc.m4: New file.
264         * gnulib/import/m4/rewinddir.m4: New file.
265         * gnulib/import/m4/save-cwd.m4: New file.
266         * gnulib/import/m4/strdup.m4: New file.
267         * gnulib/import/m4/strerror.m4: New file.
268         * gnulib/import/m4/unistd-safer.m4: New file.
269         * gnulib/import/mempcpy.c: New file.
270         * gnulib/import/memrchr.c: New file.
271         * gnulib/import/msvc-inval.c: New file.
272         * gnulib/import/msvc-inval.h: New file.
273         * gnulib/import/msvc-nothrow.c: New file.
274         * gnulib/import/msvc-nothrow.h: New file.
275         * gnulib/import/open.c: New file.
276         * gnulib/import/openat-die.c: New file.
277         * gnulib/import/openat-priv.h: New file.
278         * gnulib/import/openat-proc.c: New file.
279         * gnulib/import/openat.c: New file.
280         * gnulib/import/openat.h: New file.
281         * gnulib/import/opendir.c: New file.
282         * gnulib/import/pipe-safer.c: New file.
283         * gnulib/import/readdir.c: New file.
284         * gnulib/import/realloc.c: New file.
285         * gnulib/import/rewinddir.c: New file.
286         * gnulib/import/save-cwd.c: New file.
287         * gnulib/import/save-cwd.h: New file.
288         * gnulib/import/strdup.c: New file.
289         * gnulib/import/strerror-override.c: New file.
290         * gnulib/import/strerror-override.h: New file.
291         * gnulib/import/strerror.c: New file.
292         * gnulib/import/unistd--.h: New file.
293         * gnulib/import/unistd-safer.h: New file.
294         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
295         "getcwd" and "glob".
296         * ser-tcp.c: Undefine "close" before redefining it.
297
298 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
299
300         * guile/scm-value.c (gdbscm_value_address): Initialize address,
301         get rid of res_val.
302
303 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
304
305         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
306         <sol2,sparc>: Likewise.
307         <sol2-64,i386>: Likewise.
308
309         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
310         -Wdeprecated-declarations on *-*-solaris*.
311         * configure: Regenerate.
312
313         * procfs.c: Include "nat/inferior.h".
314         (procfs_info_proc): Fix typo.
315
316 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
317
318         * remote.c (vector): Include.
319         (struct private_thread_info): Add field, thread_handle.
320         (free_private_thread_info): Deallocate storage associated with
321         thread handle.
322         (get_private_info_thread): Initialize `thread_handle' field.
323         (struct thread_item): Add field, thread_handle.
324         (clear_threads_listing_context): Deallocate storage associated
325         with thread handle.
326         (start_thread): Add support for "handle" attribute.
327         (thread_attributes): Add "handle".
328         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
329         field.
330         (remote_update_thread_list): Update thread_handle.
331         (remote_thread_handle_to_thread_info): New function.
332         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
333
334 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
335
336         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
337         function.
338         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
339         * python/python-internal.h (thread_object_type): Declare.
340
341 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
342
343         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
344         (target_thread_handle_to_thread_info): Declare.
345         * target.c (target_thread_handle_to_thread_info): New function.
346         * target-delegates.c: Regenerate.
347         * gdbthread.h (find_thread_by_handle): Declare.
348         * thread.c (find_thread_by_handle): New function.
349         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
350         function.
351         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
352
353 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
354
355         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
356
357 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
358
359         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
360
361 2017-09-21  Yao Qi  <yao.qi@linaro.org>
362
363         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
364         to gdb_target_obs.
365
366 2017-09-20  Tom Tromey  <tom@tromey.com>
367
368         * breakpoint.c (struct counted_command_line): Remove.
369         (breakpoint_commands): Update.
370         (alloc_counted_command_line, incref_counted_command_line)
371         (decref_counted_command_line, do_cleanup_counted_command_line)
372         (make_cleanup_decref_counted_command_line): Remove.
373         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
374         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
375         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
376         (save_breakpoints): Update.
377         * breakpoint.h (counted_command_line): Now a typedef to
378         shared_ptr.
379         (struct breakpoint) <commands>: Now a counted_command_line.
380         (struct bpstats) <command>: Likewise.
381
382 2017-09-20  Tom Tromey  <tom@tromey.com>
383
384         * breakpoint.c (struct commands_info, do_map_commands_command):
385         Remove.
386         (commands_command_1): Update.
387         (iterate_over_related_breakpoints): Take a function_view.
388         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
389         (delete_command): Update.
390         (map_breakpoint_numbers): Take a function_view.
391         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
392         (disable_command): Update.
393         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
394         (enable_command): Update.
395         (struct disp_data, do_enable_breakpoint_disp)
396         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
397         (do_map_enable_delete_breakpoint): Remove.
398         (enable_once_command, enable_count_command, enable_delete_command)
399         (delete_trace_variable_command): Update.
400
401 2017-09-20  Tom Tromey  <tom@tromey.com>
402
403         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
404         (bpstat_clear): Use delete.
405         (bpstats): New constructors.
406         (bpstat_copy, bpstat_stop_status): Use new.
407         (dprintf_after_condition_true): Update.
408         * breakpoint.h (bpstats::bpstats): Add constructors.
409         (bpstats::~bpstats): Add destructor.
410
411 2017-09-20  Pedro Alves  <palves@redhat.com>
412
413         * eval.c (make_params): Delete, refactored as ...
414         (class fake_method): ... this new type's ctor.
415         (fake_method::~fake_method): New.
416         (evaluate_subexp_standard): Use 'fake_method'.
417
418 2017-09-20  Tom Tromey  <tom@tromey.com>
419
420         * windows-nat.c (get_windows_debug_event, windows_wait)
421         (do_initial_windows_stuff, windows_attach): Update.
422         * utils.c (vwarning, internal_vproblem): Update.
423         (ui_unregister_input_event_handler_cleanup)
424         (prepare_to_handle_input): Remove.
425         (class scoped_input_handler): New.
426         (defaulted_query, prompt_for_continue): Update.
427         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
428         Update.
429         * top.c (undo_terminal_modifications_before_exit): Update.
430         * target/target.h (target_terminal_init, target_terminal_inferior)
431         (target_terminal_ours): Don't declare.
432         (class target_terminal): New.
433         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
434         (target_terminal_ours_for_output)
435         (make_cleanup_restore_target_terminal): Don't declare.
436         (target_terminal_info): Remove.
437         * target.c (enum terminal_state, terminal_state): Remove.
438         (target_terminal::terminal_state): Define.
439         (target_terminal::init): Rename from target_terminal_init.
440         (target_terminal::inferior): Rename from
441         target_terminal_inferior.
442         (target_terminal::ours): Rename from target_terminal_ours.
443         (target_terminal::ours_for_output): Rename from
444         target_terminal_ours_for_output.
445         (target_terminal::info): New method.
446         (cleanup_restore_target_terminal)
447         (make_cleanup_restore_target_terminal): Remove.
448         * solib.c (handle_solib_event): Update.
449         * remote.c (remote_serial_quit_handler): Update.
450         (remote_terminal_inferior, remote_wait_as): Update.
451         * record-full.c (record_full_wait_1): Update.
452         * nto-procfs.c (procfs_create_inferior): Update.
453         * nat/fork-inferior.c (startup_inferior): Update.
454         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
455         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
456         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
457         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
458         (mi_breakpoint_created, mi_breakpoint_deleted)
459         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
460         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
461         (mi_user_selected_context_changed, report_initial_inferior):
462         Update.
463         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
464         (linux_nat_terminal_inferior): Update.
465         * infrun.c (follow_fork_inferior)
466         (handle_vfork_child_exec_or_exit, do_target_resume)
467         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
468         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
469         Update.
470         * inflow.c (child_terminal_init, info_terminal_command): Update.
471         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
472         (attach_command): Update.
473         * infcall.c (call_thread_fsm_should_stop): Update.
474         * gnu-nat.c (gnu_attach): Update.
475         * extension.c (struct active_ext_lang_state)
476         (restore_active_ext_lang): Update.
477         * exceptions.c (print_flush): Update.
478         * event-top.c (async_enable_stdin, default_quit_handler): Update.
479         (struct quit_handler_cleanup_data, restore_quit_handler)
480         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
481         Remove.
482         * cp-support.c (gdb_demangle): Update.
483         * breakpoint.c (update_inserted_breakpoint_locations)
484         (insert_breakpoint_locations, handle_jit_event)
485         (disable_breakpoints_in_unloaded_shlib): Update.
486         * annotate.c (annotate_breakpoints_invalid)
487         (annotate_frames_invalid): Update.
488
489 2017-09-20  Tom Tromey  <tom@tromey.com>
490
491         * main.c (catch_command_errors): Rename from
492         catch_command_errors_const.
493         (captured_main_1): Update.
494
495 2017-09-20  Pedro Alves  <palves@redhat.com>
496
497         * cli/cli-cmds.c (list_command): Use print_sal_location.
498         (print_sal_location): New function.
499         (ambiguous_line_spec): Use print_sal_location.
500         * linespec.c (symbol_to_sal): Record the symbol in the sal.
501         * symtab.c (find_function_start_sal): Likewise.
502         * symtab.h (symtab_and_line::symbol): New field.
503
504 2017-09-20  Pedro Alves  <palves@redhat.com>
505
506         * linespec.c (minsym_found): Handle non-text minsyms.
507         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
508
509 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
510
511         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
512         backslash.
513
514 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
515
516         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
517         vmovups instead vmovaps.
518         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
519
520 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
521
522         * NEWS (Changes since GDB 8.0): Add starti.
523         * infcmd.c (enum run_break): New.
524         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
525         case.
526         (run_command): Use enum run_how.
527         (start_command): Likewise.
528         (starti_command): New function.
529         (RUN_ARGS_HELP): New macro.
530         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
531         commands.  Add starti command.
532
533 2017-09-19  Yao Qi  <yao.qi@linaro.org>
534
535         * Makefile.in (monitor.o): Remove the rule.
536
537 2017-09-19  Yao Qi  <yao.qi@linaro.org>
538
539         * annotate.h (struct annotate_arg_emitter): Use
540         DISABLE_COPY_AND_ASSIGN.
541         * common/refcounted-object.h (refcounted_object): Likewise.
542         * completer.h (struct completion_result): Likewise.
543         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
544         * filename-seen-cache.h (filename_seen_cache): Likewise.
545         * gdbcore.h (thread_section_name): Likewise.
546         * gdb_regex.h (compiled_regex): Likewise.
547         * gdbthread.h (scoped_restore_current_thread): Likewise.
548         * inferior.h (scoped_restore_current_inferior): Likewise.
549         * jit.c (jit_reader): Likewise.
550         * linespec.h (struct linespec_result): Likewise.
551         * mi/mi-parse.h (struct mi_parse): Likewise.
552         * nat/fork-inferior.c (execv_argv): Likewise.
553         * progspace.h (scoped_restore_current_program_space): Likewise.
554         * python/python-internal.h (class gdbpy_enter): Likewise.
555         * regcache.h (regcache): Likewise.
556         * target-descriptions.c (struct tdesc_reg): Likewise.
557         (struct tdesc_type): Likewise.
558         (struct tdesc_feature): Likewise.
559         * ui-out.h (ui_out_emit_type): Likewise.
560
561 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
562
563         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
564         label abort_expression.
565
566 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
567
568         * common/buffer.c (buffer_xml_printf): Adjust.
569         * common/xml-utils.c (xml_escape_text): Change return type to
570         std::string, update code accordingly.
571         * common/xml-utils.h (xml_escape_text): Change return type to
572         std::string.
573         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
574         * windows-tdep.c (windows_xfer_shared_library): Adjust.
575         * unittests/xml-utils-selftests.c (test_xml_escape_text):
576         Adjust.
577
578 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
579
580         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
581         (SUBDIR_UNITTESTS_OBS): Add new object file.
582         * unittests/xml-utils-selftests.c: New file.
583
584 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
585
586         * common/selftest.h (selftest): New struct/interface.
587         (register_test): Add name parameter, add new overload.
588         (run_tests): Add filter parameter.
589         (for_each_selftest_ftype): New typedef.
590         (for_each_selftest): New declaration.
591         * common/selftest.c (tests): Change type to
592         map<string, unique_ptr<selftest>>.
593         (simple_selftest): New struct.
594         (register_test): New function.
595         (register_test): Add name parameter and use it.
596         (run_tests): Add filter parameter and use it.  Add prints.
597         Adjust to vector -> map change.
598         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
599         registering selftests.
600         * arm-tdep.c (_initialize_arm_tdep): Likewise.
601         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
602         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
603         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
604         * findvar.c (_initialize_findvar): Likewise.
605         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
606         * maint.c (maintenance_selftest): Update call to run_tests.
607         (maintenance_info_selftests): New function.
608         (_initialize_maint_cmds): Register "maintenance info selftests"
609         command.  Update "maintenance selftest" doc.
610         * regcache.c (_initialize_regcache): Add names when registering
611         selftests.
612         * rust-exp.y (_initialize_rust_exp): Likewise.
613         * selftest-arch.c (gdbarch_selftest): New struct.
614         (gdbarch_tests): Remove.
615         (register_test_foreach_arch): Add name parameter.  Call
616         register_test.
617         (tests_with_arch): Remove, move most content to
618         gdbarch_selftest::operator().
619         (_initialize_selftests_foreach_arch): Remove.
620         * selftest-arch.h (register_test_foreach_arch): Add name
621         parameter.
622         (run_tests_with_arch): New declaration.
623         * utils-selftests.c (_initialize_utils_selftests): Add names
624         when registering selftests.
625         * utils.c (_initialize_utils): Likewise.
626         * unittests/array-view-selftests.c
627         (_initialize_array_view_selftests): Likewise.
628         * unittests/environ-selftests.c (_initialize_environ_selftests):
629         Likewise.
630         * unittests/function-view-selftests.c
631         (_initialize_function_view_selftests): Likewise.
632         * unittests/offset-type-selftests.c
633         (_initialize_offset_type_selftests): Likewise.
634         * unittests/optional-selftests.c
635         (_initialize_optional_selftests): Likewise.
636         * unittests/scoped_restore-selftests.c
637         (_initialize_scoped_restore_selftests): Likewise.
638         * NEWS: Document "maintenance selftest" and "maint info
639         selftests".
640
641 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
642
643         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
644         scoped_restore.
645
646 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
647
648         * mi/mi-main.c (mi_load_progress): Make uiout variable
649         a unique_ptr.
650
651 2017-09-15  Pedro Alves  <palves@redhat.com>
652
653         * compile/compile-c-types.c (convert_enum, convert_int)
654         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
655
656 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
657
658         * dwarf2read.c (copy_string): Remove.
659         (parse_macro_definition): Replace copy_string with savestring.
660
661 2017-09-15  Yao Qi  <yao.qi@linaro.org>
662
663         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
664         gdb_target_obs.
665         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
666         Likewise.
667         (i[34567]86-*-linux*): Likewise.
668
669 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
670
671         * dwarf2expr.h (dwarf_stack_value): Add constructor.
672         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
673         <stack>: Change type to std::vector.
674         <stack_len, stack_allocated>: Remove.
675         <grow_stack>: Remove.
676         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
677         (dwarf_expr_context::~dwarf_expr_context): Remove.
678         (dwarf_expr_context::grow_stack): Remove.
679         (dwarf_expr_context::push): Adjust.
680         (dwarf_expr_context::pop): Adjust.
681         (dwarf_expr_context::fetch): Adjust.
682         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
683         (dwarf_expr_context::stack_empty_p): Adjust.
684         (dwarf_expr_context::execute_stack_op): Adjust.
685
686 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
687
688         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
689         return type to bool.
690         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
691
692 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
693
694         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
695         Change type to bool.
696         (dwarf_stack_value) <in_stack_memory>: Likewise.
697         (dwarf_expr_context) <push_address>: Change parameter type to
698         bool.
699         <fetch_in_stack_memory>: Change return type to bool.
700         <push>: Change parameter type to bool.
701         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
702         to bool.
703         (dwarf_expr_context::push_address): Likewise.
704         (dwarf_expr_context::fetch_in_stack_memory): Change return type
705         to bool.
706         (dwarf_expr_context::execute_stack_op): Adjust.
707         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
708
709 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
710
711         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
712         (struct dwarf_expr_context) <n_pieces>: Remove.
713         <pieces>: Change type to std::vector.
714         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
715         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
716         pieces.
717         (dwarf_expr_context::add_piece): Adjust.
718         * dwarf2loc.c (struct piece_closure): Initialize fields.
719         <n_pieces>: Remove.
720         <pieces>: Change type to std::vector.
721         (allocate_piece_closure): Adjust, change parameter to
722         std::vector rvalue and std::move it to piece_closure.
723         (rw_pieced_value): Adjust.
724         (check_pieced_synthetic_pointer): Adjust.
725         (indirect_synthetic_pointer): Adjust.
726         (coerce_pieced_ref): Adjust.
727         (free_pieced_value_closure):  Adjust.  Use delete to free
728         piece_closure.
729         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
730         to allocate_piece_closure.
731         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
732
733 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
734
735         * probe.h (probe_ops_cp): Remove typedef.
736         (DEF_VEC_P (probe_ops_cp)): Remove.
737         (all_probe_ops): Change type to std::vector.
738         * probe.c (info_probes_for_ops): Adjust to vector change.
739         (probe_linespec_to_ops): Likewise.
740         (all_probe_ops): Change type to std::vector.
741         (_initialize_probe): Adjust to vector change.
742         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
743         * elfread.c (elf_get_probes): Likewise.
744         * stap-probe.c (_initialize_stap_probe): Likewise.
745
746 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
747
748         * probe.h (struct bound_probe): Define constructors.
749         * probe.c (bound_probe_s): Remove typedef.
750         (DEF_VEC_O (bound_probe_s)): Remove VEC.
751         (collect_probes): Change return type to std::vector, remove
752         cleanup.
753         (compare_probes): Return bool, change parameter type.  Change
754         semantic to "less than".
755         (gen_ui_out_table_header_info): Change parameter to std::vector
756         and update.
757         (exists_probe_with_pops): Likewise.
758         (info_probes_for_ops): Update to std::vector change.
759         (enable_probes_command): Likewise.
760         (disable_probes_command): Likewise.
761
762 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
763
764         * probe.h (struct probe_ops) <get_probes>: Change parameter from
765         vec to std::vector.
766         * probe.c (parse_probes_in_pspace): Update.
767         (find_probes_in_objfile): Update.
768         (find_probe_by_pc): Update.
769         (collect_probes): Update.
770         (probe_any_get_probes): Update.
771         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
772         return type to reference to std::vector.
773         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
774         std::vector and update.
775         (dtrace_process_dof): Likewise.
776         (dtrace_get_probes): Likewise.
777         * elfread.c (elf_get_probes): Change return type to std::vector,
778         store an std::vector in bfd_data.
779         (probe_key_free): Update to std::vector.
780         * stap-probe.c (handle_stap_probe): Change parameter to
781         std::vector and update.
782         (stap_get_probes): Likewise.
783         * symfile-debug.c (debug_sym_get_probes): Change return type to
784         std::vector and update.
785
786 2017-09-11  Tom Tromey  <tom@tromey.com>
787
788         * breakpoint.c (program_breakpoint_here_p): Update.
789         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
790         from make_show_memory_breakpoints_cleanup.  Return a
791         scoped_restore_tmpl<int>.
792         (restore_show_memory_breakpoints): Remove.
793         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
794         * mem-break.c (memory_validate_breakpoint): Update.
795         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
796         (ia64_memory_remove_breakpoint): Update.
797         (ia64_breakpoint_from_pc): Update.
798         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
799         from make_show_memory_breakpoints_cleanup.
800
801 2017-09-11  Tom Tromey  <tom@tromey.com>
802
803         * d-namespace.c (d_lookup_symbol): Use std::string.
804         (find_symbol_in_baseclass): Likewise.
805
806 2017-09-11  Tom Tromey  <tom@tromey.com>
807
808         * ctf.c (ctf_start): Use std::string.
809
810 2017-09-11  Tom Tromey  <tom@tromey.com>
811
812         * ada-lang.c (is_known_support_routine): Update.
813         (ada_unhandled_exception_name_addr_from_raise): Update.
814         * guile/scm-frame.c (gdbscm_frame_name): Update.
815         * python/py-frame.c (frapy_name): Update.
816         (frapy_function): Update.
817         * stack.h (find_frame_funname): Update.
818         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
819         (print_frame): Update.
820
821 2017-09-11  Tom Tromey  <tom@tromey.com>
822
823         * findcmd.c (put_bits): Take a gdb::byte_vector.
824         (parse_find_args): Return gdb::byte_vector.  "args" now const.
825         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
826         cleanups.
827         (find_command): Update.
828
829 2017-09-11  Tom Tromey  <tom@tromey.com>
830
831         * cli/cli-script.c (class scoped_restore_hook_in): New.
832         (clear_hook_in_cleanup): Remove.
833         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
834         scoped_restore_hook_in.
835
836 2017-09-11  Tom Tromey  <tom@tromey.com>
837
838         * cli/cli-script.c (restore_interp): Remove.
839         (read_command_lines): Use scoped_restore_interp.
840         * interps.c (scoped_restore_interp::set_temp): Rename from
841         interp_set_temp.
842         * interps.h (class scoped_restore_interp): New.
843         (interp_set_temp): Remove.
844
845 2017-09-11  Tom Tromey  <tom@tromey.com>
846
847         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
848         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
849         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
850         scoped_restore.
851         (mi_cmd_break_insert_1): Update.
852         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
853         scoped_restore.
854
855 2017-09-11  Tom Tromey  <tom@tromey.com>
856
857         * demangle.c (demangle_command): Update.
858         * breakpoint.c (disable_command): Update.
859         (enable_command): Update.
860         (find_location_by_number): Make "number" const.  Use
861         get_number_trailer.
862         * cli/cli-utils.c (extract_arg): Return std::string.
863         * probe.c (parse_probe_linespec): Update.  Change types.
864         (collect_probes): Take string arguments.
865         (parse_probe_linespec): Likewise.
866         (info_probes_for_ops): Update.
867         (enable_probes_command): Update.
868         (disable_probes_command): Update.
869         * break-catch-sig.c (catch_signal_split_args): Update.
870         * mi/mi-parse.c (mi_parse): Update.
871
872 2017-09-11  Tom Tromey  <tom@tromey.com>
873
874         * language.h (language_enum): Make argument const.
875         * language.c (language_enum): Make argument const.
876
877 2017-09-11  Tom Tromey  <tom@tromey.com>
878
879         * common/common-utils.h (skip_to_space): Remove macro, redeclare
880         as function.
881         (skip_to_space): Rename from skip_to_space_const.
882         * common/common-utils.c (skip_to_space): New function.
883         (skip_to_space): Rename from skip_to_space_const.
884         * cli/cli-utils.h (get_number): Rename from get_number_const.
885         (extract_arg): Rename from extract_arg_const.
886         * cli/cli-utils.c (get_number): Rename from get_number_const.
887         (extract_arg): Rename from extract_arg_const.
888         (number_or_range_parser::get_number): Use ::get_number.
889         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
890         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
891         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
892         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
893         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
894         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
895         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
896         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
897
898 2017-09-11  Tom Tromey  <tom@tromey.com>
899
900         * python/python.c (do_start_initialization): Use
901         py-event-types.def to initialize types.
902         Define all object type structures.
903         * python/python-internal.h: Don't declare event initialization
904         functions.
905         * python/py-threadevent.c (thread_event_object_type): Don't
906         define.
907         * python/py-stopevent.c (stop_event_object_type): Don't define.
908         * python/py-signalevent.c (signal_event_object_type): Don't
909         declare or define.
910         * python/py-newobjfileevent.c (new_objfile_event_object_type)
911         (clear_objfiles_event_object_type): Don't declare or define.
912         * python/py-infevents.c (inferior_call_pre_event_object_type)
913         (inferior_call_post_event_object_type)
914         (register_changed_event_object_type)
915         (memory_changed_event_object_type): Don't declare or define.
916         * python/py-inferior.c (new_thread_event_object_type)
917         (new_inferior_event_object_type)
918         (inferior_deleted_event_object_type): Don't declare or define.
919         * python/py-exitedevent.c (exited_event_object_type): Don't
920         declare or define.
921         * python/py-evts.c (gdbpy_initialize_py_events): Use
922         py-all-events.def.
923         * python/py-events.h (thread_event_object_type): Don't declare.
924         (events_object): Use py-all-events.def.
925         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
926         py-event-types.def.
927         * python/py-event-types.def: New file.
928         * python/py-continueevent.c (create_continue_event_object): Don't
929         declare or define.
930         * python/py-bpevent.c (breakpoint_event_object_type): Don't
931         declare or define.
932         * python/py-all-events.def: New file.
933
934 2017-09-11  Tom Tromey  <tom@tromey.com>
935
936         * python/py-threadevent.c (create_thread_event_object): Return
937         gdbpy_ref.
938         * python/py-stopevent.h (create_stop_event_object)
939         (create_breakpoint_event_object, create_signal_event_object):
940         Update.
941         * python/py-stopevent.c (create_stop_event_object): Return
942         gdbpy_ref.
943         (emit_stop_event): Update.
944         * python/py-signalevent.c (create_signal_event_object): Return
945         gdbpy_ref.
946         * python/py-infevents.c (create_inferior_call_event_object):
947         Update.
948         * python/py-event.h (create_event_object)
949         (create_thread_event_object): Update.
950         * python/py-event.c (create_event_object): Return gdbpy_ref.
951         * python/py-continueevent.c: Return gdbpy_ref.
952         * python/py-bpevent.c (create_breakpoint_event_object): Return
953         gdbpy_ref.
954
955 2017-09-11  Tom Tromey  <tom@tromey.com>
956
957         PR python/15622:
958         * NEWS: Add entry.
959         * python/python.c (do_start_initialization): Initialize new event
960         types.
961         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
962         (gdbpy_initialize_inferior_deleted_event)
963         (gdbpy_initialize_new_thread_event): Declare.
964         * python/py-threadevent.c (create_thread_event_object): Add option
965         "thread" parameter.
966         * python/py-inferior.c (new_thread_event_object_type)
967         (new_inferior_event_object_type)
968         (inferior_deleted_event_object_type): Declare.
969         (python_new_inferior, python_inferior_deleted): New functions.
970         (add_thread_object): Emit new_thread event.
971         (gdbpy_initialize_inferior): Attach new functions to corresponding
972         observers.
973         (new_thread, new_inferior, inferior_deleted): Define new event
974         types.
975         * python/py-evts.c (gdbpy_initialize_py_events): Add new
976         registries.
977         * python/py-events.h (events_object) <new_inferior,
978         inferior_deleted, new_thread>: New fields.
979         * python/py-event.h (create_thread_event_breakpoint): Add optional
980         "thread" parameter.
981
982 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
983
984         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
985         check current_ui instead.
986         (internal_vproblem): Likewise.
987
988 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
989
990         * thread.c (print_thread_info_1): Remove unnecessary calls to
991         uiout->is_mi_like_p.
992
993 2017-09-09  Tom Tromey  <tom@tromey.com>
994
995         * namespace.h (add_using_directive): Update.
996         * namespace.c (add_using_directive): Change type of excludes to
997         std::vector.
998         * dwarf2read.c (read_import_statement): Use std::vector.
999         (read_namespace): Update.
1000         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1001
1002 2017-09-09  Tom Tromey  <tom@tromey.com>
1003
1004         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
1005
1006 2017-09-09  Tom Tromey  <tom@tromey.com>
1007
1008         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
1009
1010 2017-09-09  Tom Tromey  <tom@tromey.com>
1011
1012         * stack.c (func_command): Use gdb::def_vector.
1013
1014 2017-09-09  Tom Tromey  <tom@tromey.com>
1015
1016         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
1017         ui_out_emit_list, ui_out_emit_tuple.
1018         (mi_cmd_var_update): Likewise.
1019
1020 2017-09-09  Tom Tromey  <tom@tromey.com>
1021
1022         * mi/mi-interp.c (mi_user_selected_context_changed): Use
1023         ui_out_redirect_pop.
1024         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
1025         ui_out_redirect_pop.
1026         * utils.c (do_ui_out_redirect_pop)
1027         (make_cleanup_ui_out_redirect_pop): Remove.
1028         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
1029         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
1030         * ui-out.h (ui_out_redirect_pop): New class.
1031
1032 2017-09-09  Tom Tromey  <tom@tromey.com>
1033
1034         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
1035         (list_available_thread_groups, mi_cmd_list_thread_groups)
1036         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
1037         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
1038         Likewise.
1039
1040 2017-09-09  Tom Tromey  <tom@tromey.com>
1041
1042         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
1043         ui_out_emit_tuple.
1044
1045 2017-09-09  Tom Tromey  <tom@tromey.com>
1046
1047         * target.c (flash_erase_command): Use ui_out_emit_tuple.
1048         * stack.c (print_frame): Use ui_out_emit_tuple.
1049         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
1050         (info_spu_mailbox_command, info_spu_dma_command)
1051         (info_spu_proxydma_command): Likewise.
1052         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
1053         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
1054         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
1055         ui_out_emit_tuple.
1056         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
1057
1058 2017-09-09  Tom Tromey  <tom@tromey.com>
1059
1060         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
1061         (class ui_out_emit_table): Update comment.
1062         * ui-out.c (do_cleanup_table_end)
1063         (make_cleanup_ui_out_table_begin_end): Remove.
1064         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
1065         (info_spu_dma_cmdlist): Likewise.
1066         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
1067         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
1068         ui_out_emit_table.
1069
1070 2017-09-09  Tom Tromey  <tom@tromey.com>
1071
1072         * thread.c (print_thread_info_1): Use ui_out_emit_table,
1073         ui_out_emit_list, gdb::optional.
1074
1075 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
1076
1077         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
1078         prototype.
1079         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
1080         prototype.
1081         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
1082         prototype.
1083         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
1084         * ada-exp.y: Remove _initialize_ada_exp prototype.
1085         * ada-lang.c: Remove _initialize_ada_language prototype.
1086         * ada-tasks.c: Remove _initialize_tasks prototype.
1087         * addrmap.c: Remove _initialize_addrmap prototype.
1088         * agent.c: Remove _initialize_agent prototype.
1089         * aix-thread.c: Remove _initialize_aix_thread prototype.
1090         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
1091         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
1092         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
1093         prototype.
1094         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
1095         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
1096         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
1097         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
1098         prototype.
1099         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
1100         prototype.
1101         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
1102         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
1103         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
1104         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
1105         prototype.
1106         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
1107         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
1108         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
1109         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
1110         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1111         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
1112         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
1113         prototype.
1114         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
1115         prototype.
1116         * annotate.c: Remove _initialize_annotate prototype.
1117         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
1118         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
1119         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
1120         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
1121         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
1122         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
1123         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
1124         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
1125         prototype.
1126         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
1127         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
1128         * auto-load.c: Remove _initialize_auto_load prototype.
1129         * auxv.c: Remove _initialize_auxv prototype.
1130         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
1131         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
1132         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
1133         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
1134         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
1135         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
1136         prototype.
1137         * break-catch-throw.c: Remove _initialize_break_catch_throw
1138         prototype.
1139         * breakpoint.c: Remove _initialize_breakpoint prototype.
1140         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
1141         * btrace.c: Remove _initialize_btrace prototype.
1142         * charset.c: Remove _initialize_charset prototype.
1143         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
1144         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
1145         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
1146         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
1147         * cli/cli-script.c: Remove _initialize_cli_script prototype.
1148         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
1149         * coffread.c: Remove _initialize_coffread prototype.
1150         * compile/compile.c: Remove _initialize_compile prototype.
1151         * complaints.c: Remove _initialize_complaints prototype.
1152         * completer.c: Remove _initialize_completer prototype.
1153         * copying.awk: Remove _initialize_copying prototype.
1154         * copying.c: Regenerate.
1155         * core-regset.c: Remove _initialize_core_regset prototype.
1156         * corefile.c: Remove _initialize_core prototype.
1157         * corelow.c: Remove _initialize_corelow prototype.
1158         * cp-abi.c: Remove _initialize_cp_abi prototype.
1159         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
1160         * cp-support.c: Remove _initialize_cp_support prototype.
1161         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
1162         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
1163         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
1164         * ctf.c: Remove _initialize_ctf prototype.
1165         * d-lang.c: Remove _initialize_d_language prototype.
1166         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
1167         prototype.
1168         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
1169         * dbxread.c: Remove _initialize_dbxread prototype.
1170         * dcache.c: Remove _initialize_dcache prototype.
1171         * demangle.c: Remove _initialize_demangler prototype.
1172         * disasm-selftests.c: Remove _initialize_disasm_selftests
1173         prototype.
1174         * disasm.c: Remove _initialize_disasm prototype.
1175         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
1176         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
1177         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
1178         prototype.
1179         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
1180         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
1181         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
1182         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
1183         * elfread.c: Remove _initialize_elfread prototype.
1184         * exec.c: Remove _initialize_exec prototype.
1185         * extension.c: Remove _initialize_extension prototype.
1186         * f-lang.c: Remove _initialize_f_language prototype.
1187         * f-valprint.c: Remove _initialize_f_valprint prototype.
1188         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
1189         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
1190         * filesystem.c: Remove _initialize_filesystem prototype.
1191         * findcmd.c: Remove _initialize_mem_search prototype.
1192         * fork-child.c: Remove _initialize_fork_child prototype.
1193         * frame-base.c: Remove _initialize_frame_base prototype.
1194         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
1195         * frame.c: Remove _initialize_frame prototype.
1196         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
1197         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
1198         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
1199         * gcore.c: Remove _initialize_gcore prototype.
1200         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
1201         * gdbarch.c: Regenerate.
1202         * gdbarch.sh: Remove _initialize_gdbarch prototype.
1203         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
1204         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
1205         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
1206         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
1207         * go-lang.c: Remove _initialize_go_language prototype.
1208         * go32-nat.c: Remove _initialize_go32_nat prototype.
1209         * guile/guile.c: Remove _initialize_guile prototype.
1210         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
1211         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
1212         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
1213         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
1214         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
1215         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
1216         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
1217         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
1218         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
1219         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
1220         prototype.
1221         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
1222         prototype.
1223         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
1224         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
1225         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
1226         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
1227         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
1228         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
1229         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
1230         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
1231         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
1232         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
1233         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
1234         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
1235         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
1236         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
1237         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
1238         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
1239         prototype.
1240         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
1241         prototype.
1242         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
1243         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
1244         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
1245         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
1246         * infcall.c: Remove _initialize_infcall prototype.
1247         * infcmd.c: Remove _initialize_infcmd prototype.
1248         * inferior.c: Remove _initialize_inferiors prototype.
1249         * inflow.c: Remove _initialize_inflow prototype.
1250         * infrun.c: Remove _initialize_infrun prototype.
1251         * interps.c: Remove _initialize_interpreter prototype.
1252         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
1253         * jit.c: Remove _initialize_jit prototype.
1254         * language.c: Remove _initialize_language prototype.
1255         * linux-fork.c: Remove _initialize_linux_fork prototype.
1256         * linux-nat.c: Remove _initialize_linux_nat prototype.
1257         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
1258         * linux-thread-db.c: Remove _initialize_thread_db prototype.
1259         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
1260         * m2-lang.c: Remove _initialize_m2_language prototype.
1261         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
1262         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
1263         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
1264         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
1265         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
1266         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1267         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1268         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
1269         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
1270         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
1271         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
1272         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
1273         * machoread.c: Remove _initialize_machoread prototype.
1274         * macrocmd.c: Remove _initialize_macrocmd prototype.
1275         * macroscope.c: Remove _initialize_macroscope prototype.
1276         * maint.c: Remove _initialize_maint_cmds prototype.
1277         * mdebugread.c: Remove _initialize_mdebugread prototype.
1278         * memattr.c: Remove _initialize_mem prototype.
1279         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
1280         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
1281         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
1282         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
1283         * mi/mi-main.c: Remove _initialize_mi_main prototype.
1284         * microblaze-linux-tdep.c: Remove
1285         _initialize_microblaze_linux_tdep prototype.
1286         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
1287         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
1288         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
1289         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
1290         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
1291         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
1292         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
1293         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
1294         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
1295         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
1296         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
1297         prototype.
1298         * mipsread.c: Remove _initialize_mipsread prototype.
1299         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
1300         prototype.
1301         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
1302         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
1303         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
1304         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
1305         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
1306         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
1307         prototype.
1308         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
1309         * nto-procfs.c: Remove _initialize_procfs prototype.
1310         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
1311         * objc-lang.c: Remove _initialize_objc_language prototype.
1312         * objfiles.c: Remove _initialize_objfiles prototype.
1313         * observer.c: Remove observer_test_first_notification_function,
1314         observer_test_second_notification_function,
1315         observer_test_third_notification_function, and
1316         _initialize_observer prototypes.
1317         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
1318         * osabi.c: Remove _initialize_gdb_osabi prototype.
1319         * osdata.c: Remove _initialize_osdata prototype.
1320         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
1321         * parse.c: Remove _initialize_parse prototype.
1322         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
1323         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
1324         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
1325         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
1326         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
1327         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
1328         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
1329         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
1330         * printcmd.c: Remove _initialize_printcmd prototype.
1331         * probe.c: Remove _initialize_probe prototype.
1332         * proc-api.c: Remove _initialize_proc_api prototype.
1333         * proc-events.c: Remove _initialize_proc_events prototype.
1334         * proc-service.c: Remove _initialize_proc_service prototype.
1335         * procfs.c: Remove _initialize_procfs prototype.
1336         * psymtab.c: Remove _initialize_psymtab prototype.
1337         * python/python.c: Remove _initialize_python prototype.
1338         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
1339         * record-btrace.c: Remove _initialize_record_btrace prototype.
1340         * record-full.c: Remove _initialize_record_full prototype.
1341         * record.c: Remove _initialize_record prototype.
1342         * regcache.c: Remove _initialize_regcache prototype.
1343         * reggroups.c: Remove _initialize_reggroup prototype.
1344         * remote-notif.c: Remove _initialize_notif prototype.
1345         * remote-sim.c: Remove _initialize_remote_sim prototype.
1346         * remote.c: Remove _initialize_remote prototype.
1347         * reverse.c: Remove _initialize_reverse prototype.
1348         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
1349         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
1350         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
1351         prototype.
1352         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
1353         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
1354         * rust-exp.y: Remove _initialize_rust_exp prototype.
1355         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
1356         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
1357         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
1358         * score-tdep.c: Remove _initialize_score_tdep prototype.
1359         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
1360         prototype.
1361         * ser-go32.c: Remove _initialize_ser_dos prototype.
1362         * ser-mingw.c: Remove _initialize_ser_windows prototype.
1363         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
1364         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
1365         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
1366         * serial.c: Remove _initialize_serial prototype.
1367         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
1368         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
1369         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
1370         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
1371         * skip.c: Remove _initialize_step_skip prototype.
1372         * sol-thread.c: Remove _initialize_sol_thread prototype.
1373         * solib-aix.c: Remove _initialize_solib_aix prototype.
1374         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
1375         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
1376         * solib-frv.c: Remove _initialize_frv_solib prototype.
1377         * solib-spu.c: Remove _initialize_spu_solib prototype.
1378         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
1379         * solib-target.c: Remove _initialize_solib_target prototype.
1380         * solib.c: Remove _initialize_solib prototype.
1381         * source.c: Remove _initialize_source prototype.
1382         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
1383         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
1384         prototype.
1385         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
1386         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
1387         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
1388         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
1389         prototype.
1390         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
1391         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
1392         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
1393         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
1394         prototype.
1395         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
1396         prototype.
1397         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
1398         prototype.
1399         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
1400         prototype.
1401         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
1402         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
1403         prototype.
1404         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
1405         prototype.
1406         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
1407         prototype.
1408         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
1409         prototype.
1410         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
1411         prototype.
1412         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
1413         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
1414         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
1415         * stabsread.c: Remove _initialize_stabsread prototype.
1416         * stack.c: Remove _initialize_stack prototype.
1417         * stap-probe.c: Remove _initialize_stap_probe prototype.
1418         * std-regs.c: Remove _initialize_frame_reg prototype.
1419         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
1420         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
1421         * symfile.c: Remove _initialize_symfile prototype.
1422         * symmisc.c: Remove _initialize_symmisc prototype.
1423         * symtab.c: Remove _initialize_symtab prototype.
1424         * target-dcache.c: Remove _initialize_target_dcache prototype.
1425         * target-descriptions.c: Remove _initialize_target_descriptions
1426         prototype.
1427         * thread.c: Remove _initialize_thread prototype.
1428         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
1429         prototype.
1430         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
1431         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
1432         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
1433         prototype.
1434         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
1435         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
1436         * tracefile.c: Remove _initialize_tracefile prototype.
1437         * tracepoint.c: Remove _initialize_tracepoint prototype.
1438         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
1439         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
1440         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
1441         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
1442         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
1443         * tui/tui-win.c: Remove _initialize_tui_win prototype.
1444         * tui/tui.c: Remove _initialize_tui prototype.
1445         * typeprint.c: Remove _initialize_typeprint prototype.
1446         * user-regs.c: Remove _initialize_user_regs prototype.
1447         * utils.c: Remove _initialize_utils prototype.
1448         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
1449         * valarith.c: Remove _initialize_valarith prototype.
1450         * valops.c: Remove _initialize_valops prototype.
1451         * valprint.c: Remove _initialize_valprint prototype.
1452         * value.c: Remove _initialize_values prototype.
1453         * varobj.c: Remove _initialize_varobj prototype.
1454         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
1455         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
1456         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
1457         * windows-nat.c: Remove _initialize_windows_nat,
1458         _initialize_check_for_gdb_ini, and _initialize_loadable
1459         prototypes.
1460         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
1461         * xcoffread.c: Remove _initialize_xcoffread prototype.
1462         * xml-support.c: Remove _initialize_xml_support prototype.
1463         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
1464         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
1465         prototype.
1466         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
1467         prototype.
1468         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
1469
1470 2017-09-08  Keith Seitz  <keiths@redhat.com>
1471
1472         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
1473         field.
1474
1475 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
1476
1477         * f-valprint.c (f_val_print): Remove check for one byte
1478         sized integers. Remove printing of character type.
1479
1480 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
1481             Christoph Weinmann  <christoph.t.weinmann@intel.com>
1482             Bernhard Heckel  <bernhard.heckel@intel.com>
1483
1484         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
1485         to maintain proper indentation when printing pointers/refs.
1486
1487 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
1488
1489         GDB 8.0.1 released.
1490
1491 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
1492
1493         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
1494
1495 2017-09-05  Tom Tromey  <tom@tromey.com>
1496
1497         * parse.c (funcall_chain): Now a std::vector.
1498         (start_arglist, end_arglist): Simplify.
1499         (free_funcalls): Remove.
1500         (parse_exp_in_context_1): Remove cleanup.
1501
1502 2017-09-05  Tom Tromey  <tom@tromey.com>
1503
1504         * go-exp.y (go_parse): Don't create a cleanup.
1505
1506 2017-09-05  Tom Tromey  <tom@tromey.com>
1507
1508         * d-exp.y (PrimaryExpression): Use std::string.
1509         (d_parse): Don't create a cleanup.
1510
1511 2017-09-05  Tom Tromey  <tom@tromey.com>
1512
1513         * utils.c (do_clear_parser_state): Remove.
1514         (make_cleanup_clear_parser_state): Remove.
1515         * p-exp.y (pascal_parse): Use scoped_restore.
1516         * m2-exp.y (m2_parse): Use scoped_restore.
1517         * f-exp.y (f_parse): Use scoped_restore.
1518         * d-exp.y (d_parse): Use scoped_restore.
1519         * c-exp.y (c_parse): Use scoped_restore.
1520         * ada-exp.y (ada_parse): Use scoped_restore.
1521         * utils.h (make_cleanup_clear_parser_state): Remove.
1522
1523 2017-09-06  Keith Seitz  <keiths@redhat.com>
1524
1525         * dwarf2read.c (dw2_linkage_name_attr): New function.
1526         (dw2_linkage_name): New function.
1527         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
1528         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
1529         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
1530
1531 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
1532
1533         * config/djgpp/djconfig.sh: Correct shell portability issue.
1534
1535 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
1536
1537         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
1538
1539 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
1540
1541         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
1542         * NEWS: Mention new FreeBSD/mips native configuration.
1543         * configure.host: Add aarch64*-*-freebsd*.
1544         * configure.nat: Likewise.
1545         * aarch64-fbsd-nat.c: New file.
1546
1547 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
1548
1549         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
1550         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
1551         * NEWS: Mention new FreeBSD/aarch64 target.
1552         * configure.tgt: Add aarch64*-*-freebsd*.
1553         * aarch64-fbsd-tdep.c: New file.
1554         * aarch64-fbsd-tdep.h: New file.
1555
1556 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
1557
1558         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
1559
1560 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
1561
1562         * parse.c (find_minsym_type_and_address): Don't relocate addresses
1563         of TLS symbols.
1564
1565 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1566
1567         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
1568         call.
1569
1570 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
1571
1572         * infrun.c (follow_exec): Call add_thread after
1573         target_find_description.
1574
1575 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
1576
1577         * infrun.c (handle_inferior_event_1): When exec'ing, read
1578         stop_pc after follow_exec.
1579
1580 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
1581
1582         * remote.c (process_g_packet): Update error message.
1583
1584 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1585
1586         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
1587         targets.
1588
1589 2017-09-05  Pedro Alves  <palves@redhat.com>
1590
1591         * eval.c (eval_call, evaluate_funcall): New functions, factored
1592         out from ...
1593         (evaluate_subexp_standard): ... this.
1594
1595 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1596
1597         * amd64-tdep.c (amd64_target_description): Create target
1598         descriptions.
1599         (_initialize_amd64_tdep): Don't call functions
1600         initialize_tdesc_amd64_*.  Add self tests.
1601         * arch/amd64.c (amd64_create_target_description): Add parameter
1602         is_linux.  Call set_tdesc_osabi if is_linux is true.
1603         * arch/amd64.h (amd64_create_target_description): Update the
1604         declaration.
1605         * arch/i386.c (i386_create_target_description): Add parameter
1606         is_linux.  Call set_tdesc_osabi if is_linux is true.
1607         * arch/i386.h (i386_create_target_description): Update
1608         declaration.
1609         * configure.tgt: Add i386.o to gdb_target_obs.
1610         * features/Makefile (XMLTOC): Remove i386/*.xml.
1611         * features/i386/amd64-avx-avx512.c: Remove.
1612         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
1613         * features/i386/amd64-avx-mpx.c: Remove.
1614         * features/i386/amd64-avx.c: Remove.
1615         * features/i386/amd64-mpx.c: Remove.
1616         * features/i386/amd64.c: Remove.
1617         * features/i386/i386-avx-avx512.c: Remove.
1618         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
1619         * features/i386/i386-avx-mpx.c: Remove.
1620         * features/i386/i386-avx.c: Remove.
1621         * features/i386/i386-mmx.c: Remove.
1622         * features/i386/i386-mpx.c: Remove.
1623         * features/i386/i386.c: Remove.
1624         * i386-tdep.c: Don't include features/i386/i386*.c., include
1625         target-descriptions.h and arch/i386.h.
1626         (i386_target_description): Create target descriptions.
1627         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
1628         functions.  Do self tests.
1629
1630 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1631
1632         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
1633         * features/i386/amd64-avx-avx512-linux.c: Removed.
1634         * features/i386/amd64-avx-linux.c: Removed.
1635         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
1636         * features/i386/amd64-avx-mpx-linux.c: Removed.
1637         * features/i386/amd64-linux.c: Removed.
1638         * features/i386/amd64-mpx-linux.c: Removed.
1639         * features/i386/x32-avx-avx512-linux.c: Removed.
1640         * features/i386/x32-avx-linux.c: Removed.
1641         * features/i386/x32-linux.c: Removed.
1642
1643 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1644
1645         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
1646         features/i386/*.c.
1647         (amd64_linux_read_description): Call
1648         amd64_create_target_description.
1649         * arch/amd64.c: New file.
1650         * arch/amd64.h: New file.
1651         * configure.tgt (x86_64-*-linux*): Append amd64.o.
1652         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
1653
1654 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1655
1656         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
1657         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
1658         (amd64_linux_read_description): Create target descriptions.
1659         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
1660         functions.  Add unit tests.
1661         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
1662         x32-core.xml.
1663         * features/i386/64bit-avx.c: Generated.
1664         * features/i386/64bit-avx512.c: Generated.
1665         * features/i386/64bit-core.c: Generated.
1666         * features/i386/64bit-linux.c: Generated.
1667         * features/i386/64bit-mpx.c: Generated.
1668         * features/i386/64bit-pkeys.c: Generated.
1669         * features/i386/64bit-segments.c: Generated.
1670         * features/i386/64bit-sse.c: Generated.
1671         * features/i386/x32-core.c: Generated.
1672         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
1673         c files for amd64-linux and x32-linux.
1674
1675 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1676
1677         * amd64-linux-tdep.c (amd64_linux_read_description): New
1678         function.
1679         (amd64_linux_core_read_description): Call
1680         amd64_linux_read_description.
1681         (amd64_linux_init_abi): Likewise.
1682         (amd64_x32_linux_init_abi): Likewise.
1683         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
1684         * x86-linux-nat.c (x86_linux_read_description): Call
1685         amd64_linux_read_description.
1686
1687 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1688
1689         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
1690         comments.
1691
1692 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1693
1694         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
1695         * features/i386/i386-avx-avx512-linux.c: Remove.
1696         * features/i386/i386-avx-linux.c: Remove.
1697         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
1698         * features/i386/i386-avx-mpx-linux.c: Remove.
1699         * features/i386/i386-linux.c: Remove.
1700         * features/i386/i386-mmx-linux.c: Remove.
1701         * features/i386/i386-mpx-linux.c: Remove.
1702
1703 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1704
1705         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
1706         (SFILES): Add arch/i386.c.
1707         (HFILES_NO_SRCDIR): Add arch/i386.h.
1708         * arch/i386.c: New file.
1709         * arch/i386.h: New file.
1710         * arch/tdesc.h (allocate_target_description): Declare.
1711         (set_tdesc_architecture): Declare.
1712         (set_tdesc_osabi): Declare.
1713         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
1714         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
1715         include arch/i386.h.
1716         (i386_linux_read_description): Remove code and call
1717         i386_create_target_description.
1718         (set_tdesc_architecture): New function.
1719         (set_tdesc_osabi): New function.
1720         * target-descriptions.h (allocate_target_description): Remove.
1721
1722 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1723
1724         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
1725         * target-descriptions.c (tdesc_create_feature): Likewise, and
1726         adjust code.
1727         * features/i386/32bit-avx.c: Re-generated.
1728         * features/i386/32bit-avx512.c: Re-generated.
1729         * features/i386/32bit-core.c: Re-generated.
1730         * features/i386/32bit-linux.c: Re-generated.
1731         * features/i386/32bit-mpx.c: Re-generated.
1732         * features/i386/32bit-pkeys.c: Re-generated.
1733         * features/i386/32bit-sse.c: Re-generated.
1734
1735 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1736
1737         * regformats/regdef.h (struct reg): Override operator == and !=.
1738
1739 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1740
1741         * arch/tdesc.h: New file.
1742         * regformats/regdat.sh: Generate code using tdesc_create_reg.
1743         * target-descriptions.c: Update comments.
1744         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
1745         declarations.
1746         * features/i386/32bit-avx.c: Re-generated.
1747         * features/i386/32bit-avx512.c: Re-generated.
1748         * features/i386/32bit-core.c: Re-generated.
1749         * features/i386/32bit-linux.c: Re-generated.
1750         * features/i386/32bit-mpx.c: Re-generated.
1751         * features/i386/32bit-pkeys.c: Re-generated.
1752         * features/i386/32bit-sse.c: Re-generated.
1753
1754 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1755
1756         * regformats/regdat.sh: Update generated code.
1757
1758 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1759
1760         * regformats/regdat.sh: Adjust code order.
1761
1762 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
1763
1764         * expprint.c (dump_subexp_body_standard): Use constant format
1765         string in fprintf_filtered call.
1766
1767 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
1768
1769         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
1770         NetBSD/i386.
1771         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
1772
1773 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
1774
1775         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
1776
1777 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
1778
1779         * bsd-kvm.o: Define _KMEMUSER.
1780         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
1781         * configure: Regenerate.
1782
1783 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
1784
1785         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
1786         * i386-fbsd-nat.c: Likewise.
1787
1788 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
1789
1790         * unittests/array-view-selftests.c: Add include of <array>.
1791
1792 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
1793
1794         * spu-tdep.c (flush_ea_cache): Add missing argument to
1795         call_function_by_hand.
1796
1797 2017-09-04  Pedro Alves  <palves@redhat.com>
1798
1799         * NEWS (Safer support for debugging with no debug info): New.
1800
1801 2017-09-04  Pedro Alves  <palves@redhat.com>
1802
1803         * c-exp.y (function_method, function_method_void): Add current
1804         instance flags to TYPE_INSTANCE.
1805         * dwarf2read.c (check_modifier): New.
1806         (compute_delayed_physnames): Assert that only C++ adds delayed
1807         physnames.  Mark fn_fields as const/volatile depending on
1808         physname.
1809         * eval.c (make_params): New type_instance_flags parameter.  Use
1810         it as the new type's instance flags.
1811         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
1812         flags element and pass it to make_params.
1813         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
1814         instance flags element.
1815         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
1816         * gdbtypes.h: Include "enum-flags.h".
1817         (type_instance_flags): New enum-flags type.
1818         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
1819         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
1820         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
1821         (follow_type_instance_flags): New function.
1822         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
1823         * parser-defs.h (follow_type_instance_flags): Declare.
1824         * valops.c (value_struct_elt_for_reference): const/volatile must
1825         match too.
1826
1827 2017-09-04  Pedro Alves  <palves@redhat.com>
1828
1829         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
1830         function/method scopes; lookup the nested name as a function local
1831         static variable.
1832
1833 2017-09-04  Pedro Alves  <palves@redhat.com>
1834
1835         (%type <voidval>): Add function_method.
1836         * c-exp.y (exp): New production for calls with no arguments.
1837         (function_method, function_method_void_or_typelist): New
1838         productions.
1839         (exp): New production for "method()::static_var".
1840         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
1841         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1842         Handle OP_FUNC_STATIC_VAR.
1843         * parse.c (operator_length_standard):
1844         Handle OP_FUNC_STATIC_VAR.
1845
1846 2017-09-04  Pedro Alves  <palves@redhat.com>
1847
1848         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
1849         handling.
1850         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1851         Ditto.
1852         * parse.c (operator_length_standard, operator_check_standard):
1853         Ditto.
1854         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
1855
1856 2017-09-04  Pedro Alves  <palves@redhat.com>
1857
1858         * ax-gdb.c: Include "typeprint.h".
1859         (gen_expr_for_cast): New function.
1860         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
1861         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
1862         type is unknown.
1863         * dwarf2read.c (new_symbol_full): Fallback to int instead of
1864         nodebug_data_symbol.
1865         * eval.c: Include "typeprint.h".
1866         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
1867         Error out if symbol has unknown type.
1868         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
1869         evaluate_subexp_for_cast.
1870         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
1871         OP_VAR_MSYM_VALUE.
1872         (evaluate_subexp_for_cast): New function.
1873         * gdbtypes.c (init_nodebug_var_type): New function.
1874         (objfile_type): Use it to initialize types of variables with no
1875         debug info.
1876         * typeprint.c (error_unknown_type): New.
1877         * typeprint.h (error_unknown_type): New declaration.
1878         * compile/compile-c-types.c (convert_type_basic): Handle
1879         TYPE_CODE_ERROR; warn and fallback to int for variables with
1880         unknown type.
1881
1882 2017-09-04  Pedro Alves  <palves@redhat.com>
1883
1884         * eval.c (evaluate_var_value): New function, factored out from ...
1885         (evaluate_subexp_standard): ... here.
1886
1887 2017-09-04  Pedro Alves  <palves@redhat.com>
1888
1889         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
1890         Remove useless assignments to 'op'.
1891
1892 2017-09-04  Pedro Alves  <palves@redhat.com>
1893
1894         * eval.c (eval_skip_value): New function.
1895         (evaluate_subexp_standard): Use it.
1896
1897 2017-09-04  Pedro Alves  <palves@redhat.com>
1898
1899         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
1900         function name from symbol/minsym and pass it to
1901         error_call_unknown_return_type.
1902
1903 2017-09-04  Pedro Alves  <palves@redhat.com>
1904
1905         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
1906         * ax-gdb.c (gen_msym_var_ref): New function.
1907         (gen_expr): Handle OP_VAR_MSYM_VALUE.
1908         * eval.c (evaluate_var_msym_value): New function.
1909         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
1910         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
1911         to call_function_by_hand.
1912         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
1913         Handle OP_VAR_MSYM_VALUE.
1914         (union exp_element) <msymbol>: New field.
1915         * minsyms.h (struct type): Forward declare.
1916         (find_minsym_type_and_address): Declare.
1917         * parse.c (write_exp_elt_msym): New function.
1918         (write_exp_msymbol): Delete, refactored as ...
1919         (find_minsym_type_and_address): ... this new function.
1920         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
1921         (operator_length_standard, operator_check_standard): Handle
1922         OP_VAR_MSYM_VALUE.
1923         * std-operator.def (OP_VAR_MSYM_VALUE): New.
1924
1925 2017-09-04  Pedro Alves  <palves@redhat.com>
1926
1927         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
1928         TYPE_GNU_IFUNC specially here.  Throw error if return type is
1929         unknown.
1930         * ada-typeprint.c (print_func_type): Handle functions with unknown
1931         return type.
1932         * c-typeprint.c (c_type_print_base): Handle functions and methods
1933         with unknown return type.
1934         * compile/compile-c-symbols.c (convert_symbol_bmsym)
1935         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
1936         * compile/compile-c-types.c: Include "objfiles.h".
1937         (convert_func): For functions with unknown return type, warn and
1938         default to int.
1939         * compile/compile-object-run.c (compile_object_run): Adjust call
1940         to call_function_by_hand_dummy.
1941         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
1942         call_function_by_hand.
1943         * eval.c (evaluate_subexp_standard): Adjust calls to
1944         call_function_by_hand.  Handle functions and methods with unknown
1945         return type.  Pass expect_type to call_function_by_hand.
1946         * f-typeprint.c (f_type_print_base): Handle functions with unknown
1947         return type.
1948         * gcore.c (call_target_sbrk): Adjust call to
1949         call_function_by_hand.
1950         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
1951         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
1952         an integer address type instead of nodebug.
1953         * guile/scm-value.c (gdbscm_value_call): Adjust call to
1954         call_function_by_hand.
1955         * infcall.c (error_call_unknown_return_type): New function.
1956         (call_function_by_hand): New "default_return_type" parameter.
1957         Pass it down.
1958         (call_function_by_hand_dummy): New "default_return_type"
1959         parameter.  Use it instead of defaulting to int.  If there's no
1960         default and the return type is unknown, throw an error.  If
1961         there's a default return type, and the called function has no
1962         debug info, then assume the function is prototyped.
1963         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
1964         New "default_return_type" parameter.
1965         (error_call_unknown_return_type): New declaration.
1966         * linux-fork.c (call_lseek): Cast return type of lseek.
1967         (inferior_call_waitpid, checkpoint_command): Adjust calls to
1968         call_function_by_hand.
1969         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
1970         calls to call_function_by_hand.
1971         * m2-typeprint.c (m2_procedure): Handle functions with unknown
1972         return type.
1973         * objc-lang.c (lookup_objc_class, lookup_child_selector)
1974         (value_nsstring, print_object_command): Adjust calls to
1975         call_function_by_hand.
1976         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
1977         functions with unknown return type.
1978         (pascal_type_print_func_varspec_suffix): New function.
1979         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
1980         TYPE_CODE_METHOD>: Use it.
1981         * python/py-value.c (valpy_call): Adjust call to
1982         call_function_by_hand.
1983         * rust-lang.c (rust_evaluate_funcall): Adjust call to
1984         call_function_by_hand.
1985         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
1986         call_function_by_hand.
1987         * valops.c (value_allocate_space_in_inferior): Adjust call to
1988         call_function_by_hand.
1989         * typeprint.c (type_print_unknown_return_type): New function.
1990         * typeprint.h (type_print_unknown_return_type): New declaration.
1991
1992 2017-09-04  Pedro Alves  <palves@redhat.com>
1993
1994         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
1995         types with more than one parameter as prototyped.
1996
1997 2017-09-04  Pedro Alves  <palves@redhat.com>
1998
1999         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
2000         (disassemble_command): Use gdb_disassembly_flags instead of bare
2001         int.
2002         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
2003         (dump_insns, do_mixed_source_and_assembly_deprecated)
2004         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
2005         Use gdb_disassembly_flags instead of bare int.
2006         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
2007         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
2008         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
2009         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
2010         (enum gdb_disassembly_flag): ... values of this new enumeration.
2011         (gdb_disassembly_flags): Define.
2012         (gdb_disassembly)
2013         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
2014         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
2015         gdb_disassembly_flags instead of bare int.
2016         * record-btrace.c (btrace_insn_history)
2017         (record_btrace_insn_history, record_btrace_insn_history_range)
2018         (record_btrace_insn_history_from): Use gdb_disassembly_flags
2019         instead of bare int.
2020         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
2021         Use gdb_disassembly_flags instead of bare int.
2022         * target-debug.h (target_debug_print_gdb_disassembly_flags):
2023         Define.
2024         * target-delegates.c: Regenerate.
2025         * target.c (target_insn_history, target_insn_history_from)
2026         (target_insn_history_range): Use gdb_disassembly_flags instead of
2027         bare int.
2028         * target.h: Include "disasm.h".
2029         (struct target_ops) <to_insn_history, to_insn_history_from,
2030         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
2031         int.
2032         (target_insn_history, target_insn_history_from)
2033         (target_insn_history_range): Use gdb_disassembly_flags instead of
2034         bare int.
2035
2036 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
2037
2038         * cli/cli-script.c (build_command_line): For if/while commands,
2039         check whether args is empty.
2040
2041 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
2042
2043         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
2044         (enum command_control_type): Likewise.
2045         (struct command_line): Likewise.
2046         (free_command_lines): Likewise.
2047         (struct command_lines_deleter): Likewise.
2048         (command_line_up): Likewise.
2049         (read_command_lines): Likewise.
2050         (read_command_lines_1): Likewise.
2051         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
2052         (enum command_control_type): Likewise.
2053         (struct command_line): Likewise.
2054         (free_command_lines): Likewise.
2055         (struct command_lines_deleter): Likewise.
2056         (command_line_up): Likewise.
2057         (read_command_lines): Likewise.
2058         (read_command_lines_1): Likewise.
2059         * breakpoint.h: Include cli/cli-script.h.
2060         * extension-priv.h: Likewise.
2061         * gdbcmd.h: Likewise.
2062
2063 2017-09-04  Pedro Alves  <palves@redhat.com>
2064
2065         * ada-lang.c (is_known_support_routine): Move sal declaration to
2066         where it is initialized.
2067         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
2068         (parse_breakpoint_sals, decode_static_tracepoint_spec)
2069         (clear_command, update_static_tracepoint): Remove init_sal
2070         references.  Move declarations closer to initializations.
2071         * cli/cli-cmds.c (list_command): Move sal declarations closer to
2072         initializations.
2073         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
2074         references.  Move sal declarations closer to initializations.
2075         * frame.c (find_frame_sal): Return a symtab_and_line via function
2076         return instead of output parameter.  Remove init_sal references.
2077         * frame.h (find_frame_sal): Return a symtab_and_line via function
2078         return instead of output parameter.
2079         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
2080         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
2081         instead of memset.
2082         (gdbscm_find_pc_line): Remove init_sal reference.
2083         * infcall.c (call_function_by_hand_dummy): Remove init_sal
2084         references.  Move declarations closer to initializations.
2085         * infcmd.c (set_step_frame): Update.  Move declarations closer to
2086         initializations.
2087         (finish_backward): Remove init_sal references.  Move declarations
2088         closer to initializations.
2089         * infrun.c (process_event_stop_test, handle_step_into_function)
2090         (insert_hp_step_resume_breakpoint_at_frame)
2091         (insert_step_resume_breakpoint_at_caller): Likewise.
2092         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
2093         (symbol_to_sal): Likewise.
2094         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
2095         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
2096         to its initialization.
2097         * reverse.c (save_bookmark_command): Use new/delete.  Remove
2098         init_sal references.  Move declarations closer to initializations.
2099         * source.c (get_current_source_symtab_and_line): Remove brace
2100         initialization.
2101         (set_current_source_symtab_and_line): Now takes the sal by const
2102         reference.  Remove brace initialization.
2103         (line_info): Remove init_sal reference.
2104         * source.h (set_current_source_symtab_and_line): Now takes a
2105         symtab_and_line via const reference.
2106         * stack.c (set_current_sal_from_frame): Adjust.
2107         (print_frame_info): Adjust.
2108         (get_last_displayed_sal): Return the sal via function return
2109         instead of via output parameter.  Simplify.
2110         (frame_info): Adjust.
2111         * stack.h (get_last_displayed_sal): Return the sal via function
2112         return instead of via output parameter.
2113         * symtab.c (init_sal): Delete.
2114         (find_pc_sect_line): Remove init_sal references.  Move
2115         declarations closer to initializations.
2116         (find_function_start_sal): Remove init_sal references.  Move
2117         declarations closer to initializations.
2118         * symtab.h (struct symtab_and_line): In-class initialize all
2119         fields.
2120         * tracepoint.c (set_traceframe_context)
2121         (print_one_static_tracepoint_marker): Remove init_sal references.
2122         Move declarations closer to initializations.
2123         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
2124         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
2125         declarations closer to initializations.
2126         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
2127         init_sal references.  Adjust.
2128
2129 2017-09-04  Pedro Alves  <palves@redhat.com>
2130
2131         * ax-gdb.c (agent_command_1): Use range-for.
2132         * break-catch-throw.c (re_set_exception_catchpoint): Update.
2133         * breakpoint.c: Include "common/array-view.h".
2134         (init_breakpoint_sal, create_breakpoint_sal): Change sals
2135         parameter from struct symtabs_and_lines to
2136         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
2137         (breakpoint_sals_to_pc): Change sals parameter from struct
2138         symtabs_and_lines to std::vector reference.
2139         (check_fast_tracepoint_sals): Change sals parameter from struct
2140         symtabs_and_lines to std::array_view.  Use range-for.
2141         (decode_static_tracepoint_spec): Return a std::vector instead of
2142         symtabs_and_lines.  Update.
2143         (create_breakpoint): Update.
2144         (break_range_command, until_break_command, clear_command): Update.
2145         (base_breakpoint_decode_location, bkpt_decode_location)
2146         (bkpt_probe_create_sals_from_location)
2147         (bkpt_probe_decode_location, tracepoint_decode_location)
2148         (tracepoint_probe_decode_location)
2149         (strace_marker_create_sals_from_location): Return a std::vector
2150         instead of symtabs_and_lines.
2151         (strace_marker_create_breakpoints_sal): Update.
2152         (strace_marker_decode_location): Return a std::vector instead of
2153         symtabs_and_lines.  Update.
2154         (update_breakpoint_locations): Change struct symtabs_and_lines
2155         parameters to gdb::array_view.  Adjust.
2156         (location_to_sals): Return a std::vector instead of
2157         symtabs_and_lines.  Update.
2158         (breakpoint_re_set_default): Use std::vector instead of struct
2159         symtabs_and_lines.
2160         (decode_location_default): Return a std::vector instead of
2161         symtabs_and_lines.  Update.
2162         * breakpoint.h: Include "common/array-view.h".
2163         (struct breakpoint_ops) <decode_location>: Now returns a
2164         std::vector instead of returning a symtabs_and_lines via output
2165         parameter.
2166         (update_breakpoint_locations): Change sals parameters to use
2167         gdb::array_view.
2168         * cli/cli-cmds.c (edit_command, list_command): Update to use
2169         std::vector and gdb::array_view.
2170         (ambiguous_line_spec): Adjust to use gdb::array_view and
2171         range-for.
2172         (compare_symtabs): Rename to ...
2173         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
2174         const reference and adjust.
2175         (filter_sals): Rewrite using std::vector and standard algorithms.
2176         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
2177         (jump_command): Update to use std::vector.
2178         * linespec.c (struct linespec_state) <canonical_names>: Update
2179         comment.
2180         (add_sal_to_sals_basic): Delete.
2181         (add_sal_to_sals, filter_results, convert_results_to_lsals)
2182         (decode_line_2, create_sals_line_offset)
2183         (convert_address_location_to_sals, convert_linespec_to_sals)
2184         (convert_explicit_location_to_sals, parse_linespec)
2185         (event_location_to_sals, decode_line_full, decode_line_1)
2186         (decode_line_with_current_source)
2187         (decode_line_with_last_displayed, decode_objc)
2188         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
2189         (linespec_result::~linespec_result): Adjust to use std::vector
2190         instead of symtabs_and_lines.
2191         * linespec.h (linespec_sals::sals): Now a std::vector.
2192         (struct linespec_result): Use std::vector, bool, and in-class
2193         initialization.
2194         (decode_line_1, decode_line_with_current_source)
2195         (decode_line_with_last_displayed): Return std::vector.
2196         * macrocmd.c (info_macros_command): Use std::vector.
2197         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
2198         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
2199         std::vector.
2200         * probe.h (parse_probes): Return a std::vector.
2201         * python/python.c (gdbpy_decode_line): Use std::vector and
2202         gdb::array_view.
2203         * source.c (select_source_symtab, line_info): Use std::vector.
2204         * stack.c (func_command): Use std::vector.
2205         * symtab.h (struct symtabs_and_lines): Delete.
2206         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
2207
2208 2017-09-04  Pedro Alves  <palves@redhat.com>
2209
2210         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2211         unittests/array-view-selftests.c.
2212         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
2213         * common/array-view.h: New file.
2214         * unittests/array-view-selftests.c: New file.
2215
2216 2017-09-04  Pedro Alves  <palves@redhat.com>
2217
2218         * cli/cli-cmds.c (edit_command): Pass message to
2219         ambiguous_line_spec.
2220         (list_command): Pass message to ambiguous_line_spec.  Say
2221         "first"/"last" instead of "start" and "end" to be consistent with
2222         the manual.
2223         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
2224         them to print formatted message.
2225
2226 2017-09-04  Pedro Alves  <palves@redhat.com>
2227
2228         * btrace.c (ftrace_add_pt): Pass btrace_insn to
2229         ftrace_update_insns by reference instead of pointer.
2230
2231 2017-09-04  Yao Qi  <yao.qi@linaro.org>
2232
2233         * i386-go32-tdep.c: Include x86-xstate.h.
2234         (i386_go32_init_abi): Call i386_target_description.
2235         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
2236         if xcr0 is X86_XSTATE_X87_MASK.
2237         * i386-tdep.h (tdesc_i386): Remove the declaration.
2238         (tdesc_i386_mmx): Likewise.
2239
2240 2017-09-04  Yao Qi  <yao.qi@linaro.org>
2241
2242         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
2243         X86_XSTATE_SSE_MASK instead of 0.
2244
2245 2017-09-04  Yao Qi  <yao.qi@linaro.org>
2246
2247         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
2248         i386_target_description.
2249         * i386-fbsd-nat.c (i386fbsd_read_description): Call
2250         i386_target_description.
2251         * i386-tdep.c (i386_gdbarch_init): Likewise.
2252
2253 2017-09-04  Yao Qi  <yao.qi@linaro.org>
2254
2255         * amd64-darwin-tdep.c: Include "x86-xstate.h".
2256         (x86_darwin_init_abi_64): Call amd64_target_description.
2257         * amd64-dicos-tdep.c: Likewise.
2258         * amd64-fbsd-nat.c: Likewise.
2259         * amd64-fbsd-tdep.c: Likewise.
2260         * amd64-nbsd-tdep.c: Likewise.
2261         * amd64-obsd-tdep.c: Likewise.
2262         * amd64-sol2-tdep.c: Likewise.
2263         * amd64-windows-tdep.c: Likewise.
2264         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
2265
2266 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
2267
2268         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
2269         (btrace_function) <insn>: Change type to use std::vector.
2270         * btrace.c (ftrace_debug, ftrace_call_num_insn,
2271         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
2272         ftrace_update_insns, ftrace_compute_global_level_offset,
2273         btrace_stitch_bts, btrace_clear, btrace_insn_get,
2274         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
2275         change to std::vector.
2276         (ftrace_update_insns): Adjust to change to std::vector, change
2277         type of INSN parameter.
2278         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
2279         * record-btrace.c (btrace_call_history_insn_range,
2280         btrace_compute_src_line_range,
2281         record_btrace_frame_prev_register): Adjust to change to
2282         std::vector.
2283         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
2284         to change to std::vector.
2285
2286 2017-09-03  Tom Tromey  <tom@tromey.com>
2287
2288         * corefile.c (reopen_exec_file): Use std::string.
2289
2290 2017-09-03  Tom Tromey  <tom@tromey.com>
2291
2292         * compile/compile.c (compile_register_name_mangled): Return
2293         std::string.
2294         * compile/compile-loc2c.c (pushf_register_address): Update.
2295         (pushf_register): Update.
2296         * compile/compile-c-types.c (convert_array): Update.
2297         * compile/compile-c-symbols.c (generate_vla_size): Update.
2298         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
2299         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
2300         (convert_one_symbol): Update.
2301         (generate_c_for_for_one_variable): Update.
2302         * compile/compile-c-support.c (c_get_range_decl_name): Return a
2303         std::string.
2304         (generate_register_struct): Update.
2305         * compile/compile-internal.h (c_get_range_decl_name): Return a
2306         std::string.
2307         (compile_register_name_mangled): Return std::string.
2308
2309 2017-09-03  Tom Tromey  <tom@tromey.com>
2310
2311         * utils.c (perror_string): Return a std::string.
2312         (throw_perror_with_name, perror_warning_with_name): Update.
2313
2314 2017-09-03  Tom Tromey  <tom@tromey.com>
2315
2316         * demangle.c (demangle_command): Use std::string,
2317         unique_xmalloc_ptr.
2318
2319 2017-09-03  Tom Tromey  <tom@tromey.com>
2320
2321         * cli/cli-setshow.c (do_set_command): Use std::string.
2322
2323 2017-09-03  Tom Tromey  <tom@tromey.com>
2324
2325         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
2326
2327 2017-09-03  Tom Tromey  <tom@tromey.com>
2328
2329         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
2330
2331 2017-09-03  Tom Tromey  <tom@tromey.com>
2332
2333         * mi/mi-cmd-env.c (env_execute_cli_command): Use
2334         gdb::unique_xmalloc_ptr.
2335
2336 2017-09-03  Tom Tromey  <tom@tromey.com>
2337
2338         * thread.c (print_thread_info_1): Use string_printf.
2339         (thread_apply_command, thread_apply_all_command): Use
2340         std::string.
2341
2342 2017-09-03  Tom Tromey  <tom@tromey.com>
2343
2344         * valprint.c (val_print_string): Update.
2345         * gdbcore.h (memory_error_message): Return std::string.
2346         * corefile.c (memory_error_message): Return std::string.
2347         (memory_error): Update.
2348         * breakpoint.c (insert_bp_location): Update.
2349
2350 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
2351
2352         * target/waitstatus.h (target_waitstatus_to_string): Change
2353         return type to std::string.
2354         * target/waitstatus.c (target_waitstatus_to_string): Return
2355         std::string.
2356         * target.h (target_waitstatus_to_string): Remove declaration.
2357         * infrun.c (resume, clear_proceed_status_thread,
2358         print_target_wait_results, do_target_wait, save_waitstatus,
2359         stop_all_threads): Adjust.
2360         * record-btrace.c (record_btrace_wait): Adjust.
2361         * target-debug.h
2362         (target_debug_print_struct_target_waitstatus_p): Adjust.
2363
2364 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
2365
2366         PR gdb/22046
2367         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
2368         detection.
2369
2370 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2371
2372         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
2373         for setting/unsetting environment variables on the remote target.
2374         (New remote packets): Add entries for QEnvironmentHexEncoded,
2375         QEnvironmentUnset and QEnvironmentReset.
2376         * common/environ.c (gdb_environ::operator=): Extend method to
2377         handle m_user_set_env_list and m_user_unset_env_list.
2378         (gdb_environ::clear): Likewise.
2379         (match_var_in_string): Change type of first parameter from 'char
2380         *' to 'const char *'.
2381         (gdb_environ::set): Extend method to handle
2382         m_user_set_env_list and m_user_unset_env_list.
2383         (gdb_environ::unset): Likewise.
2384         (gdb_environ::clear_user_set_env): New method.
2385         (gdb_environ::user_set_envp): Likewise.
2386         (gdb_environ::user_unset_envp): Likewise.
2387         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
2388         m_user_unset_env_list on move constructor/assignment.
2389         (unset): Add new default parameter 'update_unset_list = true'.
2390         (clear_user_set_env): New method.
2391         (user_set_envp): Likewise.
2392         (user_unset_envp): Likewise.
2393         (m_user_set_env_list): New std::set.
2394         (m_user_unset_env_list): Likewise.
2395         * common/rsp-low.c (hex2str): New function.
2396         (bin2hex): New overload for bin2hex function.
2397         * common/rsp-low.c (hex2str): New prototype.
2398         (str2hex): New overload prototype.
2399         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
2400         QEnvironmentUnset and QEnvironmentReset.
2401         (remote_protocol_features): Add QEnvironmentHexEncoded,
2402         QEnvironmentUnset and QEnvironmentReset packets.
2403         (send_environment_packet): New function.
2404         (extended_remote_environment_support): Likewise.
2405         (extended_remote_create_inferior): Call
2406         extended_remote_environment_support.
2407         (_initialize_remote): Add QEnvironmentHexEncoded,
2408         QEnvironmentUnset and QEnvironmentReset packet configs.
2409         * unittests/environ-selftests.c (gdb_selftest_env_var):
2410         New variable.
2411         (test_vector_initialization): New function.
2412         (test_init_from_host_environ): Likewise.
2413         (test_reinit_from_host_environ): Likewise.
2414         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
2415         Likewise.
2416         (test_unset_set_empty_vector): Likewise.
2417         (test_vector_clear): Likewise.
2418         (test_std_move): Likewise.
2419         (test_move_constructor):
2420         (test_self_move): Likewise.
2421         (test_set_unset_reset): Likewise.
2422         (run_tests): Rewrite in terms of the functions above.
2423
2424 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
2425
2426         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
2427         (adi_available): Use a temp variable of type CORE_ADDR as argument
2428         3 when calling target_auxv_search.
2429         (adi_normalize_address): Use masks and xor operators to calculate
2430         normalized address.
2431         (adi_read_versions, adi_write_versions, adi_print_versions)
2432         (do_examine, do_assign): Use paddress.
2433
2434 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
2435
2436         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
2437         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
2438         out of loop and add supply of FIR.
2439         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
2440         add collect of FIR.
2441
2442 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
2443
2444         PR gdb/21827
2445         * cli/cli-script.c (define_command): Don't convert command name
2446         to lower case.
2447
2448 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
2449
2450         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
2451         Update all callers accordingly. Remove all code blocks handling
2452         the case where DISPP is not NULL.
2453
2454 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
2455
2456         PR symtab/22003
2457         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
2458         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2459         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
2460
2461 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
2462
2463         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
2464         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
2465         (read_comp_units_from_section): New parameter abbrev_section, use
2466         read_and_check_comp_unit_head, allocate signatured_type if needed.
2467         (create_all_comp_units): Update read_comp_units_from_section caller.
2468
2469 2017-08-23  Pedro Alves  <palves@redhat.com>
2470
2471         PR remote/21852
2472         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
2473         to null_ptid and switch to thread without reading the registers
2474         after adding the inferior.
2475
2476 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
2477
2478         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
2479         compile-gcc.
2480         * compile/compile.c (compile_gcc, show_compile_gcc): New.
2481         (compile_to_object): Implement compile_gcc.
2482         (_initialize_compile): Install "set compile-gcc".  Initialize
2483         compile_gcc.
2484
2485 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
2486
2487         * compile/compile.c (compile_to_object): Conditionally call
2488         set_verbose.  Conditionally call compile or compile_v0.
2489
2490 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
2491
2492         * sparc64-tdep.h: (adi_normalize_address): New export.
2493         * sparc-nat.h: (open_adi_tag_fd): New export.
2494         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
2495         * sparc64-linux-tdep.c:
2496         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
2497         (sparc64_linux_handle_segmentation_fault): New function.
2498         (sparc64_linux_init_abi): Register
2499         sparc64_linux_handle_segmentation_fault
2500         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
2501         (sparc64_addr_bits_remove): New function.
2502         (sparc64_init_abi): Register sparc64_addr_bits_remove.
2503         (MAX_PROC_NAME_SIZE): New macro.
2504         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
2505         (sparc64adilist): New variable.
2506         (adi_proc_list): New variable.
2507         (find_adi_info): New function.
2508         (add_adi_info): New function.
2509         (get_adi_info_proc): New function.
2510         (get_adi_info): New function.
2511         (info_adi_command): New function.
2512         (read_maps_entry): New function.
2513         (adi_available): New function.
2514         (adi_normalize_address): New function.
2515         (adi_align_address): New function.
2516         (adi_convert_byte_count): New function.
2517         (adi_tag_fd): New function.
2518         (adi_is_addr_mapped): New function.
2519         (adi_read_versions): New function.
2520         (adi_write_versions): New function.
2521         (adi_print_versions): New function.
2522         (do_examine): New function.
2523         (do_assign): New function.
2524         (adi_examine_command): New function.
2525         (adi_assign_command): New function.
2526         (_initialize_sparc64_adi_tdep): New function.
2527
2528 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
2529
2530         * breakpoint.c (breakpoints_info): Rename to ...
2531         (info_breakpoints_command): ... this.
2532         (watchpoints_info): Rename to ...
2533         (info_watchpoints_command): ... this.
2534         (tracepoints_info): Rename to ...
2535         (info_tracepoints_command): ... this.
2536         (_initialize_breakpoint): Adjust.
2537         * dcache.c (dcache_info): Rename to ...
2538         (info_display_command): ... this.
2539         (_initialize_dcache): Adjust.
2540         * frame.h (args_info): Rename to ...
2541         (info_args_command): ... this.
2542         (locals_info): Rename to ...
2543         (info_locals_command): ... this.
2544         * infcmd.c (nofp_registers_info): Rename to ...
2545         (info_registers_command): ... this.
2546         (float_info): Rename to ...
2547         (info_float_command): ... this.
2548         (program_info): Rename to ...
2549         (info_program_command): ... this.
2550         (all_registers_info): Rename to ...
2551         (info_all_registers_command): ... this.
2552         (vector_info): Rename to ...
2553         (info_vector_command): ... this.
2554         (float_info): Rename to ...
2555         (info_float_command): ... this.
2556         (_initialize_infcmd): Adjust.
2557         * inferior.h (term_info): Rename to ...
2558         (info_terminal_command): ... this.
2559         * inflow.c (term_info): Rename to ...
2560         (info_terminal_command): ... this.
2561         (_initialize_inflow): Adjust.
2562         * infrun.c (signals_info): Rename to ...
2563         (info_signals_command): ... this.
2564         (_initialize_infrun): Adjust.
2565         * objc-lang.c (classes_info): Rename to ...
2566         (info_classes_command): ... this.
2567         (selectors_info): Rename to ...
2568         (info_selectors_command): ... this.
2569         (_initialize_objc_language): Adjust.
2570         * printcmd.c (sym_info): Rename to ...
2571         (info_symbol_command): ... this.
2572         (address_info): Rename to ...
2573         (info_address_command): ... this.
2574         (display_info): Rename to ...
2575         (info_display_command): ... this.
2576         (_initialize_printcmd): Adjust.
2577         * reverse.c (bookmarks_info): Rename to ...
2578         (info_breakpoints_command): ... this.
2579         (_initialize_reverse): Adjust.
2580         * ser-go32.c (dos_info): Rename to ...
2581         (info_serial_command): ... this.
2582         (_initialize_ser_dos): Adjust.
2583         * skip.c (skip_info): Rename to ...
2584         (info_skip_command): ... this.
2585         (_initialize_step_skip): Adjust.
2586         * source.c (line_info): Rename to ...
2587         (info_line_command): ... this.
2588         (source_info): Rename to ...
2589         (info_source_command)
2590         * stack.c (frame_info): Rename to ...
2591         (info_frame_command): ... this.
2592         (locals_info): Rename to ...
2593         (info_locals_command): ... this.
2594         (args_info): Rename to ...
2595         (info_args_command): ... this.
2596         (_initialize_stack): Adjust.
2597         * symtab.c (sources_info): Rename to ...
2598         (info_sources_command): ... this.
2599         (variables_info): Rename to ...
2600         (info_variables_command): ... this.
2601         (functions_info): Rename to ...
2602         (info_functions_command): ... this.
2603         (types_info): Rename to ...
2604         (info_types_command): ... this.
2605         (_initialize_symtab): Adjust.
2606         * target.c (target_info): Rename to ...
2607         (info_target_command): ... this.
2608         (initialize_targets): Adjust.
2609         * tracepoint.c (tvariables_info): Rename to ...
2610         (info_tvariables_command): ... this.
2611         (scope_info): Rename to ...
2612         (info_scope_command): ... this.
2613         (trace_dump_actions): Adjust.
2614         (_initialize_tracepoint): Adjust.
2615
2616 2017-08-22  Tom Tromey  <tom@tromey.com>
2617
2618         * breakpoint.h (install_breakpoint): Update.
2619         * breakpoint.c (add_solib_catchpoint): Update.
2620         (install_breakpoint): Change argument to a std::unique_ptr.
2621         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
2622         (create_breakpoint_sal, create_breakpoint): Update.
2623         (watch_command_1, catch_exec_command_1)
2624         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
2625         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
2626         Return the breakpoint.
2627         (set_raw_breakpoint_without_location, set_raw_breakpoint)
2628         (new_single_step_breakpoint): Update.
2629         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
2630         std::unique_ptr.
2631         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2632         std::unique_ptr.
2633         * break-catch-sig.c (create_signal_catchpoint): Use
2634         std::unique_ptr.
2635         * ada-lang.c (create_ada_exception_catchpoint): Use
2636         std::unique_ptr.
2637
2638 2017-08-22  Tom Tromey  <tom@tromey.com>
2639
2640         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
2641
2642 2017-08-22  Tom Tromey  <tom@tromey.com>
2643
2644         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
2645         (lookup_partial_symbol): Update.
2646
2647 2017-08-22  Tom Tromey  <tom@tromey.com>
2648
2649         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
2650         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
2651         (find_and_open_source, symtab_to_fullname): Update.
2652         * psymtab.c (psymtab_to_fullname): Update.
2653
2654 2017-08-22  Tom Tromey  <tom@tromey.com>
2655
2656         * exec.c (exec_file_attach): Update.
2657         * linux-thread-db.c (try_thread_db_load): Update.
2658         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
2659         * utils.c (gdb_realpath): Change return type.
2660         (gdb_realpath_keepfile): Update.
2661         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
2662         (_initialize_utils): Register the new self test.
2663         * source.c (openp): Update.
2664         (find_and_open_source): Update.
2665         * nto-tdep.c (nto_find_and_open_solib): Update.
2666         * main.c (set_gdb_data_directory): Update.
2667         (captured_main_1): Update.
2668         * dwarf2read.c (dwarf2_get_dwz_file): Update
2669         (dw2_map_symbol_filenames): Update.
2670         * auto-load.c (auto_load_safe_path_vec_update): Update.
2671         (filename_is_in_auto_load_safe_path_vec): Change type of
2672         "filename_realp".
2673         (auto_load_objfile_script): Update.
2674         (file_is_auto_load_safe): Update.  Use std::string.
2675         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
2676
2677 2017-08-22  Tom Tromey  <tom@tromey.com>
2678
2679         * utils.c (gdb_realpath_keepfile): Return a
2680         gdb::unique_xmalloc_ptr.
2681         * exec.c (exec_file_attach): Update.
2682         * utils.h (gdb_realpath_keepfile): Return a
2683         gdb::unique_xmalloc_ptr.
2684
2685 2017-08-22  Tom Tromey  <tom@tromey.com>
2686
2687         * compile/compile.c (compile_file_command): Use
2688         gdb::unique_xmalloc_ptr, std::string.
2689         * utils.c (gdb_abspath): Change return type.
2690         * source.c (openp): Update.
2691         * objfiles.c (allocate_objfile): Update.
2692         * main.c (set_gdb_data_directory): Update.
2693         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
2694
2695 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
2696
2697         * cli-cmds.c (list_commands): List actual code around more than
2698         one location.
2699
2700 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
2701
2702         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
2703
2704 2017-08-21  Pedro Alves  <palves@redhat.com>
2705
2706         PR gdb/19487
2707         * c-exp.y (variable production): Handle function aliases.
2708         * minsyms.c (msymbol_is_text): New function.
2709         * minsyms.h (msymbol_is_text): Declare.
2710         * symtab.c (find_function_alias_target): New function.
2711         * symtab.h (find_function_alias_target): Declare.
2712
2713 2017-08-21  Pedro Alves  <palves@redhat.com>
2714
2715         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
2716         typedefs.
2717         * typeprint.c (whatis_exp): If handling "whatis", and expression
2718         is OP_TYPE, strip one typedef level.  Otherwise don't strip
2719         typedefs here.
2720         * valops.c (value_cast): Save "to" type before resolving
2721         stubs/typedefs.  Use that type as resulting value's type.
2722
2723 2017-08-18  Tom Tromey  <tom@tromey.com>
2724             Pedro Alves  <palves@redhat.com>
2725
2726         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
2727         * sol-thread.c (sol_thread_resume, sol_thread_wait)
2728         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
2729         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
2730         * proc-service.c (ps_xfer_memory): Use scoped_restore.
2731         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
2732         (linux_get_siginfo_data): Add "thread" argument.  Use
2733         scoped_restore.
2734         * linux-nat.c (linux_child_follow_fork)
2735         (check_stopped_by_watchpoint): Use scoped_restore.
2736         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
2737         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
2738         (restore_inferior_ptid, save_inferior_ptid): Remove.
2739         * btrace.c (btrace_fetch): Use scoped_restore.
2740         * bsd-uthread.c (bsd_uthread_fetch_registers)
2741         (bsd_uthread_store_registers): Use scoped_restore.
2742         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
2743         scoped_restore.
2744         * aix-thread.c (aix_thread_resume, aix_thread_wait)
2745         (aix_thread_xfer_partial): Use scoped_restore.
2746         * inferior.h (save_inferior_ptid): Remove.
2747
2748 2017-08-18  Yao Qi  <yao.qi@linaro.org>
2749
2750         PR tdep/21818
2751         * arm-tdep.c (gdb_print_insn_arm): Mark
2752         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
2753
2754 2017-08-18  Yao Qi  <yao.qi@linaro.org>
2755
2756         * NEWS: Mention GDBserver's new option "--selftest".
2757         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
2758         * selftest.c: Move it to common/selftest.c.
2759         * selftest.h: Move it to common/selftest.h.
2760         * selftest-arch.c (reset): New function.
2761         (tests_with_arch): Call reset.
2762
2763 2017-08-18  Yao Qi  <yao.qi@linaro.org>
2764
2765         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
2766         instead of exception_fprintf and printf_filtered.
2767
2768 2017-08-18  Yao Qi  <yao.qi@linaro.org>
2769
2770         * selftest.c (register_self_test): Rename it to
2771         selftests::register_test.
2772         (run_self_tests): selftest::run_tests.
2773         * selftest.h: Update declarations.
2774         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
2775         selftests::register_test_foreach_arch.
2776         * selftest-arch.h: Update declaration.
2777         * aarch64-tdep.c: Update.
2778         * arm-tdep.c: Likewise.
2779         * disasm-selftests.c: Likewise.
2780         * dwarf2loc.c: Likewise.
2781         * dwarf2-frame.c: Likewise.
2782         * findvar.c: Likewise.
2783         * gdbarch-selftests.c: Likewise.
2784         * maint.c (maintenance_selftest): Likewise.
2785         * regcache.c: Likewise.
2786         * rust-exp.y: Likewise.
2787         * selftest-arch.c: Likewise.
2788         * unittests/environ-selftests.c: Likewise.
2789         * unittests/function-view-selftests.c: Likewise.
2790         * unittests/offset-type-selftests.c: Likewise.
2791         * unittests/optional-selftests.c: Likewise.
2792         * unittests/scoped_restore-selftests.c: Likewise.
2793         * utils-selftests.c: Likewise.
2794
2795 2017-08-17  Pedro Alves  <palves@redhat.com>
2796
2797         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
2798         local.
2799
2800 2017-08-17  Pedro Alves  <palves@redhat.com>
2801
2802         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
2803         field.
2804         (reset_die_in_process): Delete, replaced by ...
2805         (process_die_scope): ... this new class.  Make it responsible for
2806         freeing cu->line_header too.
2807         (process_die): Use process_die_scope.
2808         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
2809         cu->line_header_die_owner.  Don't release the line header if it's
2810         owned by the CU.
2811         (setup_type_unit_groups): Make the CU/DIE own the line header.
2812         Don't release the line header here.
2813
2814 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
2815
2816         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
2817
2818 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
2819
2820         * NEWS: Mention new shortcuts for nexti and stepi in TUI
2821         Single-Key mode
2822
2823 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
2824
2825         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
2826         mode command list.
2827
2828 2017-08-15  Stafford Horne  <shorne@gmail.com>
2829
2830         * MAINTAINERS (Write After Approval): Add Stafford Horne.
2831
2832 2017-08-15  Stafford Horne  <shorne@gmail.com>
2833
2834         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
2835
2836 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
2837
2838         PR gdb/21954
2839         * infcmd.c (unset_environment_command): Use the 'clear' method on
2840         the environment instead of resetting it.
2841
2842 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
2843
2844         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
2845         platforms.
2846
2847 2017-08-14  Tom Tromey  <tom@tromey.com>
2848
2849         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
2850         (print_binary_chars): Likewise.
2851         (BITS_IN_BYTES): Remove.
2852
2853 2017-08-14  Tom Tromey  <tom@tromey.com>
2854
2855         PR gdb/21675
2856         * valprint.c (LOW_ZERO): Change value to 034.
2857         (print_octal_chars): Add static_asserts for octal constants.
2858         * printcmd.c (print_scalar_formatted): Add 'd' case.
2859
2860 2017-08-11  Tom Tromey  <tom@tromey.com>
2861
2862         * symfile.c (add_symbol_file_command): Use std::vector.
2863
2864 2017-08-14  Tom Tromey  <tom@tromey.com>
2865
2866         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
2867         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
2868         std::move.
2869         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
2870
2871 2017-08-11  Pedro Alves  <palves@redhat.com>
2872
2873         * infrun.c (process_event_stop_test): Adjust
2874         function_name_is_marked_for_skip call.
2875         * skip.c: Include <list>.
2876         (skiplist_entry): Make it a class with private fields, and
2877         getters/setters.
2878         (skiplist_entry_chain): Delete.
2879         (skiplist_entries): New.
2880         (skiplist_entry_count): Delete.
2881         (highest_skiplist_entry_num): New.
2882         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
2883         (add_skiplist_entry): Delete.
2884         (skiplist_entry::skiplist_entry): New.
2885         (skiplist_entry::add_entry): New.
2886         (skip_file_command, skip_function): Adjust.
2887         (compile_skip_regexp): Delete.
2888         (skip_command): Don't compile regexp here.  Adjust to use
2889         skiplist_entry::add_entry.
2890         (skip_info): Adjust to use range-for and getters.
2891         (skip_enable_command, skip_disable_command): Adjust to use
2892         range-for and setters.
2893         (skip_delete_command): Adjust to use std::list.
2894         (add_skiplist_entry): Delete.
2895         (skip_file_p): Delete, refactored as ...
2896         (skiplist_entry::do_skip_file_p): ... this new method.
2897         (skip_gfile_p): Delete, refactored as ...
2898         (skiplist_entry::do_gskip_file_p): ... this new method.
2899         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
2900         (skiplist_entry::skip_function_p): ... this new method.
2901         (function_name_is_marked_for_skip): Now returns bool, and takes
2902         the function sal by const reference.  Adjust to use range-for and
2903         skiplist_entry methods.
2904         (_initialize_step_skip): Remove references to
2905         skiplist_entry_chain, skiplist_entry_count.
2906         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
2907         takes the function sal by const reference.
2908
2909 2017-08-11  Yao Qi  <yao.qi@linaro.org>
2910
2911         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
2912         (dwarf2_frame_cache): Remove reset_cache_cleanup.
2913         (dwarf2_frame_cache):
2914         * frame-unwind.c (frame_unwind_try_unwinder): Catch
2915         RETURN_MASK_ALL and set *this_case to NULL.
2916         * frame-unwind.h: Update comments.
2917
2918 2017-08-11  Yao Qi  <yao.qi@linaro.org>
2919
2920         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
2921         (dwarf2_frame_state_copy_regs): Remove.
2922         (dwarf2_frame_state_free_regs): Remove.
2923         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
2924         (dwarf2_restore_rule): Call method .alloc_regs instead of
2925         dwarf2_frame_state_alloc_regs.
2926         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
2927         constructor.  Call std::move.
2928         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
2929         (dwarf2_frame_cache): Likewise.
2930
2931         [GDB_SELF_TEST]: Include selftest.h and
2932         selftest-arch.h.
2933         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
2934         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
2935         execute_cfa_program_test.
2936
2937         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
2938         copy ctor, assignment operator, move assignment.
2939         <alloc_regs>: New method.
2940         <swap>: New method.
2941         (struct dwarf2_frame_state): Delete dtor.
2942         (dwarf2_frame_state_alloc_regs): Remove declaration.
2943         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
2944         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
2945
2946 2017-08-11  Yao Qi  <yao.qi@linaro.org>
2947
2948         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
2949         (dwarf2_frame_state::dwarf2_frame_state): New.
2950         (dwarf2_frame_state::~dwarf2_frame_state): New.
2951         (dwarf2_fetch_cfa_info): Update.
2952         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
2953         rather than a pointer.  Update code.
2954         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
2955         dtor.
2956         <data_align, code_align, retaddr_column>: Change them to const.
2957         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
2958         to bool.
2959
2960 2017-08-11  Yao Qi  <yao.qi@linaro.org>
2961
2962         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
2963         <loc.exp>: New field.
2964         * dwarf2-frame.c (execute_cfa_program): Update.
2965         (dwarf2_frame_prev_register): Update.
2966
2967 2017-08-10  Pedro Alves  <palves@redhat.com>
2968
2969         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
2970
2971 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
2972
2973         * fbsd-nat.c (struct fbsd_fork_info): Remove.
2974         (fbsd_pending_children): Use std::list.
2975         (fbsd_remember_child): Likewise.
2976         (fbsd_is_child_pending): Likewise.
2977         (fbsd_pending_vfork_done): Use std::forward_list.
2978         (fbsd_add_vfork_done): Likewise.
2979         (fbsd_is_vfork_done_pending): Likewise.
2980         (fbsd_next_vfork_done): Likewise.
2981
2982 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
2983
2984         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
2985         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
2986         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
2987         for `mapfilename'.
2988         (fbsd_xfer_partial): Use gdb::byte_vector.
2989         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
2990
2991 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
2992
2993         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
2994         "filestuff.h".
2995         (fbsd_find_memory_regions): Fix `mapfile' initialization.
2996
2997 2017-08-09  Tom Tromey  <tom@tromey.com>
2998
2999         * skip.c (skiplist_entry): New constructor.
3000         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
3001         (skiplist_entry::file_is_glob): Now bool.
3002         (skiplist_entry::file, skiplist_entry::function): Now
3003         std::string.
3004         (make_skip_entry): Return a unique_ptr.  Use new.
3005         (free_skiplist_entry, free_skiplist_entry_cleanup)
3006         (make_free_skiplist_entry_cleanup): Remove.
3007         (skip_command, skip_disable_command, add_skiplist_entry)
3008         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
3009         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
3010         (function_name_is_marked_for_skip): Update.
3011         (skip_delete_command): Update.  Use delete.
3012
3013 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
3014
3015         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
3016         (aarch64_linux_core_read_description): New function.
3017         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
3018
3019 2017-08-09  Pedro Alves  <palves@redhat.com>
3020
3021         * cp-name-parser.y (cp_comp_to_string): Return a
3022         gdb::unique_xmalloc_ptr<char>.
3023         * cp-support.c (replace_typedefs_qualified_name)
3024         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
3025         (cp_canonicalize_string_full): Use op= instead of explicit
3026         convertion.
3027         (cp_class_name_from_physname, method_name_from_physname)
3028         (cp_func_name, cp_remove_params): Adjust to use
3029         gdb::unique_xmalloc_ptr<char>.
3030         * cp-support.h (cp_comp_to_string): Return a
3031         gdb::unique_xmalloc_ptr<char>.
3032         * python/py-type.c (typy_lookup_type): Adjust to use
3033         gdb::unique_xmalloc_ptr<char>.
3034
3035 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
3036
3037         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
3038
3039 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
3040             Yao Qi  <yao.qi@linaro.org>
3041
3042         * cp-support.c (cp_canonicalize_string_full): Use
3043         gdb::unique_xmalloc_ptr<char>.
3044         (cp_canonicalize_string): Likewise.
3045
3046 2017-08-09  Yao Qi  <yao.qi@linaro.org>
3047
3048         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
3049         * regformats/i386/amd64-avx-avx512.dat: Remove.
3050         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
3051         * regformats/i386/amd64-avx-mpx.dat:Remove.
3052         * regformats/i386/amd64-avx.dat: Remove.
3053         * regformats/i386/amd64-mpx.dat: Remove.
3054         * regformats/i386/i386-avx-avx512.dat: Remove.
3055         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
3056         * regformats/i386/i386-avx-mpx.dat: Remove.
3057         * regformats/i386/i386-mmx.dat: Remove.
3058         * regformats/i386/i386-mpx.dat: Remove.
3059
3060 2017-08-09  Yao Qi  <yao.qi@linaro.org>
3061
3062         * amd64-tdep.h (tdesc_x32): Remove the declaration.
3063         * amd64-tdep.c: Don't include features/i386/x32*.c.
3064         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
3065         functions.
3066         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
3067         and i386/x32-avx-avx512.
3068         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
3069         and i386/x32.xml.
3070         * features/i386/x32-avx-avx512.c: Removed.
3071         * features/i386/x32-avx-avx512.xml: Removed.
3072         * features/i386/x32-avx.c: Removed.
3073         * features/i386/x32-avx.xml: Removed.
3074         * features/i386/x32.c: Removed.
3075         * features/i386/x32.xml: Removed.
3076         * regformats/i386/x32-avx-avx512.dat: Removed.
3077         * regformats/i386/x32-avx.dat: Removed.
3078         * regformats/i386/x32.dat: Removed.
3079
3080 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
3081
3082         PR breakpoints/21886
3083         * mem-break.c (default_memory_insert_breakpoint): Use
3084         `->placed_address' rather than `->reqstd_address' for the
3085         breakpoint location.
3086
3087 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
3088
3089         * arch-utils.c (default_print_insn): Remove arch/mach/endian
3090         assertions.
3091
3092 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
3093
3094         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
3095         a union of `tdep_info', `tdesc_data' and `id'.
3096         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
3097         rather than `info.tdep_info'.
3098         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
3099         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
3100         * i386-tdep.c (i386_gdbarch_init): Likewise.
3101         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
3102         * mips-tdep.c (mips_gdbarch_init): Likewise.
3103         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
3104         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
3105         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
3106         `info.tdep_info'.
3107         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
3108         `info.tdep_info'.
3109         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
3110         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
3111         `info.tdep_info'.
3112         * spu-tdep.c (spu_gdbarch_init): Likewise.
3113         * gdbarch.h: Regenerate.
3114
3115 2017-08-07  Leszek Swirski  <leszeks@google.com>
3116
3117         PR symtab/20899
3118         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
3119
3120 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3121
3122         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
3123         (gdbsim_open): Rename gdb_argv args object to argv.
3124
3125 2017-08-05  Tom Tromey  <tom@tromey.com>
3126
3127         * compile/compile-object-load.c (compile_object_load): Use
3128         gdb::unique_xmalloc_ptr.
3129         * cli/cli-dump.c (scan_filename): Rename from
3130         scan_filename_with_cleanup.  Change return type.
3131         (scan_expression): Rename from scan_expression_with_cleanup.
3132         Change return type.
3133         (dump_memory_to_file, dump_value_to_file, restore_command):
3134         Use gdb::unique_xmalloc_ptr.  Update.
3135         * cli/cli-cmds.c (find_and_open_script): Use
3136         gdb::unique_xmalloc_ptr.
3137         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
3138         * symmisc.c (maintenance_print_symbols)
3139         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
3140         * symfile.c (symfile_bfd_open, generic_load)
3141         (add_symbol_file_command, remove_symbol_file_command): Use
3142         gdb::unique_xmalloc_ptr.
3143         * source.c (openp): Use gdb::unique_xmalloc_ptr.
3144         * psymtab.c (maintenance_print_psymbols): Use
3145         gdb::unique_xmalloc_ptr.
3146         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
3147         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
3148         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
3149         (reload_shared_libraries_1): Likewise.
3150
3151 2017-08-05  Tom Tromey  <tom@tromey.com>
3152
3153         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
3154         (rust_op_vector, rust_set_vector): New typedefs.
3155         (current_parser): New global.
3156         (work_obstack): Change to pointer type.  Update all users.
3157         (rust_ast, pstate): Remove globals.
3158         (struct rust_parser): New.
3159         (%union) <params, field_inits>: Change type.
3160         (start, tuple_expr, unit_expr, struct_expr_list, literal)
3161         (field_expr, expr_list, maybe_expr_list, type_list): Update.
3162         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
3163         (convert_params_to_types, convert_params_to_expression): Change
3164         type of "params".
3165         (ast_string): Change type of "fields".
3166         (rust_parse): Make a rust_parser.  Remove cleanups.
3167         (rust_lex_tests): Make and install an auto_obstack.
3168
3169 2017-08-04  Yao Qi  <yao.qi@linaro.org>
3170
3171         * configure.srv (ipa_x32_linux_regobj): New.
3172         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
3173         instead of X86_TDESC_AVX512.
3174         (initialize_low_tracepoint): Call
3175         init_registers_x32_avx_avx512_linux.
3176
3177 2017-08-04  Yao Qi  <yao.qi@linaro.org>
3178
3179         * utils.h (gdb_argv): Add namespace std for nullptr_t.
3180
3181 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
3182
3183         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
3184
3185 2017-08-03  Tom Tromey  <tom@tromey.com>
3186
3187         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
3188         Remove.
3189         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
3190
3191 2017-08-03  Tom Tromey  <tom@tromey.com>
3192
3193         * python/py-param.c (compute_enum_values): Use gdb_argv.
3194
3195 2017-08-03  Tom Tromey  <tom@tromey.com>
3196
3197         * utils.h (struct gdb_argv_deleter): New.
3198         (gdb_argv): New class.
3199         * utils.c (gdb_argv::reset): New method.
3200         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
3201         * tracefile.c (tsave_command): Use gdb_argv.
3202         * top.c (new_ui_command): Use gdb_argv.
3203         * symmisc.c (maintenance_print_symbols)
3204         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
3205         * symfile.c (symbol_file_command, generic_load)
3206         (remove_symbol_file_command): Use gdb_argv.
3207         * stack.c (backtrace_command): Use gdb_argv.
3208         * source.c (add_path, show_substitute_path_command)
3209         (unset_substitute_path_command, set_substitute_path_command):
3210         Use gdb_argv.
3211         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
3212         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
3213         * remote.c (extended_remote_run, remote_put_command)
3214         (remote_get_command, remote_delete_command): Use gdb_argv.
3215         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
3216         (gdbsim_open): Use gdb_argv.
3217         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
3218         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
3219         * procfs.c (procfs_info_proc): Use gdb_argv.
3220         * interps.c (interpreter_exec_cmd): Use gdb_argv.
3221         * infrun.c (handle_command): Use gdb_argv.
3222         * inferior.c (add_inferior_command, clone_inferior_command):
3223         Use gdb_argv.
3224         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
3225         * exec.c (exec_file_command): Use gdb_argv.
3226         * cli/cli-cmds.c (alias_command): Use gdb_argv.
3227         * compile/compile.c (build_argc_argv): Use gdb_argv.
3228
3229 2017-08-03  Tom Tromey  <tom@tromey.com>
3230
3231         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
3232
3233 2017-08-03  Tom Tromey  <tom@tromey.com>
3234
3235         * python/python.c (compute_python_string): Return std::string.
3236         (gdbpy_eval_from_control_command): Update.
3237         (do_start_initialization): Use std::string.
3238         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
3239         xstrprintf.
3240         * python/py-breakpoint.c (local_setattro): Use string_printf, not
3241         xstrprintf.
3242
3243 2017-08-03  Tom Tromey  <tom@tromey.com>
3244
3245         * top.h (do_restore_instream_cleanup): Remove.
3246         * top.c (do_restore_instream_cleanup): Remove.
3247         (read_command_file): Use scoped_restore.
3248         * cli/cli-script.c (execute_user_command): Use scoped_restore.
3249
3250 2017-08-03  Tom Tromey  <tom@tromey.com>
3251
3252         * cli/cli-script.c (execute_user_command)
3253         (execute_control_command): Use scoped_restore.
3254
3255 2017-08-03  Tom Tromey  <tom@tromey.com>
3256
3257         * cli/cli-script.c (do_restore_user_call_depth): Remove.
3258         (execute_user_command): Remove user_call_depth; use
3259         user_args_stack's size instead.
3260
3261 2017-08-03  Tom Tromey  <tom@tromey.com>
3262
3263         * top.h (in_user_command): Remove.
3264         * top.c (in_user_command): Remove.
3265         * cli/cli-script.c (do_restore_user_call_depth)
3266         (execute_user_command): Update.
3267
3268 2017-08-03  Tom Tromey  <tom@tromey.com>
3269
3270         * valops.c (search_struct_method): Use gdb::byte_vector.
3271         * valarith.c (value_concat): Use std::vector.
3272         * target.c (memory_xfer_partial): Use gdb::byte_vector.
3273         (simple_search_memory): Likewise.
3274         * printcmd.c (find_string_backward): Use gdb::byte_vector.
3275         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
3276         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
3277         * elfread.c (elf_rel_plt_read): Use std::string.
3278         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
3279         * cli/cli-dump.c (restore_section_callback): Use
3280         gdb::byte_vector.
3281
3282 2017-08-03  Tom Tromey  <tom@tromey.com>
3283
3284         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
3285
3286 2017-08-03  Tom Tromey  <tom@tromey.com>
3287
3288         * tui/tui-regs.c (tui_restore_gdbout): Remove.
3289         (tui_register_format): Use scoped_restore.
3290
3291 2017-08-03  Tom Tromey  <tom@tromey.com>
3292
3293         * reverse.c (exec_direction_default): Remove.
3294         (exec_reverse_once): Use scoped_restore.
3295         * remote.c (restore_remote_timeout): Remove.
3296         (remote_flash_erase, remote_flash_write, remote_flash_done)
3297         (readchar, remote_serial_write): Use scoped_restore.
3298         * cli/cli-script.c (struct source_cleanup_lines_args)
3299         (source_cleanup_lines): Remove.
3300         (script_from_file): Use scoped_restore.
3301         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
3302         (source_command): Use scoped_restore.
3303
3304 2017-08-03  Tom Tromey  <tom@tromey.com>
3305
3306         * utils.h (make_cleanup_free_so): Remove.
3307         * utils.c (do_free_so, make_cleanup_free_so): Remove.
3308         * solist.h (struct so_deleter): New.
3309         (so_list_up): New typedef.
3310         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
3311
3312 2017-08-03  Tom Tromey  <tom@tromey.com>
3313
3314         * utils.h (make_cleanup_restore_current_language): Remove.
3315         * utils.c (do_restore_current_language)
3316         (make_cleanup_restore_current_language): Remove.
3317         * parse.c (parse_exp_in_context_1)
3318         (parse_expression_with_language): Use
3319         scoped_restore_current_language.
3320         * mi/mi-main.c (mi_cmd_execute): Use
3321         scoped_restore_current_language.
3322         * language.h (scoped_restore_current_language): New class.
3323
3324 2017-08-03  Tom Tromey  <tom@tromey.com>
3325
3326         * compile/compile.c (cleanup_unlink_file): Remove.
3327         (compile_to_object): Use gdb::unlinker.
3328         (eval_compile_command): Likewise.
3329
3330 2017-08-03  Tom Tromey  <tom@tromey.com>
3331
3332         * utils.h (make_cleanup_fclose): Remove.
3333         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
3334
3335 2017-08-03  Tom Tromey  <tom@tromey.com>
3336
3337         * top.c (open_terminal_stream): Return gdb_file_up.
3338         (new_ui_command): Update.
3339
3340 2017-08-03  Tom Tromey  <tom@tromey.com>
3341
3342         * source.c (print_source_lines_base, forward_search_command)
3343         (reverse_search_command): Use gdb_file_up.
3344
3345 2017-08-03  Tom Tromey  <tom@tromey.com>
3346
3347         * fbsd-nat.c (fbsd_find_memory_regions): Update.
3348
3349 2017-08-03  Tom Tromey  <tom@tromey.com>
3350
3351         * cli/cli-cmds.c (find_and_open_script): Change return type.
3352         Remove "streamp" and "full_path" parameters.
3353         (source_script_with_search): Update.
3354         * auto-load.c (source_script_file): Update.
3355         * cli/cli-cmds.h (find_and_open_script): Change type.
3356         (open_script): New struct.
3357
3358 2017-08-03  Tom Tromey  <tom@tromey.com>
3359
3360         * xml-support.c (xml_fetch_content_from_file): Update.
3361         * ui-file.c (stdio_file::open): Update.
3362         * tracefile-tfile.c (tfile_start): Update.
3363         * remote.c (remote_file_put, remote_file_get): Update.
3364         * nat/linux-procfs.c (linux_proc_get_int)
3365         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
3366         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
3367         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
3368         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
3369         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
3370         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
3371         * linux-nat.c (linux_proc_pending_signals): Update.
3372         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
3373         (file_closer): Remove.
3374         * compile/compile.c (compile_to_object): Update.
3375         * common/filestuff.h (struct gdb_file_deleter): New.
3376         (gdb_file_up): New typedef.
3377         (gdb_fopen_cloexec): Change return type.
3378         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
3379         * cli/cli-dump.c (fopen_with_cleanup): Remove.
3380         (dump_binary_file, restore_binary_file): Update.
3381         * auto-load.c (auto_load_objfile_script_1): Update.
3382
3383 2017-08-03  Tom Tromey  <tom@tromey.com>
3384
3385         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
3386         (info_static_tracepoint_markers_command): Likewise.
3387         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
3388         * skip.c (skip_info): Use ui_out_emit_table.
3389         * progspace.c (print_program_space): Use ui_out_emit_table.
3390         * osdata.c (info_osdata): Use ui_out_emit_table.
3391         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
3392         ui_out_emit_table.
3393         * linux-thread-db.c (info_auto_load_libthread_db): Use
3394         ui_out_emit_table.
3395         * inferior.c (print_inferior): Use ui_out_emit_table.
3396         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
3397         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
3398         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
3399         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
3400         * ui-out.h (class ui_out_emit_table): New.
3401
3402 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
3403
3404         * mips-tdep.c (mips_fpu_type_str): New function.
3405         (mips_dump_tdep): Call it.
3406
3407 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
3408
3409         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
3410         `->mips_fpu_type'.
3411
3412 2017-07-31  Xavier Roirand  <roirand@adacore.com>
3413
3414         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
3415
3416 2017-07-27  Xavier Roirand  <roirand@adacore.com>
3417
3418         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
3419
3420 2017-07-26  Yao Qi  <yao.qi@linaro.org>
3421
3422         * cli/cli-cmds.c (maintenancechecklist): New variable.
3423         * gdbcmd.h (maintenancechecklist): Declare it.
3424         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
3425         Call i386_linux_read_description with different masks.
3426         * maint.c (maintenance_check_command): New function.
3427         (_initialize_maint_cmds): Call add_prefix_cmd.
3428         * target-descriptions.c (tdesc_reg): override operator != and ==.
3429         (tdesc_type): Likewise.
3430         (tdesc_feature): Likewise.
3431         (target_desc): Likewise.
3432         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
3433         (maintenance_check_xml_descriptions): New function.
3434         (_initialize_target_descriptions) Add command "xml-descriptions".
3435         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
3436
3437 2017-07-26  Yao Qi  <yao.qi@linaro.org>
3438
3439         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
3440         Include features/i386/32bit-*.c.
3441         (i386_linux_read_description): Generate target description if it
3442         doesn't exist.
3443         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
3444         functions.
3445         * features/i386/32bit-linux.c: Re-generated.
3446         * features/i386/32bit-sse.c: Likewise.
3447         * target-descriptions.c (print_c_feature::visit): Print code to
3448         set register number if needed.
3449         (print_c_feature) <m_next_regnum>: New field.
3450
3451 2017-07-26  Yao Qi  <yao.qi@linaro.org>
3452
3453         * features/Makefile (CFILES): Rename with TDESC_CFILES.
3454         (FEATURE_XMLFILES): New.
3455         (FEATURE_CFILES): New.
3456         New rules.
3457         (clean-cfiles): Remove generated c files.
3458         * features/i386/32bit-avx.c: Generated.
3459         * features/i386/32bit-avx512.c: Generated.
3460         * features/i386/32bit-core.c: Generated.
3461         * features/i386/32bit-linux.c: Generated.
3462         * features/i386/32bit-mpx.c: Generated.
3463         * features/i386/32bit-pkeys.c: Generated.
3464         * features/i386/32bit-sse.c: Generated.
3465         * target-descriptions.c: Include algorithm.
3466         (tdesc_element_visitor): Add method visit_end.
3467         (print_c_tdesc): Implement visit_end.
3468         (print_c_tdesc:: m_filename_after_features): Move it to
3469         protected.
3470         (print_c_feature): New class.
3471         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
3472         name starts with "i386/32bit-".
3473
3474 2017-07-26  Yao Qi  <yao.qi@linaro.org>
3475
3476         * target-descriptions.c (tdesc_element_visitor): New class.
3477         (tdesc_element): New class.
3478         (tdesc_reg): Inherit from tdesc_element.
3479         (tdesc_reg::accept): New function.
3480         (tdesc_type): Inherit from tdesc_element.
3481         (tdesc_type::accept): New function.
3482         (tdesc_feature): Inherit from tdesc_element.
3483         (tdesc_feature::accept): New function.
3484         (target_desc): Inherit from tdesc_element.
3485         (target_desc::target_desc): New.
3486         (target_desc::~target_desc): New.
3487         (target_desc::accept): New.
3488         (allocate_target_description): Use new.
3489         (free_target_description): Use delete.
3490         (print_c_tdesc): New class.
3491         (maint_print_c_tdesc_cmd): Adjust.
3492
3493         * features/aarch64.c: Re-generated.
3494         * features/arc-arcompact.c: Re-generated.
3495         * features/arc-v2.c: Re-generated.
3496         * features/arm/arm-with-iwmmxt.c: Re-generated.
3497         * features/arm/arm-with-m.c: Re-generated.
3498         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
3499         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
3500         * features/arm/arm-with-neon.c: Re-generated.
3501         * features/arm/arm-with-vfpv2.c: Re-generated.
3502         * features/arm/arm-with-vfpv3.c: Re-generated.
3503         * features/i386/amd64-avx-avx512.c: Re-generated.
3504         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
3505         * features/i386/amd64-avx.c: Re-generated.
3506         * features/i386/amd64-avx-linux.c: Re-generated.
3507         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
3508         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
3509         * features/i386/amd64-avx-mpx.c: Re-generated.
3510         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
3511         * features/i386/amd64.c: Re-generated.
3512         * features/i386/amd64-linux.c: Re-generated.
3513         * features/i386/amd64-mpx.c: Re-generated.
3514         * features/i386/amd64-mpx-linux.c: Re-generated.
3515         * features/i386/i386-avx-avx512.c: Re-generated.
3516         * features/i386/i386-avx-avx512-linux.c: Re-generated.
3517         * features/i386/i386-avx.c: Re-generated.
3518         * features/i386/i386-avx-linux.c: Re-generated.
3519         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
3520         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
3521         * features/i386/i386-avx-mpx.c: Re-generated.
3522         * features/i386/i386-avx-mpx-linux.c: Re-generated.
3523         * features/i386/i386.c: Re-generated.
3524         * features/i386/i386-linux.c: Re-generated.
3525         * features/i386/i386-mmx.c: Re-generated.
3526         * features/i386/i386-mmx-linux.c: Re-generated.
3527         * features/i386/i386-mpx.c: Re-generated.
3528         * features/i386/i386-mpx-linux.c: Re-generated.
3529         * features/i386/x32-avx-avx512.c: Re-generated.
3530         * features/i386/x32-avx-avx512-linux.c: Re-generated.
3531         * features/i386/x32-avx.c: Re-generated.
3532         * features/i386/x32-avx-linux.c: Re-generated.
3533         * features/i386/x32.c: Re-generated.
3534         * features/i386/x32-linux.c: Re-generated.
3535         * features/microblaze.c: Re-generated.
3536         * features/microblaze-with-stack-protect.c: Re-generated.
3537         * features/mips64-dsp-linux.c: Re-generated.
3538         * features/mips64-linux.c: Re-generated.
3539         * features/mips-dsp-linux.c: Re-generated.
3540         * features/mips-linux.c: Re-generated.
3541         * features/nds32.c: Re-generated.
3542         * features/nios2.c: Re-generated.
3543         * features/nios2-linux.c: Re-generated.
3544         * features/rs6000/powerpc-32.c: Re-generated.
3545         * features/rs6000/powerpc-32l.c: Re-generated.
3546         * features/rs6000/powerpc-403.c: Re-generated.
3547         * features/rs6000/powerpc-403gc.c : Re-generated.
3548         * features/rs6000/powerpc-405.c: Re-generated.
3549         * features/rs6000/powerpc-505.c: Re-generated.
3550         * features/rs6000/powerpc-601.c: Re-generated.
3551         * features/rs6000/powerpc-602.c: Re-generated.
3552         * features/rs6000/powerpc-603.c: Re-generated.
3553         * features/rs6000/powerpc-604.c: Re-generated.
3554         * features/rs6000/powerpc-64.c: Re-generated.
3555         * features/rs6000/powerpc-64l.c: Re-generated.
3556         * features/rs6000/powerpc-7400.c: Re-generated.
3557         * features/rs6000/powerpc-750.c: Re-generated.
3558         * features/rs6000/powerpc-860.c: Re-generated.
3559         * features/rs6000/powerpc-altivec32.c: Re-generated.
3560         * features/rs6000/powerpc-altivec32l.c: Re-generated.
3561         * features/rs6000/powerpc-altivec64.c: Re-generated.
3562         * features/rs6000/powerpc-altivec64l.c: Re-generated.
3563         * features/rs6000/powerpc-cell32l.c: Re-generated.
3564         * features/rs6000/powerpc-cell64l.c: Re-generated.
3565         * features/rs6000/powerpc-e500.c: Re-generated.
3566         * features/rs6000/powerpc-e500l.c: Re-generated.
3567         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
3568         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
3569         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
3570         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
3571         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
3572         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
3573         * features/rs6000/powerpc-vsx32.c: Re-generated.
3574         * features/rs6000/powerpc-vsx32l.c: Re-generated.
3575         * features/rs6000/powerpc-vsx64.c: Re-generated.
3576         * features/rs6000/powerpc-vsx64l.c: Re-generated.
3577         * features/rs6000/rs6000.c: Re-generated.
3578         * features/s390-linux32.c: Re-generated.
3579         * features/s390-linux32v1.c: Re-generated.
3580         * features/s390-linux32v2.c: Re-generated.
3581         * features/s390-linux64.c: Re-generated.
3582         * features/s390-linux64v1.c: Re-generated.
3583         * features/s390-linux64v2.c: Re-generated.
3584         * features/s390-te-linux64.c: Re-generated.
3585         * features/s390-tevx-linux64.c: Re-generated.
3586         * features/s390-vx-linux64.c: Re-generated.
3587         * features/s390x-linux64.c: Re-generated.
3588         * features/s390x-linux64v1.c: Re-generated.
3589         * features/s390x-linux64v2.c: Re-generated.
3590         * features/s390x-te-linux64.c: Re-generated.
3591         * features/s390x-tevx-linux64.c: Re-generated.
3592         * features/s390x-vx-linux64.c: Re-generated.
3593         * features/sparc/sparc32-solaris.c: Re-generated.
3594         * features/sparc/sparc64-solaris.c: Re-generated.
3595         * features/tic6x-c62x.c: Re-generated.
3596         * features/tic6x-c62x-linux.c: Re-generated.
3597         * features/tic6x-c64x.c: Re-generated.
3598         * features/tic6x-c64x-linux.c: Re-generated.
3599         * features/tic6x-c64xp.c: Re-generated.
3600         * features/tic6x-c64xp-linux.c: Re-generated.
3601
3602 2017-07-26  Yao Qi  <yao.qi@linaro.org>
3603
3604         * i386-linux-tdep.c (i386_linux_read_description): New function.
3605         (i386_linux_core_read_description): Call
3606         i386_linux_read_description.
3607         * i386-linux-tdep.h (i386_linux_read_description): Declare.
3608         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
3609         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
3610         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
3611         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
3612         * x86-linux-nat.c (x86_linux_read_description): Call
3613         i386_linux_read_description.
3614
3615 2017-07-26  Yao Qi  <yao.qi@linaro.org>
3616
3617         * NEWS: Mention it.
3618         * features/Makefile (%.c: %.xml): Pass the xml file name to
3619         command "maint print c-tdesc".
3620         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
3621         name from 'arg'.
3622
3623 2017-07-26  Yao Qi  <yao.qi@linaro.org>
3624
3625         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
3626         in-class initialization.
3627         (tdesc_create_feature): Call new instead of XCNEW.
3628         (free_target_description): Ue delete.
3629
3630 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
3631
3632         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
3633
3634 2017-07-25  Yao Qi  <yao.qi@linaro.org>
3635
3636         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
3637         constant.
3638         (amd64_x32_init_abi): Likewise.
3639         * amd64-tdep.h (amd64_init_abi): Update declaration.
3640         (amd64_x32_init_abi): Likewise.
3641
3642 2017-07-25  Yao Qi  <yao.qi@linaro.org>
3643
3644         PR tdep/21717
3645         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
3646         condition for FPSCR.
3647         (arm_linux_store_inferior_registers): Likewise.
3648
3649 2017-07-22  Tom Tromey  <tom@tromey.com>
3650
3651         * break-catch-syscall.c (struct catch_syscall_inferior_data)
3652         <syscalls_counts>: Now a std::vector.
3653         (get_catch_syscall_inferior_data): Use "new".
3654         (catch_syscall_inferior_data_cleanup): Use "delete".
3655         (insert_catch_syscall, remove_catch_syscall)
3656         (clear_syscall_counts): Update.
3657
3658 2017-07-22  Tom Tromey  <tom@tromey.com>
3659
3660         * break-catch-syscall.c (syscall_catchpoint)
3661         <syscalls_to_be_caught>: Now a std::vector<int>
3662         (~syscall_catchpoint): Remove.
3663         (insert_catch_syscall, remove_catch_syscall)
3664         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
3665         (print_mention_catch_syscall, print_recreate_catch_syscall):
3666         Update.
3667         (create_syscall_event_catchpoint): Change type of "filter"
3668         parameter.
3669         (catch_syscall_split_args): Return a std::vector.
3670         (catch_syscall_command_1, catching_syscall_number_1): Update.
3671
3672 2017-07-22  Tom Tromey  <tom@tromey.com>
3673
3674         * break-catch-throw.c (struct exception_catchpoint)
3675         <exception_rx>: Now a std::string.
3676         (~exception_catchpoint): Remove.
3677         (print_one_detail_exception_catchpoint): Update.
3678         (handle_gnu_v3_exceptions): Change type of except_rx.
3679         (extract_exception_regexp): Return a std::string.
3680         (catch_exception_command_1): Update.
3681
3682 2017-07-22  Tom Tromey  <tom@tromey.com>
3683
3684         * break-catch-sig.c (gdb_signal_type): Remove typedef.
3685         (struct signal_catchpoint) <signals_to_be_caught>: Now a
3686         std::vector.
3687         <catch_all>: Now a bool.
3688         (~signal_catchpoint): Remove.
3689         (signal_catchpoint_insert_location)
3690         (signal_catchpoint_remove_location)
3691         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
3692         (signal_catchpoint_print_mention)
3693         (signal_catchpoint_print_recreate)
3694         (signal_catchpoint_explains_signal): Update.
3695         (create_signal_catchpoint): Change type of "filter" and
3696         "catch_all".
3697         (catch_signal_split_args): Return a std::vector.  Change type of
3698         "catch_all".
3699         (catch_signal_command): Update.
3700
3701 2017-07-20  Pedro Alves  <palves@redhat.com>
3702
3703         * ada-lang.c (ada_language_defn): Make extern.
3704         (_initialize_ada_language): Remove add_language call.
3705         * c-lang.c (c_language_defn, cplus_language_defn)
3706         (asm_language_defn, minimal_language_defn): Make extern.
3707         (_initialize_c_language): Delete.
3708         * completer.c (compare_cstrings): Delete, moved to utils.h.
3709         * d-lang.c (d_language_defn): Make extern.
3710         (_initialize_d_language): Remove add_language calls.
3711         * defs.h (enum language): Add comment.
3712         * f-lang.c (f_language_defn): Make extern.
3713         (_initialize_f_language): Remove add_language call.
3714         * go-lang.c (go_language_defn): Make extern.
3715         (_initialize_go_language): Remove add_language call.
3716         * language.c: Include <algorithm>.
3717         (languages): Redefine as const array.
3718         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
3719         (set_language_command): Handle "local".  Use for-range loop.
3720         (set_language): Remove loop.
3721         (language_enum): Rewrite.
3722         (language_def, language_str): Remove loops.
3723         (add_language): Delete.
3724         (add_set_language_command): New, based on add_languages.
3725         (skip_language_trampoline): Adjust.
3726         (local_language_defn): Delete.
3727         (language_gdbarch_post_init): Adjust.
3728         (_initialize_language): Remove add_language calls.  Call
3729         add_set_language_command.
3730         * language.h (add_language): Delete.
3731         (auto_language_defn)
3732         (unknown_language_defn, minimal_language_defn, ada_language_defn)
3733         (asm_language_defn, c_language_defn, cplus_language_defn)
3734         (d_language_defn, f_language_defn, go_language_defn)
3735         (m2_language_defn, objc_language_defn, opencl_language_defn)
3736         (pascal_language_defn, rust_language_defn): Declare.
3737         * m2-lang.c (m2_language_defn): Make extern.
3738         (_initialize_m2_language): Remove add_language call.
3739         * objc-lang.c (objc_language_defn): Make extern.
3740         (_initialize_objc_language): Remove add_language call.
3741         * opencl-lang.c (opencl_language_defn): Make extern.
3742         (_initialize_opencl_language): Remove add_language call.
3743         * p-lang.c (pascal_language_defn): Make extern.
3744         (_initialize_pascal_language): Delete.
3745         * rust-lang.c (rust_language_defn): Make extern.
3746         (_initialize_rust_language): Delete.
3747         * utils.h (compare_cstrings): New static inline function.
3748
3749 2017-07-20  Pedro Alves  <palves@redhat.com>
3750
3751         * ada-lang.c (ada_to_fixed_type_1): Adjust.
3752         (get_var_value): Constify parameters.
3753         (get_int_var_value): Change prototype.
3754         (to_fixed_range_type): Adjust.
3755         * ada-lang.h (get_int_var_value): Change prototype.
3756
3757 2017-07-20  Pedro Alves  <palves@redhat.com>
3758
3759         * dwarf2read.c (dw2_lookup_symbol): Use
3760         SYMBOL_MATCHES_SEARCH_NAME.
3761         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
3762
3763 2017-07-20  Pedro Alves  <palves@redhat.com>
3764
3765         * block.c (block_iter_name_step, block_iter_name_first)
3766         (block_iter_name_next): Delete.
3767         (block_lookup_symbol_primary): Adjust to use
3768         dict_iter_match_first/dict_iter_match_next.
3769         * block.h (block_iter_name_first, block_iter_name_next): Delete
3770         declarations.
3771         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
3772         dict_iter_match_first/dict_iter_match_next.
3773
3774 2017-07-20  Pedro Alves  <palves@redhat.com>
3775
3776         * cp-support.c (cp_find_first_component_aux): Add missing case for
3777         end of string.
3778
3779 2017-07-18  David Blaikie  <dblaikie@gmail.com>
3780
3781         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
3782         of dwo_cu's dwo_file.
3783
3784 2017-07-18  Yao Qi  <yao.qi@linaro.org>
3785
3786         * remote.c (store_registers_using_G): Remove one line comment.
3787
3788 2017-07-18  Yao Qi  <yao.qi@linaro.org>
3789
3790         * regcache.c (regcache_cpy): Simplify it.
3791         (regcache::cpy_no_passthrough): Remove it.
3792         * regcache.h (cpy_no_passthrough): Remove it.
3793         (regcache_dup, regcache_cpy): Update comments.
3794
3795 2017-07-18  Pedro Alves  <palves@redhat.com>
3796
3797         * remote-sim.c (sim_command_completer): Adjust to work with a
3798         completion_tracker instead of a VEC.
3799
3800 2017-07-17  Pedro Alves  <palves@redhat.com>
3801
3802         * completer.c (complete_source_filenames): New function.
3803         (complete_address_and_linespec_locations): New function.
3804         (location_completer): Use complete_address_and_linespec_locations.
3805         (completion_tracker::build_completion_result): Honor the tracker's
3806         request to suppress append.
3807         * completer.h (completion_tracker::suppress_append_ws)
3808         (completion_tracker::set_suppress_append_ws): New methods.
3809         (completion_tracker::m_suppress_append_ws): New field.
3810         (complete_source_filenames): New declaration.
3811         * linespec.c (linespec_complete_what): New.
3812         (struct ls_parser) <complete_what, completion_word,
3813         completion_quote_char, completion_quote_end, completion_tracker>:
3814         New fields.
3815         (string_find_incomplete_keyword_at_end): New.
3816         (linespec_lexer_lex_string): Record quote char.  If in completion
3817         mode, don't throw.
3818         (linespec_lexer_consume_token): Advance the completion word point.
3819         (linespec_lexer_peek_token): Save/restore completion info.
3820         (save_stream_and_consume_token): New.
3821         (set_completion_after_number): New.
3822         (linespec_parse_basic): Set what to complete next depending on
3823         token.  Handle function and label completions specially.
3824         (parse_linespec): Disable objc shortcut in completion mode.  Set
3825         what to complete next depending on token type.  Skip keyword if in
3826         completion mode.
3827         (complete_linespec_component, linespec_complete): New.
3828         * linespec.h (linespec_complete): Declare.
3829
3830 2017-07-17  Pedro Alves  <palves@redhat.com>
3831
3832         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
3833         Handle 'operator<' / 'operator<<'.
3834
3835 2017-07-17  Pedro Alves  <palves@redhat.com>
3836
3837         * completer.c (collect_explicit_location_matches): Handle
3838         MATCH_LABEL.
3839         (convert_explicit_location_to_linespec): New, factored out from
3840         ...
3841         (convert_explicit_location_to_sals): ... this.
3842         (complete_label): New.
3843         (linespec_complete_label, find_label_symbols_in_block): New.
3844         (find_label_symbols): Add completion_mode parameter and adjust to
3845         call find_label_symbols_in_block.
3846         * linespec.h (linespec_complete_label): Declare.
3847
3848 2017-07-17  Pedro Alves  <palves@redhat.com>
3849
3850         * ada-lang.c (ada_collect_symbol_completion_matches): Add
3851         complete_symbol_mode parameter.
3852         * cli/cli-cmds.c (complete_command): Get the completion result out
3853         of the handle_brkchars tracker if used a custom word point.
3854         * completer.c: Include "linespec.h".
3855         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
3856         (advance_to_expression_complete_word_point): New.
3857         (completion_tracker::completes_to_completion_word): New.
3858         (complete_files_symbols): Pass down
3859         complete_symbol_mode::EXPRESSION.
3860         (explicit_options, probe_options): New.
3861         (collect_explicit_location_matches): Complete on the
3862         explictit_loc->foo instead of word.  Use
3863         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
3864         keyword and options completions.
3865         (backup_text_ptr): Delete.
3866         (skip_keyword): New.
3867         (complete_explicit_location): Remove 'word' parameter.  Add
3868         language, quoted_arg_start and quoted_arg_end parameters.
3869         Rewrite, parsing left to right.
3870         (location_completer): Rewrite.
3871         (location_completer_handle_brkchars): New function.
3872         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
3873         (enum complete_line_internal_reason): Adjust comments.
3874         (completion_tracker::discard_completions): New.
3875         (completer_handle_brkchars_func_for_completer): Handle
3876         location_completer.
3877         (gdb_custom_word_point_brkchars)
3878         (gdb_org_rl_basic_quote_characters): New.
3879         (gdb_completion_word_break_characters_throw)
3880         (completion_find_completion_word): Handle trackers that use a
3881         custom word point.
3882         (completion_tracker::advance_custom_word_point_by): New.
3883         (completion_tracker::build_completion_result): Don't rely on
3884         readline appending the quote char.
3885         (gdb_rl_attempted_completion_function_throw): Handle trackers that
3886         use a custom word point.
3887         (gdb_rl_attempted_completion_function): Restore
3888         rl_basic_quote_characters.
3889         * completer.h (class completion_tracker): Extend intro comment.
3890         (completion_tracker::set_quote_char)
3891         (completion_tracker::quote_char)
3892         (completion_tracker::set_use_custom_word_point)
3893         (completion_tracker::use_custom_word_point)
3894         (completion_tracker::custom_word_point)
3895         (completion_tracker::set_custom_word_point)
3896         (completion_tracker::advance_custom_word_point_by)
3897         (completion_tracker::completes_to_completion_word)
3898         (completion_tracker::discard_completions): New methods.
3899         (completion_tracker::m_quote_char)
3900         (completion_tracker::m_use_custom_word_point)
3901         (completion_tracker::m_custom_word_point): New fields.
3902         (advance_to_expression_complete_word_point): Declare.
3903         * f-lang.c (f_collect_symbol_completion_matches): Add
3904         complete_symbol_mode parameter.
3905         * language.h (struct language_defn)
3906         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
3907         parameter.
3908         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
3909         (linespec_complete_function): New function.
3910         (linespec_lexer_lex_keyword): Adjust.
3911         * linespec.h (linespec_keywords, linespec_complete_function): New
3912         declarations.
3913         * location.c (find_end_quote): New function.
3914         (explicit_location_lex_one): Add explicit_completion_info
3915         parameter.  Save quoting info.  Don't throw if being called for
3916         completion.  Don't handle Ada operators here.
3917         (is_cp_operator, skip_op_false_positives, first_of)
3918         (explicit_location_lex_one_function): New function.
3919         (string_to_explicit_location): Replace 'dont_throw' parameter with
3920         an explicit_completion_info pointer parameter.  Handle it.  Don't
3921         use explicit_location_lex_one to lex function names.  Use
3922         explicit_location_lex_one_function instead.
3923         * location.h (struct explicit_completion_info): New.
3924         (string_to_explicit_location): Replace 'dont_throw' parameter with
3925         an explicit_completion_info pointer parameter.
3926         * symtab.c (default_collect_symbol_completion_matches_break_on):
3927         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
3928         (default_collect_symbol_completion_matches)
3929         (collect_symbol_completion_matches): Add complete_symbol_mode
3930         parameter.
3931         (collect_symbol_completion_matches_type): Pass down
3932         complete_symbol_mode::EXPRESSION.
3933         (collect_file_symbol_completion_matches): Add complete_symbol_mode
3934         parameter.  Handle LINESPEC mode.
3935         * symtab.h (complete_symbol_mode): New.
3936         (default_collect_symbol_completion_matches_break_on)
3937         (default_collect_symbol_completion_matches)
3938         (collect_symbol_completion_matches)
3939         (collect_file_symbol_completion_matches): Add complete_symbol_mode
3940         parameter.
3941
3942 2017-07-17  Pedro Alves  <palves@redhat.com>
3943
3944         * utils.c (enum class strncmp_iw_mode): New.
3945         (strcmp_iw): Rename to ...
3946         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
3947         parameters.  Handle them.
3948         (strncmp_iw): New.
3949         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
3950         * utils.h (strncmp_iw): Declare.
3951         (strcmp_iw): Move describing comments here.
3952
3953 2017-07-17  Pedro Alves  <palves@redhat.com>
3954
3955         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
3956         CP_OPERATOR_STR.
3957         * c-typeprint.c (is_type_conversion_operator): Use
3958         CP_OPERATOR_STR.
3959         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
3960         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
3961         CP_OPERATOR_LEN.
3962         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
3963         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
3964         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
3965         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
3966         CP_OPERATOR_STR.
3967         * location.c: Include "cp-support.h".
3968         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
3969         CP_OPERATOR_STR.
3970         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
3971         CP_OPERATOR_LEN.
3972
3973 2017-07-17  Pedro Alves  <palves@redhat.com>
3974
3975         * cli/cli-cmds.c (complete_command): Use a completion tracker
3976         along with completion_find_completion_word for handle_brkchars
3977         phase.
3978         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
3979         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
3980         (struct gdb_rl_completion_word_info): New.
3981         (gdb_rl_find_completion_word): New.
3982         (completion_find_completion_word): New.
3983         * completer.h (completion_find_completion_word): Declare.
3984
3985 2017-07-17  Pedro Alves  <palves@redhat.com>
3986
3987         * ada-lang.c (symbol_completion_match): Adjust comments.
3988         (symbol_completion_add): Replace vector parameter with
3989         completion_tracker parameter.  Use it.
3990         (ada_make_symbol_completion_list): Rename to...
3991         (ada_collect_symbol_completion_matches): ... this.  Add
3992         completion_tracker parameter and use it.
3993         (ada_language_defn): Adjust.
3994         * break-catch-syscall.c (catch_syscall_completer): Adjust
3995         prototype and work with completion_tracker instead of VEC.
3996         * breakpoint.c (condition_completer): Adjust prototype and work
3997         with completion_tracker instead of VEC.
3998         * c-lang.c (c_language_defn, cplus_language_defn)
3999         (asm_language_defn, minimal_language_defn): Adjust to renames.
4000         * cli/cli-cmds.c (complete_command): Rework using
4001         completion_tracker.  Catch exceptions when completing.
4002         * cli/cli-decode.c (integer_unlimited_completer)
4003         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
4004         with completion_tracker instead of VEC.
4005         * command.h (struct completion_tracker): Forward declare.
4006         (completer_ftype, completer_handle_brkchars_ftype): Change
4007         types.
4008         (complete_on_cmdlist, complete_on_enum): Adjust.
4009         * completer.c: Include <algorithm>.
4010         (struct gdb_completer_state): New.
4011         (current_completion): New global.
4012         (readline_line_completion_function): Delete.
4013         (noop_completer, filename_completer)
4014         (filename_completer_handle_brkchars, complete_files_symbols)
4015         (linespec_location_completer): Adjust to work with a
4016         completion_tracker instead of a VEC.
4017         (string_or_empty): New.
4018         (collect_explicit_location_matches): Adjust to work with a
4019         completion_tracker instead of a VEC.
4020         (explicit_location_completer): Rename to ...
4021         (complete_explicit_location): ... this and adjust to work with a
4022         completion_tracker instead of a VEC.
4023         (location_completer): Adjust to work with a completion_tracker
4024         instead of a VEC.
4025         (add_struct_fields): Adjust to work with a completion_list instead
4026         of VEC.
4027         (expression_completer): Rename to ...
4028         (complete_expression): ... this and adjust to work with a
4029         completion_tracker instead of a VEC.  Use complete_files_symbols.
4030         (expression_completer): Reimplement on top of complete_expression.
4031         (symbol_completer): Adjust to work with a completion_tracker
4032         instead of a VEC.
4033         (enum complete_line_internal_reason): Add describing comments.
4034         (complete_line_internal_normal_command): Adjust to work with a
4035         completion_tracker instead of a VEC.
4036         (complete_line_internal): Rename to ...
4037         (complete_line_internal_1): ... this and adjust to work with a
4038         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
4039         handle_brkchars phase.
4040         (new_completion_tracker): Delete.
4041         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
4042         complete_line_internal_1.
4043         (free_completion_tracker): Delete.
4044         (INITIAL_COMPLETION_HTAB_SIZE): New.
4045         (completion_tracker::completion_tracker)
4046         (completion_tracker::~completion_tracker): New.
4047         (maybe_add_completion): Delete.
4048         (completion_tracker::maybe_add_completion)
4049         (completion_tracker::add_completion)
4050         (completion_tracker::add_completions): New.
4051         (throw_max_completions_reached_error): Delete.
4052         (complete_line): Adjust to work with a completion_tracker instead
4053         of a VEC.  Don't create a completion_tracker_t or check for max
4054         completions here.
4055         (command_completer, command_completer_handle_brkchars)
4056         (signal_completer, reg_or_group_completer_1)
4057         (reg_or_group_completer, default_completer_handle_brkchars):
4058         Adjust to work with a completion_tracker.
4059         (gdb_completion_word_break_characters_throw): New.
4060         (gdb_completion_word_break_characters): Reimplement.
4061         (line_completion_function): Delete.
4062         (completion_tracker::recompute_lowest_common_denominator)
4063         (expand_preserving_ws)
4064         (completion_tracker::build_completion_result)
4065         (completion_result::completion_result)
4066         (completion_result::completion_result)
4067         (completion_result::~completion_result)
4068         (completion_result::completion_result)
4069         (completion_result::release_match_list, compare_cstrings)
4070         (completion_result::sort_match_list)
4071         (completion_result::reset_match_list)
4072         (gdb_rl_attempted_completion_function_throw)
4073         (gdb_rl_attempted_completion_function): New.
4074         * completer.h (completion_list, struct completion_result)
4075         (class completion_tracker): New.
4076         (complete_line): Add completion_tracker parameter.
4077         (readline_line_completion_function): Delete.
4078         (gdb_rl_attempted_completion_function): New.
4079         (noop_completer, filename_completer, expression_completer)
4080         (location_completer, symbol_completer, command_completer)
4081         (signal_completer, reg_or_group_completer): Update prototypes.
4082         (completion_tracker_t, new_completion_tracker)
4083         (make_cleanup_free_completion_tracker): Delete.
4084         (enum maybe_add_completion_enum): Delete.
4085         (maybe_add_completion): Delete.
4086         (throw_max_completions_reached_error): Delete.
4087         * corefile.c (complete_set_gnutarget): Adjust to work with a
4088         completion_tracker instead of a VEC.
4089         * cp-abi.c (cp_abi_completer): Adjust to work with a
4090         completion_tracker instead of a VEC.
4091         * d-lang.c (d_language_defn): Adjust.
4092         * disasm.c (disassembler_options_completer): Adjust to work with a
4093         completion_tracker instead of a VEC.
4094         * f-lang.c (f_make_symbol_completion_list): Rename to ...
4095         (f_collect_symbol_completion_matches): ... this.  Adjust to work
4096         with a completion_tracker instead of a VEC.
4097         (f_language_defn): Adjust.
4098         * go-lang.c (go_language_defn): Adjust.
4099         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
4100         Adjust to work with a completion_tracker instead of a VEC.
4101         * infrun.c (handle_completer): Likewise.
4102         * interps.c (interpreter_completer): Likewise.
4103         * interps.h (interpreter_completer): Likewise.
4104         * language.c (unknown_language_defn, auto_language_defn)
4105         (local_language_defn): Adjust.
4106         * language.h (language_defn::la_make_symbol_completion_list):
4107         Rename to ...
4108         (language_defn::la_collect_symbol_completion_matches): ... this
4109         and adjust to work with a completion_tracker instead of a VEC.
4110         * m2-lang.c (m2_language_defn): Adjust.
4111         * objc-lang.c (objc_language_defn): Adjust.
4112         * opencl-lang.c (opencl_language_defn): Adjust.
4113         * p-lang.c (pascal_language_defn): Adjust.
4114         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
4115         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
4116         with a completion_tracker.
4117         * rust-lang.c (rust_language_defn): Adjust.
4118         * symtab.c (free_completion_list, do_free_completion_list)
4119         (return_val, completion_tracker): Delete.
4120         (completion_list_add_name, completion_list_add_symbol)
4121         (completion_list_add_msymbol, completion_list_objc_symbol)
4122         (completion_list_add_fields, add_symtab_completions): Add
4123         completion_tracker parameter and use it.
4124         (default_make_symbol_completion_list_break_on_1): Rename to...
4125         (default_collect_symbol_completion_matches_break_on): ... this.
4126         Add completion_tracker parameter and use it instead of allocating
4127         a completion tracker here.
4128         (default_make_symbol_completion_list_break_on): Delete old
4129         implementation.
4130         (default_make_symbol_completion_list): Delete.
4131         (default_collect_symbol_completion_matches): New.
4132         (make_symbol_completion_list): Delete.
4133         (collect_symbol_completion_matches): New.
4134         (make_symbol_completion_type): Rename to ...
4135         (collect_symbol_completion_matches_type): ... this.  Add
4136         completion_tracker parameter and use it instead of VEC.
4137         (make_file_symbol_completion_list_1): Rename to...
4138         (collect_file_symbol_completion_matches): ... this.  Add
4139         completion_tracker parameter and use it instead of VEC.
4140         (make_file_symbol_completion_list): Delete.
4141         (add_filename_to_list): Use completion_list instead of a VEC.
4142         (add_partial_filename_data::list): Now a completion_list.
4143         (make_source_files_completion_list): Work with a completion_list
4144         instead of a VEC.
4145         * symtab.h: Include "completer.h".
4146         (default_make_symbol_completion_list_break_on)
4147         (default_make_symbol_completion_list, make_symbol_completion_list)
4148         (make_symbol_completion_type, make_file_symbol_completion_list)
4149         (make_source_files_completion_list): Delete.
4150         (default_collect_symbol_completion_matches_break_on)
4151         (default_collect_symbol_completion_matches)
4152         (collect_symbol_completion_matches)
4153         (collect_symbol_completion_matches_type)
4154         (collect_file_symbol_completion_matches)
4155         (make_source_files_completion_list): New.
4156         * top.c (init_main): Don't install a rl_completion_entry_function
4157         hook.  Install a rl_attempted_completion_function hook instead.
4158         * tui/tui-layout.c (layout_completer): Adjust to work with a
4159         completion_tracker.
4160         * tui/tui-regs.c (tui_reggroup_completer):
4161         * tui/tui-win.c (window_name_completer, focus_completer)
4162         (winheight_completer): Adjust to work with a completion_tracker.
4163         * value.c: Include "completer.h".
4164         (complete_internalvar): Adjust to work with a completion_tracker.
4165         * value.h (complete_internalvar): Likewise.
4166
4167 2017-07-17  Pedro Alves  <palves@redhat.com>
4168
4169         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
4170         renames.
4171         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
4172         comments to completer_ftype's declaration.
4173         <completer_handle_brkchars>: Change type to
4174         completer_handle_brkchars_ftype.
4175         * command.h (completer_ftype): Add describing comment and give
4176         names to parameters.
4177         (completer_ftype_void): Rename to ...
4178         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
4179         (set_cmd_completer_handle_brkchars): Adjust.
4180         * completer.c (filename_completer_handle_brkchars): New function.
4181         (complete_line_internal_normal_command): New function, factored
4182         out from ...
4183         (complete_line_internal): ... here.
4184         (command_completer_handle_brkchars)
4185         (default_completer_handle_brkchars)
4186         (completer_handle_brkchars_func_for_completer): New functions.
4187         * completer.h (set_gdb_completion_word_break_characters): Delete
4188         declaration.
4189         (completer_handle_brkchars_func_for_completer): New declaration.
4190         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
4191         completer_handle_brkchars_func_for_completer.
4192
4193 2017-07-17  Pedro Alves  <palves@redhat.com>
4194
4195         * completer.c (symbol_completer): New function, based on
4196         make_symbol_completion_list_fn.
4197         * completer.h (symbol_completer): New declaration.
4198         * guile/scm-cmd.c (cmdscm_completers): Adjust.
4199         * python/py-cmd.c (completers): Adjust.
4200         * symtab.c (make_symbol_completion_list_fn): Delete.
4201         * symtab.h (make_symbol_completion_list_fn): Delete.
4202         * cli/cli-decode.c (add_cmd): Adjust.
4203
4204 2017-07-17  Pedro Alves  <palves@redhat.com>
4205
4206         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
4207         * dwarf2read.c: Include "filename-seen-cache.h".
4208         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
4209         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
4210         * filename-seen-cache.c: New file.
4211         * filename-seen-cache.h: New file.
4212         * symtab.c: Include "filename-seen-cache.h".
4213         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
4214         (create_filename_seen_cache, clear_filename_seen_cache)
4215         (delete_filename_seen_cache, filename_seen): Delete, parts moved
4216         to filename-seen-cache.h/filename-seen-cache.c.
4217         (output_source_filename, sources_info)
4218         (maybe_add_partial_symtab_filename)
4219         (make_source_files_completion_list): Adjust to use
4220         filename_seen_cache.
4221
4222 2017-07-17  Pedro Alves  <palves@redhat.com>
4223
4224         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
4225         fields.
4226         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
4227         dwarf2_debug_sections*)): New.
4228         (dwarf2_per_objfile::dwarf2_per_objfile(const
4229         dwarf2_per_objfile&)): Declare as deleted.
4230         (dwarf2_per_objfile::operator=): Declare as deleted.
4231         (dwarf2_per_objfile::dwarf2_per_objfile)
4232         (dwarf2_per_objfile::~dwarf2_per_objfile)
4233         (dwarf2_per_objfile::free_cached_comp_units): New.
4234         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
4235         ctor.  Call dwarf2_per_objfile's ctor manually.
4236         (dwarf2_locate_sections): Deleted/refactored as ...
4237         (dwarf2_per_objfile::locate_sections): ... this new method.
4238         (free_cached_comp_units): Defer to
4239         dwarf2_per_objfile::free_cached_comp_units.
4240         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
4241
4242 2017-07-14  Tom Tromey  <tom@tromey.com>
4243
4244         PR rust/21764:
4245         * rust-exp.y (convert_ast_to_expression): Add "want_type"
4246         parameter.
4247         <UNOP_SIZEOF>: Split into separate case.
4248         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
4249
4250 2017-07-14  Tom Tromey  <tom@tromey.com>
4251
4252         PR rust/21763:
4253         * symtab.c (symbol_matches_domain): Add language_rust to special
4254         case.
4255         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
4256         treat LOC_TYPEDEF symbols as variables.
4257
4258 2017-07-14  Pedro Alves  <palves@redhat.com>
4259
4260         * symtab.c (make_file_symbol_completion_list_1): Iterate over
4261         symtabs matching all symtabs with SRCFILE as file name instead of
4262         only considering the first hit, with lookup_symtab.
4263
4264 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
4265
4266         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
4267         operator_name parameters.
4268         (gen_expr): Update function call.
4269
4270 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
4271
4272         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
4273         parameter.
4274         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
4275         Likewise.
4276         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
4277         parameter, use agent_expr::gdbarch instead, update function
4278         calls.
4279         (locexpr_tracepoint_var_ref): Likewise.
4280         (loclist_tracepoint_var_ref): Likewise.
4281         * ax-gdb.c (gen_trace_static_fields): Likewise.
4282         (gen_traced_pop): Likewise.
4283         (gen_frame_args_address): Likewise.
4284         (gen_frame_locals_address): Likewise.
4285         (gen_var_ref): Likewise.
4286         (gen_struct_ref_recursive): Likewise.
4287         (gen_static_field): Likewise.
4288         (gen_maybe_namespace_elt): Likewise.
4289         (gen_expr): Likewise.
4290         (gen_trace_for_var): Likewise.
4291         (gen_trace_for_expr): Likewise.
4292         (gen_trace_for_return_address): Likewise.
4293
4294 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
4295
4296         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
4297         parameter.
4298         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
4299
4300 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
4301
4302         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
4303         from ax, update calls.
4304         (gen_usual_arithmetic): Likewise.
4305         (gen_integral_promotions): Likewise.
4306         (gen_bitfield_ref): Likewise.
4307         (gen_primitive_field): Likewise.
4308         (gen_struct_ref_recursive): Likewise.
4309         (gen_struct_ref): Likewise.
4310         (gen_maybe_namespace_elt): Likewise.
4311         (gen_struct_elt_for_reference): Likewise.
4312         (gen_namespace_elt): Likewise.
4313         (gen_aggregate_elt_ref): Likewise.
4314         (gen_expr): Get gdbarch from ax, update calls.
4315         (gen_expr_binop_rest): Likewise.
4316
4317 2017-07-13  Pedro Alves  <palves@redhat.com>
4318
4319         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
4320         as default tdesc.
4321         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
4322         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
4323         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
4324         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
4325         tdep.
4326         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
4327         Get final tdesc from the tdep.
4328         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
4329         default tdesc.
4330         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4331         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4332         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
4333         Use it as default tdesc.
4334         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
4335         down to amd_init_abi.  No longer handle fallback tdesc here.
4336         * amd64-tdep.h (tdesc_x32): Declare.
4337         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
4338         parameter.
4339         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
4340         as default tdesc.
4341
4342 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4343
4344         * s390-linux-tdep.c (s390_process_record): Add support for
4345         instructions new in arch12.
4346
4347 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
4348
4349         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
4350         PT_GETFSBASE and PT_GETGSBASE.
4351         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
4352         PT_SETGSBASE.
4353
4354 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
4355
4356         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
4357         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
4358         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
4359         those rules.
4360         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
4361         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
4362         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
4363         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
4364         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
4365         * features/i386/amd64.xml: Add 64bit-segments.xml.
4366         * features/i386/amd64-avx-avx512.c: Regenerated.
4367         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
4368         * features/i386/amd64-avx-mpx.c: Regenerated.
4369         * features/i386/amd64-avx.c: Regenerated.
4370         * features/i386/amd64-mpx.c: Regenerated.
4371         * features/i386/amd64.c: Regenerated.
4372         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
4373         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4374         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
4375         * regformats/i386/amd64-avx.dat: Regenerated.
4376         * regformats/i386/amd64-mpx.dat: Regenerated.
4377         * regformats/i386/amd64.dat: Regenerated.
4378
4379 2017-07-10  Yao Qi  <yao.qi@linaro.org>
4380
4381         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
4382         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
4383
4384 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
4385
4386         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
4387         unsetenv.
4388         * gnulib/aclocal.m4: Regenerate.
4389         * gnulib/config.in: Regenerate.
4390         * gnulib/configure: Regenerate.
4391         * gnulib/import/Makefile.am: Regenerate.
4392         * gnulib/import/Makefile.in: Regenerate.
4393         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4394         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4395         * gnulib/import/m4/environ.m4: New file.
4396         * gnulib/import/m4/setenv.m4: New file.
4397         * gnulib/import/setenv.c: New file.
4398         * gnulib/import/unsetenv.c: New file.
4399
4400 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
4401
4402         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
4403         address when op is DW_OP_addr.
4404
4405 2017-07-09  Tom Tromey  <tom@tromey.com>
4406
4407         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
4408         check and apply to outer type.
4409
4410 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
4411
4412         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
4413         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
4414         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
4415         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
4416
4417 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
4418
4419         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
4420
4421 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
4422
4423         * corelow.c (get_core_siginfo): Remove.
4424         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
4425         instead of get_core_siginfo.
4426         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
4427         * gdbarch.h: Re-generate.
4428         * gdbarch.c: Re-generate.
4429         * linux-tdep.c (linux_core_xfer_siginfo): New.
4430         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
4431
4432 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
4433
4434         * corelow.c (thread_section_name): Move to ...
4435         * gdbcore.h (thread_section_name): ... here.
4436
4437 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
4438
4439         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
4440         (struct siginfo32): New.
4441         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
4442         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
4443         via ptrace(PT_LWPINFO).
4444
4445 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
4446
4447         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
4448         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
4449         (fbsd_get_siginfo_type): New.
4450         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
4451         (_initialize_fbsd_tdep): New.
4452
4453 2017-07-06  David Blaikie  <dblaikie@gmail.com>
4454
4455         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
4456         a singular dwo_unit*) to support multiple CUs in the same way that
4457         multiple TUs are supported.
4458         (create_cus_hash_table): Replace create_dwo_cu with a function for
4459         parsing multiple CUs from a DWO file.
4460         (open_and_init_dwo_file): Use create_cus_hash_table rather than
4461         create_dwo_cu.
4462         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
4463         htab_find, rather than comparing the signature to a singleton CU in
4464         the dwo_file.
4465
4466 2017-07-06  Pedro Alves  <palves@redhat.com>
4467
4468         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
4469
4470 2017-07-04  Pedro Alves  <palves@redhat.com>
4471
4472         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
4473         * gdbtypes.h (TYPE_STATIC): Delete.
4474         (struct fn_field) <is_public, is_abstract, is_static, is_final,
4475         is_synchronized, is_native>: Delete.
4476         <dummy>: Bump.
4477         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
4478         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
4479         (TYPE_FN_FIELD_ABSTRACT): Delete.
4480
4481 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
4482
4483         * buffer.h (buffer_finish): Fix spelling mistakes.
4484
4485 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
4486
4487         * .dir-locals.el: Automatically switch to C-style comments in
4488         versions of Emacs that support the feature.
4489
4490 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
4491             Pedro Alves  <palves@redhat.com>
4492
4493         PR cli/21688
4494         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
4495         (process_next_line): New variable 'inline_cmd'.
4496         Adjust 'if' clauses for "python", "compile" and "guile" to use
4497         'command_name_equals' and check for '!inline_cmd'.
4498
4499 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
4500
4501         PR cli/21688
4502         * cli/cli-script.c (command_name_equals_not_inline): New function.
4503         (process_next_line): Adjust 'if' clauses for "python", "compile"
4504         and "guile" to use command_name_equals_not_inline.
4505
4506 2017-06-29  Pedro Alves  <palves@redhat.com>
4507
4508         * completer.c (expression_completer): Call
4509         linespec_location_completer instead of location_completer.
4510
4511 2017-06-29  Pedro Alves  <palves@redhat.com>
4512
4513         * completer.c (expression_completer): Remove code that recomputes
4514         'text' from 'word'.
4515
4516 2017-06-29  Yao Qi  <yao.qi@linaro.org>
4517
4518         * regformats/regdat.sh: Generate code with
4519         "ifndef IN_PROCESS_AGENT".
4520
4521 2017-06-28  Pedro Alves  <palves@redhat.com>
4522
4523         * command.h: Include "common/scoped_restore.h".
4524
4525 2017-06-28  Yao Qi  <yao.qi@linaro.org>
4526
4527         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
4528         instead of obstack_grow.
4529
4530 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
4531
4532         PR gdb/21337
4533         * symfile.c (reread_symbols): Call objfiles_changed just before
4534         read_symbols.
4535
4536 2017-06-27  Pedro Alves  <palves@redhat.com>
4537
4538         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
4539         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
4540         (completion_list_add_symbol, completion_list_add_msymbol):
4541         ... these new functions.
4542         (add_symtab_completions)
4543         (default_make_symbol_completion_list_break_on_1): Adjust.
4544
4545 2017-06-27  Pedro Alves  <palves@redhat.com>
4546
4547         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
4548         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
4549         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
4550         dtor.
4551         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
4552         'storage_obstack' field an auto_obstack.  In-class initialize all
4553         non-bitfield fields.  Make minsyms_read bool.
4554         * symfile.c (read_symbols): Adjust.
4555
4556 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
4557
4558         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
4559         (gdbsim_store_register): Likewise.
4560
4561 2017-06-27  Pedro Alves  <palves@redhat.com>
4562
4563         * c-exp.y (name_obstack): Now an auto_obstack.
4564         (yylex): Use auto_obstack::clear.
4565         (c_parse): Use auto_obstack::clear instead of reinitializing and
4566         freeing the obstack.
4567         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
4568         * d-exp.y (name_obstack): Now an auto_obstack.
4569         (yylex): Use auto_obstack::clear.
4570         (d_parse): Use auto_obstack::clear instead of reinitializing and
4571         freeing the obstack.
4572         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
4573         auto_obstack.
4574         * dwarf2read.c (create_addrmap_from_index)
4575         (dwarf2_build_psymtabs_hard)
4576         (update_enumeration_type_from_children): Likewise.
4577         * gdb_obstack.h (auto_obstack): New type.
4578         * go-exp.y (name_obstack): Now an auto_obstack.
4579         (build_packaged_name): Use auto_obstack::clear.
4580         (go_parse): Use auto_obstack::clear instead of reinitializing and
4581         freeing the obstack.
4582         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
4583         auto_obstack.
4584         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
4585         * rust-exp.y (work_obstack): Now an auto_obstack.
4586         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
4587         reinitializing and freeing the obstack.
4588         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
4589         (host_char_to_target): Use auto_obstack.
4590         * utils.h (make_cleanup_obstack_free): Delete declaration.
4591         * valprint.c (generic_emit_char, generic_printstr): Use
4592         auto_obstack.
4593
4594 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4595
4596         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
4597         thread.
4598         (darwin_init_thread_list): Don't update dummy thread.
4599         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
4600
4601 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
4602
4603         * record-full.c (netorder16): Remove.
4604
4605 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
4606
4607         * common/diagnostics.h: Define macros for GCC.
4608         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
4609         * common/vec.h: Include diagnostics.h.
4610         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
4611         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
4612         warning.
4613
4614 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
4615
4616         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
4617         New macro.
4618         * ada-lex.l: Ignore deprecated register warnings.
4619
4620 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
4621
4622         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
4623         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
4624
4625 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
4626
4627         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
4628         its own line.
4629
4630 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
4631
4632         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
4633
4634 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
4635
4636         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
4637         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
4638         (xtensa_register_read_masked): Likewise.
4639
4640 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4641
4642         * common/environ.c (gdb_environ::unset): Update comment.
4643
4644 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
4645
4646         * python/py-unwind.c (pyuw_sniffer): Allocate space for
4647         registers.
4648
4649 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
4650
4651         * record-full.c (record_full_exec_insn): Use byte_vector.
4652
4653 2017-06-22  Yao Qi  <yao.qi@linaro.org>
4654
4655         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
4656         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
4657
4658 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
4659
4660         * remote.c (cached_reg): Move from here...
4661         * regcache.h (cached_reg): ...to here.
4662         * python/py-unwind.c (struct reg_info): Remove.
4663         (cached_frame_info): Use cached_reg_t.
4664         (pyuw_prev_register): Likewise.
4665         (pyuw_sniffer): Use cached_reg_t and allocate registers.
4666         (pyuw_dealloc_cache): Free all registers.
4667
4668 2017-06-22  Pedro Alves  <palves@redhat.com>
4669             Simon Marchi  <simon.marchi@ericsson.com>
4670
4671         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
4672         warning.
4673         * common/diagnostics.h: New file.
4674
4675 2017-06-22  Pedro Alves  <palves@redhat.com>
4676
4677         * common/agent.h: Add include guards.
4678
4679 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
4680
4681         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
4682         talk about addressable units instead of bytes.
4683
4684 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
4685
4686         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
4687         of '::const_iterator'.
4688
4689 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
4690
4691         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4692         'unittests/environ-selftests.c'.
4693         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
4694         * charset.c (find_charset_names): Declare object 'iconv_env'.
4695         Update code to use 'iconv_env' object.  Remove call to
4696         'free_environ'.
4697         * common/environ.c: Include <utility>.
4698         (make_environ): Delete function.
4699         (free_environ): Delete function.
4700         (gdb_environ::clear): New function.
4701         (gdb_environ::operator=): New function.
4702         (gdb_environ::get): Likewise.
4703         (environ_vector): Delete function.
4704         (set_in_environ): Delete function.
4705         (gdb_environ::set): New function.
4706         (unset_in_environ): Delete function.
4707         (gdb_environ::unset): New function.
4708         (gdb_environ::envp): Likewise.
4709         * common/environ.h: Include <vector>.
4710         (struct gdb_environ): Delete; transform into...
4711         (class gdb_environ): ... this class.
4712         (free_environ): Delete prototype.
4713         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
4714         environ_vector): Likewise.
4715         * infcmd.c (run_command_1): Update code to call
4716         'envp' from 'gdb_environ' class.
4717         (environment_info): Update code to call methods from 'gdb_environ'
4718         class.
4719         (unset_environment_command): Likewise.
4720         (path_info): Likewise.
4721         (path_command): Likewise.
4722         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
4723         (inferior::inferior): Initialize 'environment' using the host's
4724         information.
4725         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
4726         Include "environ.h".
4727         (class inferior) <environment>: Change type from 'struct
4728         gdb_environ' to 'gdb_environ'.
4729         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
4730         methods from 'gdb_environ' class.
4731         * solib.c (solib_find_1): Likewise
4732         * unittests/environ-selftests.c: New file.
4733
4734 2017-06-20  Yao Qi  <yao.qi@linaro.org>
4735
4736         * features/i386/i386-linux.xml: Exchange the order of including
4737         32bit-linux.xml and 32bit-sse.xml.
4738         * features/i386/i386-linux.c: Regenerated.
4739
4740 2017-06-20  Yao Qi  <yao.qi@linaro.org>
4741
4742         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
4743         Delete copy ctor and assignment operator.
4744         (tdesc_type): Likewise.
4745         (tdesc_feature): Likewise.
4746         (tdesc_free_reg): Remove.
4747         (tdesc_create_reg): Use new.
4748         (tdesc_free_type): Remove.
4749         (tdesc_create_vector): Use new.
4750         (tdesc_create_union): Likewise.
4751         (tdesc_create_flags): Likewise.
4752         (tdesc_create_enum): Likewise.
4753         (tdesc_free_feature): Delete.
4754         (free_target_description): Use delete.
4755
4756 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
4757
4758         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
4759         registers.
4760
4761 2017-06-19  Pedro Alves  <palves@redhat.com>
4762
4763         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
4764         after gdb::unlinker.
4765
4766 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
4767
4768         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
4769         gdb_environ to access an environment variable.
4770
4771 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
4772
4773         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
4774         gdb_byte*.
4775
4776 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
4777
4778         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
4779
4780 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
4781
4782         * configure: Re-generate.
4783         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
4784
4785 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
4786
4787         * configure: Re-generate.
4788         * warning.m4: Pass -Werror to compiler when checking for
4789         supported warning flags.
4790
4791 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
4792
4793         * Makefile.in (COMPILE.pre): Add "-x c++".
4794
4795 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
4796             Pedro Alves  <palves@redhat.com>
4797             Yao Qi  <yao.qi@linaro.org>
4798
4799         * defs.h (RequireLongest): New.
4800         (extract_integer): Declare function template.
4801         (extract_signed_integer): Remove the declaration, but define it
4802         static inline.
4803         (extract_unsigned_integer): Likewise.
4804         (store_integer): Declare function template.
4805         (store_signed_integer): Remove the declaration, but define it
4806         static inline.
4807         (store_unsigned_integer): Likewise.
4808         * findvar.c (extract_integer): New function template.
4809         (extract_signed_integer): Remove.
4810         (extract_unsigned_integer): Remove.
4811         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
4812         instantiations.
4813         (store_integer): New function template.
4814         (store_signed_integer): Remove.
4815         (store_unsigned_integer): Remove.
4816         (store_integer): Explicit instantiations.
4817         * regcache.c (regcache_raw_read_signed): Update.
4818         (regcache::raw_read): New function.
4819         (regcache::raw_read_signed): Remove.
4820         (regcache::raw_read_unsigned): Remove.
4821         (regcache_raw_read_unsigned): Update.
4822         (regcache_raw_write_unsigned): Update.
4823         (regcache::raw_write_signed): Remove.
4824         (regcache::raw_write): New function.
4825         (regcache_cooked_read_signed): Update.
4826         (regcache::raw_write_unsigned): Remove.
4827         (regcache::cooked_read_signed): Remove.
4828         (regcache_cooked_read_unsigned): Update.
4829         (regcache::cooked_read_unsigned): Remove.
4830         (regcache_cooked_write_signed): Update.
4831         (regcache_cooked_write_unsigned): Update.
4832         * regcache.h (regcache) <raw_read_signed>: Remove.
4833         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
4834         <raw_read, raw_write>: New.
4835         <cooked_read_signed, cooked_write_signed>: Remove.
4836         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
4837         <cooked_read, cooked_write>: New.
4838         * sh64-tdep.c (sh64_pseudo_register_read): Update.
4839         (sh64_pseudo_register_write): Update.
4840
4841 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
4842
4843         * arc-tdep.c (arc_disassembler_options): New variable.
4844         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
4845         of default_print_insn.
4846         (arc_delayed_print_insn): Set info->section when needed,
4847         use default_print_insn to retrieve a disassembler.
4848
4849 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
4850
4851         PR gdb/21574
4852         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
4853         to mention $SHELL and startup-with-shell.
4854
4855 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
4856
4857         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
4858
4859 2017-06-14  Yao Qi  <yao.qi@linaro.org>
4860
4861         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
4862         default_print_insn instead of print_insn_aarch64.
4863         * arm-tdep.c (gdb_print_insn_arm): Call
4864         default_print_insn instead of print_insn_big_arm
4865         and print_insn_little_arm.
4866         * i386-tdep.c (i386_print_insn): Call default_print_insn
4867         instead of print_insn_i386.
4868         * ia64-tdep.c (ia64_print_insn): Call
4869         default_print_insn instead of print_insn_ia64.
4870         * mips-tdep.c (gdb_print_insn_mips): Call
4871         default_print_insn instead of print_insn_big_mips
4872         and print_insn_little_mips.
4873         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
4874         instead of print_insn_spu.
4875
4876 2017-06-14  Pedro Alves  <palves@redhat.com>
4877
4878         * ada-lang.c: Include "common/byte-vector.h".
4879         (ada_value_primitive_packed_val): Use gdb::byte_vector.
4880         * charset.c (wchar_iterator::iterate): Resize the vector instead
4881         of reserving it.
4882         * common/byte-vector.h: Include "common/def-vector.h".
4883         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
4884         * cli/cli-dump.c: Include "common/byte-vector.h".
4885         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
4886         * common/byte-vector.h: New file.
4887         * common/def-vector.h: New file.
4888         * common/default-init-alloc.h: New file.
4889         * dwarf2loc.c: Include "common/byte-vector.h".
4890         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
4891         instead of reserving it.
4892         * dwarf2read.c: Include "common/byte-vector.h".
4893         (data_buf::m_vec): Now a gdb::byte_vector.
4894         * gdb_regex.c: Include "common/def-vector.h".
4895         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
4896         * mi/mi-main.c: Include "common/byte-vector.h".
4897         (mi_cmd_data_read_memory): Use gdb::byte_vector.
4898         * printcmd.c: Include "common/byte-vector.h".
4899         (print_scalar_formatted): Use gdb::byte_vector.
4900         * valprint.c: Include "common/byte-vector.h".
4901         (maybe_negate_by_bytes, print_decimal_chars): Use
4902         gdb::byte_vector.
4903
4904 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4905
4906         * darwin-nat.c: Include "nat/fork-inferior.h".
4907
4908 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4909
4910         * configure.nat: Factor out Darwin bits that are not
4911         architecture-specific.  Add fork-inferior.o.
4912
4913 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
4914
4915         * configure.nat: Factor out AIX bits that are not
4916         architecture-specific.  Add fork-inferior.o.
4917
4918 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4919
4920         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
4921         (read_pieced_value, write_pieced_value): ...here.  Reduce to
4922         wrappers that just call rw_pieced_value.
4923
4924 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4925
4926         * dwarf2loc.c (write_pieced_value): When writing the data for a
4927         memory piece, use write_memory_with_notification instead of
4928         write_memory.
4929
4930 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4931
4932         * valops.c (read_value_memory): Change embedded_offset to
4933         represent a bit offset instead of a byte offset.
4934         * value.h (read_value_memory): Adjust comment.
4935
4936 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4937
4938         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
4939         dest_offset_bits and source_offset_bits.
4940         (write_pieced_value): Likewise.
4941
4942 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4943
4944         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
4945         given by DW_OP_bit_piece.
4946         (write_pieced_value): Likewise.
4947
4948 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4949
4950         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
4951         some other preparations to the places where sufficient information
4952         is available.
4953         (write_pieced_value): Likewise.
4954
4955 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4956
4957         * dwarf2loc.c (bits_to_bytes): New function.
4958         (read_pieced_value): Fix offset calculations for register pieces
4959         on big-endian targets.
4960         (write_pieced_value): Likewise.
4961
4962 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4963
4964         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
4965         (write_pieced_value): Likewise.
4966
4967 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4968
4969         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
4970         transfer the source value's least significant bits, instead of its
4971         lowest-addressed ones.  Rename type_len to max_offset.
4972         (read_pieced_value): Mirror above changes to write_pieced_value as
4973         applicable.
4974
4975 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4976
4977         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
4978         truncate full bytes from dest_offset_bits before using it as an
4979         offset into the buffer.
4980
4981 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4982
4983         * dwarf2loc.c (write_pieced_value): Include transfer size in
4984         byte-wise check.
4985
4986 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4987
4988         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
4989         calculation of this_size.
4990
4991 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4992
4993         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
4994         when targeting a bit-field.
4995         (write_pieced_value): Likewise.
4996
4997 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4998
4999         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
5000         (allocate_piece_closure): Drop addr_size parameter.
5001         (dwarf2_evaluate_loc_desc_full): Adjust call to
5002         allocate_piece_closure.
5003
5004 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5005
5006         PR gdb/21226
5007         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
5008         the LSB end, independent of endianness.
5009
5010 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5011
5012         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
5013         size capping.
5014
5015 2017-06-13  Yao Qi  <yao.qi@linaro.org>
5016
5017         * mips-linux-nat.c: Move include features/mips*-linux.c to
5018         mips-linux-tdep.c.
5019         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
5020         to mips-linux-tdep.c.
5021         * mips-linux-tdep.c: Include features/mips*-linux.c
5022         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
5023         functions.
5024         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
5025         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
5026         (tdesc_mips64_dsp_linux): Declare.
5027
5028 2017-06-12  Tom Tromey  <tom@tromey.com>
5029
5030         * valprint.h (val_print_type_code_int): Remove.
5031         * valprint.c (generic_val_print_int): Always call
5032         val_print_scalar_formatted.
5033         (val_print_type_code_int): Remove.
5034         * printcmd.c (print_scalar_formatted): Handle options->format==0.
5035         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
5036         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
5037         * ada-valprint.c (ada_val_print_num): Use
5038         val_print_scalar_formatted.
5039
5040 2017-06-12  Tom Tromey  <tom@tromey.com>
5041
5042         * printcmd.c (print_scalar_formatted): Unify the two switches.
5043         Don't convert scalars to LONGEST.
5044
5045 2017-06-12  Tom Tromey  <tom@tromey.com>
5046
5047         PR exp/16225:
5048         * valprint.h (print_decimal_chars): Update.
5049         * valprint.c (maybe_negate_by_bytes): New function.
5050         (print_decimal_chars): Add "is_signed" argument.
5051         * printcmd.c (print_scalar_formatted): Update.
5052
5053 2017-06-12  Tom Tromey  <tom@tromey.com>
5054
5055         PR exp/16225:
5056         * valprint.h (print_binary_chars, print_hex_chars): Update.
5057         * valprint.c (val_print_type_code_int): Update.
5058         (print_binary_chars): Add "zero_pad" argument.
5059         (emit_octal_digit): New function.
5060         (print_octal_chars): Don't zero-pad.
5061         (print_decimal_chars): Likewise.
5062         (print_hex_chars): Add "zero_pad" argument.
5063         * sh64-tdep.c (sh64_do_fp_register): Update.
5064         * regcache.c (regcache::dump): Update.
5065         * printcmd.c (print_scalar_formatted): Update.
5066         * infcmd.c (default_print_one_register_info): Update.
5067
5068 2017-06-12  Pedro Alves  <palves@redhat.com>
5069             Alan Hayward  <alan.hayward@arm.com>
5070
5071         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
5072         (mips_eabi_push_dummy_call): Rename local 'regsize' to
5073         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
5074         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
5075         Assert that abi_regsize bytes fit in 'ref_valbuf'.
5076
5077 2017-06-12  Pedro Alves  <palves@redhat.com>
5078
5079         * dwarf2read.c (mapped_symtab::data): Now a vector of
5080         symtab_index_entry instead of vector of
5081         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
5082         whether an element's name is NULL instead of checking whether the
5083         element itself is NULL.
5084         (find_slot): Change return type.  Adjust.
5085         (hash_expand, , add_index_entry, uniquify_cu_indices)
5086         (write_hash_table): Adjust.
5087
5088 2017-06-12  Pedro Alves  <palves@redhat.com>
5089
5090         * dwarf2read.c (recursively_count_psymbols): New function.
5091         (write_psymtabs_to_index): Call it to compute number of psyms and
5092         pass estimate size of psyms_seen to unordered_set's ctor.
5093
5094 2017-06-12  Pedro Alves  <palves@redhat.com>
5095
5096         * dwarf2read.c (write_hash_table): Check if key already exists
5097         before emplacing.
5098
5099 2017-06-12  Pedro Alves  <palves@redhat.com>
5100
5101         * dwarf2read.c (data_buf::append_space): Rename to...
5102         (data_buf::grow): ... this, and make private.  Adjust all callers.
5103         (data_buf::append_uint): New method.
5104         (add_address_entry, write_one_signatured_type)
5105         (write_psymtabs_to_index): Use it.
5106
5107 2017-06-12  Pedro Alves  <palves@redhat.com>
5108
5109         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
5110         (file_write (FILE *, const std::vector<Elem>&)): Delete.
5111         (data_buf::file_write): Call ::fwrite directly.
5112
5113 2017-06-12  Pedro Alves  <palves@redhat.com>
5114
5115         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
5116         std::vector::erase.
5117
5118 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
5119
5120         Code cleanup: C++ify .gdb_index producer.
5121         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
5122         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
5123         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
5124         (create_strtab, add_string): Remove.
5125         (file_write, data_buf): New.
5126         (struct symtab_index_entry): Use std::vector for cu_indices.
5127         (struct mapped_symtab): Use std::vector for data.
5128         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
5129         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
5130         Remove.
5131         (find_slot): Change return type.  Update it to the new data structures.
5132         (hash_expand, add_index_entry): Update it to the new data structures.
5133         (offset_type_compare): Remove.
5134         (uniquify_cu_indices): Update it to the new data structures.
5135         (c_str_view, c_str_view_hasher, vector_hasher): New.
5136         (add_indices_to_cpool): Remove.
5137         (write_hash_table): Update it to the new data structures.
5138         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
5139         (eq_psymtab_cu_index): Remove.
5140         (psym_index_map): New typedef.
5141         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
5142         reference and std::unordered_map for cu_index_htab.
5143         (add_address_entry, add_address_entry_worker, write_address_map)
5144         (write_psymbols): Update it to the new data structures.
5145         (write_obstack): Remove.
5146         (struct signatured_type_index_data): Change types_list to a data_buf
5147         reference and psyms_seen to a std::unordered_set reference.
5148         (write_one_signatured_type, recursively_write_psymbols)
5149         (write_psymtabs_to_index): Update it to the new data structures.
5150
5151 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
5152
5153         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
5154         separate-debug-file commands.
5155         * symfile.h (separate_debug_file_debug): New global.
5156         * symfile.c (separate_debug_file_debug): New global.
5157         (separate_debug_file_exists, find_separate_debug_file): Add
5158         debug output.
5159         (_initialize_symfile): Add "set debug separate-debug-file"
5160         command.
5161         * build-id.c (build_id_to_debug_bfd,
5162         find_separate_debug_file_by_buildid): Add debug output.
5163
5164 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
5165
5166         * gdbarch.sh (displaced_step_free_closure): Remove.
5167         * gdbarch.h, gdbarch.c: Re-generate.
5168         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
5169         displaced_step_free_closure.
5170         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
5171         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
5172         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5173         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
5174         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5175         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5176         * arch-utils.h (simple_displaced_step_free_closure): Remove.
5177         * arch-utils.c (simple_displaced_step_free_closure): Remove.
5178         * infrun.c (displaced_step_clear): Call xfree instead of
5179         gdbarch_displaced_step_free_closure.
5180
5181 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
5182
5183         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
5184         NULL".
5185
5186 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
5187
5188         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
5189         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
5190         (mn10300_push_dummy_call): Likewise.
5191
5192 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
5193
5194         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
5195
5196 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
5197
5198         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
5199
5200 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
5201
5202         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
5203         able to start inferiors using a shell.
5204         (New remote packets): Announce new packet "QStartupWithShell".
5205         * remote.c: Add PACKET_QStartupWithShell.
5206         (extended_remote_create_inferior): Handle new
5207         PACKET_QStartupWithShell.
5208         (remote_protocol_features) <QStartupWithShell>: New entry for
5209         PACKET_QStartupWithShell.
5210         (_initialize_remote): Call "add_packet_config_cmd" for
5211         QStartupShell.
5212
5213 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
5214             Pedro Alves  <palves@redhat.com>
5215
5216         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
5217         and "nat/fork-inferior.h".
5218         * common/common-inferior.h: New file, with contents from
5219         "gdb/inferior.h".
5220         * commom/common-utils.c: Include "common-utils.h".
5221         (stringify_argv): New function.
5222         * common/common-utils.h (stringify_argv): New prototype.
5223         * configure.nat: Add "fork-inferior.o" as a dependency for
5224         "*linux*", "fbsd*" and "nbsd*" hosts.
5225         * corefile.c (get_exec_file): Update comment.
5226         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
5227         instead of "startup_inferior".
5228         (darwin_create_inferior): Call "add_thread_silent" after
5229         "fork_inferior".
5230         * fork-child.c: Cleanup unnecessary includes.
5231         (SHELL_FILE): Move to "common/common-fork-child.c".
5232         (environ): Likewise.
5233         (exec_wrapper): Initialize.
5234         (get_exec_wrapper): New function.
5235         (breakup_args): Move to "common/common-fork-child.c"; rename to
5236         "breakup_args_for_exec".
5237         (escape_bang_in_quoted_argument): Move to
5238         "common/common-fork-child.c".
5239         (saved_ui): New variable.
5240         (prefork_hook): New function.
5241         (postfork_hook): Likewise.
5242         (postfork_child_hook): Likewise.
5243         (gdb_startup_inferior): Likewise.
5244         (fork_inferior): Move to "common/common-fork-child.c".  Update
5245         function to support gdbserver.
5246         (startup_inferior): Likewise.
5247         * gdbcore.h (get_exec_file): Remove declaration.
5248         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
5249         instead of "startup_inferior".  Call "add_thread_silent" after
5250         "fork_inferior".
5251         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
5252         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
5253         instead of "startup_inferior".  Call "add_thread_silent" after
5254         "fork_inferior".
5255         * inferior.h: Include "common-inferior.h".
5256         (trace_start_error): Move to "common/common-utils.h".
5257         (trace_start_error_with_name): Likewise.
5258         (fork_inferior): Move prototype to "nat/fork-inferior.h".
5259         (startup_inferior): Likewise.
5260         (gdb_startup_inferior): New prototype.
5261         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
5262         * nat/fork-inferior.h: New file.
5263         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
5264         instead of "startup_inferior".  Call "add_thread_silent" after
5265         "fork_inferior".
5266         * target.h (target_terminal_init): Move prototype to
5267         "target/target.h".
5268         (target_terminal_inferior): Likewise.
5269         (target_terminal_ours): Likewise.
5270         * target/target.h (target_terminal_init): New prototype, moved
5271         from "target.h".
5272         (target_terminal_inferior): Likewise.
5273         (target_terminal_ours): Likewise.
5274         * utils.c (gdb_flush_out_err): New function.
5275
5276 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
5277
5278         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
5279         * common/common-gdbthread.h: New file, with parts from
5280         "gdb/gdbthread.h".
5281         * gdbthread.h: Include "common-gdbthread.h".
5282         (switch_to_thread): Moved to "common/common-gdbthread.h".
5283
5284 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
5285
5286         * Makefile.in (SFILES): Add "common/job-control.c".
5287         (HFILES_NO_SRCDIR): Add "common/job-control.h".
5288         (COMMON_OBS): Add "job-control.o".
5289         * common/job-control.c: New file, with contents from
5290         "gdb/inflow.c".
5291         * common/job-control.h: New file, with contents from "terminal.h".
5292         * fork-child.c: Include "job-control.h".
5293         * inflow.c: Include "job-control.h".
5294         (gdb_setpgid): Move to "common/common-inflow.c".
5295         (_initialize_inflow): Move setting of "job_control" to
5296         "handle_job_control".
5297         * terminal.h (job_control): Moved to "common/common-terminal.h".
5298         (gdb_setpgid): Likewise.
5299         * top.c: Include "job_control.h".
5300         * utils.c: Likewise.
5301         (job_control): Moved to "job-control.c".
5302
5303 2017-06-07  Pedro Alves  <palves@redhat.com>
5304
5305         * Makefile.in (SFILES): Add gdb_regex.c.
5306         (COMMON_OBS): Add gdb_regex.o.
5307         * ada-lang.c (ada_add_standard_exceptions)
5308         (ada_add_exceptions_from_frame, name_matches_regex)
5309         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
5310         parameter type to compiled_regex.  Adjust.
5311         (ada_exceptions_list): Use compiled_regex.
5312         * break-catch-throw.c (exception_catchpoint::pattern): Now a
5313         std::unique_ptr<compiled_regex>.
5314         (exception_catchpoint::~exception_catchpoint): Remove regfree
5315         call.
5316         (check_status_exception_catchpoint): Adjust to use compiled_regex.
5317         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
5318         * breakpoint.c (solib_catchpoint::compiled): Now a
5319         std::unique_ptr<compiled_regex>.
5320         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
5321         (check_status_catch_solib): Adjust to use compiled_regex.
5322         (add_solib_catchpoint): Adjust to use compiled_regex.
5323         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
5324         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
5325         compiled_regex reference.  Adjust to use it.
5326         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
5327         declaration.  Include "gdb_regex.h".
5328         (apropos_cmd): Change regex parameter to compiled_regex reference.
5329         * gdb_regex.c: New file.
5330         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
5331         declarations.
5332         (class compiled_regex): New.
5333         * linux-tdep.c: Include "common/gdb_optional.h".
5334         (struct mapping_regexes): New, factored out from
5335         mapping_is_anonymous_p, and adjusted to use compiled_regex.
5336         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
5337         gdb::optional and remove cleanups.  Adjust to compiled_regex.
5338         * probe.c: Include "common/gdb_optional.h".
5339         (collect_probes): Use compiled_regex and gdb::optional and remove
5340         cleanups.
5341         * skip.c: Include "common/gdb_optional.h".
5342         (skiplist_entry::compiled_function_regexp): Now a
5343         gdb::optional<compiled_regex>.
5344         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
5345         (free_skiplist_entry): Remove regfree call.
5346         (compile_skip_regexp, skip_rfunction_p): Adjust to use
5347         compiled_regex and gdb::optional.
5348         * symtab.c: Include "common/gdb_optional.h".
5349         (search_symbols): Use compiled_regex and gdb::optional.
5350         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
5351         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
5352         to gdb_regex.c.
5353
5354 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
5355
5356         * regcache.c (regcache::save): Avoid buffer use.
5357         (regcache::dump): Likewise.
5358
5359 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
5360
5361         * sh-tdep.c (sh_pseudo_register_read): Remove
5362         MAX_REGISTER_SIZE.
5363         (sh_pseudo_register_write): Likewise.
5364         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
5365         (sh64_pseudo_register_write): Likewise
5366
5367 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
5368
5369         * aarch64-tdep.c (aarch64_store_return_value): Use
5370         V_REGISTER_SIZE.
5371         (aarch64_pseudo_read_value): Likewise.
5372         (aarch64_pseudo_write): Likewise.
5373
5374 2017-06-06  Yao Qi  <yao.qi@linaro.org>
5375
5376         * regformats/regdef.h (set_register_cache): Remove the
5377         declaration.
5378
5379 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
5380
5381         * frame.c (frame_unwind_register_signed): Use
5382         frame_unwind_register_value.
5383
5384 2017-06-06  Pedro Alves  <palves@redhat.com>
5385
5386         PR breakpoints/21553
5387         * breakpoint.c (create_breakpoints_sal_default)
5388         (init_breakpoint_sal, create_breakpoint_sal): Use
5389         gdb::unique_xmalloc_ptr for string parameters.
5390         (create_breakpoint): Constify 'extra_string' and 'cond_string'
5391         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
5392         (base_breakpoint_create_breakpoints_sal)
5393         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
5394         (strace_marker_create_breakpoints_sal)
5395         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
5396         string parameters.
5397         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
5398         gdb::unique_xmalloc_ptr for string parameters.
5399         (create_breakpoint): Constify 'extra_string' and 'cond_string'
5400         parameters.
5401
5402 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
5403
5404         * alpha-tdep.c (alpha_register_to_value): Use
5405         get_frame_register_value.
5406         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
5407
5408 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
5409
5410         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
5411         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
5412         (ia64_value_to_register): Likewise.
5413         (ia64_extract_return_value): Likewise.
5414         (ia64_store_return_value): Likewise.
5415         (ia64_push_dummy_call): Likewise.
5416
5417 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
5418
5419         GDB 8.0 released.
5420
5421 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
5422
5423         * x86-linux-nat.c (struct arch_lwp_info): Remove.
5424
5425 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
5426
5427         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
5428         parameter.
5429         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
5430
5431 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
5432
5433         * event-loop.c (poll_timers): Unallocate timer using delete
5434         instead of xfree.
5435
5436 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
5437
5438         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
5439         (struct breakpoint) <~breakpoint>: New.
5440         (struct watchpoint): Inherit from breakpoint.
5441         <~watchpoint>: New.
5442         <base>: Remove.
5443         (struct tracepoint): Inherit from breakpoint.
5444         <base>: Remove.
5445         * breakpoint.c (longjmp_breakpoint_ops): Remove.
5446         (struct longjmp_breakpoint): Inherit from breakpoint.
5447         <~longjmp_breakpoint>: New.
5448         <base>: Remove.
5449         (new_breakpoint_from_type): Remove casts.
5450         (watchpoint_in_thread_scope): Remove reference to base field.
5451         (watchpoint_del_at_next_stop): Likewise.
5452         (update_watchpoint): Likewise.
5453         (watchpoint_check): Likewise.
5454         (bpstat_check_watchpoint): Likewise.
5455         (set_longjmp_breakpoint): Likewise.
5456         (struct fork_catchpoint): Inherit from breakpoint.
5457         <base>: Remove.
5458         (struct solib_catchpoint): Inherit from breakpoint.
5459         <~solib_catchpoint>: New.
5460         <base>: Remove.
5461         (dtor_catch_solib): Change to ...
5462         (solib_catchpoint::~solib_catchpoint): ... this.
5463         (breakpoint_hit_catch_solib): Remove reference to base field.
5464         (add_solib_catchpoint): Likewise.
5465         (create_fork_vfork_event_catchpoint): Likewise.
5466         (struct exec_catchpoint): Inherit from breakpoint.
5467         <~exec_catchpoint>: New.
5468         <base>: Remove.
5469         (dtor_catch_exec): Change to ...
5470         (exec_catchpoint::~exec_catchpoint): ... this.
5471         (dtor_watchpoint): Change to ...
5472         (watchpoint::~watchpoint): ... this.
5473         (watch_command_1): Remove reference to base field.
5474         (catch_exec_command_1): Likewise.
5475         (base_breakpoint_dtor): Change to ...
5476         (breakpoint::~breakpoint): ... this.
5477         (base_breakpoint_ops): Remove dtor field value.
5478         (longjmp_bkpt_dtor): Change to ...
5479         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
5480         (strace_marker_create_breakpoints_sal): Remove reference to base
5481         field.
5482         (delete_breakpoint): Don't manually call breakpoint destructor.
5483         (create_tracepoint_from_upload): Remove reference to base field.
5484         (trace_pass_set_count): Likewise.
5485         (initialize_breakpoint_ops): Don't initialize
5486         momentary_breakpoint_ops, don't set dtors.
5487         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
5488         <~ada_catchpoint>: New.
5489         <base>: Remove.
5490         (create_excep_cond_exprs): Remove reference to base field.
5491         (dtor_exception): Change to ...
5492         (ada_catchpoint::~ada_catchpoint): ... this.
5493         (dtor_catch_exception): Remove.
5494         (dtor_catch_exception_unhandled): Remove.
5495         (dtor_catch_assert): Remove.
5496         (create_ada_exception_catchpoint): Remove reference to base
5497         field.
5498         (initialize_ada_catchpoint_ops): Don't set dtors.
5499         * break-catch-sig.c (struct signal_catchpoint): Inherit from
5500         breakpoint.
5501         <~signal_catchpoint>: New.
5502         <base>: Remove.
5503         (signal_catchpoint_dtor): Change to ...
5504         (signal_catchpoint::~signal_catchpoint): ... this.
5505         (create_signal_catchpoint): Remove reference to base field.
5506         (initialize_signal_catchpoint_ops): Don't set dtor.
5507         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
5508         from breakpoint.
5509         <~syscall_catchpoint>: New.
5510         <base>: Remove.
5511         (dtor_catch_syscall): Change to ...
5512         (syscall_catchpoint::~syscall_catchpoint): ... this.
5513         (create_syscall_event_catchpoint): Remove reference to base
5514         field.
5515         (initialize_syscall_catchpoint_ops): Don't set dtor.
5516         * break-catch-throw.c (struct exception_catchpoint): Inherit
5517         from breakpoint.
5518         <~exception_catchpoint>: New.
5519         <base>: Remove.
5520         (dtor_exception_catchpoint): Change to ...
5521         (exception_catchpoint::~exception_catchpoint): ... this.
5522         (handle_gnu_v3_exceptions): Remove reference to base field.
5523         (initialize_throw_catchpoint_ops): Don't set dtor.
5524         * ctf.c (ctf_get_traceframe_address): Remove reference to base
5525         field.
5526         * remote.c (remote_get_tracepoint_status): Likewise.
5527         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
5528         * tracefile.c (tracefile_fetch_registers): Likewise.
5529         * tracepoint.c (actions_command): Likewise.
5530         (validate_actionline): Likewise.
5531         (tfind_1): Likewise.
5532         (get_traceframe_location): Likewise.
5533         (find_matching_tracepoint_location): Likewise.
5534         (parse_tracepoint_status): Likewise.
5535         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
5536
5537 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
5538
5539         * breakpoint.c (struct longjmp_breakpoint): New struct.
5540         (is_tracepoint_type): Change return type to bool.
5541         (is_longjmp_type): New function.
5542         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
5543         (set_raw_breakpoint_without_location): Use
5544         new_breakpoint_from_type.
5545         (set_raw_breakpoint): Likewise.
5546
5547 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
5548
5549         * breakpoint.c (new_breakpoint_from_type): New function.
5550         (create_breakpoint_sal): Use new_breakpoint_from_type and
5551         unique_ptr.
5552         (create_breakpoint): Likewise.
5553
5554 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
5555
5556         * memattr.c (mem_info_command): Rename to ...
5557         (info_mem_command): ... this.
5558         (mem_enable_command): Rename to ...
5559         (enable_mem_command): ... this.
5560         (mem_disable_command): Rename to ...
5561         (disable_mem_command): ... this.
5562         (mem_delete_command): Rename to ...
5563         (delete_mem_command): ... this.
5564         (_initialize_mem): Adjust function names.
5565
5566 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
5567
5568         * btrace.c (handle_pt_insn_events): New.
5569         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
5570         STATUS.  Split into this and ...
5571         (handle_pt_insn_event_flags): ... this.
5572
5573 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
5574
5575         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
5576         and struct pt_insn.resynced.
5577         * configure: Regenerated.
5578         * config.in: Regenerated.
5579
5580 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5581
5582         * btrace.c (ftrace_find_call_by_number): New function.
5583         (ftrace_new_function): Store objects, not pointers.
5584         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
5585         ftrace_new_gap, ftrace_update_function,
5586         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
5587         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
5588         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
5589         btrace_ends_with_single_insn, btrace_call_get): Account for
5590         btrace_thread_info::functions now storing objects.
5591         * btrace.h (struct btrace_thread_info): Add constructor.
5592         (struct btrace_thread_info) <functions>: Make std::vector.
5593         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
5594         Initialize with default values.
5595         * record-btrace.c (record_btrace_frame_sniffer): Account for
5596         btrace_thread_info::functions now storing objects.
5597
5598 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5599
5600         * btrace.c: Remove typedef bfun_s.
5601         (ftrace_new_gap): Directly add gaps to the list of gaps.
5602         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
5603         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
5604         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
5605         instead of gdb VEC.
5606
5607 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5608
5609         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
5610         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
5611         with btrace_thread_info::next_segment and
5612         btrace_thread_info::prev_segment.
5613         * btrace.h: Remove struct btrace_func_link.
5614         (struct btrace_function): Replace pair of function segment pointers
5615         with pair of indices.
5616         * python/py-record-btrace.c (btpy_call_prev_sibling,
5617         btpy_call_next_sibling): Replace references to
5618         btrace_thread_info::segment with btrace_thread_info::next_segment and
5619         btrace_thread_info::prev_segment.
5620         * record-btrace.c (record_btrace_frame_this_id): Use
5621         btrace_find_call_by_number.
5622
5623 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5624
5625         * btrace.c (ftrace_new_function, ftrace_fixup_level,
5626         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
5627         btrace_insn_next, btrace_insn_prev): Remove references to
5628         btrace_thread_info::flow.
5629         * btrace.h (struct btrace_function): Remove FLOW.
5630
5631 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5632
5633         * btrace.c (ftrace_find_call_by_number): New function.
5634         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
5635         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
5636         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
5637         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
5638         index.
5639         * btrace.h (struct btrace_function): Turn UP into an index.
5640         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
5641         as an index.
5642         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
5643         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
5644         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
5645
5646 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5647
5648         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5649         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5650         ftrace_update_function, ftrace_compute_global_level_offset,
5651         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
5652         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
5653         btrace_insn_end, btrace_is_empty): Remove references to
5654         btrace_thread_info::begin and btrace_thread_info::end.
5655         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
5656         (struct btrace_thread_info) <functions>: Adjust comment.
5657         * record-btrace.c (record_btrace_start_replaying): Remove reference to
5658         btrace_thread_info::begin.
5659
5660 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5661
5662         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
5663         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
5664         ftrace_update_function): Remove arguments that implicitly were always
5665         BTINFO->END.
5666         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
5667         Don't pass BTINFO->END.
5668
5669 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5670
5671         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
5672         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
5673         btrace_find_insn_by_number): Replace function segment pointer with
5674         index.
5675         (btrace_insn_cmp): Simplify.
5676         * btrace.h: (struct btrace_insn_iterator) Rename index to
5677         insn_index.  Replace function segment pointer with index into function
5678         segment vector.
5679         * record-btrace.c (record_btrace_call_history): Replace function
5680         segment pointer use with index.
5681         (record_btrace_frame_sniffer): Retrieve function call segment through
5682         vector.
5683         (record_btrace_set_replay): Remove defunc't safety check.
5684
5685 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5686
5687         * btrace.c (btrace_ends_with_single_insn): New function.
5688         (btrace_call_get, btrace_call_number, btrace_call_begin,
5689         btrace_call_end, btrace_call_next, btrace_call_prev,
5690         btrace_find_call_by_number): Use index into call segment vector
5691         instead of pointer.
5692         (btrace_call_cmp): Simplify.
5693         * btrace.h (struct btrace_call_iterator): Replace function call segment
5694         pointer with index into vector.
5695         * record-btrace.c (record_btrace_call_history): Use index instead of
5696         pointer.
5697
5698 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5699
5700         * btrace.c (btrace_insn_begin, btrace_insn_end,
5701         btrace_find_insn_by_number): Add btinfo to iterator.
5702         * btrace.h (struct btrace_insn_iterator): Add btinfo.
5703
5704 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5705
5706         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
5707         and save pointers directly.
5708         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
5709         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
5710         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
5711         changed signature of functions.
5712         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
5713         (btrace_fetch): Remove code that adds btrace_function pointers to
5714         vector of btrace_functions.
5715         (btrace_clear): Simplify freeing vector of btrace_functions.
5716
5717 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
5718
5719         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
5720         Replace VEC_* with std::vector functions.
5721         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
5722         (struct btrace_thread_info)<functions>: Change type to std::vector.
5723
5724 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5725
5726         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
5727         "Removed targets and native configurations" up.  Merge duplicate
5728         "New commands" sub-sections.  Add "New options" sub-sections.
5729
5730 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
5731
5732         * defs.h (copy_integer_to_size): New declaration.
5733         * findvar.c (copy_integer_to_size): New function.
5734         (do_cint_test): New selftest function.
5735         (copy_integer_to_size_test): Likewise.
5736         (_initialize_findvar): Likewise.
5737         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
5738         (mips_fbsd_collect_reg): Use raw_collect_integer.
5739         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
5740         (mips64_fill_gregset): Use raw_collect_integer
5741         (mips64_fill_fpregset): Use raw_supply_integer.
5742         * regcache.c (regcache::raw_supply_integer): New function.
5743         (regcache::raw_collect_integer): Likewise.
5744         * regcache.h: (regcache::raw_supply_integer): New declaration.
5745         (regcache::raw_collect_integer): Likewise.
5746
5747 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5748
5749         * Makefile.in (SFILES): Add gdbarch-selftests.c.
5750         (COMMON_OBS): Add gdbarch-selftests.o.
5751         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
5752         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
5753         * gdbarch-selftests.c: New file.
5754         * regcache.h (regcache) <~regcache>: Mark it virtual if
5755         GDB_SELF_TEST.
5756         <raw_write>: Likewise.
5757
5758 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5759
5760         * regcache.c (current_regcache): Change it to
5761         regcache::current_regcache.
5762         (regcache_observer_target_changed): Update.
5763         (regcache_thread_ptid_changed): Make it a regcache static
5764         method.
5765         (regcache_thread_ptid_changed): Update.
5766         (class regcache_access): New.
5767         (current_regcache_test): Update.
5768         (_initialize_regcache): Update.
5769         * regcache.h: Include forward_list.
5770         (regcache): Declare regcache_thread_ptid_changed and declare
5771         registers_changed_ptid as friend.
5772
5773 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5774
5775         * i387-tdep.c (i387_register_to_value): Use register_size
5776         instead of TYPE_LENGTH.
5777         * m68k-tdep.c (m68k_register_to_value): Likewise.
5778
5779 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5780
5781         * i387-tdep.c (i387_convert_register_p): Return false if type
5782         code isn't TYPE_CODE_FLT.
5783
5784 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5785
5786         * alpha-tdep.c (alpha_convert_register_p): Return true if type
5787         length is 4.
5788         (alpha_register_to_value): Remove type length check.
5789         (alpha_value_to_register): Likewise.
5790
5791 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5792
5793         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
5794         TYPE_CODE_FLT.
5795
5796 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5797
5798         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
5799         TYPE_CODE_FLT or not.
5800
5801 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5802
5803         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
5804         * avr-tdep.c (avr_gdbarch_init): Likewise.
5805         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5806         * cris-tdep.c (cris_gdbarch_init): Likewise.
5807         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5808         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5809         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5810         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
5811         * mep-tdep.c (mep_gdbarch_init): Likewise.
5812         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5813         * mips-tdep.c (mips_gdbarch_init): Likewise.
5814         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5815         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5816         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5817         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5818         * v850-tdep.c (v850_gdbarch_init): Likewise.
5819
5820 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5821
5822         * selftest-arch.c (tests_with_arch): Call registers_changed
5823         and reinit_frame_cache.
5824         * selftest.c (run_self_tests): Likewise.
5825
5826 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5827
5828         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
5829         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
5830
5831 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5832
5833         * rl78-tdep.c (rl78_gdbarch_init): Don't call
5834         set_gdbarch_print_insn.
5835
5836 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5837
5838         * h8300-tdep.c (h8300_gdbarch_init): Don't call
5839         set_gdbarch_print_insn.
5840
5841 2017-05-24  Yao Qi  <yao.qi@linaro.org>
5842
5843         * alpha-tdep.c (alpha_gdbarch_init): Don't call
5844         set_gdbarch_print_insn.
5845         * arc-tdep.c (arc_gdbarch_init): Likewise.
5846         * arch-utils.c: include dis-asm.h.
5847         (default_print_insn): New function.
5848         * arch-utils.h (default_print_insn): Declare.
5849         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
5850         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
5851         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
5852         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
5853         * frv-tdep.c (frv_gdbarch_init): Likewise.
5854         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
5855         * gdbarch.sh (print_insn): Use default_print_insn.
5856         * gdbarch.c: Regenerated.
5857         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
5858         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
5859         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
5860         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
5861         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
5862         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
5863         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
5864         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
5865         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
5866         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
5867         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
5868         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
5869         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
5870         * mt-tdep.c (mt_gdbarch_init): Likewise.
5871         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5872         * nios2-tdep.c (nios2_print_insn): Remove.
5873         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
5874         * rx-tdep.c (rx_gdbarch_init): Likewise.
5875         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
5876         * score-tdep.c (score_print_insn): Remove.
5877         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
5878         * sh-tdep.c (sh_gdbarch_init): Likewise.
5879         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
5880         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5881         * tic6x-tdep.c (tic6x_print_insn): Remove.
5882         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
5883         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
5884         * v850-tdep.c (v850_gdbarch_init): Likewise.
5885         * vax-tdep.c (vax_gdbarch_init): Likewise.
5886         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
5887         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
5888
5889 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
5890
5891         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
5892         (MIPS_FP0_REGNUM): Remove.
5893         (MIPS_FSR_REGNUM): Remove.
5894         (mips_fbsd_supply_fpregs): Use mips_regnum.
5895         (mips_fbsd_supply_gregs): Likewise.
5896         (mips_fbsd_collect_fpregs): Likewise.
5897         (mips_fbsd_collect_gregs): Likewise.
5898
5899 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
5900
5901         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
5902         (getpfpregs_supplies): New function.
5903         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
5904         getfpregs_supplies.
5905         (mips_fbsd_store_inferior_registers): Likewise.
5906
5907 2017-05-22  Pedro Alves <palves@redhat.com>
5908
5909         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
5910         maintainer.
5911
5912 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
5913
5914         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
5915         (store_register): Likewise.
5916         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
5917         (get_decimal_float_return_value): Likewise.
5918         (do_ppc_sysv_return_value): Likewise.
5919         (ppc64_sysv_abi_push_integer): Likewise.
5920         (ppc64_sysv_abi_push_freg): Likewise.
5921         (ppc64_sysv_abi_return_value_base): Likewise.
5922         (ppc64_sysv_abi_return_value): Likewise.
5923         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
5924         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
5925         * rs6000-nat.c: Likewise.
5926         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
5927         (rs6000_value_to_register): Likewise.
5928         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
5929
5930 2017-05-21  Tom Tromey  <tom@tromey.com>
5931
5932         PR rust/21466:
5933         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
5934         arrays as "[T]", not "[T; ]".
5935
5936 2017-05-19  Tom Tromey  <tom@tromey.com>
5937
5938         PR rust/21484:
5939         * rust-lang.c (exp_descriptor_rust): New function.
5940         (rust_language_defn): Use it.
5941         * p-lang.c (pascal_language_defn): Update.
5942         * opencl-lang.c (opencl_language_defn): Update.
5943         * objc-lang.c (objc_language_defn): Update.
5944         * m2-lang.c (m2_language_defn): Update.
5945         * language.h (struct language_defn)
5946         <la_watch_location_expression>: New member.
5947         * language.c (unknown_language_defn, auto_language_defn)
5948         (local_language_defn): Update.
5949         * go-lang.c (go_language_defn): Update.
5950         * f-lang.c (f_language_defn): Update.
5951         * d-lang.c (d_language_defn): Update.
5952         * c-lang.h (c_watch_location_expression): Declare.
5953         * c-lang.c (c_watch_location_expression): New function.
5954         (c_language_defn, cplus_language_defn, asm_language_defn)
5955         (minimal_language_defn): Use it.
5956         * breakpoint.c (watch_command_1): Call
5957         la_watch_location_expression.
5958         * ada-lang.c (ada_language_defn): Update.
5959
5960 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5961
5962         PR tui/21482
5963         * gdb_curses.h (NOMACROS): Define.
5964         (NCURSES_NOMACROS): Define.
5965
5966 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5967
5968         PR tui/21482
5969         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
5970         arg to char *.
5971         * tui/tui-wingeneral.c (box_win): Likewise.
5972         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
5973         (tui_show_source_line): Likewise.
5974         (tui_show_exec_info_content): Likewise.
5975
5976 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
5977
5978         * sparc-tdep.c (sparc_structure_return_p)
5979         (sparc_arg_on_registers_p): New functions.
5980         (sparc32_store_arguments): Use them.
5981         * sparc64-tdep.c (sparc64_16_byte_align_p)
5982         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
5983         Handle TYPE_CODE_ARRAY.
5984
5985 2017-05-17  Yao Qi  <yao.qi@linaro.org>
5986
5987         * cli/cli-decode.c (add_alias_cmd): New function.
5988         * command.h (add_alias_cmd): Declare.
5989         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
5990         instead call add_alias_cmd.
5991
5992 2017-05-17  Pedro Alves  <palves@redhat.com>
5993
5994         * Makefile.in (nat_extra_makefile_frag): Rename to ...
5995         (nat_makefile_frag): ... this.  All references updated.
5996         * configure.ac: Likewise.
5997         * configure.nat: Likewise.  Enhance comments.
5998         * configure: Regenerate.
5999
6000 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6001
6002         * procfs.c (procfs_create_inferior): Change prototype to match
6003         definition.
6004
6005 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
6006
6007         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
6008         C++ compiler warning.
6009
6010 2017-05-12  Tom Tromey  <tom@tromey.com>
6011
6012         PR rust/21483:
6013         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
6014         recurse, just call value_struct_elt directly.
6015
6016 2017-05-12  Tom Tromey  <tom@tromey.com>
6017
6018         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
6019         OP_RUST_ARRAY>: Fix.
6020
6021 2017-05-12  Tom Tromey  <tom@tromey.com>
6022
6023         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
6024
6025 2017-05-09  Yao Qi  <yao.qi@linaro.org>
6026
6027         * regcache.c: Include <forward_list>.
6028         (struct regcache_list): Remove.
6029         (current_regcache): Update.
6030         (get_thread_arch_aspace_regcache): Update for std::forward_list.
6031         (regcache_thread_ptid_changed): Likewise.
6032         (registers_changed_ptid): Likewise.
6033         (current_regcache_size): Likewise.
6034
6035 2017-05-09  Yao Qi  <yao.qi@linaro.org>
6036
6037         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
6038         (current_regcache_size): New function.
6039         (current_regcache_test): New function.
6040         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
6041
6042 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
6043
6044         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
6045         (print_gp_register_row): Use get_frame_register_value.
6046
6047 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
6048
6049         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
6050         (mips_supply_fpregset): Likewise.
6051         (mips64_supply_gregset): Likewise.
6052
6053 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
6054
6055         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
6056         regcache->raw_supply_zeroed.
6057
6058 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
6059
6060         * configure.nat: Rearrange 'case' statements to match
6061         host before cpu.
6062
6063 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
6064
6065         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
6066         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
6067         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
6068         "@nat_extra_makefile_frag@".
6069         (Makefile): Remove dependency on "@frags@".
6070         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
6071         (data-directory/Makefile): Likewise.
6072         * config/aarch64/linux.mh: Deleted; moved contents to
6073         "gdb/configure.nat".
6074         * config/alpha/alpha-linux.mh: Likewise.
6075         * config/alpha/nbsd.mh: Likewise.
6076         * config/arm/linux.mh: Likewise.
6077         * config/arm/nbsdelf.mh: Likewise.
6078         * config/i386/cygwin.mh: Likewise.
6079         * config/i386/cygwin64.mh: Likewise.
6080         * config/i386/darwin.mh: Likewise.
6081         * config/i386/fbsd.mh: Likewise.
6082         * config/i386/fbsd64.mh: Likewise.
6083         * config/i386/go32.mh: Likewise.
6084         * config/i386/i386gnu.mh: Likewise.
6085         * config/i386/i386sol2.mh: Likewise.
6086         * config/i386/linux.mh: Likewise.
6087         * config/i386/linux64.mh: Likewise.
6088         * config/i386/mingw.mh: Likewise.
6089         * config/i386/mingw64.mh: Likewise.
6090         * config/i386/nbsd64.mh: Likewise.
6091         * config/i386/nbsdelf.mh: Likewise.
6092         * config/i386/nto.mh: Likewise.
6093         * config/i386/obsd.mh: Likewise.
6094         * config/i386/obsd64.mh: Likewise.
6095         * config/i386/sol2-64.mh: Likewise.
6096         * config/ia64/linux.mh: Likewise.
6097         * config/m32r/linux.mh: Likewise.
6098         * config/m68k/linux.mh: Likewise.
6099         * config/m68k/nbsdelf.mh: Likewise.
6100         * config/m68k/obsd.mh: Likewise.
6101         * config/m88k/obsd.mh: Likewise.
6102         * config/mips/fbsd.mh: Likewise.
6103         * config/mips/linux.mh: Likewise.
6104         * config/mips/nbsd.mh: Likewise.
6105         * config/mips/obsd64.mh: Likewise.
6106         * config/pa/linux.mh: Likewise.
6107         * config/pa/nbsd.mh: Likewise.
6108         * config/pa/obsd.mh: Likewise.
6109         * config/powerpc/aix.mh: Likewise.
6110         * config/powerpc/fbsd.mh: Likewise.
6111         * config/powerpc/linux.mh: Likewise.
6112         * config/powerpc/nbsd.mh: Likewise.
6113         * config/powerpc/obsd.mh: Likewise.
6114         * config/powerpc/ppc64-linux.mh: Likewise.
6115         * config/powerpc/spu-linux.mh: Likewise.
6116         * config/s390/linux.mh: Likewise.
6117         * config/sh/nbsd.mh: Likewise.
6118         * config/sparc/fbsd.mh: Likewise.
6119         * config/sparc/linux.mh: Likewise.
6120         * config/sparc/linux64.mh: Likewise.
6121         * config/sparc/nbsd64.mh: Likewise.
6122         * config/sparc/nbsdelf.mh: Likewise.
6123         * config/sparc/obsd64.mh: Likewise.
6124         * config/sparc/sol2.mh: Likewise.
6125         * config/tilegx/linux.mh: Likewise.
6126         * config/vax/nbsdelf.mh: Likewise.
6127         * config/vax/obsd.mh: Likewise.
6128         * config/xtensa/linux.mh: Likewise.
6129         * config/i386/i386gnu.mn: New file, with excerpts from
6130         "config/i386/i386gnu.mh".
6131         * configure: Regenerate.
6132         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
6133         *.mh files under "gdb/config".
6134         * configure.nat: New file, with contents from the
6135         "gdb/config/*/*.mh" files.
6136
6137 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
6138
6139         * btrace.c (btrace_clear): Free insn vector.
6140
6141 2017-05-05  Pedro Alves  <palves@redhat.com>
6142
6143         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
6144         * configure: Regenerate.
6145
6146 2017-05-04  Pedro Alves  <palves@redhat.com>
6147
6148         * Makefile.in (SFILES): Add progspace-and-thread.c.
6149         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
6150         (COMMON_OBS): Add progspace-and-thread.o.
6151         * breakpoint.c: Include "progspace-and-thread.h".
6152         (update_inserted_breakpoint_locations)
6153         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
6154         Use scoped_restore_current_pspace_and_thread.
6155         (create_std_terminate_master_breakpoint): Use
6156         scoped_restore_current_program_space.
6157         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
6158         (print_breakpoint_location): Use
6159         scoped_restore_current_program_space.
6160         (bp_loc_is_permanent): Use
6161         scoped_restore_current_pspace_and_thread.
6162         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
6163         (download_tracepoint_locations): Use
6164         scoped_restore_current_pspace_and_thread.
6165         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
6166         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
6167         (enum step_over_calls_kind): Moved from inferior.h.
6168         (class scoped_restore_current_thread): New class.
6169         * gdbthread.h (make_cleanup_restore_current_thread): Delete
6170         declaration.
6171         (scoped_restore_current_thread): New class.
6172         * infcmd.c: Include "common/gdb_optional.h".
6173         (continue_1, proceed_after_attach): Use
6174         scoped_restore_current_thread.
6175         (notice_new_inferior): Use scoped_restore_current_thread.
6176         * inferior.c: Include "progspace-and-thread.h".
6177         (restore_inferior, save_current_inferior): Delete.
6178         (add_inferior_command, clone_inferior_command): Use
6179         scoped_restore_current_pspace_and_thread.
6180         * inferior.h (scoped_restore_current_inferior): New class.
6181         * infrun.c: Include "progspace-and-thread.h" and
6182         "common/gdb_optional.h".
6183         (follow_fork_inferior): Use
6184         scoped_restore_current_pspace_and_thread.
6185         (scoped_restore_exited_inferior): New class.
6186         (handle_vfork_child_exec_or_exit): Use
6187         scoped_restore_exited_inferior,
6188         scoped_restore_current_pspace_and_thread,
6189         scoped_restore_current_thread and scoped_restore.
6190         (fetch_inferior_event): Use scoped_restore_current_thread.
6191         * linespec.c (decode_line_full, decode_line_1): Use
6192         scoped_restore_current_program_space.
6193         * mi/mi-main.c: Include "progspace-and-thread.h".
6194         (exec_continue): Use scoped_restore_current_thread.
6195         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
6196         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
6197         * proc-service.c (ps_pglobal_lookup): Use
6198         scoped_restore_current_program_space.
6199         * progspace-and-thread.c: New file.
6200         * progspace-and-thread.h: New file.
6201         * progspace.c (release_program_space, clone_program_space): Use
6202         scoped_restore_current_program_space.
6203         (restore_program_space, save_current_program_space)
6204         (save_current_space_and_thread): Delete.
6205         (switch_to_program_space_and_thread): Moved to
6206         progspace-and-thread.c.
6207         * progspace.h (save_current_program_space)
6208         (save_current_space_and_thread): Delete declarations.
6209         (scoped_restore_current_program_space): New class.
6210         * remote.c (remote_btrace_maybe_reopen): Use
6211         scoped_restore_current_thread.
6212         * symtab.c: Include "progspace-and-thread.h".
6213         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
6214         * thread.c (print_thread_info_1): Use
6215         scoped_restore_current_thread.
6216         (struct current_thread_cleanup): Delete.
6217         (do_restore_current_thread_cleanup)
6218         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
6219         (scoped_restore_current_thread::~scoped_restore_current_thread):
6220         ... this new dtor.
6221         (make_cleanup_restore_current_thread): Rename/convert to ...
6222         (scoped_restore_current_thread::scoped_restore_current_thread):
6223         ... this new ctor.
6224         (thread_apply_all_command): Use scoped_restore_current_thread.
6225         (thread_apply_command): Use scoped_restore_current_thread.
6226         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
6227         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
6228
6229 2017-05-04  Pedro Alves  <palves@redhat.com>
6230
6231         * thread.c (make_cleanup_restore_current_thread): Move
6232         find_thread_ptid call before the is_stopped call.  Assert that the
6233         thread is found.  Replace is_stopped call by checking the thread's
6234         state directly.  Remove unnecessary NULL-thread check.
6235
6236 2017-05-04  Pedro Alves  <palves@redhat.com>
6237
6238         * corelow.c (thread_section_name): New class.
6239         (get_core_register_section, get_core_siginfo): Use it.
6240
6241 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6242
6243         * corelow.c (sniff_core_bfd): Remove extra semicolon.
6244         (get_core_register_section): Remove xfree of NULL pointer.
6245
6246 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
6247
6248         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
6249         * regcache.c (regcache::raw_supply_zeroed): New function.
6250         * regcache.h (regcache::raw_supply_zeroed): New declaration.
6251
6252 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
6253
6254         * gdbarch.sh: Remove commented out definition of
6255         TARGET_CHAR_BIT.
6256         * gdbarch.h: Re-generate.
6257
6258 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
6259
6260         * configure: Regenerate.
6261
6262 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
6263
6264         * solib-target.c (solib_target_relocate_section_addresses):
6265         Remove num_section_bases, num_bases, segment_bases variables.
6266
6267 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
6268
6269         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
6270
6271 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
6272
6273         * solib-target.c: Include <vector>
6274         (struct lm_info_target) <~lm_info_target>: Remove.
6275         <segment_bases, section_bases>: Change type to
6276         std::vector<CORE_ADDR>.
6277         (library_list_start_segment, library_list_start_section,
6278         library_list_end_library,
6279         solib_target_relocate_section_addresses): Adjust.
6280
6281 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
6282
6283         * gdbarch.sh (software_single_step): Change return type to
6284         std::vector<CORE_ADDR>.
6285         * gdbarch.c, gdbarch.h: Re-generate.
6286         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
6287         Adjust.
6288         (arm_deal_with_atomic_sequence_raw): Adjust.
6289         (thumb_get_next_pcs_raw): Adjust.
6290         (arm_get_next_pcs_raw): Adjust.
6291         (arm_get_next_pcs): Adjust.
6292         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
6293         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
6294         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
6295         (alpha_software_single_step): Adjust.
6296         * alpha-tdep.h (alpha_software_single_step): Adjust.
6297         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
6298         * arm-tdep.c (arm_software_single_step): Adjust.
6299         (arm_breakpoint_kind_from_current_state): Adjust.
6300         * arm-tdep.h (arm_software_single_step): Adjust.
6301         * breakpoint.c (insert_single_step_breakpoint): Adjust.
6302         * cris-tdep.c (cris_software_single_step): Adjust.
6303         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
6304         (micromips_deal_with_atomic_sequence): Adjust.
6305         (deal_with_atomic_sequence): Adjust.
6306         (mips_software_single_step): Adjust.
6307         * mips-tdep.h (mips_software_single_step): Adjust.
6308         * moxie-tdep.c (moxie_software_single_step): Adjust.
6309         * nios2-tdep.c (nios2_software_single_step): Adjust.
6310         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
6311         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
6312         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
6313         * s390-linux-tdep.c (s390_software_single_step): Adjust.
6314         * sparc-tdep.c (sparc_software_single_step): Adjust.
6315         * spu-tdep.c (spu_software_single_step): Adjust.
6316         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
6317
6318 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
6319
6320         * gdbarch.sh: Use semi-colon as field separator instead of colon.
6321         * gdbarch.h: Re-generate.
6322
6323 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
6324
6325         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
6326         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
6327         * python/py-instruction.c, python/py-instruction.h: New file.
6328         * python/py-record.c: Add py-instruction.h include.
6329         (gdbpy_initialize_record): Make gdb.Instruction a super class of
6330         gdb.RecordInstruction.
6331         * python/python-internal.h: Add gdbpy_initialize_instruction
6332         declaration.
6333         * python/python.c (do_start_initialization): Add
6334         gdbpy_initialize_instruction.
6335
6336 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
6337
6338         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
6339         Remove.
6340         (btrace_func_from_recpy_func): New function.
6341         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
6342         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
6343         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
6344         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
6345         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
6346         Also, use new helper functions.
6347         (btpy_list_item): Use new helper functions.
6348         (recpy_bt_function_call_history): Use new type name.
6349         (btpy_call_getset): Remove.
6350         (gdbpy_initialize_btrace): Remove code to initialize
6351         gdb.BtraceFunctionCall.
6352         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
6353         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
6354         recpy_bt_func_prev, recpy_bt_func_next): New export.
6355         * python/py-record.c (recpy_func_type): New static object.
6356         (recpy_func_new, recpy_func_level, recpy_func_symbol,
6357         recpy_func_instructions, recpy_func_up, recpy_func_prev,
6358         recpy_func_next): New function.
6359         (recpy_element_hash, recpy_element_richcompare): Updated comment.
6360         (recpy_func_getset): New static object.
6361         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
6362         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
6363
6364 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
6365
6366         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
6367         (btpy_object, btpy_insn_type, btpy_new): Remove.
6368         (btpy_list_object): Use gdb.RecordInstruction type instead of
6369         gdb.BtraceInstruction type.
6370         (btrace_insn_from_recpy_insn): New function.
6371         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
6372         btpy_new.
6373         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
6374         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
6375         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
6376         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
6377         instead of btpy_object.
6378         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6379         btpy_insn_data, btpy_insn_decode): Rename to ...
6380         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
6381         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
6382         recpy_bt_insn_decode): This.  Also, use new helper functions.
6383         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
6384         recpy_insn_type.
6385         (btpy_insn_getset): Remove.
6386         (gdbpy_initialize_btrace): Remove code to initialize
6387         gdb.BtraceInstruction.  Use recpy_element_object.
6388         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
6389         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
6390         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
6391         * python/py-record.c (recpy_insn_type): New static object.
6392         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
6393         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
6394         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
6395         New function.
6396         (recpy_insn_getset): New static object.
6397         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
6398         * python/py-record.h (recpy_element_object): New typedef.
6399         (recpy_insn_type, recpy_insn_new): New export.
6400
6401 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
6402
6403         * py-record-btrace.c (btpy_insn_new): Removed.
6404         (btpy_insn_or_gap_new): New function.
6405         (btpy_insn_error): Removed.
6406         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
6407         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
6408         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
6409         btpy_insn_or_gap_new instead of btpy_insn_new.
6410         (btpy_insn_getset): Remove btpy_insn_error.
6411         * py-record.c (recpy_gap_type): New static object.
6412         (recpy_gap_object): New typedef.
6413         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
6414         recpy_gap_reason_string): New function.
6415         (recpy_gap_getset): New static object.
6416         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
6417         * py-record.h (recpy_gap_new): New export.
6418
6419 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
6420
6421         * python/py-record.c (recpy_ptid): Remove.
6422         (recpy_record_getset): Remove recpy_ptid.
6423
6424 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
6425
6426         * btrace.c (btrace_fetch): Set inferior_ptid.
6427         * python/py-record-btrace.c: Add "py-record.h" include.
6428         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
6429         recpy_bt_end, recpy_bt_instruction_history,
6430         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
6431         in gdb.Record object instead of current ptid.
6432         * python/py-record.c: Include new "py-record.h" file.
6433         (recpy_record_object): Moved to py-record.h.
6434         * python/py-record.h: New file.
6435
6436 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
6437
6438         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
6439         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
6440         indentation.
6441
6442 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
6443
6444         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
6445         the past maintainers section.
6446
6447 2017-04-28  Yao Qi  <yao.qi@linaro.org>
6448
6449         * infcmd.c (get_return_value): Use regcache ctor, and remove
6450         cleanup.
6451
6452 2017-04-28  Yao Qi  <yao.qi@linaro.org>
6453             Pedro Alves  <palves@redhat.com>
6454
6455         * regcache.c (regcache::regcache): New tag dispatch ctor.
6456         (do_cooked_read): Moved above.
6457         (regcache_dup): Use the tag dispatch ctor..
6458         * regcache.h (regcache): Declare ctor, delete copy ctor and
6459         assignment operator, remove friend regcache_dup.
6460
6461 2017-04-28  Yao Qi  <yao.qi@linaro.org>
6462
6463         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
6464         call method save instead of regcache_cpy.
6465         * regcache.h (struct regcache): Make regcache_dup a friend.
6466
6467 2017-04-28  Yao Qi  <yao.qi@linaro.org>
6468
6469         * regcache.c (struct regcache): Move to regcache.h
6470         (regcache::arch): New method.
6471         (regcache_get_ptid): Update.
6472         (get_regcache_arch): Call arch method.
6473         (get_regcache_aspace): Call method aspace.
6474         (register_buffer): Change it to method.
6475         (regcache_save): Change it to regcache::save.
6476         (regcache_restore): Likewise.
6477         (regcache_cpy_no_passthrough): Remove the declaration.
6478         (regcache_cpy): Call methods restore and cpy_no_passthrough.
6479         (regcache_cpy_no_passthrough): Change it to method
6480         cpy_no_passthrough.
6481         (regcache_register_status): Change it to method
6482         get_register_status.
6483         (regcache_invalidate): Change it to method invalidate.
6484         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
6485         (regcache_raw_update): Change it to method raw_update.
6486         (regcache_raw_read): Likewise.
6487         (regcache_raw_read_signed): Likewise.
6488         (regcache_raw_read_unsigned): Likewise.
6489         (regcache_raw_write_signed): Likewise.
6490         (regcache_raw_write_unsigned): Likewise.
6491         (regcache_cooked_read): Likewise.
6492         (regcache_cooked_read_value): Likewise.
6493         (regcache_cooked_read_signed): Likewise.
6494         (regcache_cooked_read_unsigned): Likewise.
6495         (regcache_cooked_write_signed): Likewise.
6496         (regcache_cooked_write_unsigned): Likewise.
6497         (regcache_raw_set_cached_value): Likewise.
6498         (regcache_raw_write): Likewise.
6499         (regcache_cooked_write): Likewise.
6500         (regcache_xfer_part): Likewise.
6501         (regcache_raw_read_part): Likewise.
6502         (regcache_raw_write_part): Likewise.
6503         (regcache_cooked_read_part): Likewise.
6504         (regcache_cooked_write_part): Likewise.
6505         (regcache_raw_supply): Likewise.
6506         (regcache_raw_collect): Likewise.
6507         (regcache_transfer_regset): Likewise.
6508         (regcache_supply_regset): Likewise.
6509         (regcache_collect_regset): Likewise.
6510         (regcache_debug_print_register): Likewise.
6511         (enum regcache_dump_what): Move it to regcache.h.
6512         (regcache_dump): Change it to method dump.
6513         * regcache.h (enum regcache_dump_what): New.
6514         (class regcache): New.
6515         * target.c (target_fetch_registers): Call method
6516         debug_print_register.
6517         (target_store_registers): Likewise.
6518
6519 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
6520
6521         * windows-nat.c (struct lm_info_windows): Initialize field.
6522         (windows_make_so): Allocate lm_info_windows with new.
6523         (windows_free_so): Free lm_info_windows with delete.
6524
6525 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
6526
6527         * solib-darwin.c (struct lm_info_darwin): Initialize field.
6528         (darwin_current_sos): Allocate lm_info_darwin with new, remove
6529         cleanup.
6530         (darwin_free_so): Free lm_info_darwin with delete.
6531
6532 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
6533
6534         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
6535         <l_addr_p>: Change type to bool.
6536         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
6537         (svr4_free_so): Free lm_info_svr4 with delete.
6538         (svr4_copy_library_list): Replace memcpy with call to copy
6539         constructor.
6540         (library_list_start_library, svr4_default_sos): Allocate
6541         lm_info_svr4 with new.
6542
6543 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
6544
6545         * solib-target.c (struct lm_info_target): Add destructor,
6546         initialize fields.
6547         <name>: Change type to std::string.
6548         (library_list_start_library): Allocate lm_info_target with new.
6549         (solib_target_free_library_list): Free lm_info_target with
6550         delete.
6551         (solib_target_current_sos): Adapt to std::string.
6552         (solib_target_free_so): Free lm_info_target with delete.
6553
6554 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
6555
6556         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
6557         fields.
6558         (frv_current_sos): Allocate lm_info_frv with new.
6559         (frv_relocate_main_executable): Free lm_info_frv with delete,
6560         allocate with new.
6561         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
6562
6563 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
6564
6565         * solib-frv.c (struct lm_info_frv): Fix indentation.
6566
6567 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
6568
6569         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
6570         map field.
6571         (dsbt_current_sos): Allocate lm_info_dsbt with new.
6572         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
6573         and allocate with new.
6574         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
6575
6576 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
6577
6578         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
6579         <filename, member_name>: Change type to std::string.
6580         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
6581         (library_list_start_library): Allocate lm_info_aix with new.
6582         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
6583         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
6584         with copy constructor.
6585
6586 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
6587
6588         * solist.h (struct lm_info): Remove.
6589         (struct lm_info_base): New class.
6590         (struct so_list) <lm_info>: Change type to lm_info_base *.
6591         * nto-tdep.c (struct lm_info): Remove.
6592         (lm_addr): Adjust.
6593         * solib-aix.c (struct lm_info): Rename to ...
6594         (struct lm_info_aix): ... this.  Extend lm_info_base.
6595         (lm_info_p): Rename to ...
6596         (lm_info_aix_p): ... this, and adjust.
6597         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
6598         solib_aix_parse_libraries, library_list_start_library,
6599         solib_aix_free_library_list, solib_aix_parse_libraries,
6600         solib_aix_get_library_list,
6601         solib_aix_relocate_section_addresses, solib_aix_free_so,
6602         solib_aix_get_section_offsets,
6603         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
6604         Adjust.
6605         (struct solib_aix_inferior_data) <library_list>: Adjust.
6606         * solib-darwin.c (struct lm_info): Rename to ...
6607         (struct lm_info_darwin): ... this.  Extend lm_info_base.
6608         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
6609         * solib-dsbt.c (struct lm_info): Rename to ...
6610         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
6611         (struct dsbt_info) <main_executable_lm_info): Adjust.
6612         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
6613         dsbt_relocate_section_addresses): Adjust.
6614         * solib-frv.c (struct lm_info): Rename to ...
6615         (struct lm_info_frv): ... this.  Extend lm_info_base.
6616         (main_executable_lm_info): Adjust.
6617         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
6618         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
6619         find_canonical_descriptor_in_load_object,
6620         frv_fdpic_find_canonical_descriptor): Adjust.
6621         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
6622         to lm_info_svr4.
6623         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
6624         svr4_clear_so, svr4_copy_library_list,
6625         library_list_start_library, svr4_default_sos, svr4_read_so_list,
6626         svr4_current_sos, svr4_fetch_objfile_link_map,
6627         solist_update_incremental): Adjust.
6628         * solib-svr4.h (struct lm_info_svr4): Move here from
6629         solib-svr4.c.
6630         * solib-target.c (struct lm_info): Rename to ...
6631         (struct lm_info_target): ... this.  Extend lm_info_base.
6632         (lm_info_p): Rename to ...
6633         (lm_info_target_p): ... this.
6634         (solib_target_parse_libraries, library_list_start_segment,
6635         library_list_start_section, library_list_start_library,
6636         library_list_end_library, solib_target_free_library_list,
6637         solib_target_current_sos, solib_target_free_so,
6638         solib_target_relocate_section_addresses): Adjust.
6639         * windows-nat.c (struct lm_info): Rename to ...
6640         (struct lm_info_windows): ... this.  Extend lm_info_base.
6641         (windows_make_so, handle_load_dll, handle_unload_dll,
6642         windows_xfer_shared_libraries): Adjust.
6643
6644 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
6645
6646         * solib-darwin.c (struct darwin_so_list): Remove.
6647         (darwin_current_sos): Allocate an so_list object instead of a
6648         darwin_so_list, separately allocate an lm_info object.
6649         (darwin_free_so): Free lm_info.
6650
6651 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
6652
6653         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
6654         with fprintf_filtered.
6655
6656 2017-04-28  Yao Qi  <yao.qi@linaro.org>
6657
6658         * regcache.c (regcache::regcache): New function.
6659         (regcache::~regcache): New function.
6660         (regcache_xmalloc_1): Remove.
6661         (regcache_xmalloc): Call new regcache.
6662         (regcache_xfree): Call delete regcache.
6663         (get_thread_arch_aspace_regcache): Call new regcache.
6664
6665 2017-04-28  Yao Qi  <yao.qi@linaro.org>
6666
6667         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
6668         lwp instead of ptid_get_lwp.
6669
6670 2017-04-28  Yao Qi  <yao.qi@linaro.org>
6671
6672         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
6673         lwp_info instead of getting from inferior_ptid.
6674
6675 2017-04-27  Keith Seitz  <keiths@redhat.com>
6676
6677         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
6678         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
6679         (CV_CONVERSION_BADNESS): Define.
6680         (rank_one_type): Remove overly restrictive rvalue reference
6681         rank checks.
6682         Add cv-qualifier checks and subranks for type equality.
6683         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
6684         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
6685         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
6686
6687 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
6688
6689         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
6690         count when creating the object.
6691
6692 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
6693             Ulrich Weigand  <uweigand@de.ibm.com>
6694
6695         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
6696         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
6697         is used in AIX.
6698         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
6699         (process_xcoff_symbol): Likewise.
6700         (scan_xcoff_symtab): Likewise.
6701
6702 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
6703
6704         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
6705         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
6706         (ia64_access_reg): Use get_frame_register_unsigned.
6707         (ia64_access_rse_reg): Likewise.
6708         (ia64_libunwind_frame_prev_register): Likewise.
6709
6710 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
6711
6712         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
6713         * gdbarch.c: Regenerated.
6714         * gdbarch.h: Regenerated.
6715         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
6716         visibility external.
6717         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
6718         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
6719         (enum cfa_how_kind): Move to ...
6720         (struct dwarf2_frame_state_reg_info): Likewise.
6721         (struct dwarf2_frame_state): Likewise.
6722         * dwarf2-frame.h: ... here.
6723         (dwarf2_frame_state_alloc_regs): New declaration.
6724         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
6725         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
6726
6727 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
6728
6729         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
6730         regcache_raw_read_unsigned.
6731         (xtensa_pseudo_register_write): Likewise.
6732
6733 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
6734
6735         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
6736         (nds32_pseudo_register_write): Likewise.
6737
6738 2017-04-25  Yao Qi  <yao.qi@linaro.org>
6739
6740         * regcache.c (struct regcache) <readonly_p>: Change its type
6741         to bool.
6742         (regcache_xmalloc_1): Update parameter type and callers update.
6743
6744 2017-04-25  Yao Qi  <yao.qi@linaro.org>
6745
6746         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
6747         set_gdbarch_wchar_bit.
6748         * arm-tdep.c (arm_gdbarch_init): Likewise.
6749
6750 2017-04-25  Pedro Alves  <palves@redhat.com>
6751
6752         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
6753         (BothAreRelocatable, memcopy, memmove): Don't define.
6754         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
6755         macros.
6756
6757 2017-04-25  Pedro Alves  <palves@redhat.com>
6758
6759         * common/common-defs.h: Include "common/poison.h".
6760         * common/function-view.h: (Not, Or, Requires): Move to traits.h
6761         and adjust.
6762         * common/poison.h: New file.
6763         * common/traits.h: Include <type_traits>.
6764         (Not, Or, Requires): New, moved from common/function-view.h.
6765
6766 2017-04-25  Pedro Alves  <palves@redhat.com>
6767
6768         * breakpoint.h (struct breakpoint): In-class initialize all
6769         fields.  Make boolean fields "bool".
6770         * breakpoint.c (init_raw_breakpoint_without_location): Remove
6771         memset call and initializations no longer necessary.
6772
6773 2017-04-25  Pedro Alves  <palves@redhat.com>
6774
6775         * btrace.c (pt_btrace_insn_flags): Change parameter type to
6776         reference.
6777         (pt_btrace_insn): New function.
6778         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
6779
6780 2017-04-25  Pedro Alves  <palves@redhat.com>
6781
6782         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
6783         "base" field and inherit from "bp_location" instead.  Add
6784         non-default ctor.
6785         (allocate_location_exception): Use new non-default ctor.
6786         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
6787         (init_bp_location): Convert to ...
6788         (bp_location::bp_location): ... this new ctor, and remove memset
6789         call.
6790         (base_breakpoint_allocate_location): Use the new non-default ctor.
6791         * breakpoint.h (bp_location): Now a class.  Declare default and
6792         non-default ctors.  In-class initialize all members.
6793         (init_bp_location): Remove declaration.
6794
6795 2017-04-25  Pedro Alves  <palves@redhat.com>
6796
6797         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
6798         assignment operator.
6799
6800 2017-04-24  Yao Qi  <yao.qi@linaro.org>
6801
6802         * doublest.c (convert_doublest_to_floatformat): Call
6803         floatformat_totalsize_bytes.
6804
6805 2017-04-22  Tom Tromey  <tom@tromey.com>
6806
6807         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
6808         ui_out_emit_list.
6809         * stack.c (print_frame): Use ui_out_emit_list.
6810         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6811         ui_out_emit_list.
6812         * mi/mi-main.c (print_one_inferior)
6813         (mi_cmd_data_list_register_names)
6814         (mi_cmd_data_list_register_values, mi_cmd_list_features)
6815         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
6816         ui_out_emit_list.
6817         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
6818         (mi_output_solib_attribs): Use ui_out_emit_list,
6819         ui_out_emit_tuple.
6820         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
6821         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
6822         (mi_cmd_stack_list_args, list_args_or_locals): Use
6823         ui_out_emit_list.
6824         * disasm.c (do_assembly_only): Use ui_out_emit_list.
6825         * breakpoint.c (print_solib_event, output_thread_groups): Use
6826         ui_out_emit_list.
6827
6828 2017-04-22  Tom Tromey  <tom@tromey.com>
6829
6830         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
6831         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
6832         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
6833
6834 2017-04-22  Tom Tromey  <tom@tromey.com>
6835
6836         * tracepoint.c (tvariables_info_1)
6837         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
6838
6839 2017-04-22  Tom Tromey  <tom@tromey.com>
6840
6841         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
6842         annotate_arg_emitter.
6843         * breakpoint.c (print_mention_watchpoint)
6844         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
6845         * annotate.h (struct annotate_arg_emitter): New.
6846
6847 2017-04-22  Tom Tromey  <tom@tromey.com>
6848
6849         * record-btrace.c (record_btrace_insn_history)
6850         (record_btrace_insn_history_range, record_btrace_call_history)
6851         (record_btrace_call_history_range): Use ui_out_emit_tuple.
6852         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
6853         ui_out_emit_tuple.
6854         * stack.c (print_frame_info): Use ui_out_emit_tuple.
6855         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
6856         * skip.c (skip_info): Use ui_out_emit_tuple.
6857         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
6858         * progspace.c (print_program_space): Use ui_out_emit_tuple.
6859         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
6860         * osdata.c (info_osdata): Use ui_out_emit_tuple.
6861         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
6862         ui_out_emit_tuple.
6863         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
6864         (output_register, mi_cmd_data_read_memory)
6865         (mi_cmd_data_read_memory_bytes, mi_load_progress)
6866         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
6867         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
6868         Use ui_out_emit_tuple.
6869         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
6870         ui_out_emit_tuple.
6871         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
6872         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
6873         * linux-thread-db.c (info_auto_load_libthread_db): Use
6874         ui_out_emit_tuple.
6875         * inferior.c (print_inferior): Use ui_out_emit_tuple.
6876         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
6877         * disasm.c (do_mixed_source_and_assembly_deprecated)
6878         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
6879         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
6880         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
6881         * breakpoint.c (print_one_breakpoint_location)
6882         (print_one_breakpoint): Use ui_out_emit_tuple.
6883         * auto-load.c (print_script, info_auto_load_cmd): Use
6884         ui_out_emit_tuple.
6885         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
6886
6887 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
6888
6889         * thread.c (print_thread_info_1): Remove dead code.
6890
6891 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
6892
6893         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
6894         GDB_SELF_TEST.
6895         * arm-tdep.c (selftests::arm_record_test): Likewise.
6896
6897 2017-04-21  Yao Qi  <yao.qi@linaro.org>
6898
6899         * regcache.c (regcache_restore): Remove argument 2.  Replace
6900         argument 3 with regcache.  Get register status from
6901         src->register_status and get register contents from
6902         register_buffer (src, regnum).
6903         (regcache_cpy): Update.
6904
6905 2017-04-19  Pedro Alves  <palves@redhat.com>
6906
6907         * gdbthread.h (thread): Add missing closing parenthesis in
6908         comment.
6909
6910 2017-04-19  Pedro Alves  <palves@redhat.com>
6911
6912         * common/refcounted-object.h: New file.
6913         * gdbthread.h: Include "common/refcounted-object.h".
6914         (thread_info): Inherit from refcounted_object and add comments.
6915         (thread_info::incref, thread_info::decref)
6916         (thread_info::m_refcount): Delete.
6917         (thread_info::deletable): Use the refcounted_object::refcount()
6918         method.
6919         * inferior.c (current_inferior_): Add comment.
6920         (set_current_inferior): Increment/decrement refcounts.
6921         (prune_inferiors, remove_inferior_command): Skip inferiors marked
6922         not-deletable instead of comparing with the current inferior.
6923         (initialize_inferiors): Increment the initial inferior's refcount.
6924         * inferior.h (struct inferior): Forward declare.
6925         Include "common/refcounted-object.h".
6926         (current_inferior, set_current_inferior): Move declaration to
6927         before struct inferior's definition, and fix comment.
6928         (inferior): Inherit from refcounted_object.  Add comments.
6929         * thread.c (switch_to_thread_no_regs): Reference the thread's
6930         inferior pointer directly instead of doing a ptid lookup.
6931         (switch_to_no_thread): New function.
6932         (switch_to_thread(thread_info *)): New function, factored out
6933         from ...
6934         (switch_to_thread(ptid_t)): ... this.
6935         (restore_current_thread): Delete.
6936         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
6937         fields, and add 'inf' field.
6938         (do_restore_current_thread_cleanup): Check whether old->inf is
6939         alive instead of looking up an inferior by ptid.  Use
6940         switch_to_thread and switch_to_no_thread.
6941         (restore_current_thread_cleanup_dtor): Use old->inf directly
6942         instead of lookup up an inferior by id.  Decref the inferior.
6943         Don't restore 'removable'.
6944         (make_cleanup_restore_current_thread): Same the inferior pointer
6945         in old, instead of the inferior number.  Incref the inferior.
6946         Don't save/clear 'removable'.
6947
6948 2017-04-19  Pedro Alves  <palves@redhat.com>
6949
6950         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6951         unittests/scoped_restore-selftests.c.
6952         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
6953         * common/scoped_restore.h (scoped_restore_base): Make "class".
6954         (scoped_restore_base::release): New public method.
6955         (scoped_restore_base::scoped_restore_base): New protected ctor.
6956         (scoped_restore_base::m_saved_var): New protected field.
6957         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
6958         scoped_restore_base base class instead of m_saved_var directly.
6959         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
6960         (scoped_restore_tmpl::scoped_restore_tmpl(const
6961         scoped_restore_tmpl<T>&)): Likewise.
6962         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
6963         method.
6964         (scoped_restore_tmpl::saved_var): New method.
6965         (scoped_restore_tmpl::m_saved_var): Delete.
6966         * inferior.h (inferior::detaching): Now a bool.
6967         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
6968         cleanup.
6969         * unittests/scoped_restore-selftests.c: New file.
6970
6971 2017-04-19  Pedro Alves  <palves@redhat.com>
6972
6973         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
6974         Re-sort in alphabetic order.
6975
6976 2017-04-18  Pedro Alves  <palves@redhat.com>
6977
6978         * xml-support.c (obstack_xml_printf): Delete.
6979         * xml-support.h (obstack_xml_printf): Delete.
6980
6981 2017-04-18  Pedro Alves  <palves@redhat.com>
6982
6983         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
6984         vdebug, verror, body_text, start_element, end_element, name,
6985         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
6986         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
6987         is_xinclude>: Make private and add m_ prefix.
6988         (gdb_xml_parser::body_text): New method, based on ...
6989         (gdb_xml_body_text): ... this.  Adjust.
6990         (gdb_xml_parser::vdebug): New method, based on ...
6991         (gdb_xml_debug): ... this.  Adjust.
6992         (gdb_xml_parser::verror): New method, based on ...
6993         (gdb_xml_error): ... this.  Adjust.
6994         (gdb_xml_parser::start_element): New method, based on ...
6995         (gdb_xml_start_element): ... this.  Adjust.
6996         (gdb_xml_start_element_wrapper): Defer to
6997         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
6998         (gdb_xml_parser::end_element): New method, based on ...
6999         (gdb_xml_end_element_wrapper): ... this.  Adjust.
7000         (gdb_xml_parser::~gdb_xml_parser): Adjust.
7001         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
7002         (gdb_xml_parser::use_dtd): New method, based on ...
7003         (gdb_xml_use_dtd): ... this.  Adjust.
7004         (gdb_xml_parser::parse): New method, based on ...
7005         (gdb_xml_parse): ... this.  Adjust.
7006         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
7007         (xinclude_start_include): Adjust to call the parser's name method.
7008         (xml_xinclude_default, xml_xinclude_start_doctype)
7009         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
7010         method.
7011         (xml_process_xincludes): Adjust to call parser methods.
7012         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
7013         declarations.
7014
7015 2017-04-18  Pedro Alves  <palves@redhat.com>
7016
7017         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
7018         gdb::optional<std::string>.
7019         * xml-support.c: Include <string>.
7020         (scope_level::scope_level(scope_level &&))
7021         (scope_level::~scope_level): Delete.
7022         (scope_level::body): Now a std::string.
7023         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
7024         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
7025         parameter.
7026         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
7027         (xinclude_parsing_data::output): Now a std::string reference.
7028         (xinclude_start_include): Adjust.
7029         (xml_xinclude_default): Adjust.
7030         (xml_process_xincludes): Add 'output' parameter, and return bool.
7031         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
7032         and return bool.
7033         * xml-tdesc.c: Include <unordered_map> and <string>.
7034         (tdesc_xml_cache): Delete.
7035         (tdesc_xml_cache_s): Delete.
7036         (xml_cache): Now an std::unordered_map.
7037         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
7038         (target_fetch_description_xml): Change return type to
7039         gdb::optional<std::string>, and adjust.
7040         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
7041         (target_fetch_description_xml): Change return type to
7042         gdb::optional<std::string>.
7043
7044 2017-04-18  Pedro Alves  <palves@redhat.com>
7045
7046         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7047         unittests/optional-selftests.c.
7048         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
7049         * unittests/optional-selftests.c: New file.
7050         * unittests/optional/assignment/1.cc: New file.
7051         * unittests/optional/assignment/2.cc: New file.
7052         * unittests/optional/assignment/3.cc: New file.
7053         * unittests/optional/assignment/4.cc: New file.
7054         * unittests/optional/assignment/5.cc: New file.
7055         * unittests/optional/assignment/6.cc: New file.
7056         * unittests/optional/assignment/7.cc: New file.
7057         * unittests/optional/cons/copy.cc: New file.
7058         * unittests/optional/cons/default.cc: New file.
7059         * unittests/optional/cons/move.cc: New file.
7060         * unittests/optional/cons/value.cc: New file.
7061         * unittests/optional/in_place.cc: New file.
7062         * unittests/optional/observers/1.cc: New file.
7063         * unittests/optional/observers/2.cc: New file.
7064
7065 2017-04-18  Pedro Alves  <palves@redhat.com>
7066
7067         * common/gdb_optional.h: Include common/traits.h.
7068         (in_place_t): New type.
7069         (in_place): New constexpr variable.
7070         (optional::optional): Remove member initialization of
7071         m_instantiated.
7072         (optional::optional(in_place_t...)): New constructor.
7073         (optional::~optional): Use reset.
7074         (optional::optional(const optional&)): New.
7075         (optional::optional(const optional&&)): New.
7076         (optional::optional(T &)): New.
7077         (optional::optional(T &&)): New.
7078         (operator::operator=(const optional &)): New.
7079         (operator::operator=(optional &&)): New.
7080         (operator::operator= (const T &))
7081         (operator::operator= (T &&))
7082         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
7083         (operator::reset): New.
7084         (operator::m_instantiated):: Add in-class initializer.
7085         * common/traits.h: Include <type_traits>.
7086         (struct And): New types.
7087
7088 2017-04-18  Pedro Alves  <palves@redhat.com>
7089
7090         * xml-support.c: Include <vector>.
7091         (scope_level::scope_level(const gdb_xml_element *))
7092         (scope_level::scope_level(scope_level&&)): New.
7093         (scope_level::~scope_level): New.
7094         (scope_level_s): Delete.
7095         (gdb_xml_parser::scopes): Now a std::vector.
7096         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
7097         Use std::vector.
7098         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
7099         scope cleanup code.
7100         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
7101         of the scopes member.  Use std::vector::emplace_back.
7102
7103 2017-04-18  Pedro Alves  <palves@redhat.com>
7104
7105         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
7106         a bool.
7107         (gdb_xml_end_element): Change type of first parameter.
7108         (gdb_xml_cleanup): Rename to ...
7109         (gdb_xml_parser::~gdb_xml_parser): ... this.
7110         (gdb_xml_create_parser_and_cleanup): Delete with ...
7111         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
7112         to this new ctor.
7113         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
7114         using gdb_xml_create_parser_and_cleanup.
7115         (xinclude_parsing_data): Add ctor/dtor.
7116         (xml_xinclude_cleanup): Delete.
7117         (xml_process_xincludes): Create a local xinclude_parsing_data
7118         instead of heap-allocating one.  Create a local gdb_xml_parser
7119         instead of heap-allocating one with
7120         gdb_xml_create_parser_and_cleanup.
7121
7122 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
7123
7124         PR threads/20743
7125         * fbsd-nat.c (resume_one_thread_cb): Remove.
7126         (resume_all_threads_cb): Remove.
7127         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
7128         iterate_over_threads.
7129
7130 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
7131
7132         * NEWS: Create a new section for the next release branch.
7133         Rename the section of the current branch, now that it has
7134         been cut.
7135
7136 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
7137
7138         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
7139         * version.in: Bump version to 8.0.50.DATE-git.
7140
7141 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
7142
7143         PR gdb/21385
7144         * windows-nat.c (windows_create_inferior): Declare 'allargs'
7145         independently of the host, and fix build breakage on Cygwin.
7146
7147 2017-04-13  Pedro Alves  <palves@redhat.com>
7148
7149         * inferior.c (free_inferior): Convert to ...
7150         (inferior::~inferior): ... this dtor.
7151         (inferior::inferior): New ctor, factored out from ...
7152         (add_inferior_silent): ... here.  Allocate the inferior with a new
7153         expression.
7154         (delete_inferior): Call delete instead of free_inferior.
7155         * inferior.h (gdb_environ, continuation): Forward declare.
7156         (inferior): Now a class.  Add in-class initialization to all
7157         members.  Make boolean fields bool, except 'detaching'.
7158         (inferior::inferior): New explicit ctor.
7159         (inferior::~inferior): New.
7160
7161 2017-04-13  Pedro Alves  <palves@redhat.com>
7162
7163         * inferior.c (init_inferior_list): Delete.
7164         * inferior.h (init_inferior_list): Delete.
7165
7166 2017-04-13  Pedro Alves  <palves@redhat.com>
7167
7168         PR threads/13217
7169         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
7170         (top level): Call it twice, with different thread sets.
7171
7172 2017-04-13  Pedro Alves  <palves@redhat.com>
7173
7174         * thread.c: Include <algorithm>.
7175         (thread_array_cleanup): Delete.
7176         (scoped_inc_dec_ref): New class.
7177         (live_threads_count): New function.
7178         (set_thread_refcount): Delete.
7179         (tp_array_compar_ascending): Now a bool.
7180         (tp_array_compar): Convert to a std::sort comparison function.
7181         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
7182         and live_threads_count.
7183
7184 2017-04-13  Pedro Alves  <palves@redhat.com>
7185
7186         * infrun.c (follow_fork_inferior): Also switch the current
7187         inferior.
7188
7189 2017-04-13  Pedro Alves  <palves@redhat.com>
7190
7191         * breakpoint.c (watch_command_1): Save watchpoint-frame info
7192         before calling create_internal_breakpoint.
7193
7194 2017-04-13  Pedro Alves  <palves@redhat.com>
7195
7196         * fork-child.c (execv_argv): New class.
7197         (breakup_args): Refactored as ...
7198         (execv_argv::init_for_no_shell): .. this method of execv_argv.
7199         Copy arguments to storage and replace separators with NULL
7200         terminators in place.
7201         (escape_bang_in_quoted_argument): Adjust to return bool.
7202         (execv_argv::execv_argv): New ctor.
7203         (execv_argv::init_for_shell): New method, factored out from
7204         fork_inferior.  Don't strdup strings into the vector.
7205         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
7206         Remove free_vector_argv call.
7207
7208 2017-04-13  Yao Qi  <yao.qi@linaro.org>
7209
7210         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
7211         tdep->rx_psw_type.
7212
7213 2017-04-13  Yao Qi  <yao.qi@linaro.org>
7214
7215         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
7216         * rx-tdep.c (rx_gdbarch_init): Likewise.
7217
7218 2017-04-13  Pedro Alves  <palves@redhat.com>
7219
7220         * breakpoint.h (struct breakpoint): Reindent.
7221
7222 2017-04-13  Pedro Alves  <palves@redhat.com>
7223
7224         * breakpoint.c (bp_location): Rename to ...
7225         (bp_locations): ... this.  All references updated.
7226         (bp_location_count): Rename to ...
7227         (bp_locations_count): ... this.  All references updated.
7228         (bp_location_placed_address_before_address_max): Rename to ...
7229         (bp_locations_placed_address_before_address_max): ... this.  All
7230         references updated.
7231         (bp_location_shadow_len_after_address_max): Rename to ...
7232         (bp_locations_shadow_len_after_address_max): ... this.  All
7233         references updated.
7234         (bp_location_compare_addrs): Rename to ...
7235         (bp_locations_compare_addrs): ... this.  All references updated.
7236         (bp_location_compare):Rename to ...
7237         (bp_locations_compare): ... this.  All references updated.
7238         (bp_location_target_extensions_update): Rename to ...
7239         (bp_locations_target_extensions_update): ... this.  All references
7240         updated.
7241
7242 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
7243
7244         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
7245         * common/common.m4: Check headers 'termios.h', 'termio.h' and
7246         'sgtty.h'.
7247         * common/gdb_termios.h: New file, with parts of "terminal.h".
7248         * inflow.c: Include "gdb_termios.h".
7249         * ser-unix.c: Include "gdb_termios.h".
7250         * terminal.h: Move terminal-related defines to
7251         "common/gdb_termios.h".
7252
7253 2017-04-12  Tom Tromey  <tom@tromey.com>
7254
7255         * probe.c (parse_probes): Update.
7256         * location.h (delete_event_location): Don't declare.
7257         (event_location_deleter::operator()): Update.
7258         * location.c (event_location_deleter::operator()): Rename from
7259         delete_event_location.
7260         * linespec.h (linespec_result) <location>: Change type to
7261         event_location_up.
7262         * linespec.c (canonicalize_linespec, event_location_to_sals)
7263         (decode_objc): Update.
7264         (linespec_result): Don't call delete_event_location.
7265         * breakpoint.c (create_breakpoints_sal)
7266         (bkpt_probe_create_sals_from_location)
7267         (strace_marker_create_sals_from_location): Update.
7268
7269 2017-04-12  Tom Tromey  <tom@tromey.com>
7270
7271         * linespec.h (struct linespec_result): Add constructor and
7272         destructor.
7273         (init_linespec_result, destroy_linespec_result)
7274         (make_cleanup_destroy_linespec_result): Don't declare.
7275         * linespec.c (init_linespec_result): Remove.
7276         (linespec_result::~linespec_result): Rename from
7277         destroy_linespec_result.  Update.
7278         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
7279         Remove.
7280         * breakpoint.c (create_breakpoint, break_range_command)
7281         (decode_location_default): Update.
7282         * ax-gdb.c (agent_command_1): Update.
7283
7284 2017-04-12  Tom Tromey  <tom@tromey.com>
7285
7286         * remote.c (remote_download_tracepoint): Update.
7287         * python/py-breakpoint.c (bppy_get_location): Update.
7288         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
7289         (gdbscm_breakpoint_location): Update.
7290         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
7291         * breakpoint.h (struct breakpoint) <location, location_range_end>:
7292         Change type to event_location_up.
7293         * breakpoint.c (create_overlay_event_breakpoint)
7294         (create_longjmp_master_breakpoint)
7295         (create_std_terminate_master_breakpoint)
7296         (create_exception_master_breakpoint)
7297         (breakpoint_event_location_empty_p, print_breakpoint_location)
7298         (print_one_breakpoint_location, create_thread_event_breakpoint)
7299         (init_breakpoint_sal, create_breakpoint)
7300         (print_recreate_ranged_breakpoint, break_range_command)
7301         (init_ada_exception_breakpoint, say_where): Update.
7302         (base_breakpoint_dtor): Don't call delete_event_location.
7303         (bkpt_print_recreate, tracepoint_print_recreate)
7304         (dprintf_print_recreate, update_static_tracepoint)
7305         (breakpoint_re_set_default): Update.
7306
7307 2017-04-12  Tom Tromey  <tom@tromey.com>
7308
7309         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
7310         type of "to_do".  Update.
7311         (compute_stack_depth): Use std::vector.
7312
7313 2017-04-12  Tom Tromey  <tom@tromey.com>
7314
7315         * printcmd.c (find_instruction_backward): Use std::vector.
7316
7317 2017-04-12  Tom Tromey  <tom@tromey.com>
7318
7319         * symfile.c (objfilep): Remove typedef.
7320         (reread_symbols): Use a std::vector.
7321
7322 2017-04-12  Tom Tromey  <tom@tromey.com>
7323
7324         * mi/mi-main.c (exec_direction_forward): Remove.
7325         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
7326         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7327         scoped_restore.
7328         * guile/guile.c (guile_repl_command, guile_command)
7329         (gdbscm_execute_gdb_command): Use scoped_restore.
7330         * go-exp.y (go_parse): Use scoped_restore.
7331         * d-exp.y (d_parse): Use scoped_restore.
7332         * cli/cli-decode.c (cmd_func): Use scoped_restore.
7333         * c-exp.y (c_parse): Use scoped_restore.
7334
7335 2017-04-12  Tom Tromey  <tom@tromey.com>
7336
7337         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
7338         (mi_parse): Update return type.
7339         (mi_parse_free): Remove.
7340         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
7341         (mi_parse::~mi_parse): Rename from mi_parse_free.
7342         (mi_parse_cleanup): Remove.
7343         (mi_parse): Return a unique_ptr.  Use new.
7344         * mi/mi-main.c (mi_execute_command): Update.
7345
7346 2017-04-12  Tom Tromey  <tom@tromey.com>
7347
7348         * location.c (explicit_location_lex_one): Return a
7349         unique_xmalloc_ptr.
7350         (string_to_explicit_location): Update.  Remove cleanups.
7351
7352 2017-04-12  Tom Tromey  <tom@tromey.com>
7353
7354         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
7355         (compare_value_and_voffset): Change type.  Update.
7356         (compute_vtable_size): Change type of "offset_vec".
7357         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
7358         (gnuv3_get_typeid): Remove extraneous declaration.
7359
7360 2017-04-12  Tom Tromey  <tom@tromey.com>
7361
7362         * charset.h (wchar_iterator): Fix comment.
7363
7364 2017-04-12  Tom Tromey  <tom@tromey.com>
7365
7366         * charset.c (iconv_wrapper): New class.
7367         (cleanup_iconv): Remove.
7368         (convert_between_encodings): Use it.
7369
7370 2017-04-12  Tom Tromey  <tom@tromey.com>
7371
7372         * symfile.h (increment_reading_symtab): Update type.
7373         * symfile.c (decrement_reading_symtab): Remove.
7374         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
7375         * psymtab.c (psymtab_to_symtab): Update.
7376         * dwarf2read.c (dw2_instantiate_symtab): Update.
7377
7378 2017-04-12  Tom Tromey  <tom@tromey.com>
7379
7380         * jit.c (struct jit_reader): Declare separately.  Add constructor
7381         and destructor.  Change type of "handle".
7382         (loaded_jit_reader): Define separately.
7383         (jit_reader_load): Update.  New "new".
7384         (jit_reader_unload_command): Use "delete".
7385         * gdb-dlfcn.h (struct dlclose_deleter): New.
7386         (gdb_dlhandle_up): New typedef.
7387         (gdb_dlopen, gdb_dlsym): Update types.
7388         (gdb_dlclose): Remove.
7389         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
7390         (gdb_dlsym): Change type of "handle".
7391         (make_cleanup_dlclose): Remove.
7392         (dlclose_deleter::operator()): Rename from gdb_dlclose.
7393         * compile/compile-c-support.c (load_libcc): Update.
7394
7395 2017-04-12  Tom Tromey  <tom@tromey.com>
7396
7397         * symtab.h (find_pcs_for_symtab_line): Change return type.
7398         * symtab.c (find_pcs_for_symtab_line): Change return type.
7399         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
7400         type of "vec".  Update.
7401         (ltpy_get_pcs_for_line): Update.
7402         * linespec.c (decode_digits_ordinary): Update.
7403
7404 2017-04-12  Tom Tromey  <tom@tromey.com>
7405
7406         * tracepoint.c (actions_command): Update.
7407         * python/python.c (python_command, python_interactive_command):
7408         Update.
7409         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7410         * guile/guile.c (guile_command): Update.
7411         * defs.h (read_command_lines, read_command_lines_1): Return
7412         command_line_up.
7413         (command_lines_deleter): New struct.
7414         (command_line_up): New typedef.
7415         * compile/compile.c (compile_code_command)
7416         (compile_print_command): Update.
7417         * cli/cli-script.h (get_command_line, copy_command_lines): Return
7418         command_line_up.
7419         (make_cleanup_free_command_lines): Remove.
7420         * cli/cli-script.c (get_command_line, read_command_lines_1)
7421         (copy_command_lines): Return command_line_up.
7422         (while_command, if_command, read_command_lines, define_command)
7423         (document_command): Update.
7424         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
7425         Remove.
7426         * breakpoint.h (breakpoint_set_commands): Change type of
7427         "commands".
7428         * breakpoint.c (breakpoint_set_commands): Change type of
7429         "commands".  Update.
7430         (do_map_commands_command, update_dprintf_command_list)
7431         (create_tracepoint_from_upload): Update.
7432
7433 2017-04-12  Tom Tromey  <tom@tromey.com>
7434
7435         * tracepoint.c (scope_info): Update.
7436         * spu-tdep.c (spu_catch_start): Update.
7437         * python/python.c (gdbpy_decode_line): Update.
7438         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
7439         * python/py-breakpoint.c (bppy_init): Update.
7440         * probe.c (parse_probes): Update.
7441         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
7442         * location.h (event_location_deleter): New struct.
7443         (event_location_up): New typedef.
7444         (new_linespec_location, new_address_location, new_probe_location)
7445         (new_explicit_location, copy_event_location)
7446         (string_to_event_location, string_to_event_location_basic)
7447         (string_to_explicit_location): Update return type.
7448         (make_cleanup_delete_event_location): Remove.
7449         * location.c (new_linespec_location, new_address_location)
7450         (new_probe_location, new_explicit_location, copy_event_location):
7451         Return event_location_up.
7452         (delete_event_location_cleanup)
7453         (make_cleanup_delete_event_location): Remove.
7454         (string_to_explicit_location, string_to_event_location_basic)
7455         (string_to_event_location): Return event_location_up.
7456         * linespec.c (canonicalize_linespec, event_location_to_sals)
7457         (decode_line_with_current_source)
7458         (decode_line_with_last_displayed, decode_objc): Update.
7459         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
7460         * completer.c (location_completer): Update.
7461         * cli/cli-cmds.c (edit_command, list_command): Update.
7462         * breakpoint.c (create_overlay_event_breakpoint)
7463         (create_longjmp_master_breakpoint)
7464         (create_std_terminate_master_breakpoint)
7465         (create_exception_master_breakpoint)
7466         (create_thread_event_breakpoint): Update.
7467         (init_breakpoint_sal): Update.  Remove some dead code.
7468         (create_breakpoint_sal): Change type of "location".  Update.
7469         (create_breakpoints_sal, create_breakpoint, break_command_1)
7470         (dprintf_command, break_range_command, until_break_command)
7471         (init_ada_exception_breakpoint)
7472         (strace_marker_create_sals_from_location)
7473         (update_static_tracepoint, trace_command, ftrace_command)
7474         (strace_command, create_tracepoint_from_upload): Update.
7475         * break-catch-throw.c (re_set_exception_catchpoint): Update.
7476         * ax-gdb.c (agent_command_1): Update.
7477
7478 2017-04-12  Pedro Alves  <palves@redhat.com>
7479
7480         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
7481         * configure.tgt: Handle i[34567]86-*-go32* and
7482         i[34567]86-*-msdosdjgpp*.
7483         * i386-tdep.c (i386_svr4_reg_to_regnum):
7484         Make extern.
7485         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
7486         i386-go32-tdep.c.
7487         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
7488         * i386-go32-tdep.c: New file.
7489         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
7490         declarations.
7491
7492 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
7493
7494         * aix-thread.c (pd_status2str): Change return type to const char *.
7495
7496 2017-04-12  Pedro Alves  <palves@redhat.com>
7497
7498         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
7499         calls to set_gdbarch_gnu_triplet_regexp.
7500
7501 2017-04-12  Pedro Alves  <palves@redhat.com>
7502
7503         PR gdb/21323
7504         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
7505         New enum value.
7506         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
7507         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
7508         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
7509         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
7510         * gdbarch.h, gdbarch.c: Regenerate.
7511         * aarch64-tdep.c (aarch64_gdbarch_init): Override
7512         gdbarch_wchar_bit and gdbarch_wchar_signed.
7513         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
7514         * arm-tdep.c (arm_gdbarch_init): Likewise.
7515         * avr-tdep.c (avr_gdbarch_init): Likewise.
7516         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
7517         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
7518         * i386-tdep.c (i386_go32_init_abi): Likewise.
7519         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7520         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7521         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7522         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7523         * sh-tdep.c (sh_gdbarch_init): Likewise.
7524         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7525         * sparc64-tdep.c (sparc64_init_abi): Likewise.
7526         * windows-tdep.c (windows_init_abi): Likewise.
7527         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7528
7529 2017-04-12  Pedro Alves  <palves@redhat.com>
7530
7531         PR c++/21323
7532         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
7533         cplus_primitive_type_char32_t>: New enum values.
7534         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
7535         and cplus_primitive_type_char32_t.
7536         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
7537         32, use the archtecture's built-in type for char16_t and char32_t,
7538         respectively.  Otherwise, fallback to init_integer_type as before,
7539         but make the type unsigned, and issue a complaint.
7540         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
7541
7542 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
7543
7544         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
7545         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
7546
7547 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
7548
7549         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
7550         'const char *'.
7551
7552 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
7553
7554         * common/common-utils.c (free_vector_argv): New function.
7555         * common/common-utils.h: Include <vector>.
7556         (free_vector_argv): New prototype.
7557         * darwin-nat.c (darwin_create_inferior): Rewrite function
7558         prototype in order to constify "exec_file" and accept a
7559         "std::string" for "allargs".
7560         * fork-child.c: Include <vector>.
7561         (breakup_args): Rewrite function, using C++.
7562         (fork_inferior): Rewrite function header, constify "exec_file_arg"
7563         and accept "std::string" for "allargs".  Update the code to
7564         calculate "argv" based on "allargs".  Update calls to "exec_fun"
7565         and "execvp".
7566         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
7567         order to constify "exec_file" and accept a "std::string" for
7568         "allargs".
7569         * go32-nat.c (go32_create_inferior): Likewise.
7570         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
7571         * infcmd.c (run_command_1): Constify "exec_file".  Use
7572         "std::string" for inferior arguments.
7573         * inferior.h (fork_inferior): Update prototype.
7574         * linux-nat.c (linux_nat_create_inferior): Rewrite function
7575         prototype in order to constify "exec_file" and accept a
7576         "std::string" for "allargs".
7577         * nto-procfs.c (procfs_create_inferior): Likewise.
7578         * procfs.c (procfs_create_inferior): Likewise.
7579         * remote-sim.c (gdbsim_create_inferior): Likewise.
7580         * remote.c (extended_remote_run): Update code to accept
7581         "std::string" as argument.
7582         (extended_remote_create_inferior): Rewrite function prototype in
7583         order to constify "exec_file" and accept a "std::string" for
7584         "allargs".
7585         * rs6000-nat.c (super_create_inferior): Likewise.
7586         (rs6000_create_inferior): Likewise.
7587         * target.h (struct target_ops) <to_create_inferior>: Likewise.
7588         * windows-nat.c (windows_create_inferior): Likewise.
7589
7590 2017-04-11  Pedro Alves  <palves@redhat.com>
7591
7592         * thread.c: Fix whitespace throughout.
7593
7594 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
7595
7596         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
7597
7598 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
7599
7600         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
7601
7602 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
7603
7604         PR gdb/21364
7605         * osdata.c (info_osdata): Check if 'type' is an empty string
7606         instead of NULL.
7607
7608 2017-04-10  Pedro Alves  <palves@redhat.com>
7609
7610         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
7611         (ptid_to_global_thread_id, in_thread_list)
7612         (do_captured_list_thread_ids, set_resumed, set_running)
7613         (set_executing, set_stop_requested, finish_thread_state)
7614         (validate_registers_access, can_access_registers_ptid)
7615         (print_thread_info_1, switch_to_thread)
7616         (do_restore_current_thread_cleanup)
7617         (make_cleanup_restore_current_thread, thread_command)
7618         (thread_name_command): Use operator== instead of ptid_equal.
7619
7620 2017-04-10  Pedro Alves  <palves@redhat.com>
7621
7622         * thread.c (struct current_thread_cleanup) <next>: Delete field.
7623         (current_thread_cleanup_chain): Delete.
7624         (restore_current_thread_cleanup_dtor)
7625         (make_cleanup_restore_current_thread): Remove references to
7626         current_thread_cleanup_chain.
7627
7628 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
7629
7630         * msp430-tdep.c (msp430_pseudo_register_read): Never return
7631         REG_UNKNOWN.
7632
7633 2017-04-10  Yao Qi  <yao.qi@linaro.org>
7634
7635         PR gdb/19942
7636         * gdbthread.h (thread_info::deletable): New method.
7637         (thread_info::incref): New method.
7638         (thread_info::decref): New method.
7639         (thread_info::refcount): Move it to private.
7640         * infrun.c (save_stop_context): Call inc_refcount.
7641         (release_stop_context_cleanup): Likewise.
7642         * thread.c (set_thread_exited): New function.
7643         (init_thread_list): Delete "tp" only it is deletable, otherwise
7644         call set_thread_exited.
7645         (delete_thread_1): Call set_thread_exited.
7646         (current_thread_cleanup) <inferior_pid>: Remove.
7647         <thread>: New field.
7648         (restore_current_thread_ptid_changed): Removed.
7649         (do_restore_current_thread_cleanup): Adjust.
7650         (restore_current_thread_cleanup_dtor): Don't call
7651         find_thread_ptid.
7652         (set_thread_refcount): Use dec_refcount.
7653         (make_cleanup_restore_current_thread): Adjust.
7654         (thread_apply_all_command): Call inc_refcount.
7655         (_initialize_thread): Don't call
7656         observer_attach_thread_ptid_changed.
7657
7658 2017-04-10  Yao Qi  <yao.qi@linaro.org>
7659
7660         * thread.c (delete_thread_1): Hoist code on marking thread as
7661         exited.
7662
7663 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
7664
7665         * windows-nat.c (windows_detach): Initialize ptid with
7666         minus_one_ptid.
7667
7668 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
7669
7670         * unittests/ptid-selftests.c: Fix erroneous assert messages.
7671
7672 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
7673
7674         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
7675         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
7676         (bfin_pseudo_register_write): Likewise
7677
7678 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
7679
7680         * common/ptid.h (struct ptid): Change to...
7681         (class ptid_t): ... this.
7682         <ptid_t>: New constructors.
7683         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
7684         matches>: New methods.
7685         <make_null, make_minus_one>: New static methods.
7686         <pid>: Rename to...
7687         <m_pid>: ...this.
7688         <lwp>: Rename to...
7689         <m_lwp>: ...this.
7690         <tid>: Rename to...
7691         <m_tid>: ...this.
7692         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
7693         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
7694         as references, move comment to class ptid_t.
7695         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
7696         ptid_t static methods.
7697         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
7698         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
7699         Take ptid arguments as references, implement using ptid_t methods.
7700         * unittests/ptid-selftests.c: New file.
7701         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7702         unittests/ptid-selftests.c.
7703         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
7704
7705 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7706
7707         * python/python.c (python_run_simple_file): Cast mode literal to
7708         non-const char pointer as expected by PyFile_FromString.
7709
7710 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
7711
7712         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
7713         minus_one_ptid and null_ptid.
7714
7715 2017-04-05  Pedro Alves  <palves@redhat.com>
7716
7717         * warning.m4 (build_warnings): Remove -Wno-write-strings.
7718         * configure: Regenerate.
7719
7720 2017-04-05  Pedro Alves  <palves@redhat.com>
7721
7722         * ada-exp.y (yyerror): Constify.
7723         * ada-lang.c (bound_name, get_selections)
7724         (ada_variant_discrim_type)
7725         (ada_variant_discrim_name, ada_value_struct_elt)
7726         (ada_lookup_struct_elt_type, is_unchecked_variant)
7727         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
7728         (catch_ada_exception_command_split)
7729         (catch_ada_assert_command_split, catch_assert_command)
7730         (ada_op_name): Constify.
7731         * ada-lang.h (ada_yyerror, get_selections)
7732         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
7733         * arc-tdep.c (arc_print_frame_cache): Constify.
7734         * arm-tdep.c (arm_skip_stub): Constify.
7735         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
7736         (gen_aggregate_elt_ref): Constify.
7737         * bcache.c (print_bcache_statistics): Constify.
7738         * bcache.h (print_bcache_statistics): Constify.
7739         * break-catch-throw.c (catch_exception_command_1):
7740         * breakpoint.c (struct ep_type_description::description):
7741         Constify.
7742         (add_solib_catchpoint): Constify.
7743         (catch_fork_command_1): Add cast.
7744         (add_catch_command): Constify.
7745         * breakpoint.h (add_catch_command, add_solib_catchpoint):
7746         Constify.
7747         * bsd-uthread.c (bsd_uthread_state): Constify.
7748         * buildsym.c (patch_subfile_names): Constify.
7749         * buildsym.h (next_symbol_text_func, patch_subfile_names):
7750         Constify.
7751         * c-exp.y (yyerror): Constify.
7752         (token::oper): Constify.
7753         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
7754         * c-varobj.c (cplus_describe_child): Constify.
7755         * charset.c (find_charset_names): Add cast.
7756         (find_charset_names): Constify array and add const_cast.
7757         * cli/cli-cmds.c (complete_command, cd_command): Constify.
7758         (edit_command): Constify.
7759         * cli/cli-decode.c (lookup_cmd): Constify.
7760         * cli/cli-dump.c (dump_memory_command, dump_value_command):
7761         Constify.
7762         (struct dump_context): Constify.
7763         (add_dump_command, restore_command): Constify.
7764         * cli/cli-script.c (get_command_line): Constify.
7765         * cli/cli-script.h (get_command_line): Constify.
7766         * cli/cli-utils.c (check_for_argument): Constify.
7767         * cli/cli-utils.h (check_for_argument): Constify.
7768         * coff-pe-read.c (struct read_pe_section_data): Constify.
7769         * command.h (lookup_cmd): Constify.
7770         * common/print-utils.c (decimal2str): Constify.
7771         * completer.c (gdb_print_filename): Constify.
7772         * corefile.c (set_gnutarget): Constify.
7773         * cp-name-parser.y (yyerror): Constify.
7774         * cp-valprint.c (cp_print_class_member): Constify.
7775         * cris-tdep.c (cris_register_name, crisv32_register_name):
7776         Constify.
7777         * d-exp.y (yyerror): Constify.
7778         (struct token::oper): Constify.
7779         * d-lang.h (d_yyerror): Constify.
7780         * dbxread.c (struct header_file_location::name): Constify.
7781         (add_old_header_file, add_new_header_file, last_function_name)
7782         (dbx_next_symbol_text, add_bincl_to_list)
7783         (find_corresponding_bincl_psymtab, set_namestring)
7784         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
7785         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
7786         * defs.h (command_line_input, print_address_symbolic)
7787         (deprecated_readline_begin_hook): Constify.
7788         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
7789         Constify.
7790         * event-top.c (handle_line_of_input): Constify and add cast.
7791         * exceptions.c (catch_errors): Constify.
7792         * exceptions.h (catch_errors): Constify.
7793         * expprint.c (print_subexp_standard, op_string, op_name)
7794         (op_name_standard, dump_raw_expression, dump_raw_expression):
7795         * expression.h (op_name, op_string, dump_raw_expression):
7796         Constify.
7797         * f-exp.y (yyerror): Constify.
7798         (struct token::oper): Constify.
7799         (struct f77_boolean_val::name): Constify.
7800         * f-lang.c (f_word_break_characters): Constify.
7801         * f-lang.h (f_yyerror): Constify.
7802         * fork-child.c (fork_inferior): Add cast.
7803         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
7804         (new_variant): Constify.
7805         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
7806         * gdbarch.c: Regenerate.
7807         * gdbcore.h (set_gnutarget): Constify.
7808         * go-exp.y (yyerror): Constify.
7809         (token::oper): Constify.
7810         * go-lang.h (go_yyerror): Constify.
7811         * go32-nat.c (go32_sysinfo): Constify.
7812         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
7813         * guile/scm-cmd.c (cmdscm_function): Constify.
7814         * guile/scm-param.c (pascm_param_value): Constify.
7815         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
7816         (h8300sx_register_name): Constify.
7817         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
7818         Constify.
7819         * ia64-tdep.c (ia64_register_names): Constify.
7820         * infcmd.c (construct_inferior_arguments): Constify.
7821         (path_command, attach_post_wait): Constify.
7822         * language.c (show_range_command, show_case_command)
7823         (unk_lang_error): Constify.
7824         * language.h (language_defn::la_error)
7825         (language_defn::la_name_of_this): Constify.
7826         * linespec.c (decode_line_2): Constify.
7827         * linux-thread-db.c (thread_db_err_str): Constify.
7828         * lm32-tdep.c (lm32_register_name): Constify.
7829         * m2-exp.y (yyerror): Constify.
7830         * m2-lang.h (m2_yyerror): Constify.
7831         * m32r-tdep.c (m32r_register_names): Constify and make static.
7832         * m68hc11-tdep.c (m68hc11_register_names): Constify.
7833         * m88k-tdep.c (m88k_register_name): Constify.
7834         * macroexp.c (appendmem): Constify.
7835         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
7836         (upgrade_type, parse_external, parse_partial_symbols)
7837         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
7838         (new_symbol): Constify.
7839         * memattr.c (mem_info_command): Constify.
7840         * mep-tdep.c (register_name_from_keyword): Constify.
7841         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
7842         Constify.
7843         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
7844         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
7845         * mi/mi-main.c (captured_mi_execute_command): Constify and add
7846         cast.
7847         (mi_execute_async_cli_command): Constify.
7848         * mips-tdep.c (mips_register_name): Constify.
7849         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
7850         (am33_register_name, am33_2_register_name)
7851         * moxie-tdep.c (moxie_register_names): Constify.
7852         * nat/linux-osdata.c (osdata_type): Constify fields.
7853         * nto-tdep.c (nto_parse_redirection): Constify.
7854         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
7855         (lookup_child_selector): Constify.
7856         (objc_methcall::name): Constify.
7857         * objc-lang.h (lookup_objc_class, lookup_child_selector)
7858         (lookup_struct_typedef): Constify.
7859         * objfiles.c (pc_in_section): Constify.
7860         * objfiles.h (pc_in_section): Constify.
7861         * p-exp.y (struct token::oper): Constify.
7862         (yyerror): Constify.
7863         * p-lang.h (pascal_yyerror): Constify.
7864         * parser-defs.h (op_name_standard): Constify.
7865         (op_print::string): Constify.
7866         (exp_descriptor::op_name): Constify.
7867         * printcmd.c (print_address_symbolic): Constify.
7868         * psymtab.c (print_partial_symbols): Constify.
7869         * python/py-breakpoint.c (stop_func): Constify.
7870         (bppy_get_expression): Constify.
7871         * python/py-cmd.c (cmdpy_completer::name): Constify.
7872         (cmdpy_function): Constify.
7873         * python/py-event.c (evpy_add_attribute)
7874         (gdbpy_initialize_event_generic): Constify.
7875         * python/py-event.h (evpy_add_attribute)
7876         (gdbpy_initialize_event_generic): Constify.
7877         * python/py-evts.c (add_new_registry): Constify.
7878         * python/py-finishbreakpoint.c (outofscope_func): Constify.
7879         * python/py-framefilter.c (get_py_iter_from_func): Constify.
7880         * python/py-inferior.c (get_buffer): Add cast.
7881         * python/py-param.c (parm_constant::name): Constify.
7882         * python/py-unwind.c (fprint_frame_id): Constify.
7883         * python/python.c (gdbpy_parameter_value): Constify.
7884         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
7885         * remote.c (memory_packet_config::name): Constify.
7886         (show_packet_config_cmd, remote_write_bytes)
7887         (remote_buffer_add_string):
7888         * reverse.c (exec_reverse_once): Constify.
7889         * rs6000-tdep.c (variant::name, variant::description): Constify.
7890         * rust-exp.y (rustyyerror): Constify.
7891         * rust-lang.c (rust_op_name): Constify.
7892         * rust-lang.h (rustyyerror): Constify.
7893         * serial.h (serial_ops::name): Constify.
7894         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
7895         (sh_sh3e_register_name, sh_sh2e_register_name)
7896         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
7897         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
7898         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
7899         (sh_sh4al_dsp_register_name): Constify.
7900         * sh64-tdep.c (sh64_register_name): Constify.
7901         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
7902         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
7903         * stabsread.c (patch_block_stabs, read_type_number)
7904         (ref_map::stabs, ref_add, process_reference)
7905         (symbol_reference_defined, define_symbol, define_symbol)
7906         (error_type, read_type, read_member_functions, read_cpp_abbrev)
7907         (read_one_struct_field, read_struct_fields, read_baseclasses)
7908         (read_tilde_fields, read_struct_type, read_array_type)
7909         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
7910         (read_huge_number, read_range_type, read_args, common_block_start)
7911         (find_name_end): Constify.
7912         * stabsread.h (common_block_start, define_symbol)
7913         (process_one_symbol, symbol_reference_defined, ref_add):
7914         * symfile.c (get_section_index, add_symbol_file_command):
7915         * symfile.h (get_section_index): Constify.
7916         * target-descriptions.c (tdesc_type::name): Constify.
7917         (tdesc_free_type): Add cast.
7918         * target.c (find_default_run_target):
7919         (add_deprecated_target_alias, find_default_run_target)
7920         (target_announce_detach): Constify.
7921         (do_option): Constify.
7922         * target.h (add_deprecated_target_alias): Constify.
7923         * thread.c (print_thread_info_1): Constify.
7924         * top.c (deprecated_readline_begin_hook, command_line_input):
7925         Constify.
7926         (init_main): Add casts.
7927         * top.h (handle_line_of_input): Constify.
7928         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
7929         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
7930         (tfind_command): Rename to ...
7931         (tfind_command_1): ... this and constify.
7932         (tfind_command): New function.
7933         (tfind_end_command, tfind_start_command): Adjust.
7934         (encode_source_string): Constify.
7935         * tracepoint.h (encode_source_string): Constify.
7936         * tui/tui-data.c (tui_partial_win_by_name): Constify.
7937         * tui/tui-data.h (tui_partial_win_by_name): Constify.
7938         * tui/tui-source.c (tui_set_source_content_nil): Constify.
7939         * tui/tui-source.h (tui_set_source_content_nil): Constify.
7940         * tui/tui-win.c (parse_scrolling_args): Constify.
7941         * tui/tui-windata.c (tui_erase_data_content): Constify.
7942         * tui/tui-windata.h (tui_erase_data_content): Constify.
7943         * tui/tui-winsource.c (tui_erase_source_content): Constify.
7944         * tui/tui.c (tui_enable): Add cast.
7945         * utils.c (defaulted_query): Constify.
7946         (init_page_info): Add cast.
7947         (puts_debug, subset_compare): Constify.
7948         * utils.h (subset_compare): Constify.
7949         * varobj.c (varobj_format_string): Constify.
7950         * varobj.h (varobj_format_string): Constify.
7951         * vax-tdep.c (vax_register_name): Constify.
7952         * windows-nat.c (windows_detach): Constify.
7953         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
7954         * xml-support.c (gdb_xml_end_element): Constify.
7955         * xml-tdesc.c (tdesc_start_reg): Constify.
7956         * xstormy16-tdep.c (xstormy16_register_name): Constify.
7957         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
7958         * xtensa-tdep.h (xtensa_register_t::name): Constify.
7959
7960 2017-04-05  Pedro Alves  <palves@redhat.com>
7961
7962         * proc-api.c (struct trans): Constify.
7963         (procfs_note): Constify.
7964         * proc-events.c (struct trans, syscall_table):
7965         * proc-flags.c (struct trans): Constify.
7966         * proc-utils.h (procfs_note): Constify.
7967         * proc-why.c (struct trans): Constify.
7968         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
7969         (procfs_detach): Constify.
7970         * sol-thread.c (struct string_map): Constify.
7971         (td_err_string, td_state_string): Constify.
7972
7973 2017-04-05  Pedro Alves  <palves@redhat.com>
7974
7975         * proc-api.c (procfs_filename): Don't initialize
7976         procfs_filename.
7977         (prepare_to_trace): Assume procfs_filename is non-NULL.
7978         (_initialize_proc_api): Give procfs_filename a default value here.
7979
7980 2017-04-05  Pedro Alves  <palves@redhat.com>
7981
7982         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
7983         'cond_string' parameter.
7984         (extract_exception_regexp): Constify 'string' parameter.
7985         (catch_exception_command_1): Constify.
7986         * breakpoint.c (init_catchpoint)
7987         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
7988         parameter.
7989         (ep_parse_optional_if_clause, catch_fork_command_1)
7990         (catch_exec_command_1): Constify.
7991         * breakpoint.h (init_catchpoint): Constify 'cond_string'
7992         parameter.
7993         (ep_parse_optional_if_clause): Constify.
7994         * cli/cli-utils.c (remove_trailing_whitespace)
7995         (check_for_argument): Constify.
7996         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
7997         non-const overload.
7998         (check_for_argument): Likewise.
7999
8000 2017-04-05  Pedro Alves  <palves@redhat.com>
8001
8002         * event-top.c (command_line_handler): Add cast to execute_command
8003         call.
8004         * record-btrace.c (cmd_record_btrace_bts_start)
8005         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
8006         (cmd_record_btrace_start): Add cast to execute_command call.
8007         * record-full.c (record_full_goto_insn):
8008         * record.c (record_start, record_stop): Add cast to
8009         execute_command_to_string calls.
8010         (cmd_record_start): Add cast to execute_command calls.
8011
8012 2017-04-05  Pedro Alves  <palves@redhat.com>
8013
8014         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
8015         static inline function.
8016         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
8017         array and use gdb_PyArg_ParseTupleAndKeywords.
8018         * python/py-cmd.c (cmdpy_init): Likewise.
8019         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
8020         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
8021         (infpy_search_memory): Likewise.
8022         * python/py-objfile.c (objfpy_add_separate_debug_file)
8023         (gdbpy_lookup_objfile): Likewise.
8024         * python/py-symbol.c (gdbpy_lookup_symbol)
8025         (gdbpy_lookup_global_symbol): Likewise.
8026         * python/py-type.c (gdbpy_lookup_type): Likewise.
8027         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
8028         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
8029         Likewise.
8030
8031 2017-04-05  Pedro Alves  <palves@redhat.com>
8032
8033         * python/python-internal.h (gdb_PyGetSetDef): New type.
8034         * python/py-block.c (block_object_getset)
8035         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
8036         * python/py-event.c (event_object_getset)
8037         (finish_breakpoint_object_getset): Likewise.
8038         * python/py-inferior.c (inferior_object_getset): Likewise.
8039         * python/py-infthread.c (thread_object_getset): Likewise.
8040         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
8041         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
8042         * python/py-objfile.c (objfile_getset): Likewise.
8043         * python/py-progspace.c (pspace_getset): Likewise.
8044         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
8045         Likewise.
8046         * python/py-record.c (recpy_record_getset): Likewise.
8047         * python/py-symbol.c (symbol_object_getset): Likewise.
8048         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
8049         Likewise.
8050         * python/py-type.c (type_object_getset, field_object_getset):
8051         Likewise.
8052         * python/py-value.c (value_object_getset): Likewise.
8053
8054 2017-04-05  Pedro Alves  <palves@redhat.com>
8055
8056         * python/python-internal.h (gdb_PyObject_CallMethod)
8057         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
8058         New functions.
8059         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
8060         (PySys_GetObject, PySys_SetPath): New macros.
8061
8062 2017-04-05  Pedro Alves  <palves@redhat.com>
8063
8064         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
8065         info_osdata_command.
8066         * osdata.c (info_osdata_command): Rename to ...
8067         (info_osdata): ... this.  Constify 'type' parameter, and remove
8068         the 'from_tty' parameter.  Accept NULL TYPE.
8069         (info_osdata_command): New function.
8070         * osdata.h (info_osdata_command): Remove declaration.
8071         (info_osdata): New declaration.
8072
8073 2017-04-05  Pedro Alves  <palves@redhat.com>
8074
8075         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
8076         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
8077         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
8078         parameter.
8079         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
8080         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
8081         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
8082         parameter.
8083         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
8084         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
8085         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
8086         (mi_cmd_file_list_exec_source_files)
8087         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
8088         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8089         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
8090         parameter.
8091         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
8092         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
8093         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
8094         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
8095         (mi_cmd_stack_info_frame): Constify 'command' parameter.
8096         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
8097         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
8098         'command' parameter.
8099         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
8100         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
8101         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
8102         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
8103         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
8104         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
8105         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
8106         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
8107         (mi_cmd_var_set_update_range): Constify 'command' parameter.
8108         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
8109         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
8110         parameter.
8111         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
8112         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
8113         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
8114         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
8115         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
8116         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
8117         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
8118         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
8119         (mi_cmd_data_list_changed_registers)
8120         (mi_cmd_data_write_register_values)
8121         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
8122         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
8123         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
8124         (mi_cmd_list_features, mi_cmd_list_target_features)
8125         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
8126         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
8127         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
8128         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
8129         (mi_cmd_trace_frame_collected): Constify 'command'
8130         parameter.
8131         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
8132         'command' parameter.
8133
8134 2017-04-05  Pedro Alves  <palves@redhat.com>
8135
8136         * ada-lang.c (ada_completer_word_break_characters): Now a const
8137         array.
8138         (ada_get_gdb_completer_word_break_characters): Constify.
8139         * completer.c (gdb_completer_command_word_break_characters)
8140         (gdb_completer_file_name_break_characters)
8141         (gdb_completer_quote_characters): Now const arrays.
8142         (get_gdb_completer_quote_characters): Constify.
8143         (set_rl_completer_word_break_characters): New function.
8144         (set_gdb_completion_word_break_characters)
8145         (complete_line_internal): Use it.
8146         * completer.h (get_gdb_completer_quote_characters): Constify.
8147         (set_rl_completer_word_break_characters): Declare.
8148         * f-lang.c (f_word_break_characters): Constify.
8149         * language.c (default_word_break_characters): Constify.
8150         * language.h (language_defn::la_word_break_characters): Constify.
8151         (default_word_break_characters): Constify.
8152         * top.c (init_main): Use set_rl_completer_word_break_characters.
8153
8154 2017-04-05  Pedro Alves  <palves@redhat.com>
8155
8156         * aix-thread.c (aix_thread_pid_to_str)
8157         (aix_thread_extra_thread_info): Constify.
8158         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
8159         * bsd-uthread.c (bsd_uthread_extra_thread_info)
8160         (bsd_uthread_pid_to_str): Constify.
8161         * corelow.c (core_pid_to_str): Constify.
8162         * darwin-nat.c (darwin_pid_to_str): Constify.
8163         * fbsd-nat.c (fbsd_pid_to_str): Constify.
8164         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
8165         Constify.
8166         * gnu-nat.c (gnu_pid_to_str): Constify.
8167         * go32-nat.c (go32_pid_to_str): Constify.
8168         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
8169         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
8170         * inferior.c (inferior_pid_to_str): Constify.
8171         * linux-nat.c (linux_nat_pid_to_str): Constify.
8172         * linux-tdep.c (linux_core_pid_to_str): Constify.
8173         * linux-thread-db.c (thread_db_pid_to_str)
8174         (thread_db_extra_thread_info): Constify.
8175         * nto-tdep.c (nto_extra_thread_info): Constify.
8176         * nto-tdep.h (nto_extra_thread_info): Constify.
8177         * obsd-nat.c (obsd_pid_to_str): Constify.
8178         * procfs.c (procfs_pid_to_str): Constify.
8179         * ravenscar-thread.c (ravenscar_extra_thread_info)
8180         (ravenscar_pid_to_str): Constify.
8181         * remote-sim.c (gdbsim_pid_to_str): Constify.
8182         * remote.c (remote_threads_extra_info, remote_pid_to_str):
8183         Constify.
8184         * sol-thread.c (solaris_pid_to_str): Constify.
8185         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
8186         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
8187         * target.c (default_pid_to_str, target_pid_to_str)
8188         (normal_pid_to_str, default_pid_to_str): Constify.
8189         * target.h (target_ops::to_pid_to_str)
8190         (target_ops::to_extra_thread_info): Constify.
8191         (target_pid_to_str, normal_pid_to_str): Constify.
8192         * windows-nat.c (windows_pid_to_str): Constify.
8193         * gdbarch.sh (core_pid_to_str): Constify.
8194         * target-delegates.c: Regenerate.
8195         * gdbarch.h, gdbarch.c: Regenerate.
8196
8197 2017-04-05  Pedro Alves  <palves@redhat.com>
8198
8199         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
8200         the memory of the temporary warning_pre_print override.
8201         * utils.c (warning_pre_print): Constify.
8202         * utils.h (warning_pre_print): Constify.
8203
8204 2017-04-05  Pedro Alves  <palves@redhat.com>
8205
8206         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
8207         (shell_command): New function.
8208         (make_command): Use std::string.
8209         (init_cli_cmds): Register shell_command instead of shell_escape.
8210
8211 2017-04-05  Pedro Alves  <palves@redhat.com>
8212
8213         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
8214         * tracepoint.c (default_collect): Don't initialize.
8215
8216 2017-04-05  Pedro Alves  <palves@redhat.com>
8217
8218         * macroexp.c (macro_buffer::shared): Now a bool.
8219         (init_buffer): Update.
8220         (init_shared_buffer): Constify 'addr' parameter.
8221         (substitute_args, expand, macro_expand, macro_expand_next): Remove
8222         casts.
8223
8224 2017-04-05  Pedro Alves  <palves@redhat.com>
8225
8226         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
8227         * disasm.c (set_disassembler_options): Constify local.
8228         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
8229
8230 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
8231
8232         PR gdb/21352
8233         * tracefile.c (tsave_command): Fix argument parsing for '-r'
8234         option.
8235
8236 2017-04-05  Yao Qi  <yao.qi@linaro.org>
8237
8238         * frame.c (frame_unwind_register_unsigned): Call
8239         frame_unwind_register_value.
8240
8241 2017-04-05  Yao Qi  <yao.qi@linaro.org>
8242
8243         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
8244         Use gdb_test_multiple, and don't match anchor.
8245
8246 2017-04-05  Pedro Alves  <palves@redhat.com>
8247
8248         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
8249         (Write After Approval): Remove Simon Marchi.
8250
8251 2017-04-05  Pedro Alves  <palves@redhat.com>
8252
8253         * common/gdb_optional.h (optional::optional): Make constexpr and
8254         initialize m_dummy.
8255
8256 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
8257
8258         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8259         (amd64fbsd_jmp_buf_reg_offset): Remove.
8260         (amd64fbsd_supply_uthread): Remove function.
8261         (amd64fbsd_collect_uthread): Remove function.
8262         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
8263         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
8264         (x86_64-*-freebsd*): Remove bsd-uthread.o.
8265         (fbsd-nat.c): Update comment.
8266         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
8267         (i386fbsd_jmp_buf_reg_offset): Remove.
8268         (i386fbsd_supply_uthread): Remove function.
8269         (i386fbsd_collect_uthread): Remove function.
8270         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
8271
8272 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
8273
8274         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
8275         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
8276         * NEWS: Mention that support for FreeBSD/alpha was removed.
8277         * alpha-fbsd-tdep.c: Delete file.
8278         * config/alpha/fbsd.mh: Delete file.
8279         * configure.host: Delete alpha*-*-freebsd* and
8280         alpha*-*-kfreebsd*-gnu.
8281         * configure.tgt: Delete alpha*-*-freebsd* and
8282         alpha*-*-kfreebsd*-gnu.
8283
8284 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
8285
8286         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
8287         amd64bsd_store_inferior_registers): Use ptid from regcache.
8288
8289 2017-04-04  Pedro Alves  <palves@redhat.com>
8290
8291         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
8292         data fields, make them private and add "m_" prefixes.
8293         (lnp_state_machine::lnp_state_machine): New ctor.
8294         (record_line, check_line_address, handle_set_discriminator)
8295         (handle_set_address, handle_advance_pc, handle_special_opcode)
8296         (handle_advance_line, handle_set_file, handle_negate_stmt)
8297         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
8298         (end_sequence, advance_line): New methods.
8299         (m_gdbarch, m_record_lines_p): New fields.
8300         (lnp_reader_state): Delete.
8301         (dwarf_record_line): Rename to ...
8302         (lnp_state_machine::record_line): ... adjust.
8303         (init_lnp_state_machine): Delete.
8304         (lnp_state_machine::lnp_state_machine): New.
8305         (check_line_address): Rename to ...
8306         (lnp_state_machine::check_line_address): This.
8307         (dwarf_decode_lines_1): Remove reference to "reader_state".
8308         Adjust lnp_state_machine having a non-default ctor.  Use bool.
8309         State machine internal state manipulation moved to
8310         lnp_state_machine methods.
8311
8312 2017-04-04  Pedro Alves  <palves@redhat.com>
8313
8314         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8315         unittests/offset-type-selftests.c.
8316         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
8317         * common/offset-type.h: New file.
8318         * common/preprocessor.h: New file.
8319         * common/traits.h: New file.
8320         * common/valid-expr.h: New file.
8321         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
8322         sect_offset and cu_offset strong typedefs throughout.
8323         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
8324         typedefs throughout.
8325         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
8326         sect_offset and cu_offset strong typedefs throughout.
8327         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
8328         typedefs throughout.
8329         * gdbtypes.h: Include "common/offset-type.h".
8330         (cu_offset): Now an offset type (strong typedef) instead of a
8331         struct.
8332         (sect_offset): Likewise.
8333         (union call_site_parameter_u): Rename "param_offset" field to
8334         "param_cu_off".
8335         * unittests/offset-type-selftests.c: New file.
8336
8337 2017-04-04  Pedro Alves  <palves@redhat.com>
8338
8339         * common/underlying.h: New file.
8340         * dwarf2read.c: Include "common/gdb_optional.h" and
8341         "common/underlying.h".
8342         (dir_index, file_name_index): New types.
8343         (file_entry): Use them.
8344         (file_entry::include): Use to_underlying.
8345         (line_header::add_file_name): Use dir_index.
8346         (read_formatted_entries): Use gdb::optional.  Read form before
8347         writting to file_entry.
8348         (dwarf_decode_line_header): Use dir_index.
8349         (lnp_state_machine::current_file): Use to_underlying.
8350         (lnp_state_machine::file): Change type to file_name_index.
8351         (dwarf_record_line): Use to_underlying.
8352         (init_lnp_state_machine): Use file_name_index.
8353         (dwarf_decode_lines_1): Use dir_index and file_name_index.
8354
8355 2017-04-04  Pedro Alves  <palves@redhat.com>
8356
8357         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
8358         operator bool, has_value and get methods.
8359
8360 2017-04-04  Pedro Alves  <palves@redhat.com>
8361
8362         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
8363         fields.
8364         (line_header): Initialize all data fields.  Change type of
8365         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
8366         Change type of include_dirs to std::vector<const char *>.  Remove
8367         num_include_dirs, include_dirs_size.  Change type of file_names to
8368         std::vector<file_entry>.  Remove num_file_names, file_names_size.
8369         (line_header::line_header): New.
8370         (line_header::add_include_dir, line_header::add_file_name): New
8371         methods.
8372         (line_header::include_dir_at): Remove NULL check.
8373         (line_header::file_name_at): Add const overload.
8374         (line_header_up): New unique_ptr typedef.
8375         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
8376         std::vector.  Remove free_line_header call.
8377         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
8378         free_line_header call.
8379         (free_cu_line_header): Delete.
8380         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
8381         (setup_type_unit_groups): Use line_header_up instead of cleanups.
8382         Adjust to use std::vector.
8383         (free_line_header): Delete.
8384         (free_line_header_voidp): Use delete.
8385         (add_include_dir): Replace with ...
8386         (line_header::add_include_dir): ... this method.  Use std::vector.
8387         (add_file_name): Replace with ...
8388         (line_header::add_file_name): ... this method.  Use std::vector.
8389         (add_include_dir_stub): Delete.
8390         (read_formatted_entries): Remove memset.
8391         (dwarf_decode_line_header): Return a line_header_up instead of a
8392         raw pointer.  Remove cleanup handling.  Pass lambdas to
8393         read_formatted_entries.  Adjust to use line_header methods.
8394         (dwarf_decode_lines_1): Adjust to use line_header methods.
8395         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
8396         use std::vector.
8397
8398 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
8399
8400         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
8401         instead of struct ptid.
8402
8403 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
8404
8405         * frame.c (get_frame_register_bytes): Unwind using value.
8406         (put_frame_register_bytes): Likewise.
8407
8408 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
8409
8410         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
8411         aggregate-like.
8412
8413 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
8414
8415         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
8416
8417 2017-03-29  Yao Qi  <yao.qi@linaro.org>
8418
8419         * gdbthread.h (struct thread_info): Declare constructor and
8420         destructor.  Add some in-class member initializers.
8421         * thread.c (free_thread): Remove.
8422         (init_thread_list): Call delete instead of free_thread.
8423         (new_thread): Call thread_info constructor.
8424         (thread_info::thread_info): New function.
8425         (thread_info::~thread_info): New function.
8426         (delete_thread_1): Call delete instead of free_thread.
8427         (make_cleanup_restore_current_thread): Move tp and frame to
8428         inner block.
8429
8430 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
8431
8432         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
8433         (arc_skip_prologue): Likewise.
8434         (arc_make_frame_cache): Likewise.
8435         (arc_pv_get_operand): New function.
8436         (arc_is_in_prologue): Likewise.
8437         (arc_analyze_prologue): Likewise.
8438         (arc_print_frame_cache): Likewise.
8439         (MAX_PROLOGUE_LENGTH): New constant.
8440
8441 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
8442
8443         * configure.tgt: Add arc-insn.o.
8444         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
8445         (dump_arc_instruction_command): New function.
8446         (arc_fprintf_disasm): Likewise.
8447         (arc_disassemble_info): Likewise.
8448         (arc_insn_get_operand_value): Likewise.
8449         (arc_insn_get_operand_value_signed): Likewise.
8450         (arc_insn_get_memory_base_reg): Likewise.
8451         (arc_insn_get_memory_offset): Likewise.
8452         (arc_insn_get_branch_target): Likewise.
8453         (arc_insn_dump): Likewise.
8454         (arc_insn_get_linear_next_pc): Likewise.
8455         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
8456         (arc_disassemble_info): Likewise.
8457         (arc_insn_get_branch_target): Likewise.
8458         (arc_insn_get_linear_next_pc): Likewise.
8459         * NEWS: Mention new "maint print arc arc-instruction".
8460
8461 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
8462
8463         * arc-tdep (maintenance_print_arc_list): New variable.
8464         (maintenance_print_arc_command): New function.
8465
8466 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
8467
8468         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
8469         Add "limm" and "reserved".
8470         (arc_cannot_fetch_register, arc_cannot_store_register): Add
8471         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
8472         * arc-tdep.h (arc_regnum): Likewise.
8473
8474 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
8475
8476         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8477         for THREADPTR register.
8478         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
8479         register.
8480         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
8481         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
8482         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
8483
8484 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
8485
8486         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
8487         registers above gdbarch_num_regs (gdbarch) as privileged in
8488         call0 ABI.
8489
8490 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
8491
8492         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
8493         for a single specified register or for all registers in
8494         a0_base..a0_base + C0_NREGS range.
8495         (supply_gregset_reg): Call regcache_raw_supply for a single
8496         specified register or for all registers in a0_base..a0_base +
8497         C0_NREGS range.
8498
8499 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
8500
8501         * arch/xtensa.h (C0_NREGS): Add definition.
8502         * xtensa-tdep.c (C0_NREGS): Remove definition.
8503
8504 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
8505
8506         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
8507         Drop xtensa_default_isa initialization.
8508         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
8509
8510 2017-03-27  Pedro Alves  <palves@redhat.com>
8511
8512         * dwarf2read.c (file_entry) <dir_index>: Add comment.
8513         (file_entry::include_dir): New method.
8514         (line_header::include_dir_at, line_header::file_name_at): New
8515         methods.
8516         (setup_type_unit_groups, setup_type_unit_groups)
8517         (psymtab_include_file_name): Simplify using the new methods.
8518         (lnp_state_machine) <the_line_header>: New field.
8519         <file>: Add comment.
8520         (lnp_state_machine::current_file): New method.
8521         (dwarf_record_line): Simplify using the new methods.
8522         (init_lnp_state_machine): Initialize the "the_line_header" field.
8523         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
8524         Simplify using the new methods.
8525
8526 2017-03-27  Pedro Alves  <palves@redhat.com>
8527
8528         * cp-name-parser.y (make_empty): Delete.
8529         (demangler_special, nested_name, ptr_operator, array_indicator)
8530         (direct_declarator, declarator_1): Use fill_comp instead of
8531         make_empty.
8532
8533 2017-03-27  Pedro Alves  <palves@redhat.com>
8534
8535         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
8536         to ATTRIBUTE_PRINTF.
8537         * solib-target.c (library_list_start_list): Print "string" not
8538         "version".
8539         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
8540         gdb_xml_error call.
8541
8542 2017-03-27  Pedro Alves  <palves@redhat.com>
8543
8544         * dwarf2read.c (struct file_and_directory): New.
8545         (dwarf2_get_dwz_file): Adjust to use std::string.
8546         (dw2_get_file_names_reader): Adjust to use file_and_directory.
8547         (find_file_and_directory): Adjust to return a file_and_directory
8548         object.
8549         (read_file_scope): Adjust to use file_and_directory.  Remove
8550         make_cleanup/do_cleanups calls.
8551         (open_and_init_dwp_file): Adjust to use std::string.  Remove
8552         make_cleanup/do_cleanups calls.
8553         * python/python.c (do_start_initialization): Adjust to ldirname
8554         returning a std::string.
8555         * utils.c (ldirname): Now returns a std::string.
8556         * utils.h (ldirname): Change return type to std::string.
8557         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
8558         returning a std::string.
8559         * xml-tdesc.c (file_read_description_xml): Likewise.
8560
8561 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
8562
8563         * regcache.c (regcache_debug_print_register): New function.
8564         * regcache.h (regcache_debug_print_register): New declaration.
8565         * target.c (debug_print_register): Remove.
8566         (target_fetch_registers): Call regcache_debug_print_register.
8567         (target_store_registers): Likewise.
8568
8569 2017-03-24  Pádraig Brady  <pbrady@fb.com>
8570
8571         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
8572         reference beyond the 'lh->include_dirs' array before accessing to
8573         it.
8574         (psymtab_include_file_name): Likewise.
8575         (dwarf_decode_lines_1): Likewise.
8576         (dwarf_decode_lines): Likewise.
8577         (file_file_name): Likewise.
8578
8579 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
8580
8581         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
8582         inferior_ptid.
8583         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8584         ps_lsetfpregs): Likewise.
8585         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
8586         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
8587         ps_lsetfpregs): Likewise.
8588         * target.c (target_fetch_registers, target_store_registers):
8589         Remove asserts.
8590
8591 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
8592
8593         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
8594
8595 2017-03-23  Yao Qi  <yao.qi@linaro.org>
8596
8597         * aarch64-tdep.c (aarch64_process_record_test): Declare.
8598         (_initialize_aarch64_tdep): Register it.
8599         (aarch64_record_load_store): Handle PRFM instruction.
8600         (aarch64_process_record_test): New function.
8601
8602 2017-03-23  Yao Qi  <yao.qi@linaro.org>
8603
8604         * aarch64-tdep.c (aarch64_record_load_store): Fix code
8605         indentation.
8606
8607 2017-03-23  Yao Qi  <yao.qi@linaro.org>
8608
8609         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
8610
8611 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
8612
8613         python/python.c (do_start_initialization): Fix memory leak.
8614
8615 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
8616
8617         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
8618         using get_ptrace_pid.
8619         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
8620         inferior_ptid.
8621         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
8622         inferior_ptid instead of pid.
8623
8624 2017-03-22  Yao Qi  <yao.qi@linaro.org>
8625
8626         * aarch64-tdep.c: Wrap locally used classes in anonymous
8627         namespace.
8628         * arm-tdep.c: Likewise.
8629         * linespec.c: Likewise.
8630         * ui-out.c: Likewise.
8631
8632 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
8633
8634         PR gdb/19637
8635         * python/lib/gdb/printer/bound_registers.py: Import sys.
8636
8637 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
8638
8639         * windows-nat.c (do_windows_fetch_inferior_registers): Add
8640         windows_thread_info parameter and use it instead of
8641         current_thread.
8642         (windows_fetch_inferior_registers): Don't set current_thread,
8643         pass the thread to do_windows_fetch_inferior_registers.  Use
8644         ptid from regcache instead of inferior_ptid.
8645         (do_windows_store_inferior_registers): Add windows_thread_info
8646         parameter and use it instead of current_thread.
8647         (windows_store_inferior_registers): Don't set current_thread,
8648         pass the thread to do_windows_store_inferior_registers.  Use
8649         ptid from regcache instead of inferior_ptid.
8650
8651 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
8652
8653         * ser-mingw.c (ser_windows_raw): Remove reference to
8654         struct serial::current_timeout.
8655
8656 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
8657
8658         PR tdep/20928
8659         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
8660         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
8661         (sparc64_fsr_type): Fix %fsr decoding.
8662
8663 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
8664
8665         * python/py-record-btrace.c (btpy_insn_data): Change return type
8666         for Python 2.
8667
8668 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
8669
8670         * spu-linux-nat.c (spu_fetch_inferior_registers,
8671         spu_store_inferior_registers): Use ptid from regcache, set and
8672         restore inferior_ptid.
8673         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
8674         Likewise.
8675
8676 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
8677
8678         * i386-linux-nat.c (fetch_register, store_register,
8679         i386_linux_fetch_inferior_registers,
8680         i386_linux_store_inferior_registers): Use ptid from regcache.
8681         * ia64-linux-nat.c (ia64_linux_fetch_register,
8682         ia64_linux_store_register): Likewise.
8683         * inf-ptrace.c (inf_ptrace_fetch_register,
8684         inf_ptrace_store_register): Likewise.
8685         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
8686         m32r_linux_store_inferior_registers): Likewise.
8687         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
8688         m68kbsd_store_inferior_registers): Likewise.
8689         * m68k-linux-nat.c (fetch_register, store_register,
8690         m68k_linux_fetch_inferior_registers,
8691         m68k_linux_store_inferior_registers): Likewise.
8692         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
8693         m88kbsd_store_inferior_registers): Likewise.
8694         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
8695         mips_fbsd_store_inferior_registers): Likewise.
8696         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
8697         mips64_linux_regsets_store_registers): Likewise.
8698         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
8699         mipsnbsd_store_inferior_registers): Likewise.
8700         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
8701         mips64obsd_store_inferior_registers): Likewise.
8702         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
8703         Likewise.
8704         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
8705         ppcfbsd_store_inferior_registers): Likewise.
8706         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
8707         ppc_linux_store_inferior_registers): Likewise.
8708         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
8709         ppcnbsd_store_inferior_registers): Likewise.
8710         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
8711         ppcobsd_store_registers): Likewise.
8712         * procfs.c (procfs_fetch_registers, procfs_store_registers):
8713         Likewise.
8714         * ravenscar-thread.c (ravenscar_fetch_registers,
8715         ravenscar_store_registers, ravenscar_prepare_to_store):
8716         Likewise.
8717         * record-btrace.c (record_btrace_fetch_registers,
8718         record_btrace_store_registers, record_btrace_prepare_to_store):
8719         Likewise.
8720         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
8721         Lookup inferior using ptid from regcache, instead of
8722         current_inferior.
8723         * remote.c (remote_fetch_registers, remote_store_registers): Use
8724         ptid from regcache.
8725         * rs6000-nat.c (fetch_register, store_register): Likewise.
8726         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
8727         s390_linux_store_inferior_registers): Likewise.
8728         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
8729         shnbsd_store_inferior_registers): Likewise.
8730         * sol-thread.c (sol_thread_fetch_registers,
8731         sol_thread_store_registers): Likewise.
8732         * sparc-nat.c (sparc_fetch_inferior_registers,
8733         sparc_store_inferior_registers): Likewise.
8734         * tilegx-linux-nat.c (fetch_inferior_registers,
8735         store_inferior_registers): Likewise.
8736         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
8737         vaxbsd_store_inferior_registers): Likewise.
8738         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
8739         store_xtregs): Likewise.
8740
8741 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8742
8743         PR gdb/14441
8744         * NEWS: Mention support for rvalue references in GDB and python.
8745         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
8746         supports both lvalue and rvalue references.
8747
8748 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8749
8750         PR gdb/14441
8751         * gdbtypes.c (rank_one_type): Implement overloading
8752         resolution rules regarding rvalue references.
8753
8754 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8755
8756         PR gdb/14441
8757         * aarch64-tdep.c (aarch64_type_align)
8758         (aarch64_extract_return_value, aarch64_store_return_value): Change
8759         lvalue reference type checks to general reference type checks.
8760         * amd64-tdep.c (amd64_classify): Likewise.
8761         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
8762         Likewise.
8763         * arm-tdep.c (arm_type_align, arm_extract_return_value)
8764         (arm_store_return_value): Likewise.
8765         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
8766         * c-typeprint.c (c_print_type): Likewise.
8767         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
8768         (cplus_number_of_children, cplus_describe_child): Likewise.
8769         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
8770         * completer.c (expression_completer): Likewise.
8771         * cp-support.c (make_symbol_overload_list_adl_namespace):
8772         Likewise.
8773         * darwin-nat-info.c (info_mach_region_command): Likewise.
8774         * dwarf2loc.c (entry_data_value_coerce_ref)
8775         (value_of_dwarf_reg_entry): Likewise.
8776         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
8777         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
8778         Likewise.
8779         * findvar.c (extract_typed_address, store_typed_address):
8780         Likewise.
8781         * gdbtypes.c (rank_one_type): Likewise.
8782         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
8783         * infcall.c (value_arg_coerce): Likewise.
8784         * language.c (pointer_type): Likewise.
8785         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
8786         Likewise.
8787         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
8788         * mn10300-tdep.c (mn10300_type_align): Likewise.
8789         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
8790         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
8791         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
8792         Likewise.
8793         * printcmd.c (print_formatted, x_command): Likewise.
8794         * python/py-type.c (typy_get_composite, typy_template_argument):
8795         Likewise.
8796         * python/py-value.c (valpy_referenced_value)
8797         (valpy_get_dynamic_type, value_has_field): Likewise.
8798         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
8799         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
8800         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
8801         * spu-tdep.c (spu_scalar_value_p): Likewise.
8802         * symtab.c (lookup_symbol_aux): Likewise.
8803         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
8804         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
8805         Likewise.
8806         * valops.c (value_cast_pointers, value_cast)
8807         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
8808         (value_struct_elt, value_struct_elt_bitpos)
8809         (value_find_oload_method_list, find_overload_match)
8810         (value_rtti_indirect_type): Likewise.
8811         * valprint.c (val_print_scalar_type_p, generic_val_print):
8812         Likewise.
8813         * value.c (value_actual_type, value_as_address, unpack_long)
8814         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
8815         (coerce_ref): Likewise.
8816         * varobj.c (varobj_get_value_type): Likewise.
8817
8818 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8819
8820         PR gdb/14441
8821         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
8822         table of constants.
8823         * python/lib/gdb/command/explore.py: Support exploring values
8824         of rvalue reference types.
8825         * python/lib/gdb/types.py: Implement get_basic_type() for
8826         rvalue reference types.
8827         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
8828         constant.
8829         * python/py-value.c (valpy_getitem): Add an rvalue reference
8830         check.
8831         (valpy_reference_value): Add new parameter "refcode".
8832         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
8833         New wrappers for valpy_reference_value().
8834         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
8835         (gdbpy_invoke_xmethod): Likewise.
8836
8837 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8838
8839         PR gdb/14441
8840         * dwarf2read.c (process_die, read_type_die_1): Handle the
8841         DW_TAG_rvalue_reference_type DIE.
8842         (read_tag_reference_type): Add new parameter "refcode".
8843
8844 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8845
8846         PR gdb/14441
8847         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
8848         (c_type_print_modifier, c_type_print_varspec_suffix)
8849         (c_type_print_base): Support printing rvalue reference types.
8850         * c-valprint.c (c_val_print, c_value_print): Support printing
8851         rvalue reference values.
8852
8853 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8854
8855         PR gdb/14441
8856         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
8857         typename.
8858         * cp-support.c (replace_typedefs): Handle
8859         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
8860         * python/py-type.c (typy_lookup_type): Likewise.
8861
8862 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8863
8864         PR gdb/14441
8865         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
8866         * parse.c (insert_type): Change assert statement.
8867         (follow_types): Handle rvalue reference types.
8868         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
8869         constant.
8870
8871 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8872
8873         PR gdb/14441
8874         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
8875         value_ref() interface.
8876         * c-valprint.c (c_value_print): Likewise.
8877         * infcall.c (value_arg_coerce): Likewise.
8878         * python/py-value.c (valpy_reference_value): Likewise.
8879         * valops.c (value_cast, value_reinterpret_cast)
8880         (value_dynamic_cast, typecmp): Likewise.
8881         (value_ref): Parameterize by kind of return value reference type.
8882         * value.h (value_ref): Add new parameter "refcode".
8883
8884 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8885
8886         PR gdb/14441
8887         * dwarf2read.c (read_tag_reference_type): Use
8888         lookup_lvalue_reference_type() instead of lookup_reference_type().
8889         * eval.c (evaluate_subexp_standard): Likewise.
8890         * f-exp.y: Likewise.
8891         * gdbtypes.c (make_reference_type, lookup_reference_type):
8892         Generalize with rvalue reference types.
8893         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
8894         convenience wrappers for lookup_reference_type().
8895         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
8896         reference kind parameter.
8897         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
8898         wrappers for lookup_reference_type().
8899         * guile/scm-type.c (gdbscm_type_reference): Use
8900         lookup_lvalue_reference_type() instead of lookup_reference_type().
8901         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
8902         * parse.c (follow_types): Likewise.
8903         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
8904         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
8905         Likewise.
8906         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
8907         (gdbpy_invoke_xmethod): Likewise.
8908         * stabsread.c: Provide extra argument to make_reference_type()
8909         call.
8910         * valops.c (value_ref, value_rtti_indirect_type): Use
8911         lookup_lvalue_reference_type() instead of lookup_reference_type().
8912
8913 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
8914
8915         PR gdb/14441
8916         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
8917         (TYPE_IS_REFERENCE): New macro.
8918         (struct type): Add rvalue_reference_type field.
8919         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
8920
8921 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
8922
8923         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
8924         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
8925         New function definition.
8926         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
8927         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
8928         New function declaration.
8929         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
8930         * mi/mi-interp.h: New file.
8931         * solib.c (info_sharedlibrary_command): Replace for loop with
8932         ALL_SO_LIBS macro
8933         * solib.h (update_solib_list): New function declaration.
8934         (so_list_head): Move macro.
8935         * solist.h (ALL_SO_LIBS): New macro.
8936
8937 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
8938
8939         * infcmd.c (post_create_inferior): Remove unused argument in
8940         call to solib_add.
8941         * remote.c (remote_start_remote): Likewise.
8942         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
8943         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
8944         (enable_break): Likewise.
8945         * solib.c (update_solib_list): Remove unused target argument
8946         and its documentation.
8947         (solib_add): Remove unused target argument.  Remove unused
8948         argument in call to update_solib_list.
8949         (info_sharedlibrary_command): Remove unused argument in call
8950         to update_solib_list.
8951         (sharedlibrary_command): Remove unused argument in call to
8952         solib_add.
8953         (handle_solib_event): Likewise.
8954         (reload_shared_libraries): Likewise.
8955         * solib.h (solib_add): Remove unused target argument.
8956
8957 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8958
8959         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
8960         (s390_displaced_step_fixup): Cover relative branches with the
8961         default fixup handling.  This fixes lack of support for some
8962         relative branch instructions.
8963
8964 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8965
8966         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
8967         ptid from regcache.
8968
8969 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8970
8971         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
8972         i386_darwin_store_inferior_registers): Use ptid from regcache.
8973
8974 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8975
8976         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
8977         i386bsd_store_inferior_registers): Use ptid from regcache.
8978
8979 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8980
8981         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
8982         hppaobsd_store_registers): Use ptid from regcache.
8983
8984 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8985
8986         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
8987         hppanbsd_store_registers): Use ptid from regcache.
8988
8989 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8990
8991         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
8992         from regcache.  Use get_ptrace_pid.
8993
8994 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
8995
8996         * corelow.c (get_core_register_section): Use ptid from regcache,
8997         update doc.
8998
8999 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9000
9001         * bsd-uthread.c (bsd_uthread_fetch_registers,
9002         bsd_uthread_store_registers): Use ptid from regcache, set and
9003         restore inferior_ptid.
9004
9005 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9006
9007         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
9008         fetch_fp_regs, store_register, store_regs, store_fp_register,
9009         store_fp_regs): Use ptid from regcache.
9010
9011 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
9012
9013         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
9014         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
9015         store_vfp_regs): Use ptid from regcache.
9016
9017 2017-03-17  Pedro Alves  <palves@redhat.com>
9018
9019         PR remote/21188
9020         * ser-base.c (ser_base_wait_for): Add comment.
9021         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
9022         version.
9023         * ser-unix.c (hardwire_raw): Remove reference to
9024         scb->current_timeout.
9025         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
9026         (hardwire_ops): Install ser_base_readchar instead of
9027         hardwire_readchar.
9028         * serial.h (struct serial) <current_timeout, timeout_remaining>:
9029         Remove fields.
9030
9031 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
9032
9033         PR gdb/19637
9034         * python/lib/gdb/printer/bound_registers.py: Add support for
9035         Python 3.
9036
9037 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9038
9039         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
9040         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
9041         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
9042         byte_offset to subobj_byte_offset.  Fix the handling of
9043         DWARF_VALUE_STACK on big-endian targets when coming via an
9044         implicit pointer.
9045         (dwarf2_evaluate_loc_desc): Adjust call to
9046         dwarf2_evaluate_loc_desc_full.
9047         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
9048         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
9049
9050 2017-03-16  Yao Qi  <yao.qi@linaro.org>
9051
9052         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
9053         and REVSH instructions.
9054
9055 2017-03-16  Yao Qi  <yao.qi@linaro.org>
9056
9057         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
9058         (arm_record_test): Declare.
9059         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
9060         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
9061         align with the manual.
9062         (thumb_record_misc): Adjust the code order to align with the
9063         manual.
9064         (thumb2_record_decode_insn_handler): Fix instruction matching.
9065         (instruction_reader_thumb): New class.
9066         (arm_record_test): New function.
9067
9068 2017-03-16  Yao Qi  <yao.qi@linaro.org>
9069
9070         * arm-tdep.c (abstract_memory_reader): New class.
9071         (instruction_reader): New class.
9072         (extract_arm_insn): Add argument 'reader'.  Callers updated.
9073         (decode_insn): Likewise.
9074
9075 2017-03-16  Doug Evans  <dje@google.com>
9076
9077         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
9078         member.  Change type of TYPE member to SCM.  All uses updated.
9079         (lsscm_make_lazy_string_smob): Add assert.
9080         (lsscm_make_lazy_string): Flag bad length values.
9081         (lsscm_elt_type): New function.
9082         (gdbscm_lazy_string_to_value): Rewrite to use
9083         lsscm_safe_lazy_string_to_value.
9084         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
9085         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
9086         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
9087         in incoming type.
9088         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9089         * guile/scm-type.c (tyscm_scm_to_type): New function.
9090
9091 2017-03-15  Doug Evans  <dje@google.com>
9092
9093         PR python/17728, python/18439, python/18779
9094         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
9095         member.  Change type of TYPE member to PyObject *.  All uses updated.
9096         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
9097         (gdbpy_create_lazy_string_object): Flag bad length values.
9098         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
9099         Handle typedefs in incoming type.
9100         (stpy_lazy_string_elt_type): New function.
9101         (gdbpy_extract_lazy_string): Call it.
9102         * python/py-value.c (valpy_lazy_string): Flag bad length values.
9103         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
9104         typedefs in incoming type.
9105
9106 2017-03-16  Doug Evans  <dje@google.com>
9107
9108         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
9109         * guile/scm-type.c (tyscm_scm_to_type): New function.
9110
9111 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
9112
9113         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
9114         "ULONGEST" for "skip".
9115
9116 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9117
9118         PR gdb/21220
9119         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
9120         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
9121         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
9122         over ptrace peek/poke until end of buffer or error.
9123
9124 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
9125
9126         * parse.c (length_of_subexp): Make static.
9127         * parser-defs.h (length_of_subexp): Remove.
9128
9129 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9130
9131         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
9132         as well.
9133
9134 2017-03-14  Pedro Alves  <palves@redhat.com>
9135
9136         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
9137         (main): Use std::unique_ptr.  Remove calls to
9138         cp_demangled_name_parse_free.
9139
9140 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9141
9142         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
9143         alphabsd_store_inferior_registers): Use regcache->ptid instead
9144         of inferior_ptid.
9145
9146 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9147
9148         * aix-thread.c (aix_thread_fetch_registers,
9149         aix_thread_store_registers): Use regcache->ptid instead of
9150         inferior_ptid.
9151
9152 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9153
9154         * aarch64-linux-nat.c (fetch_gregs_from_thread,
9155         store_gregs_to_thread, fetch_fpregs_from_thread,
9156         store_fpregs_to_thread): Use regcache->ptid instead of
9157         inferior_ptid.
9158
9159 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9160
9161         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
9162         amd64_linux_fetch_inferior_registers): Use regcache->ptid
9163         instead of inferior_ptid.
9164
9165 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9166
9167         * target.c (target_fetch_registers, target_store_registers): Add
9168         assert.
9169
9170 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
9171
9172         * regcache.h (regcache_get_ptid): New function.
9173         * regcache.c (regcache_get_ptid): New function.
9174
9175 2017-03-13  Mark Wielaard  <mark@klomp.org>
9176
9177         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
9178
9179 2017-03-10  Keith Seitz  <keiths@redhat.com>
9180
9181         PR c++/8218
9182         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
9183
9184 2017-03-08  Pedro Alves  <palves@redhat.com>
9185
9186         PR gdb/18360
9187         * infrun.c (start_step_over, do_target_resume, resume)
9188         (restart_threads): Assert we're not resuming a thread that is
9189         meant to be stopped.
9190         (infrun_thread_stop_requested_callback): Delete.
9191         (infrun_thread_stop_requested): If the thread is internally
9192         stopped, queue a pending stop event and clear the thread's
9193         inline-frame state.
9194         (handle_stop_requested): New function.
9195         (handle_syscall_event, handle_inferior_event_1): Use
9196         handle_stop_requested.
9197         (handle_stop_requested): New function.
9198         (handle_signal_stop): Set the thread's stop_signal here instead of
9199         at caller.
9200         (finish_step_over): Clear step over info unconditionally.
9201         (handle_signal_stop): If the user had interrupted the event
9202         thread, consider the stop a random signal.
9203         (handle_signal_stop) <signal arrived while stepping over
9204         breakpoint>: Don't restart threads here.
9205         (stop_waiting): Don't clear step-over info here.
9206
9207 2017-03-08  Pedro Alves  <palves@redhat.com>
9208
9209         PR 21206
9210         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
9211         goes to argument 2, not 1.
9212
9213 2017-03-08  Pedro Alves  <palves@redhat.com>
9214
9215         PR cli/21218
9216         * top.c (gdb_readline_wrapper): Avoid passing NULL to
9217         display_gdb_prompt.
9218         (command_line_input): Add comment.
9219
9220 2017-03-08  Pedro Alves  <palves@redhat.com>
9221
9222         PR tui/21216
9223         * tui/tui-file.c (tui_file::write): New.
9224         * tui/tui-file.h (tui_file): Override "write".
9225         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
9226         factored out from ...
9227         (tui_puts): ... here.
9228         (tui_putc): Use them.
9229         (tui_write): New function.
9230         * tui/tui-io.h (tui_write): Declare.
9231
9232 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9233
9234         * Makefile.in (SFILES): Replace "environ.c" with
9235         "common/environ.c".
9236         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
9237         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
9238         to...
9239         * common/environ.c: ... here.
9240         * environ.h: Moved to...
9241         * common/environ.h: ... here.
9242
9243 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
9244
9245         * gdbarch.sh (pstring_ptr): New static function.
9246         (gdbarch_disassembler_options): Use it.
9247         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
9248         not valid_disassembler_option->name.
9249         * gdbarch.c: Regenerate.
9250
9251 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
9252
9253         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
9254
9255 2017-03-07  Pedro Alves  <palves@redhat.com>
9256
9257         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
9258
9259 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
9260
9261         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
9262         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
9263         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
9264         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
9265
9266 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
9267
9268         * xtensa-linux-nat.c (fetch_gregs): Remove const.
9269
9270 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
9271
9272         * remote.c (remote_add_target_side_commands): Use range-based
9273         for loop.
9274
9275 2017-03-03  Yao Qi  <yao.qi@linaro.org>
9276
9277         PR gdb/21165
9278         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
9279         value is lazy.
9280         * valprint.c (common_val_print): Likewise.
9281
9282 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
9283
9284         * NEWS: Mention new set/show disassembler-options commands.
9285         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
9286         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
9287         (prospective_options): New static variable.
9288         (gdb_disassembler::gdb_disassembler): Initialize
9289         m_di.disassembler_options.
9290         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
9291         (get_disassembler_options): New function.
9292         (set_disassembler_options): Likewise.
9293         (set_disassembler_options_sfunc): Likewise.
9294         (show_disassembler_options_sfunc): Likewise.
9295         (disassembler_options_completer): Likewise.
9296         (_initialize_disasm): Likewise.
9297         * disasm.h (get_disassembler_options): New prototype.
9298         (set_disassembler_options): Likewise.
9299         * gdbarch.sh (gdbarch_disassembler_options): New variable.
9300         (gdbarch_verify_disassembler_options): Likewise.
9301         * gdbarch.c: Regenerate.
9302         * gdbarch.h: Likewise.
9303         * arm-tdep.c (num_disassembly_options): Delete.
9304         (set_disassembly_style): Likewise.
9305         (arm_disassembler_options): New static variable.
9306         (set_disassembly_style_sfunc): Convert short style name into long
9307         option name.  Call set_disassembler_options.
9308         (show_disassembly_style_sfunc): New function.
9309         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
9310         set_gdbarch_verify_disassembler_options.
9311         (_initialize_arm_tdep): Delete regnames variable and update callers.
9312         (arm_disassembler_options): Initialize.
9313         (disasm_options): New variable.
9314         (num_disassembly_options): Rename from this...
9315         (num_disassembly_styles): ...to this.  Compute by scanning through
9316         disasm_options.
9317         (valid_disassembly_styles): Initialize using disasm_options.
9318         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
9319         set_arm_regname_option.
9320         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
9321         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
9322         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
9323         set_gdbarch_verify_disassembler_options.
9324         * s390-tdep.c (s390_disassembler_options): New static variable.
9325         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
9326         set_gdbarch_verify_disassembler_options.
9327
9328 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
9329
9330         * remote.c (remote_add_target_side_condition): Remove "struct"
9331         keyword from range-based for loop.
9332
9333 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
9334
9335         * remote.c (remote_add_target_side_condition): Use range-based
9336         for loop.  Update comment.
9337
9338 2017-02-27  Yao Qi  <yao.qi@linaro.org>
9339
9340         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
9341
9342 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
9343
9344         * regcache.c (regcache_raw_update): New function.
9345         (regcache_raw_read): Move code to regcache_raw_update.
9346         * regcache.h (regcache_raw_update): New declaration.
9347         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
9348
9349 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
9350
9351         * dwarf2read.c (create_debug_type_hash_table): Initialize
9352         header.signature and header.type_offset_in_tu.
9353
9354 2017-02-24  Pedro Alves  <palves@redhat.com>
9355
9356         * symtab.c (make_file_symbol_completion_list_1): Use
9357         add_symtab_completions.
9358
9359 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
9360
9361         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
9362
9363 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
9364
9365         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
9366         I386_MAX_REGISTER_SIZE.
9367         (i386_pseudo_register_write): Likewise.
9368         (i386_process_record): Likewise.
9369         * i387-tdep.c (i387_supply_xsave): Likewise.
9370         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
9371         (store_register): Likewise.
9372
9373 2017-02-23  Pedro Alves  <palves@redhat.com>
9374
9375         * ada-lang.c: Include "common/function-view.h".
9376         (ada_iterate_over_symbols): Adjust to use function_view as
9377         callback type.
9378         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
9379         (ada_make_symbol_completion_list): Use a lambda.
9380         (ada_exc_search_name_matches): Delete.
9381         (name_matches_regex): New.
9382         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
9383         * compile/compile-c-support.c: Include "common/function-view.h".
9384         (print_one_macro): Change prototype to accept a ui_file pointer.
9385         (write_macro_definitions): Use a lambda.
9386         * dwarf2read.c: Include "common/function-view.h".
9387         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
9388         (dw2_expand_symtabs_matching): Adjust to use function_view as
9389         callback type.
9390         * language.h: Include "common/function-view.h".
9391         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
9392         function_view as callback type.
9393         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
9394         * linespec.c: Include "common/function-view.h".
9395         (collect_info::add_symbol): New method.
9396         (struct symbol_and_data_callback, iterate_inline_only, struct
9397         symbol_matcher_data, iterate_name_matcher): Delete.
9398         (iterate_over_all_matching_symtabs): Adjust to use function_view
9399         as callback type and lambdas.
9400         (iterate_over_file_blocks): Adjust to use function_view as
9401         callback type.
9402         (decode_compound_collector): Now a class with private fields.
9403         (decode_compound_collector::release_symbols): New method.
9404         (collect_one_symbol): Rename to...
9405         (decode_compound_collector::operator()): ... this and adjust.
9406         (lookup_prefix_sym): decode_compound_collector construction bits
9407         move to decode_compound_collector ctor.  Pass the
9408         decode_compound_collector object directly as callback.  Remove
9409         cleanups and use decode_compound_collector::release_symbols
9410         instead.
9411         (symtab_collector): Now a class with private fields.
9412         (symtab_collector::release_symtabs): New method.
9413         (add_symtabs_to_list): Rename to...
9414         (symtab_collector::operator()): ... this and adjust.
9415         (collect_symtabs_from_filename): symtab_collector construction
9416         bits move to symtab_collector ctor.  Pass the symtab_collector
9417         object directly as callback.  Remove cleanups and use
9418         symtab_collector::release_symtabs instead.
9419         (collect_symbols): Delete.
9420         (add_matching_symbols_to_info): Use lambdas.
9421         * macrocmd.c (print_macro_callback): Delete.
9422         (info_macro_command): Use a lambda.
9423         (info_macros_command): Pass print_macro_definition as callable
9424         directly.
9425         (print_one_macro): Remove 'ignore' parameter.
9426         (macro_list_command): Adjust.
9427         * macrotab.c (macro_for_each_data::fn): Now a function_view.
9428         (macro_for_each_data::user_data): Delete field.
9429         (foreach_macro): Adjust to call the function_view.
9430         (macro_for_each): Adjust to use function_view as callback type.
9431         (foreach_macro_in_scope): Adjust to call the function_view.
9432         (macro_for_each_in_scope): Adjust to use function_view as callback
9433         type.
9434         * macrotab.h: Include "common/function-view.h".
9435         (macro_callback_fn): Declare a prototype instead of a pointer.
9436         Remove "user_data" parameter.
9437         (macro_for_each, macro_for_each_in_scope): Adjust to use
9438         function_view as callback type.
9439         * psymtab.c (partial_map_expand_apply)
9440         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
9441         Adjust to use function_view as callback type and to return bool.
9442         (psym_expand_symtabs_matching): Adjust to use function_view as
9443         callback types.
9444         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
9445         to use function_view as callback type and to return bool.
9446         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
9447         callback types.
9448         * symfile.c (expand_symtabs_matching): Adjust to use function_view
9449         as callback types.
9450         * symfile.h: Include "common/function-view.h".
9451         (expand_symtabs_file_matcher_ftype)
9452         (expand_symtabs_symbol_matcher_ftype)
9453         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
9454         return bool.
9455         (quick_symbol_functions::map_symtabs_matching_filename)
9456         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
9457         function_view as callback type and return bool.
9458         (expand_symtabs_matching): Adjust to use function_view as callback
9459         type.
9460         (maintenance_expand_name_matcher)
9461         (maintenance_expand_file_matcher): Delete.
9462         (maintenance_expand_symtabs): Use lambdas.
9463         * symtab.c (iterate_over_some_symtabs): Adjust to use
9464         function_view as callback types and return bool.
9465         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
9466         of a cleanup.
9467         (lookup_symtab_callback): Delete.
9468         (lookup_symtab): Use a lambda.
9469         (iterate_over_symbols): Adjust to use function_view as callback
9470         type.
9471         (struct search_symbols_data, search_symbols_file_matches)
9472         (search_symbols_name_matches): Delete.
9473         (search_symbols): Use a pair of lambdas.
9474         (struct add_name_data, add_macro_name, symbol_completion_matcher)
9475         (symtab_expansion_callback): Delete.
9476         (default_make_symbol_completion_list_break_on_1): Use lambdas.
9477         * symtab.h: Include "common/function-view.h".
9478         (iterate_over_some_symtabs): Adjust to use function_view as
9479         callback type and return bool.
9480         (iterate_over_symtabs): Adjust to use function_view as callback
9481         type.
9482         (symbol_found_callback_ftype): Remove 'data' parameter and return
9483         bool.
9484         (iterate_over_symbols): Adjust to use function_view as callback
9485         type.
9486
9487 2017-02-23  Pedro Alves  <palves@redhat.com>
9488
9489         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
9490         (%.o) <unittests/%.c>: New pattern.
9491         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
9492         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
9493         * common/function-view.h: New file.
9494         * unittests/function-view-selftests.c: New file.
9495         * configure: Regenerate.
9496
9497 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
9498
9499         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
9500         inferior_ptid.
9501         * go32-nat.c (go32_thread_alive): Likewise.
9502
9503 2017-02-23  Yao Qi  <yao.qi@linaro.org>
9504
9505         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
9506         delete.
9507
9508 2017-02-23  Yao Qi  <yao.qi@linaro.org>
9509
9510         * varobj.c (varobj_clear_saved_item): Use delete instead of
9511         xfree.
9512         (update_dynamic_varobj_children): Likewise.
9513
9514 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9515
9516         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
9517
9518 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
9519
9520         * common/enum-flags.h (enum_flags::enum_flags): Initialize
9521         m_enum_value to 0 in default constructor.
9522
9523 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
9524
9525         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
9526         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
9527         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
9528         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
9529         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
9530         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
9531         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
9532         IS_STORE_CONDITIONAL_INSN.
9533
9534 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9535
9536         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
9537
9538 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
9539
9540         * NEWS (Changes since GDB 7.12): Add DWARF-5.
9541
9542 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
9543
9544         * dwarf2read.c (skip_one_die, read_attribute_value)
9545         (dwarf2_const_value_attr, dump_die_shallow)
9546         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9547         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
9548
9549 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
9550
9551         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
9552         (dwarf_parse_macro_header): Accept DWARF version 5.
9553         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
9554
9555 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
9556
9557         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
9558         DW_AT_GNU_*.
9559         * common/common-exceptions.h (enum errors): Likewise.
9560         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
9561         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
9562         (dwarf_expr_context::execute_stack_op): Likewise.
9563         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
9564         Likewise.
9565         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
9566         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
9567         (show_entry_values_debug, call_site_to_target_addr)
9568         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
9569         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
9570         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
9571         (value_of_dwarf_block_entry, indirect_pieced_value)
9572         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
9573         (disassemble_dwarf_expression): Likewise.
9574         * dwarf2read.c (process_die, inherit_abstract_dies)
9575         (read_call_site_scope): Likewise.
9576         * gdbtypes.h (struct func_type, struct call_site_parameter)
9577         (struct call_site): Likewise.
9578         * stack.c (read_frame_arg): Likewise.
9579         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
9580
9581 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
9582
9583         * defs.h (read_unsigned_leb128): New declaration.
9584         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
9585         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
9586         (dwarf2_find_location_expression): Call also
9587         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
9588         * dwarf2loc.h (dwarf2_version): New declaration.
9589         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
9590         rnglists.
9591         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
9592         .debug_rnglists.
9593         (struct dwop_section_names): Add loclists_dwo.
9594         (dwop_section_names): Add .debug_loclists.dwo.
9595         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
9596         (struct dwarf2_per_cu_data): Add dwarf_version.
9597         (struct dwo_sections): Add loclists.
9598         (struct attr_abbrev): Add implicit_const.
9599         (read_indirect_line_string): New declaration.
9600         (read_unsigned_leb128): Delete declaration.
9601         (rcuh_kind): New definition.
9602         (read_and_check_comp_unit_head): Change parameter
9603         is_debug_types_section to section_kind.
9604         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
9605         (read_comp_unit_head): Change parameter abfd to section, add parameter
9606         section_kind.  Handle DWARF-5.
9607         (error_check_comp_unit_head): Accept also DWARF version 5.
9608         (read_and_check_comp_unit_head): Change parameter
9609         is_debug_types_section to section_kind.
9610         (read_and_check_type_unit_head): Delete function.
9611         (read_abbrev_offset): Handle DWARF-5.
9612         (create_debug_type_hash_table): Add parameter section_kind.  Process
9613         only DW_UT_type.  Use signature and type_offset_in_tu from struct
9614         comp_unit_head.
9615         (create_debug_types_hash_table): Update create_debug_type_hash_table
9616         caller.
9617         (create_all_type_units): Call create_debug_type_hash_table.
9618         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
9619         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
9620         caller.
9621         (skip_one_die): Handle DW_FORM_implicit_const.
9622         (dwarf2_rnglists_process): New function.
9623         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
9624         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
9625         (read_attribute_value): Handle DW_FORM_implicit_const,
9626         DW_FORM_line_strp.
9627         (read_attribute): Handle DW_FORM_implicit_const.
9628         (read_indirect_string_at_offset_from): New function from
9629         read_indirect_string_at_offset.
9630         (read_indirect_string_at_offset): Call
9631         read_indirect_string_at_offset_from.
9632         (read_indirect_line_string_at_offset): New function.
9633         (read_indirect_string): New function comment.
9634         (read_indirect_line_string): New function.
9635         (read_unsigned_leb128): Make it global.
9636         (dwarf2_string_attr): Handle DWARF-5.
9637         (add_include_dir_stub, read_formatted_entries): New functions.
9638         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
9639         Handle DWARF-5.
9640         (per_cu_header_read_in): Update read_comp_unit_head caller.
9641         (dwarf2_version): New function.
9642         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
9643         rnglists.
9644         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
9645         fields.
9646
9647 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
9648
9649         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
9650
9651 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
9652
9653         * dwarf2read.c (dwarf2_ranges_process): New function from
9654         dwarf2_ranges_read.
9655         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
9656         dwarf2_ranges_process.
9657
9658 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
9659
9660         * dwarf2read.c (create_debug_type_hash_table): New function from
9661         create_debug_types_hash_table.
9662         (create_debug_types_hash_table): Call create_debug_type_hash_table.
9663         (create_all_type_units, open_and_init_dwo_file): Update
9664         create_debug_types_hash_table callers.
9665
9666 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9667
9668         PR gdb/16188
9669         * fork-child.c (trace_start_error): Fix thinko.  va_end should
9670         refer to 'ap', not 'args'.
9671
9672 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9673             Pedro Alves  <palves@redhat.com>
9674
9675         PR gdb/16188
9676         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
9677         calls succeeded.
9678         * fork-child.c (trace_start_error): New function.
9679         (trace_start_error_with_name): Likewise.
9680         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
9681         * inf-ptrace.c (inf_ptrace_me): Likewise.
9682         * inferior.h (trace_start_error): New prototype.
9683         (trace_start_error_with_name): Likewise.
9684
9685 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
9686
9687         PR gdb/21164
9688         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
9689         NULL before using it.
9690         * symmisc.c (maintenance_print_symbols): Likewise.
9691         (maintenance_print_msymbols): Likewise.
9692
9693 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
9694
9695         * NEWS: Add record Python bindings entry.
9696
9697 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
9698
9699         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
9700         py-record-full.o.
9701         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
9702         * python/py-record-btrace.c, python/py-record-btrace.h,
9703         python/py-record-full.c, python/py-record-full.h: New file.
9704         * python/py-record.c: Add include for py-record-btrace.h and
9705         py-record-full.h.
9706         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
9707         recpy_instruction_history, recpy_function_call_history, recpy_begin,
9708         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
9709         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
9710         New definition.
9711         (gdbpy_initialize_btrace): New export.
9712         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
9713
9714 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
9715
9716         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
9717         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
9718         * python/py-record.c: New file.
9719         * python/python-internal.h (gdbpy_start_recording,
9720         gdbpy_current_recording, gdpy_stop_recording,
9721         gdbpy_initialize_record): New export.
9722         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
9723         (python_GdbMethods): Add gdbpy_start_recording,
9724         gdbpy_current_recording and gdbpy_stop_recording.
9725
9726 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
9727
9728         * record-btrace.c (record_btrace_record_method): New function.
9729         (init_record_btrace_ops): Initialize to_record_method.
9730         * record-full.c (record_full_record_method): New function.
9731         (init_record_full_ops, init_record_full_core_ops): Add
9732         record_full_record_method.
9733         * record.h (enum record_method): New enum.
9734         * target-debug.h (target_debug_print_enum_record_method: New define.
9735         * target-delegates.c: Regenerate.
9736         * target.c (target_record_method): New function.
9737         * target.h: Include record.h.
9738         (struct target_ops) <to_record_method>: New field.
9739         (target_record_method): New export.
9740
9741 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
9742
9743         * record.h (record_start, record_stop): New export.
9744         * record.c (record_start, record_stop): New function.
9745
9746 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
9747
9748         * btrace.c (btrace_fetch): Copy function call segments pointer
9749         into a vector.
9750         (btrace_clear): Clear the vector.
9751         (btrace_find_insn_by_number): Use binary search to find the correct
9752         function call segment.
9753         * btrace.h (brace_fun_p): New typedef.
9754         (struct btrace_thread_info) <functions>: New field.
9755
9756 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
9757
9758         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
9759         * btrace.c (btrace_decode_error): ... here.  New function.
9760         * btrace.h (btrace_decode_error): New export.
9761
9762 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
9763
9764         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
9765         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
9766         btrace_find_insn_by_number): Remove special case for gaps.
9767         * btrace.h (btrace_insn_get_error): New export.
9768         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
9769         * record-btrace.c (btrace_insn_history): Print number for gaps.
9770         (record_btrace_info, record_btrace_goto): Handle gaps.
9771
9772 2017-02-14  Tom Tromey  <tom@tromey.com>
9773
9774         PR python/13598:
9775         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
9776         event.
9777         * python/py-evts.c (gdbpy_initialize_py_events): Add
9778         before_prompt registry.
9779         * python/py-events.h (events_object) <before_prompt>: New field.
9780
9781 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
9782
9783         * btrace.c (ftrace_new_switch): Preserve up link and flags.
9784
9785 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
9786
9787         * symfile (_initialize_symfile): Add usage text to the load command's
9788         help text.
9789
9790 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
9791
9792         * utils.c (defaulted_query): Don't query on secondary UIs.
9793
9794 2017-02-10  Tom Tromey  <tom@tromey.com>
9795
9796         * rust-lang.c (rust_get_disr_info): Remove unused variable.
9797
9798 2017-02-10  Tom Tromey  <tom@tromey.com>
9799
9800         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
9801         "cleanup" local.
9802         * python/py-type.c (typy_legacy_template_argument): Remove
9803         unnecessary "cleanup" local.
9804
9805 2017-02-10  Tom Tromey  <tom@tromey.com>
9806
9807         * python/python.c (do_start_initialization): New function, from
9808         _initialize_python.
9809         (_initialize_python): Call do_start_initialization.
9810         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
9811         goto.
9812
9813 2017-02-10  Tom Tromey  <tom@tromey.com>
9814
9815         * python/py-prettyprint.c (pretty_print_one_value): Use
9816         gdbpy_ref.
9817
9818 2017-02-10  Tom Tromey  <tom@tromey.com>
9819
9820         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
9821         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
9822         gdbpy_ref.
9823         * python/py-type.c (field_new): Use gdbpy_ref.
9824         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
9825         gdbpy_ref.
9826         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
9827         (py_free_pspace): Likewise.
9828         (pspace_to_pspace_object): Likewise.
9829         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
9830         (py_free_objfile): Likewise.
9831         (objfile_to_objfile_object): Likewise.
9832         * python/py-inferior.c (delete_thread_object): Use
9833         gdbpy_ref.
9834         (infpy_read_memory): Likewise.
9835         (py_free_inferior): Likewise.
9836         * python/py-evtregistry.c (create_eventregistry_object): Use
9837         gdbpy_ref.
9838         * python/py-event.c (create_event_object): Use gdbpy_ref.
9839
9840 2017-02-10  Tom Tromey  <tom@tromey.com>
9841
9842         * python/py-ref.h (gdbpy_ref_policy): Now a template.
9843         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
9844         used.
9845         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
9846         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
9847         python/py-exitedevent.c, python/py-finishbreakpoint.c,
9848         python/py-framefilter.c, python/py-function.c,
9849         python/py-inferior.c, python/py-infevents.c,
9850         python/py-linetable.c, python/py-newobjfileevent.c,
9851         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
9852         python/py-signalevent.c, python/py-stopevent.c,
9853         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
9854         python/py-unwind.c, python/py-utils.c, python/py-value.c,
9855         python/py-varobj.c, python/py-xmethods.c, python/python.c,
9856         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
9857
9858 2017-02-10  Tom Tromey  <tom@tromey.com>
9859
9860         * ui-out.h (ui_out_emit_type): New class.
9861         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
9862         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
9863         and ui_out_emit_tuple.
9864         (enumerate_locals): Likewise.
9865         (py_mi_print_variables, py_print_locals, py_print_args): Use
9866         ui_out_emit_list.
9867         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
9868         ui_out_emit_list.
9869         * common/gdb_optional.h: New file.
9870
9871 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
9872
9873         * MAINTAINERS (Write After Approval): Update my e-mail address.
9874
9875 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
9876
9877         PR gdb/21122
9878         * breakpoint.c (_initialize_breakpoint): Update the help description
9879         of the 'commands' command to indicate that it takes a list argument.
9880
9881 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
9882
9883         * interps.c (current_interp_set_logging): Remove "return".
9884
9885 2017-02-09  Gary Benson  <gbenson@redhat.com>
9886
9887         * symtab.c (add_symtab_completions): Prevent NULL pointer
9888         dereference.
9889
9890 2017-02-08  Pedro Alves  <palves@redhat.com>
9891
9892         * interps.c (interp::interp): Remove reference to quiet_p.
9893         (interp_set): Make static.  Remove dead "Switching to" output
9894         code.
9895         (interp_quiet_p, interp_set_quiet): Delete.
9896         (interpreter_exec_cmd): Don't set the interpreter quiet.
9897         * interps.h (interp_quiet_p): Make static.
9898         (class interp) <quiet_p>: Remove field
9899
9900 2017-02-08  Jerome Guitton  <guitton@adacore.com>
9901
9902         * cli/cli-decode.c (find_command_name_length): Make it extern.
9903         * cli/cli-decode.h (find_command_name_length): Declare.
9904         * cli/cli-script.c (command_name_equals, line_first_arg):
9905         New functions.
9906         (process_next_line): Use cli-decode to parse command names.
9907         (build_command_line): Make args a constant pointer.
9908
9909 2017-02-08  Jerome Guitton  <guitton@adacore.com>
9910
9911         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
9912         Remove case-insensitive search.
9913
9914 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
9915
9916         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
9917         at the end of the line.  Avoids an ARI warning.
9918
9919 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
9920
9921         * NEWS: Mention support for record/replay of Intel 64 rdrand and
9922         rdseed instructions.
9923         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
9924
9925 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
9926
9927         PR tdep/20936
9928         Provide and use sparc32 and sparc64 target description XML files.
9929         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
9930         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
9931         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
9932         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
9933         * features/sparc/sparc32-solaris.xml: New file.
9934         * features/sparc/sparc64-solaris.xml: New file.
9935         * features/sparc/sparc32-solaris.c: Generated.
9936         * features/sparc/sparc64-solaris.c: Generated.
9937         * sparc-tdep.h: Account for differences in target descriptions.
9938         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
9939         (sparc32_register_type): Use target provided registers.
9940         (validate_tdesc_registers): New function.
9941         (sparc32_gdbarch_init): Use tdesc_has_registers.
9942         Set pseudoregister functions.
9943         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
9944         (sparc64_register_type): Use target provided registers.
9945         (sparc64_init_abi): Set pseudoregister functions.
9946
9947 2017-02-03  Tom Tromey  <tom@tromey.com>
9948
9949         PR rust/21097:
9950         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
9951         with a single member.
9952
9953 2017-02-03  Pedro Alves  <palves@redhat.com>
9954
9955         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
9956         (cli_interp_base::~cli_interp_base): New.
9957         (cli_interp): New struct.
9958         (as_cli_interp): Cast the interp itself to cli_interp.
9959         (cli_interpreter_pre_command_loop): Rename to ...
9960         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
9961         parameter.
9962         (cli_interpreter_init): Rename to ...
9963         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
9964         boolean.  Make extern.
9965         (cli_interpreter_resume): Rename to ...
9966         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
9967         extern.
9968         (cli_interpreter_suspend): Rename to ...
9969         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
9970         extern.
9971         (cli_interpreter_exec): Rename to ...
9972         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
9973         extern.
9974         (cli_interpreter_supports_command_editing): Rename to ...
9975         (cli_interp_base::supports_command_editing): ... this.  Remove
9976         'interp' parameter.  Make extern.
9977         (cli_ui_out): Rename to ...
9978         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
9979         Make extern.
9980         (cli_set_logging): Rename to ...
9981         (cli_interp_base::set_logging): ... this.  Remove 'interp'
9982         parameter.  Make extern.
9983         (cli_interp_procs): Delete.
9984         (cli_interp_factory): Adjust to use "new".
9985         * cli/cli-interp.h: Include "interps.h".
9986         (struct cli_interp_base): New struct.
9987         * interps.c (struct interp): Delete.  Fields moved to interps.h.
9988         (interp_new): Delete.
9989         (interp::interp, interp::~interp): New.
9990         (interp_set): Use bool, and return void.  Assume the interpreter
9991         has suspend, init and resume methods, and that the all return
9992         void.
9993         (set_top_level_interpreter): interp_set returns void.
9994         (interp_ui_out): Adapt.
9995         (current_interp_set_logging): Adapt.
9996         (interp_data): Delete.
9997         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
9998         (interp_exec): Adapt.
9999         (top_level_interpreter_data): Delete.
10000         * interps.h (interp_init_ftype, interp_resume_ftype)
10001         (interp_suspend_ftype, interp_exec_ftype)
10002         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
10003         (class interp): New.
10004         (interp_new): Delete.
10005         (interp_set): Now returns void.  Use bool.
10006         (interp_data, top_level_interpreter_data): Delete.
10007         * mi/mi-common.h: Include interps.h.
10008         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
10009         init, resume, suspect, exec, interp_ui_out, set_logging and
10010         pre_command_loop methods.
10011         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
10012         (mi_interpreter_init): Rename to ...
10013         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
10014         bool, return void and make extern.  Adjust.
10015         (mi_interpreter_resume): ... Rename to ...
10016         (mi_interp::resume): ... this.  Remove the 'data' parameter,
10017         return void and make extern.  Adjust.
10018         (mi_interpreter_suspend): ... Rename to ...
10019         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
10020         return void and make extern.  Adjust.
10021         (mi_interpreter_exec): ... Rename to ...
10022         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
10023         extern.  Adjust.
10024         (mi_interpreter_pre_command_loop): ... Rename to ...
10025         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
10026         parameter and make extern.
10027         (mi_on_normal_stop_1): Adjust.
10028         (mi_ui_out): Rename to ...
10029         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
10030         parameter and make extern.  Adjust.
10031         (mi_set_logging): Rename to ...
10032         (mi_interp::set_logging): ... this.  Remove the 'interp'
10033         parameter and make extern.  Adjust.
10034         (mi_interp_procs): Delete.
10035         (mi_interp_factory): Adjust to use 'new'.
10036         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
10037         (mi_print_exception, mi_execute_command, mi_load_progress):
10038         Adjust.
10039         * tui/tui-interp.c (tui_interp): New class.
10040         (as_tui_interp): Return a tui_interp pointer.
10041         (tui_on_normal_stop, tui_on_signal_received)
10042         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
10043         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
10044         to use interp::interp_ui_out.
10045         (tui_init): Rename to ...
10046         (tui_interp::init): ... this.  Remove the 'self' parameter, use
10047         bool, return void and make extern.  Adjust.
10048         (tui_resume): Rename to ...
10049         (tui_interp::resume): ... this.  Remove the 'data' parameter,
10050         return void and make extern.  Adjust.
10051         (tui_suspend): Rename to ...
10052         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
10053         return void and make extern.  Adjust.
10054         (tui_ui_out): Rename to ...
10055         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
10056         parameter, and make extern.  Adjust.
10057         (tui_exec): Rename to ...
10058         (tui_interp::exec): ... this.  Remove the 'data' parameter and
10059         make extern.
10060         (tui_interp_procs): Delete.
10061         (tui_interp_factory): Use "new".
10062
10063 2017-02-02  Tom Tromey  <tom@tromey.com>
10064
10065         * rust-exp.y (ends_raw_string, space_then_number)
10066         (rust_identifier_start_p): Return bool.
10067         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
10068         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
10069         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
10070         (rust_chartype_p): Return bool.
10071         (val_print_struct, rust_print_struct_def, rust_print_type):
10072         Update.
10073         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
10074         Return bool.
10075
10076 2017-02-02  Tom Tromey  <tom@tromey.com>
10077
10078         * rust-lang.c: Reindent.
10079
10080 2017-02-02  Tom Tromey  <tom@tromey.com>
10081
10082         * rust-lang.h (rust_crate_for_block): Update.
10083         * rust-lang.c (rust_crate_for_block): Return std::string.
10084         (rust_get_disr_info): Use std:;string, not
10085         gdb::unique_xmalloc_ptr.
10086         * rust-exp.y (crate_name): Update.
10087
10088 2017-02-02  Pedro Alves  <palves@redhat.com>
10089
10090         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
10091         field out of gdb_disassembler_test and make it static.
10092
10093 2017-02-02  Pedro Alves  <palves@redhat.com>
10094
10095         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
10096         mi1_interp and mi_interp fields.
10097
10098 2017-02-02  Pedro Alves  <palves@redhat.com>
10099
10100         * cli/cli-interp.c (struct saved_output_files, saved_output):
10101         Moved from cli/cli-logging.c.
10102         (cli_set_logging): New function.
10103         (cli_interp_procs): Install cli_set_logging.
10104         * cli/cli-interp.h (make_logging_output, cli_set_logging):
10105         Declare.
10106         * cli/cli-logging.c (struct saved_output_files, saved_output):
10107         Moved to cli/cli-interp.c.
10108         (pop_output_files): Don't save outputs here.
10109         (make_logging_output): New function.
10110         (handle_redirections): Don't build tee nor save previous outputs
10111         here.
10112         * interps.c (current_interp_set_logging): Change prototype.
10113         Assume there's always a set_logging_proc method installed.
10114         * interps.h (interp_set_logging_ftype): Change prototype.
10115         (current_interp_set_logging): Change prototype and adjust comment.
10116         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
10117         use make_logging_output.
10118         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
10119 2017-02-02  Pedro Alves  <palves@redhat.com>
10120
10121         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
10122         from ...
10123         (set_logging_overwrite): ... here.
10124         (logging_no_redirect_file): Delete.
10125         (set_logging_redirect): Don't handle redirection on the fly.
10126         Instead warn that "logging off" / "logging on" is necessary.
10127         (pop_output_files): Delete references to logging_no_redirect_file.
10128         (show_logging_command): Always speak in terms of what will happen
10129         once logging is reenabled.
10130
10131 2017-02-02  Pedro Alves  <palves@redhat.com>
10132
10133         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
10134
10135 2017-02-02  Pedro Alves  <palves@redhat.com>
10136
10137         * disasm.c (gdb_pretty_print_insn): Rename to ...
10138         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
10139         Remove gdbarch parameter.  Adapt to clear the object's buffers
10140         instead of allocating new buffers, and to print using the object's
10141         gdb_disassembler instead of calling gdb_print_insn.
10142         (dump_insns): Use gdb_pretty_print_disassembler.
10143         * disasm.h (gdb_pretty_print_insn): Delete declaration.
10144         (gdb_pretty_print_disassembler): New class.
10145         * record-btrace.c (btrace_insn_history): Use
10146         gdb_pretty_print_disassembler.
10147
10148 2017-02-02  Pedro Alves  <palves@redhat.com>
10149
10150         * ada-lang.c (type_as_string): Use string_file.
10151         * ada-valprint.c (ada_print_floating): Use string_file.
10152         * ada-varobj.c (ada_varobj_scalar_image)
10153         (ada_varobj_get_value_image): Use string_file.
10154         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
10155         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
10156         * breakpoint.c (update_inserted_breakpoint_locations)
10157         (insert_breakpoint_locations, reattach_breakpoints)
10158         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
10159         (print_it_watchpoint): Use string_file.
10160         (save_breakpoints): Use stdio_file.
10161         * c-exp.y (oper): Use string_file.
10162         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
10163         tee_file.
10164         (pop_output_files): Use delete.
10165         (handle_redirections): Use stdio_file and tee_file.
10166         * cli/cli-setshow.c (do_show_command): Use string_file.
10167         * compile/compile-c-support.c (c_compute_program): Use
10168         string_file.
10169         * compile/compile-c-symbols.c (generate_vla_size): Take a
10170         'string_file &' instead of a 'ui_file *'.
10171         (generate_c_for_for_one_variable): Take a 'string_file &' instead
10172         of a 'ui_file *'.  Use string_file.
10173         (generate_c_for_variable_locations): Take a 'string_file &'
10174         instead of a 'ui_file *'.
10175         * compile/compile-internal.h (generate_c_for_for_one_variable):
10176         Take a 'string_file &' instead of a 'ui_file *'.
10177         * compile/compile-loc2c.c (push, pushf, unary, binary)
10178         (print_label, pushf_register_address, pushf_register)
10179         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
10180         'ui_file *'.  Adjust.
10181         * compile/compile.c (compile_to_object): Use string_file.
10182         * compile/compile.h (compile_dwarf_expr_to_c)
10183         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
10184         'ui_file *'.
10185         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
10186         (replace_typedefs_qualified_name): Use string_file and
10187         obstack_copy0.
10188         * disasm.c (gdb_pretty_print_insn): Use string_file.
10189         (gdb_disassembly): Adjust reference the null_stream global.
10190         (do_ui_file_delete): Delete.
10191         (gdb_insn_length): Use null_stream.
10192         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
10193         * dwarf2loc.c (dwarf2_compile_property_to_c)
10194         (locexpr_generate_c_location, loclist_generate_c_location): Take a
10195         'string_file &' instead of a 'ui_file *'.
10196         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
10197         * dwarf2read.c (do_ui_file_peek_last): Delete.
10198         (dwarf2_compute_name): Use string_file.
10199         * event-top.c (gdb_setup_readline): Use stdio_file.
10200         * gdbarch.sh (verify_gdbarch): Use string_file.
10201         * gdbtypes.c (safe_parse_type): Use null_stream.
10202         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
10203         string_file.
10204         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
10205         'string_file *' instead of a 'ui_file *'.
10206         (gdbscm_arch_disassemble): Use string_file.
10207         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
10208         * guile/scm-ports.c (class ioscm_file_port): Now a class that
10209         inherits from ui_file.
10210         (ioscm_file_port_delete, ioscm_file_port_rewind)
10211         (ioscm_file_port_put): Delete.
10212         (ioscm_file_port_write): Rename to ...
10213         (ioscm_file_port::write): ... this.  Remove file_port_magic
10214         checks.
10215         (ioscm_file_port_new): Delete.
10216         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
10217         ui_file_up.
10218         * guile/scm-type.c (tyscm_type_name): Use string_file.
10219         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
10220         Use string_file.
10221         * infcmd.c (print_return_value_1): Use string_file.
10222         * infrun.c (print_target_wait_results): Use string_file.
10223         * language.c (add_language): Use string_file.
10224         * location.c (explicit_to_string_internal): Use string_file.
10225         * main.c (captured_main_1): Use null_file.
10226         * maint.c (maintenance_print_architecture): Use stdio_file.
10227         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
10228         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
10229         event_channel>: Change type to mi_console_file pointer.
10230         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
10231         (mi_console_file_delete): Delete.
10232         (struct mi_console_file): Delete.
10233         (mi_console_file_magic): Delete.
10234         (mi_console_file_new): Delete.
10235         (mi_console_file::mi_console_file): New.
10236         (mi_console_file_delete): Delete.
10237         (mi_console_file_fputs): Delete.
10238         (mi_console_file::write): New.
10239         (mi_console_raw_packet): Delete.
10240         (mi_console_file::flush): New.
10241         (mi_console_file_flush): Delete.
10242         (mi_console_set_raw): Rename to ...
10243         (mi_console_file::set_raw): ... this.
10244         * mi/mi-console.h (class mi_console_file): New class.
10245         (mi_console_file_new, mi_console_set_raw): Delete.
10246         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
10247         (mi_set_logging): Use delete and tee_file.  Adjust.
10248         * mi/mi-main.c (output_register): Use string_file.
10249         (mi_cmd_data_evaluate_expression): Use string_file.
10250         (mi_cmd_data_read_memory): Use string_file.
10251         (mi_cmd_execute, print_variable_or_computed): Use string_file.
10252         * mi/mi-out.c (mi_ui_out::main_stream): New.
10253         (mi_ui_out::rewind): Use main_stream and
10254         string_file.
10255         (mi_ui_out::put): Use main_stream and string_file.
10256         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10257         Allocate a 'string_file' instead.
10258         (mi_out_new): Don't allocate a mem_fileopen stream here.
10259         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
10260         (mi_ui_out::main_stream): Declare method.
10261         * printcmd.c (eval_command): Use string_file.
10262         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
10263         * python/py-arch.c (archpy_disassemble): Use string_file.
10264         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
10265         * python/py-frame.c (frapy_str): Use string_file.
10266         * python/py-framefilter.c (py_print_type, py_print_single_arg):
10267         Use string_file.
10268         * python/py-type.c (typy_str): Use string_file.
10269         * python/py-unwind.c (unwind_infopy_str): Use string_file.
10270         * python/py-value.c (valpy_str): Use string_file.
10271         * record-btrace.c (btrace_insn_history): Use string_file.
10272         * regcache.c (regcache_print): Use stdio_file.
10273         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
10274         * remote.c (escape_buffer): Use string_file.
10275         * rust-lang.c (rust_get_disr_info): Use string_file.
10276         * serial.c (serial_open_ops_1): Use stdio_file.
10277         (do_serial_close): Use delete.
10278         * stack.c (print_frame_arg): Use string_file.
10279         (print_frame_args): Remove local mem_fileopen stream, not used.
10280         (print_frame): Use string_file.
10281         * symmisc.c (maintenance_print_symbols): Use stdio_file.
10282         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
10283         Take a 'string_file *' instead of a 'ui_file *'.
10284         * top.c (new_ui): Use stdio_file and stderr_file.
10285         (free_ui): Use delete.
10286         (execute_command_to_string): Use string_file.
10287         (quit_confirm): Use string_file.
10288         * tracepoint.c (collection_list::append_exp): Use string_file.
10289         * tui/tui-disasm.c (tui_disassemble): Use string_file.
10290         * tui/tui-file.c: Don't include "ui-file.h".
10291         (enum streamtype, struct tui_stream): Delete.
10292         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
10293         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
10294         (tui_file::tui_file): New method.
10295         (tui_file_fputs): Delete.
10296         (tui_file_get_strbuf): Delete.
10297         (tui_file::puts): New method.
10298         (tui_file_adjust_strbuf): Delete.
10299         (tui_file_flush): Delete.
10300         (tui_file::flush): New method.
10301         * tui/tui-file.h: Tweak intro comment.
10302         Include ui-file.h.
10303         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
10304         (tui_file_adjust_strbuf): Delete declarations.
10305         (class tui_file): New class.
10306         * tui/tui-io.c (tui_initialize_io): Use tui_file.
10307         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
10308         (tui_register_format): Use string_stream.
10309         * tui/tui-stack.c (tui_make_status_line): Use string_file.
10310         (tui_get_function_from_frame): Use string_file.
10311         * typeprint.c (type_to_string): Use string_file.
10312         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
10313         (null_stream): New global.
10314         (ui_file_delete): Delete.
10315         (ui_file::ui_file): New.
10316         (null_file_isatty): Delete.
10317         (ui_file::~ui_file): New.
10318         (null_file_rewind): Delete.
10319         (ui_file::printf): New.
10320         (null_file_put): Delete.
10321         (null_file_flush): Delete.
10322         (ui_file::putstr): New.
10323         (null_file_write): Delete.
10324         (ui_file::putstrn): New.
10325         (null_file_read): Delete.
10326         (ui_file::putc): New.
10327         (null_file_fputs): Delete.
10328         (null_file_write_async_safe): Delete.
10329         (ui_file::vprintf): New.
10330         (null_file_delete): Delete.
10331         (null_file::write): New.
10332         (null_file_fseek): Delete.
10333         (null_file::puts): New.
10334         (ui_file_data): Delete.
10335         (null_file::write_async_safe): New.
10336         (gdb_flush, ui_file_isatty): Adjust.
10337         (ui_file_put, ui_file_rewind): Delete.
10338         (ui_file_write): Adjust.
10339         (ui_file_write_for_put): Delete.
10340         (ui_file_write_async_safe, ui_file_read): Adjust.
10341         (ui_file_fseek): Delete.
10342         (fputs_unfiltered): Adjust.
10343         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
10344         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
10345         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
10346         (set_ui_file_data): Delete.
10347         (string_file::~string_file, string_file::write)
10348         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
10349         (do_ui_file_as_string, ui_file_as_string): Delete.
10350         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
10351         (struct mem_file): Delete.
10352         (mem_file_new): Delete.
10353         (stdio_file::stdio_file): New.
10354         (mem_file_delete): Delete.
10355         (stdio_file::stdio_file): New.
10356         (mem_fileopen): Delete.
10357         (stdio_file::~stdio_file): New.
10358         (mem_file_rewind): Delete.
10359         (stdio_file::set_stream): New.
10360         (mem_file_put): Delete.
10361         (stdio_file::open): New.
10362         (mem_file_write): Delete.
10363         (stdio_file_magic, struct stdio_file): Delete.
10364         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
10365         (stdio_file::flush): New.
10366         (stdio_file_read): Rename to ...
10367         (stdio_file::read): ... this.  Adjust.
10368         (stdio_file_write): Rename to ...
10369         (stdio_file::write): ... this.  Adjust.
10370         (stdio_file_write_async_safe): Rename to ...
10371         (stdio_file::write_async_safe) ... this.  Adjust.
10372         (stdio_file_fputs): Rename to ...
10373         (stdio_file::puts) ... this.  Adjust.
10374         (stdio_file_isatty): Delete.
10375         (stdio_file_fseek): Delete.
10376         (stdio_file::isatty): New.
10377         (stderr_file_write): Rename to ...
10378         (stderr_file::write) ... this.  Adjust.
10379         (stderr_file_fputs): Rename to ...
10380         (stderr_file::puts) ... this.  Adjust.
10381         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
10382         (stderr_file::stderr_file): New.
10383         (tee_file_magic): Delete.
10384         (struct tee_file): Delete.
10385         (tee_file::tee_file): New.
10386         (tee_file_new): Delete.
10387         (tee_file::~tee_file): New.
10388         (tee_file_delete): Delete.
10389         (tee_file_flush): Rename to ...
10390         (tee_file::flush): ... this.  Adjust.
10391         (tee_file_write): Rename to ...
10392         (tee_file::write): ... this.  Adjust.
10393         (tee_file::write_async_safe): New.
10394         (tee_file_fputs): Rename to ...
10395         (tee_file::puts): ... this.  Adjust.
10396         (tee_file_isatty): Rename to ...
10397         (tee_file::isatty): ... this.  Adjust.
10398         * ui-file.h (struct obstack, struct ui_file): Don't
10399         forward-declare.
10400         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
10401         (ui_file_write_ftype)
10402         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
10403         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
10404         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
10405         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
10406         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
10407         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
10408         (set_ui_file_fseek): Delete.
10409         (ui_file_data, ui_file_delete, ui_file_rewind)
10410         (struct ui_file): New.
10411         (ui_file_up): New.
10412         (class null_file): New.
10413         (null_stream): Declare.
10414         (ui_file_write_for_put, ui_file_put): Delete.
10415         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
10416         Delete.
10417         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
10418         (gdb_fopen, tee_file_new): Delete.
10419         (struct string_file): New.
10420         (struct stdio_file): New.
10421         (stdio_file_up): New.
10422         (struct stderr_file): New.
10423         (class tee_file): New.
10424         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
10425         of a 'ui_file *'.  Adjust.
10426         * ui-out.h (class ui_out) <field_stream>: Likewise.
10427         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
10428         (null_stream): Delete.
10429         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
10430         Adjust.
10431         * utils.h (struct ui_file): Delete forward declaration..
10432         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
10433         (error_stream): Take a 'string_file &' instead of a
10434         'ui_file *'.
10435         * varobj.c (varobj_value_get_print_value): Use string_file.
10436         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
10437         * gdbarch.c: Regenerate.
10438
10439 2017-02-02  Pedro Alves  <palves@redhat.com>
10440
10441         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
10442         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
10443         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
10444         Adjust to call gdb_print_insn instead of
10445         gdb_disassembler::print_insn.
10446         (dump_insns, do_mixed_source_and_assembly_deprecated)
10447         (do_mixed_source_and_assembly, do_assembly_only): Add back a
10448         'gdbarch' parameter.  Remove gdb_disassembler parameter.
10449         (gdb_disassembly): Don't allocate a gdb_disassembler here.
10450         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
10451         declaration.
10452         (gdb_pretty_print_insn): Re-add declaration.
10453         * record-btrace.c (btrace_insn_history): Don't allocate a
10454         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
10455
10456 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
10457
10458         * disasm.h (gdb_disassembly): Remove file_string parameter.
10459         * disasm.c (gdb_disassembly): Likewise.
10460         * cli/cli-cmds.c (print_disassembly): Adapt.
10461         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
10462         * stack.c (do_gdb_disassembly): Likewise.
10463
10464 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10465
10466         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
10467         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
10468         targets.  And if the implicit value is longer than needed, extract
10469         the first bytes instead of the "least significant" ones.
10470
10471 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
10472
10473         * btrace.c (btrace_enable): Do not call btrace_add_pc for
10474         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
10475         (btrace_fetch): Assert can_access_registers_ptid.
10476         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
10477         validate_registers_access.
10478
10479 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
10480
10481         * gdbthread.h (can_access_registers_ptid): New.
10482         * thread.c (can_access_registers_ptid): New.
10483
10484 2017-02-01  Pedro Alves  <palves@redhat.com>
10485
10486         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
10487
10488 2017-01-31  Pedro Alves  <palves@redhat.com>
10489
10490         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
10491         Fix typos.
10492
10493 2017-01-31  Pedro Alves  <palves@redhat.com>
10494
10495         * stack.c (print_frame_args): Remove local mem_fileopen stream,
10496         not used.
10497
10498 2017-01-31  Pedro Alves  <palves@redhat.com>
10499
10500         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
10501
10502 2017-01-31  Pedro Alves  <palves@redhat.com>
10503
10504         * common/scoped_restore.h
10505         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
10506         change the value's parameter type to T2.
10507         (make_scoped_restore): Likewise.
10508
10509 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
10510             Richard Henderson  <rth@redhat.com>
10511
10512         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
10513         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
10514         GS_BASE for older kernels.
10515         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
10516         GS_BASE for older kernels.
10517         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
10518         and GS_BASE to the offset table.
10519         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
10520         system register group.
10521         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
10522         for older kernels.
10523         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
10524         amd64 ABI.
10525         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
10526         AMD64_GSBASE_REGNUM.
10527         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
10528         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
10529         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
10530         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
10531         i386/64bit-segments.xml in those rules.
10532         * features/i386/64bit-segments.xml: New file.
10533         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
10534         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
10535         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
10536         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
10537         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
10538         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
10539         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
10540         * features/i386/amd64-avx-linux.c: Regenerated.
10541         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
10542         * features/i386/amd64-avx-mpx.c: Regenerated.
10543         * features/i386/amd64-avx512-linux.c: Regenerated.
10544         * features/i386/amd64-linux.c: Regenerated.
10545         * features/i386/amd64-mpx-linux.c: Regenerated.
10546         * features/i386/i386-avx-mpx-linux.c: Regenerated.
10547         * features/i386/i386-avx-mpx.c: Regenerated.
10548         * features/i386/x32-avx-linux.c: Regenerated.
10549         * features/i386/x32-avx512-linux.c: Regenerated.
10550         * regformats/i386/amd64-avx-linux.dat: Regenerated.
10551         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
10552         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
10553         * regformats/i386/amd64-linux.dat: Regenerated.
10554         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
10555         * regformats/i386/x32-avx-linux.dat: Regenerated.
10556         * regformats/i386/x32-avx512-linux.dat: Regenerated.
10557         * regformats/i386/x32-linux.dat: Regenerated.
10558
10559 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
10560
10561         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
10562         Set to AMD64_NUM_REGS.
10563
10564 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
10565
10566         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
10567         that checks validity of a register number.
10568
10569 2017-01-27  Kees Cook  <keescook@google.com>
10570
10571         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
10572         fetch_fpregs if target has fpa registers.
10573         (arm_linux_store_inferior_registers): Call store_fpregs if target
10574         has fpa registers.
10575
10576 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10577
10578         * cris-tdep.c (cris_gdbarch_init): Remove check for
10579         info.byte_order and force it to BFD_ENDIAN_LITTLE.
10580
10581 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
10582
10583         * corelow.c (get_core_register_section): Check for regset
10584         existence before checking for REGSET_VARIABLE_SIZE.
10585
10586 2017-01-26  Yao Qi  <yao.qi@linaro.org>
10587             Pedro Alves  <palves@redhat.com>
10588
10589         PR gdb/20939
10590         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
10591         call memory_error, save memaddr instead.
10592         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
10593         negative, cal memory_error.
10594         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
10595
10596 2017-01-26  Yao Qi  <yao.qi@linaro.org>
10597
10598         * disasm-selftests.c (memory_error_test): New function.
10599         (_initialize_disasm_selftests): Register memory_error_test.
10600
10601 2017-01-26  Yao Qi  <yao.qi@linaro.org>
10602
10603         * Makefile.in (SFILES): Add disasm-selftests.c and
10604         selftest-arch.c.
10605         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
10606         * disasm-selftests.c: New file.
10607         * selftest-arch.c: New file.
10608         * selftest-arch.h: New file.
10609
10610 2017-01-26  Yao Qi  <yao.qi@linaro.org>
10611
10612         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
10613         to bfd_arch_mep.  Don't return 0 if section is not
10614         found.  Call print_insn_mep.
10615
10616 2017-01-26  Pedro Alves  <palves@redhat.com>
10617             Yao Qi  <yao.qi@linaro.org>
10618
10619         * arm-tdep.c: Include "disasm.h".
10620         (gdb_print_insn_arm): Update code to get gdbarch.
10621         * disasm.c (dis_asm_read_memory): Change it to
10622         gdb_disassembler::dis_asm_read_memory.
10623         (dis_asm_memory_error): Likewise.
10624         (dis_asm_print_address): Likewise.
10625         (gdb_pretty_print_insn): Change it to
10626         gdb_disassembler::pretty_print_insn.
10627         (dump_insns): Add one argument gdb_disassemlber.  All
10628         callers updated.
10629         (do_mixed_source_and_assembly_deprecated): Likewise.
10630         (do_mixed_source_and_assembly): Likewise.
10631         (do_assembly_only): Likewise.
10632         (gdb_disassembler::gdb_disassembler): New.
10633         (gdb_disassembler::print_insn): New.
10634         * disasm.h (class gdb_disassembler): New.
10635         (gdb_pretty_print_insn): Remove declaration.
10636         (gdb_disassemble_info): Likewise.
10637         * guile/scm-disasm.c (class gdbscm_disassembler): New.
10638         (gdbscm_disasm_read_memory_worker): Update.
10639         (gdbscm_disasm_read_memory): Update.
10640         (gdbscm_disasm_memory_error): Remove.
10641         (gdbscm_disasm_print_address): Remove.
10642         (gdbscm_disassembler::gdbscm_disassembler): New.
10643         (gdbscm_print_insn_from_port): Update.
10644         * mips-tdep.c: Include disasm.h.
10645         (gdb_print_insn_mips): Update code to get gdbarch.
10646         * record-btrace.c (btrace_insn_history): Update.
10647         * spu-tdep.c: Include disasm.h.
10648         (struct spu_dis_asm_data): Remove.
10649         (struct spu_dis_asm_info): New.
10650         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
10651         SPU id.
10652         (gdb_print_insn_spu): Cast disassemble_info to
10653         spu_dis_asm_info.
10654
10655 2017-01-26  Yao Qi  <yao.qi@linaro.org>
10656
10657         * disasm.c (do_ui_file_delete): Delete.
10658         (gdb_insn_length): Move code creating stream to ...
10659         * utils.c (null_stream): ... here.  New function.
10660         * utils.h (null_stream): Declare.
10661
10662 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
10663
10664         * python/py-inferior.c (find_thread_object): Return directly
10665         from the loop.  Remove "found" variable.
10666
10667 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
10668
10669         GDB 7.12.1 released.
10670
10671 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
10672
10673         * python/py-function.c (fnpy_call): Reorder declarations to have
10674         the gdbpy_enter object declared first.
10675         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
10676
10677 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
10678
10679         PR python/21068
10680         * python/python-internal.h (PyMem_RawMalloc): Define for
10681         Python < 3.4.
10682         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
10683         PyMem_RawMalloc instead of PyMem_Malloc.
10684
10685 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
10686             Luis Machado  <lgustavo@codesourcery.com>
10687
10688         * NEWS (New commands): Mention flash-erase.
10689         (New MI commands): Mention target-flash-erase.
10690         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
10691         command.
10692         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
10693         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
10694         * target.c (flash_erase_command): New function.
10695         (initialize_targets): Add new flash-erase command.
10696         * target.h (flash_erase_command): New declaration.
10697
10698 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
10699
10700         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
10701         HAVE_SYS_PROCFS_H is defined.
10702
10703 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
10704
10705         * remote.c (struct cached_reg): Change data into a pointer.
10706         * (stop_reply_dtr): Free data pointers before deleting vector.
10707         (process_stop_reply): Likewise.
10708         (remote_parse_stop_reply): Allocate space for data
10709
10710 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
10711
10712         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
10713         MAX_REGISTER_SIZE.
10714         (amd64_pseudo_register_read_value): Likewise.
10715         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
10716         (store_register_using_P): Likewise.
10717         * regcache.c (regcache_xfer_part): Likewise.
10718
10719 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
10720
10721         Split real and pseudo registers.
10722         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
10723         (sparc32_pseudo_regnum): New enum.
10724         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
10725         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
10726         (SPARC32_CP0_REGISTERS): New macro.
10727         (sparc32_pseudo_register_name): New function.
10728         (sparc32_register_name): Use sparc32_pseudo_register_name.
10729         (sparc32_pseudo_register_type): New function.
10730         (sparc32_register_type): Use sparc32_pseudo_register_type.
10731         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
10732         pseudo register numbers.
10733         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
10734         (SPARC64_CP0_REGISTERS): New macro.
10735         (sparc64_pseudo_register_name): New function.
10736         (sparc64_register_name): Use sparc64_pseudo_register_name.
10737         (sparc64_pseudo_register_type): New function.
10738         (sparc64_register_type): Use sparc64_pseudo_register_type.
10739         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
10740         pseudo register numbers.
10741         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
10742         sparc64_store_arguments): Handle pseudo register numbers.
10743
10744 2017-01-13  Yao Qi  <yao.qi@linaro.org>
10745
10746         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
10747         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
10748         output.
10749         (getpkt_or_notif_sane_1): Likewise.
10750
10751 2017-01-13  Yao Qi  <yao.qi@linaro.org>
10752
10753         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
10754         of CC.  Pass "-x c++-header" instead of "-x c".
10755
10756 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
10757
10758         * remote.c (remote_can_async_p): Update comment.
10759
10760 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
10761
10762         * linux-nat.c (linux_nat_can_async_p): Update comment.
10763
10764 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
10765
10766         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
10767
10768 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
10769
10770         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
10771
10772 2017-01-10  Tom Tromey  <tom@tromey.com>
10773
10774         * python/py-type.c (typy_legacy_template_argument): Update.
10775         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
10776         ~demangle_parse_info): Declare new members.
10777         (cp_demangled_name_to_comp): Return unique_ptr.
10778         (cp_demangled_name_parse_free)
10779         (make_cleanup_cp_demangled_name_parse_free)
10780         (cp_new_demangle_parse_info): Remove.
10781         * cp-support.c (do_demangled_name_parse_free_cleanup)
10782         (make_cleanup_cp_demangled_name_parse_free): Remove.
10783         (inspect_type, cp_canonicalize_string_full)
10784         (cp_canonicalize_string): Update.
10785         (mangled_name_to_comp): Change return type.
10786         (cp_class_name_from_physname, method_name_from_physname)
10787         (cp_func_name, cp_remove_params): Update.
10788         * cp-name-parser.y (demangle_parse_info): New constructor, from
10789         cp_new_demangle_parse_info.
10790         (~demangle_parse_info): New destructor, from
10791         cp_demangled_name_parse_free.
10792         (cp_merge_demangle_parse_infos): Update.
10793         (cp_demangled_name_to_comp): Change return type.
10794
10795 2017-01-10  Tom Tromey  <tom@tromey.com>
10796
10797         * top.c (prevent_dont_repeat): Change return type.
10798         * python/python.c (execute_gdb_command): Use std::string.
10799         Update.
10800         * guile/guile.c (gdbscm_execute_gdb_command): Update.
10801         * command.h (prevent_dont_repeat): Change return type.
10802         * breakpoint.c (bpstat_do_actions_1): Update.
10803
10804 2017-01-10  Tom Tromey  <tom@tromey.com>
10805
10806         * value.h (scoped_value_mark::~scoped_value_mark): Call
10807         free_to_mark.
10808         (scoped_value_mark::free_to_mark): New method.
10809         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
10810         scoped_value_mark.
10811
10812 2017-01-10  Tom Tromey  <tom@tromey.com>
10813
10814         * python/py-value.c (valpy_dereference, valpy_referenced_value)
10815         (valpy_reference_value, valpy_const_value, valpy_get_address)
10816         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
10817         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
10818         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
10819         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
10820         scoped_value_mark.
10821         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
10822         * value.h (scoped_value_mark): New class.
10823
10824 2017-01-10  Tom Tromey  <tom@tromey.com>
10825
10826         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
10827         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
10828         * psymtab.c (discard_psymtabs_upto): Remove.
10829         (make_cleanup_discard_psymtabs): Remove.
10830         (struct psymtab_state): Remove.
10831
10832 2017-01-10  Tom Tromey  <tom@tromey.com>
10833
10834         * record-full.c (record_full_save_cleanups): Remove.
10835         (record_full_save): Use gdb::unlinker.
10836         * gcore.c (do_bfd_delete_cleanup): Remove.
10837         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
10838         cleanups.
10839         * dwarf2read.c (unlink_if_set): Remove.
10840         (write_psymtabs_to_index): Use gdb::unlinker.
10841         * common/gdb_unlinker.h: New file.
10842
10843 2017-01-10  Tom Tromey  <tom@tromey.com>
10844
10845         * windows-tdep.c (windows_xfer_shared_library): Update.
10846         * windows-nat.c (windows_make_so): Update.
10847         * utils.h (make_cleanup_bfd_unref): Remove.
10848         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
10849         * symfile.h (symfile_bfd_open)
10850         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
10851         * symfile.c (read_symbols, symbol_file_add)
10852         (separate_debug_file_exists): Update.
10853         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
10854         (generic_load, reread_symbols): Update.
10855         * symfile-mem.c (symbol_file_add_from_memory): Update.
10856         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
10857         (spu_symbol_file_add_from_memory): Update.
10858         * solist.h (struct target_so_ops) <bfd_open>: Return
10859         gdb_bfd_ref_ptr.
10860         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
10861         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
10862         gdb_bfd_ref_ptr.
10863         (solib_map_sections, reload_shared_libraries_1): Update.
10864         * solib-svr4.c (enable_break): Update.
10865         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
10866         * solib-frv.c (enable_break2): Update.
10867         * solib-dsbt.c (enable_break): Update.
10868         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
10869         gdb_bfd_ref_ptr.
10870         (darwin_solib_get_all_image_info_addr_at_init): Update.
10871         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
10872         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
10873         * record-full.c (record_full_save): Update.
10874         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
10875         * procfs.c (insert_dbx_link_bpt_in_file): Update.
10876         * minidebug.c (find_separate_debug_file_in_section): Return
10877         gdb_bfd_ref_ptr.
10878         * machoread.c (macho_add_oso_symfile): Change abfd to
10879         gdb_bfd_ref_ptr.
10880         (macho_symfile_read_all_oso): Update.
10881         (macho_check_dsym): Return gdb_bfd_ref_ptr.
10882         (macho_symfile_read): Update.
10883         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
10884         (jit_bfd_try_read_symtab): Update.
10885         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10886         (gdb_bfd_openw, gdb_bfd_openr_iovec)
10887         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
10888         gdb_bfd_ref_ptr.
10889         (gdb_bfd_ref_policy): New struct.
10890         (gdb_bfd_ref_ptr): New typedef.
10891         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10892         (gdb_bfd_openw, gdb_bfd_openr_iovec)
10893         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
10894         gdb_bfd_ref_ptr.
10895         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
10896         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
10897         (gcore_command): Update.
10898         * exec.c (exec_file_attach): Update.
10899         * elfread.c (elf_symfile_read): Update.
10900         * dwarf2read.c (dwarf2_get_dwz_file): Update.
10901         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
10902         (open_and_init_dwo_file): Update.
10903         (open_dwp_file): Return gdb_bfd_ref_ptr.
10904         (open_and_init_dwp_file): Update.
10905         * corelow.c (core_open): Update.
10906         * compile/compile-object-load.c (compile_object_load): Update.
10907         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
10908         * coffread.c (coff_symfile_read): Update.
10909         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
10910         gdb_bfd_ref_ptr.  Rename.
10911         (dump_bfd_file, restore_command): Update.
10912         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
10913         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
10914         (find_separate_debug_file_by_buildid): Update.
10915
10916 2017-01-10  Tom Tromey  <tom@tromey.com>
10917
10918         * common/gdb_ref_ptr.h: New file.
10919         * python/py-ref.h (struct gdbpy_ref_policy): New.
10920         (gdbpy_ref): Now a typedef.
10921
10922 2017-01-10  Tom Tromey  <tom@tromey.com>
10923
10924         * utils.h (make_cleanup_htab_delete): Don't declare.
10925         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
10926         Remove.
10927         * linespec.c (decode_compound_collector): Add constructor,
10928         destructor.
10929         (lookup_prefix_sym): Remove cleanup.
10930         (symtab_collector): Add constructor, destructor.
10931         (collect_symtabs_from_filename): Remove cleanup.
10932         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
10933         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
10934         Use htab_up.
10935         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
10936         * dwarf2read.c (dw2_expand_symtabs_matching)
10937         (dw2_map_symbol_filenames, dwarf_decode_macros)
10938         (write_psymtabs_to_index): Use htab_up.
10939         * dwarf2loc.c (func_verify_no_selftailcall)
10940         (call_site_find_chain_1, func_verify_no_selftailcall)
10941         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
10942         std::vector, gdb::unique_xmalloc_ptr.
10943         (call_sitep): Remove typedef.
10944         (dwarf2_locexpr_baton_eval): Remove unused variable.
10945
10946 2017-01-10  Tom Tromey  <tom@tromey.com>
10947
10948         * python/python-internal.h (make_cleanup_py_decref)
10949         (make_cleanup_py_xdecref): Don't declare.
10950         * python/py-utils.c (py_decref, make_cleanup_py_decref)
10951         (py_xdecref, make_cleanup_py_xdecref): Remove.
10952
10953 2017-01-10  Tom Tromey  <tom@tromey.com>
10954
10955         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
10956         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
10957
10958 2017-01-10  Tom Tromey  <tom@tromey.com>
10959
10960         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
10961
10962 2017-01-10  Tom Tromey  <tom@tromey.com>
10963
10964         * python/py-utils.c (unicode_to_encoded_string)
10965         (python_string_to_target_string)
10966         (python_string_to_target_python_string)
10967         (python_string_to_host_string, gdbpy_obj_to_string)
10968         (get_addr_from_python): Use gdbpy_ref.
10969
10970 2017-01-10  Tom Tromey  <tom@tromey.com>
10971
10972         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
10973         gdbpy_ref.
10974
10975 2017-01-10  Tom Tromey  <tom@tromey.com>
10976
10977         * python/python.c (eval_python_command, gdbpy_decode_line)
10978         (gdbpy_run_events, gdbpy_start_type_printers)
10979         (gdbpy_apply_type_printers): Use gdbpy_ref.
10980
10981 2017-01-10  Tom Tromey  <tom@tromey.com>
10982
10983         * python/py-param.c (get_doc_string, compute_enum_values): Use
10984         gdbpy_ref.
10985
10986 2017-01-10  Tom Tromey  <tom@tromey.com>
10987
10988         * python/py-inferior.c (find_thread_object, build_inferior_list):
10989         Use gdbpy_ref.
10990
10991 2017-01-10  Tom Tromey  <tom@tromey.com>
10992
10993         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
10994
10995 2017-01-10  Tom Tromey  <tom@tromey.com>
10996
10997         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
10998         gdbpy_ref.
10999
11000 2017-01-10  Tom Tromey  <tom@tromey.com>
11001
11002         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
11003         extra incref.
11004         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
11005         Use gdbpy_ref.
11006
11007 2017-01-10  Tom Tromey  <tom@tromey.com>
11008
11009         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11010         gdbpy_ref.
11011
11012 2017-01-10  Tom Tromey  <tom@tromey.com>
11013
11014         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
11015         decref results of PyArg_ParseTupleAndKeywords.
11016
11017 2017-01-10  Tom Tromey  <tom@tromey.com>
11018
11019         * python/python.c (python_run_simple_file): Use
11020         unique_xmalloc_ptr, gdbpy_ref.
11021
11022 2017-01-10  Tom Tromey  <tom@tromey.com>
11023
11024         * python/py-prettyprint.c (print_stack_unless_memory_error)
11025         (print_string_repr, print_children): Use gdbpy_ref.
11026         (dummy_python_frame): New class.
11027         (dummy_python_frame::dummy_python_frame): Rename from
11028         push_dummy_python_frame.
11029         (py_restore_tstate): Remove.
11030
11031 2017-01-10  Tom Tromey  <tom@tromey.com>
11032
11033         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
11034
11035 2017-01-10  Tom Tromey  <tom@tromey.com>
11036
11037         * python/python.c (ensure_python_env, restore_python_env):
11038         Remove.
11039         * python/python-internal.h (ensure_python_env): Don't declare.
11040         * varobj.h (varobj_ensure_python_env): Don't declare.
11041         * varobj.c (varobj_ensure_python_env): Remove.
11042
11043 2017-01-10  Tom Tromey  <tom@tromey.com>
11044
11045         * varobj.c (varobj_value_get_print_value): Use
11046         gdbpy_enter_varobj.
11047
11048 2017-01-10  Tom Tromey  <tom@tromey.com>
11049
11050         * python/py-prettyprint.c (print_string_repr, print_children):
11051         Update.
11052         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
11053         of "encoding".
11054         * varobj.c (varobj_value_get_print_value): Update.
11055         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
11056
11057 2017-01-10  Tom Tromey  <tom@tromey.com>
11058
11059         * varobj.c (varobj_get_display_hint)
11060         (dynamic_varobj_has_child_method, install_new_value_visualizer)
11061         (varobj_set_visualizer, free_variable): Use
11062         gdbpy_enter_varobj.
11063
11064 2017-01-10  Tom Tromey  <tom@tromey.com>
11065
11066         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
11067         (do_finish_initialization): New function.  Use gdbpy_ref.
11068         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
11069         do_finish_initialization.
11070
11071 2017-01-10  Tom Tromey  <tom@tromey.com>
11072
11073         * python/py-param.c (get_set_value, get_show_value): Use
11074         gdbpy_enter, gdbpy_ref.
11075
11076 2017-01-10  Tom Tromey  <tom@tromey.com>
11077
11078         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
11079
11080 2017-01-10  Tom Tromey  <tom@tromey.com>
11081
11082         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
11083
11084 2017-01-10  Tom Tromey  <tom@tromey.com>
11085
11086         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
11087         Use gdbpy_enter_varobj.
11088
11089 2017-01-10  Tom Tromey  <tom@tromey.com>
11090
11091         * varobj.c (gdbpy_enter_varobj): New constructor.
11092         * python/python-internal.h (gdbpy_enter_varobj): New class.
11093         * python/py-varobj.c (py_varobj_get_iterator): Use
11094         gdbpy_enter_varobj.
11095
11096 2017-01-10  Tom Tromey  <tom@tromey.com>
11097
11098         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
11099         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11100         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
11101         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
11102         unique_xmalloc_ptr.
11103         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
11104
11105 2017-01-10  Tom Tromey  <tom@tromey.com>
11106
11107         * python/py-xmethods.c (invoke_match_method): Use
11108         gdbpy_ref.
11109
11110 2017-01-10  Tom Tromey  <tom@tromey.com>
11111
11112         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
11113         gdbpy_enter, gdbpy_ref.
11114
11115 2017-01-10  Tom Tromey  <tom@tromey.com>
11116
11117         * python/python.c (python_interactive_command): Use gdbpy_enter.
11118
11119 2017-01-10  Tom Tromey  <tom@tromey.com>
11120
11121         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
11122         gdbpy_ref.
11123
11124 2017-01-10  Tom Tromey  <tom@tromey.com>
11125
11126         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
11127         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
11128
11129 2017-01-10  Tom Tromey  <tom@tromey.com>
11130
11131         * utils.h (htab_deleter): New struct.
11132         (htab_up): New typedef.
11133         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
11134         gdbpy_enter, gdbpy_ref, htab_up.
11135
11136 2017-01-10  Tom Tromey  <tom@tromey.com>
11137
11138         * python/py-unwind.c (pending_frame_invalidate): Remove.
11139         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
11140
11141 2017-01-10  Tom Tromey  <tom@tromey.com>
11142
11143         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
11144         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
11145
11146 2017-01-10  Tom Tromey  <tom@tromey.com>
11147
11148         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
11149
11150 2017-01-10  Tom Tromey  <tom@tromey.com>
11151
11152         * python/python.c (gdbpy_eval_from_control_command)
11153         (gdbpy_source_script, gdbpy_run_events)
11154         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
11155         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
11156         gdbpy_enter.
11157
11158 2017-01-10  Tom Tromey  <tom@tromey.com>
11159
11160         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
11161
11162 2017-01-10  Tom Tromey  <tom@tromey.com>
11163
11164         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
11165
11166 2017-01-10  Tom Tromey  <tom@tromey.com>
11167
11168         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
11169         (python_on_inferior_call_pre, python_on_inferior_call_post)
11170         (python_on_memory_change, python_on_register_change)
11171         (python_inferior_exit, python_new_objfile, add_thread_object)
11172         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
11173
11174 2017-01-10  Tom Tromey  <tom@tromey.com>
11175
11176         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
11177         (bpfinishpy_handle_exit): Use gdbpy_enter.
11178
11179 2017-01-10  Tom Tromey  <tom@tromey.com>
11180
11181         * python/py-cmd.c (cmdpy_destroyer)
11182         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
11183         gdbpy_enter.
11184
11185 2017-01-10  Tom Tromey  <tom@tromey.com>
11186
11187         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
11188         gdbpy_enter.
11189         (gdbpy_breakpoint_has_cond): Likewise.
11190
11191 2017-01-10  Tom Tromey  <tom@tromey.com>
11192
11193         * python/python.c (gdbpy_enter): New constructor.
11194         (~gdbpy_enter): New destructor.
11195         (restore_python_env, ensure_python_env): Rewrite.
11196         * python/python-internal.h (gdbpy_enter): New class.
11197
11198 2017-01-10  Tom Tromey  <tom@tromey.com>
11199
11200         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
11201
11202 2017-01-10  Tom Tromey  <tom@tromey.com>
11203
11204         * python/py-value.c (value_has_field, get_field_flag)
11205         (get_field_type, valpy_getitem, convert_value_from_python): Use
11206         gdbpy_ref.
11207
11208 2017-01-10  Tom Tromey  <tom@tromey.com>
11209
11210         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
11211         gdbpy_ref.
11212
11213 2017-01-10  Tom Tromey  <tom@tromey.com>
11214
11215         * python/py-prettyprint.c (search_pp_list)
11216         (find_pretty_printer_from_objfiles)
11217         (find_pretty_printer_from_progspace)
11218         (find_pretty_printer_from_gdb, find_pretty_printer)
11219         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
11220         gdbpy_ref.
11221
11222 2017-01-10  Tom Tromey  <tom@tromey.com>
11223
11224         * python/py-param.c (call_doc_function): Use gdbpy_ref.
11225
11226 2017-01-10  Tom Tromey  <tom@tromey.com>
11227
11228         * python/py-linetable.c (build_line_table_tuple_from_pcs)
11229         (ltpy_get_all_source_lines): Use gdbpy_ref.
11230
11231 2017-01-10  Tom Tromey  <tom@tromey.com>
11232
11233         * python/py-framefilter.c (extract_sym, extract_value)
11234         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
11235         gdbpy_ref.
11236
11237 2017-01-10  Tom Tromey  <tom@tromey.com>
11238
11239         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
11240
11241 2017-01-10  Tom Tromey  <tom@tromey.com>
11242
11243         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
11244
11245 2017-01-10  Tom Tromey  <tom@tromey.com>
11246
11247         * python/py-function.c (convert_values_to_python, fnpy_init): Use
11248         gdbpy_ref.
11249
11250 2017-01-10  Tom Tromey  <tom@tromey.com>
11251
11252         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
11253
11254 2017-01-10  Tom Tromey  <tom@tromey.com>
11255
11256         * python/py-type.c (convert_field, make_fielditem, typy_fields)
11257         (typy_range): Use gdbpy_ref.
11258
11259 2017-01-10  Tom Tromey  <tom@tromey.com>
11260
11261         * python/py-threadevent.c (create_thread_event_object): Use
11262         gdbpy_ref.
11263         * python/py-stopevent.c (create_stop_event_object): Simplify.
11264         (emit_stop_event): Use gdbpy_ref.
11265         * python/py-signalevent.c (create_signal_event_object): Use
11266         gdbpy_ref.
11267         * python/py-newobjfileevent.c (create_new_objfile_event_object)
11268         (emit_new_objfile_event, create_clear_objfiles_event_object)
11269         (emit_clear_objfiles_event): Use gdbpy_ref.
11270         * python/py-infevents.c (create_inferior_call_event_object)
11271         (create_register_changed_event_object)
11272         (create_memory_changed_event_object, emit_inferior_call_event)
11273         (emit_memory_changed_event, emit_register_changed_event): Use
11274         gdbpy_ref.
11275         * python/py-exitedevent.c (create_exited_event_object)
11276         (emit_exited_event): Use gdbpy_ref.
11277         * python/py-event.h (evpy_emit_event): Remove
11278         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
11279         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
11280         * python/py-continueevent.c (emit_continue_event): Use
11281         gdbpy_ref.
11282         * python/py-breakpoint.c (gdbpy_breakpoint_created)
11283         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
11284         gdbpy_ref.
11285         * python/py-bpevent.c (create_breakpoint_event_object): Use
11286         gdbpy_ref.
11287
11288 2017-01-10  Tom Tromey  <tom@tromey.com>
11289
11290         * python/py-ref.h: New file.
11291
11292 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
11293
11294         * cli-out.c (cli_ui_out::do_redirect): Change return type to
11295         void.
11296         * cli-out.h (cli_ui_out::do_redirect): Likewise.
11297         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
11298         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
11299         * ui-out.c (ui_out::redirect): Likewise.
11300         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
11301         * cli/cli-logging.c (set_logging_redirect): Update call site of
11302         ui_out::redirect.
11303         (handle_redirections): Likewise.
11304         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
11305         * top.c (execute_command_to_string): Likewise.
11306         * utils.c (do_ui_out_redirect_pop): Likewise.
11307
11308 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
11309
11310         * stack.c (_initialize_stack): Update "frame" command help message.
11311
11312 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
11313
11314         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
11315
11316 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11317
11318         * x86-linux-nat.h: Include gdb_proc_service.h.
11319
11320 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11321
11322         * ser-base.h: Include serial.h.
11323
11324 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11325
11326         * ppc-linux-tdep.h: Include ppc-tdep.h.
11327
11328 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11329
11330         * nat/amd64-linux-siginfo.h: Include signal.h.
11331
11332 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11333
11334         * nat/aarch64-linux-hw-point.h: Include break-common.h.
11335
11336 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11337
11338         * mi/mi-parse.h: Include mi-cmds.h.
11339
11340 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11341
11342         * inf-loop.c: Don't include "target.h".
11343         * inf-loop.h: Include it here.
11344
11345 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11346
11347         * dfp.h: Include "dboulest.h" and "expression.h".
11348
11349 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11350
11351         * ax-gdb.h: Include "ax.h".
11352
11353 2017-01-06  Yao Qi  <yao.qi@linaro.org>
11354
11355         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
11356         with nat/gdb_ptrace.h.
11357
11358 2017-01-05  Yao Qi  <yao.qi@linaro.org>
11359
11360         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
11361         new line.
11362         (mips64_fbsd_sigframe_init): Likewise.
11363
11364 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
11365
11366         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
11367         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
11368
11369 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
11370
11371         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
11372         * NEWS: Mention new FreeBSD/mips native configuration.
11373         * config/mips/fbsd.mh: New file.
11374         * configure.host: Add mips*-*-freebsd*.
11375         * mips-fbsd-nat.c: New file.
11376
11377 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
11378
11379         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
11380         (ALLDEPFILES): Add mips-fbsd-tdep.c.
11381         * NEWS: Mention new FreeBSD/mips target.
11382         * configure.tgt: Add mips*-*-freebsd*.
11383         * mips-fbsd-tdep.c: New file.
11384         * mips-fbsd-tdep.h: New file.
11385
11386 2017-01-04  Yao Qi  <yao.qi@linaro.org>
11387
11388         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
11389         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
11390
11391 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
11392
11393         Update copyright year range in all GDB files.
11394
11395 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
11396
11397         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
11398
11399 For older changes see ChangeLog-2016.
11400 \f
11401 Local Variables:
11402 mode: change-log
11403 left-margin: 8
11404 fill-column: 74
11405 version-control: never
11406 coding: utf-8
11407 End: