Breakpoint location parsing: always error instead of warning
[external/binutils.git] / gdb / ChangeLog
1 2017-11-07  Pedro Alves  <palves@redhat.com>
2
3         * breakpoint.c (extract_bp_number_and_location): Change return
4         type to void.  Throw error instead of warning.
5         (enable_disable_command): Adjust.
6
7 2017-11-07  Xavier Roirand  <roirand@adacore.com>
8             Pedro Alves  <palves@redhat.com>
9
10         * breakpoint.c (map_breakpoint_number_range): New, factored out
11         from ...
12         (map_breakpoint_numbers): ... here.
13         (find_location_by_number): Change parameters from string to
14         breakpoint number and location.
15         (extract_bp_number_and_location): New function.
16         (enable_disable_bp_num_loc)
17         (enable_disable_breakpoint_location_range)
18         (enable_disable_command): New functions, factored out ...
19         (enable_command, disable_command): ... these functions, and
20         adjusted to support ranges.
21         * NEWS: Document enable/disable breakpoint location range feature.
22
23 2017-11-06  Luis Machado  <luis.machado@linaro.org>
24
25         * MAINTAINERS (Write After Approval): Update my e-mail address.
26
27 2017-11-06  Pedro Alves  <palves@redhat.com>
28
29         * gnu-nat.c (gnu_terminal_init): Delete.
30         (gnu_target): Don't install gnu_terminal_init.
31         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
32         (child_terminal_init): ... this function.
33
34 2017-11-06  Pedro Alves  <palves@redhat.com>
35
36         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
37         sgtty.h.
38         * config.in, configure: Regenerate.
39
40 2017-11-06  Pedro Alves  <palves@redhat.com>
41
42         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
43         (async_init_signals): Adjust.
44         (handle_stop_sig): Rename to ...
45         (handle_sigtstp): ... this.
46         (async_stop_sig): Rename to ...
47         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
48         SIGTSTP path.
49         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
50         instead of STOP_SIGNAL thoughout.
51         (handle_stop_sig): Rename to ...
52         (handle_sigtstp): ... this.
53         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
54
55 2017-11-06  Pedro Alves  <palves@redhat.com>
56
57         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
58         longer set flags twice in row.
59
60 2017-11-06  Pedro Alves  <palves@redhat.com>
61
62         * Makefile.in (SER_HARDWIRE): Update comment.
63         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
64         * common/gdb_termios.h: Delete file.
65         * common/job-control.c: Include termios.h and unistd.h instead of
66         gdb_termios.h.
67         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
68         check.
69         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
70         Remove sgtty code.
71         * configure.ac: No longer check for termio.h and sgtty.h.
72         * configure: Regenerate.
73         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
74         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
75         Replace PROCESS_GROUP_TYPE references with pid_t references
76         throughout.
77         (gdb_getpgrp): Delete.
78         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
79         (child_terminal_inferior): Remove comment.  Remove sgtty code.
80         (child_terminal_ours_1): Use tcgetpgrp directly instead of
81         gdb_getpgrp.  Use serial_set_tty_state instead aof
82         serial_noflush_set_tty_state.  Remove sgtty code.
83         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
84         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
85         (inferior_process_group): Now returns pid_t.
86         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
87         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
88         * ser-event.c (serial_event_ops): Update.
89         * ser-go32.c (dos_noflush_set_tty_state): Delete.
90         (dos_ops): Update.
91         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
92         * ser-pipe.c (pipe_ops): Update.
93         * ser-tcp.c (tcp_ops): Update.
94         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
95         HAVE_TERMIOS checks.
96         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
97         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
98         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
99         assume termios.
100         (hardwire_noflush_set_tty_state): Delete.
101         (hardwire_print_tty_state, hardwire_drain_output)
102         (hardwire_flush_output, hardwire_flush_input)
103         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
104         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
105         code, and assume termios.
106         (hardwire_ops): Update.
107         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
108         * serial.c (serial_noflush_set_tty_state): Delete.
109         * serial.h (serial_noflush_set_tty_state): Delete.
110         (serial_ops::noflush_set_tty_state): Delete.
111
112 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
113
114         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
115         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
116         (COMMON_OBS): Remove doublest.o and dfp.o.
117         Do not build target-float.c (instead of doublest.c)
118         with -Wformat-nonliteral.
119
120         * doublest.c: Remove file.
121         * doublest.h: Remove file.
122         * dfp.c: Remove file.
123         * dfp.h: Remove file.
124
125         * target-float.c: Do not include "doublest.h" and "dfp.h".
126         (DOUBLEST): Move here from doublest.h.
127         (enum float_kind): Likewise.
128         (FLOATFORMAT_CHAR_BIT): Likewise.
129         (FLOATFORMAT_LARGEST_BYTES): Likewise.
130         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
131         (floatformat_precision): Likewise.
132         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
133         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
134         Likewise.
135         (host_float_format, host_double_format, host_long_double_format):
136         Likewise.
137         (floatformat_to_string, floatformat_from_string): Likewise.
138         (floatformat_to_doublest): Likewise.  Also, inline the original
139         convert_floatformat_to_doublest.
140         (floatformat_from_doublest): Likewise.  Also, inline the original
141         convert_floatformat_from_doublest.
142
143         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
144         (MAX_DECIMAL_STRING): Move here from dfp.c.
145         (match_endianness): Likewise.
146         (set_decnumber_context, decimal_check_errors): Likewise.
147         (decimal_from_number, decimal_to_number): Likewise.
148         (decimal_to_string, decimal_from_string): Likewise.  Make static.
149         (decimal_from_longest, decimal_from_ulongest): Likewise.
150         (decimal_to_longest): Likewise.
151         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
152         (decimal_convert): Likewise.
153
154 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
155
156         * doublest.c: Do not include "gdbtypes.h".
157         (extract_typed_floating): Remove.
158         (store_typed_floating): Remove.
159         (convert_typed_floating): Remove.
160         * doublest.h (struct type): Remove.
161         (DOUBLEST_PRINT_FORMAT): Remove.
162         (DOUBLEST_SCAN_FORMAT): Remove.
163         (extract_typed_floating): Remove.
164         (store_typed_floating): Remove.
165         (convert_typed_floating): Remove.
166
167         * dfp.c (decimal_from_doublest): Remove.
168         (decimal_to_doublest): Remove.
169         * dfp.h: Do not include "doublest.h".
170         (decimal_from_doublest): Remove.
171         (decimal_to_doublest): Remove.
172
173         * value.c: Do not include "doublest.h" and "dfp.h".
174         (value_as_double): Remove.
175         (unpack_double): Remove.
176         (value_from_double): Remove.
177         (value_from_decfloat): Remove.
178         * value.h: Do not include "doublest.h".
179         (value_as_double): Remove.
180         (unpack_double): Remove.
181         (value_from_double): Remove.
182         (value_from_decfloat): Remove.
183
184 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
185
186         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
187         (i386_extract_return_value): Use target_float_convert.
188         (i386_store_return_value): Likewise.
189         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
190         (i387_value_to_register): Likewise.
191         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
192         (ia64_register_to_value): Use target_float_convert.
193         (ia64_value_to_register): Likewise.
194         (ia64_extract_return_value): Likewise.
195         (ia64_store_return_value): Likewise.
196         (ia64_push_dummy_call): Likewise.
197         * m68k-tdep.c: Include "target-float.h".
198         (m68k_register_to_value): Use target_float_convert.
199         (m68k_value_to_register): Likewise.
200         (m68k_svr4_extract_return_value): Likewise.
201         (m68k_svr4_store_return_value): Likewise.
202         * ppc-sysv-tdep.c: Include "target-float.h".
203         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
204         (do_ppc_sysv_return_value): Likewise.
205         (ppc64_sysv_abi_push_freg): Likewise.
206         (ppc64_sysv_abi_return_value_base): Likewise.
207         * rs6000-aix-tdep.c: Include "target-float.h".
208         (rs6000_push_dummy_call): Use target_float_convert.
209         (rs6000_return_value): Likewise.
210         * rs6000-lynx178-tdep.c: Include "target-float.h".
211         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
212         (rs6000_lynx178_return_value): Likewise.
213         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
214         (rs6000_register_to_value): Use target_float_convert.
215         (rs6000_value_to_register): Likewise.
216         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
217         (arm_extract_return_value): Use target_float_convert.
218         (arm_store_return_value): Likewise.
219         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
220         (sh_register_convert_to_virtual): Use target_float_convert.
221         (sh_register_convert_to_raw): Likewise.
222         * sh64-tdep.c: Include "target-float.h".
223         (sh64_extract_return_value): Use target_float_convert.
224         (sh64_register_convert_to_virtual): Likewise.
225         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
226
227 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
228
229         * target-float.c (floatformat_to_host_double): New function.
230         (floatformat_from_host_double): Likewise.
231         (target_float_to_host_double): Likewise.
232         (target_float_from_host_double): Likewise.
233         * target-float.h (target_float_to_host_double): Add prototype.
234         (target_float_from_host_double): Likewise.
235
236         * guile/scm-value.c: Include "target-float.h".
237         (gdbscm_value_to_real): Use target_float_to_host_double.
238         Handle integer source values via value_as_long.
239         * guile/scm-math.c: Include "target-float.h".  Do not include
240         "doublest.h", "dfp.h", and "expression.h".
241         (vlscm_convert_typed_number): Use target_float_from_host_double.
242         (vlscm_convert_number): Likewise.
243
244         * python/py-value.c (valpy_float): Use target_float_to_host_double.
245         (convert_value_from_python): Use target_float_from_host_double.
246
247 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
248
249         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
250         (cast_from_fixed): Likewise.
251         (ada_scaling_type): New function.
252         (ada_delta): Return value instead of DOUBLEST.  Perform target
253         arithmetic instead of host arithmetic.
254         (scaling_factor): Rename to ...
255         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
256         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
257         (ada_fixed_to_float): Remove.
258         (ada_float_to_fixed): Remove.
259         * ada-lang.h (ada_fixed_to_float): Remove.
260         (ada_float_to_fixed): Remove.
261         (ada_delta): Return value instead of DOUBLEST.
262         (ada_scaling_factor): Add prototype.
263
264         * ada-typeprint.c: Include "target-float.h".
265         (print_fixed_point_type): Perform target arithmetic instead of
266         host arithmetic.
267         * ada-valprint.c: Include "target-float.h".
268         (ada_val_print_num): Perform target arithmetic instead of
269         host arithmetic for fixed-point types.
270
271 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
272
273         * target-float.c: Include <math.h>.
274         (floatformat_binop): New function.
275         (floatformat_compare): Likewise.
276         (target_float_binop): Likewise.
277         (target_float_compare): Likewise.
278         * target-float.h: Include "expression.h".
279         (target_float_binop): Add prototype.
280         (target_float_compare): Likewise.
281
282         * valarith.c: Do not include "doublest.h" and "dfp.h".
283         Include "common/byte-vector.h".
284         (value_args_as_decimal): Remove, replace by ...
285         (value_args_as_target_float): ... this function.  Handle both
286         binary and decimal target floating-point formats.
287         (scalar_binop): Handle both binary and decimal FP using
288         value_args_as_target_float and target_float_binop.
289         (value_equal): Handle both binary and decimal FP using
290         value_args_as_target_float and target_float_compare.
291         (value_less): Likewise.
292         (value_pos): Handle all scalar types as simple copy.
293         (value_neg): Handle all scalar types via BINOP_SUB from 0.
294         * dfp.c (decimal_binop): Throw error instead of internal_error
295         when called with an unsupported operation code.
296
297 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
298
299         * target-float.c (target_float_to_string): New function.
300         (target_float_from_string): New function.
301         * target-float.h (target_float_to_string): Add prototype.
302         (target_float_from_string): Add prototype.
303
304         * valprint.c: Include "target-float.h".  Do not include
305         "doublest.h" and "dfp.h".
306         (print_floating): Use target_float_to_string.
307         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
308         (printf_floating): Use target_float_to_string.
309         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
310         (print_i387_value): Use target_float_to_string.
311         * mips-tdep.c: Include "target-float.h".
312         (mips_print_fp_register): Use target_float_to_string.
313         * sh64-tdep.c: Include "target-float.h".
314         (sh64_do_fp_register): Use target_float_to_string.
315
316         * parse.c: Include "target-float.h".  Do not include
317         "doublest.h" and "dfp.h".
318         (parse_float): Use target_float_from_string.
319         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
320         (define_symbol): Use target_float_from_string.
321         * gdbarch-selftests.c: Include "target-float.h".
322         (register_to_value_test): Use target_float_from_string.
323
324 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
325
326         * Makefile.c (SFILES): Add target-float.c.
327         (HFILES_NO_SRCDIR): Add target-float.h.
328         (COMMON_OBS): Add target-float.o.
329         * target-float.h: New file.
330         * target-float.c: New file.
331
332         * doublest.c (floatformat_classify): Fix detection of float_zero.
333
334         * gdbtypes.c (is_floating_type): New function.
335         * gdbtypes.h (is_floating_type): Add prototype.
336
337         * value.c: Do not include "floatformat.h".
338         (unpack_double): Use target_float_is_valid.
339         (is_floating_value): New function.
340         * value.h (is_floating_value): Add prototype-
341
342         * valarith.c: Include "target-float.h".
343         (value_logical_not): Use target_float_is_zero.
344
345         * python/py-value.c: Include "target-float.h".
346         (valpy_nonzero): Use target_float_is_zero.
347
348 2017-11-04  Tom Tromey  <tom@tromey.com>
349
350         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
351
352 2017-11-04  Tom Tromey  <tom@tromey.com>
353
354         * breakpoint.c (set_momentary_breakpoint): Return
355         breakpoint_up.
356         (until_break_command): Update.
357         (new_until_break_fsm): Change argument types to
358         breakpoint_up.
359         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
360         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
361         Remove.
362         * infcmd.c (finish_forward): Update.
363         * breakpoint.h (set_momentary_breakpoint)
364         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
365         (make_cleanup_delete_breakpoint): Remove.
366         (struct breakpoint_deleter): New.
367         (breakpoint_up): New typedef.
368         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
369         (insert_exception_resume_breakpoint): Update.
370         (insert_exception_resume_from_probe): Update.
371         (insert_longjmp_resume_breakpoint): Update.
372         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
373         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
374         * infcall.c (call_function_by_hand_dummy): Update
375
376 2017-11-04  Tom Tromey  <tom@tromey.com>
377
378         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
379
380 2017-11-04  Tom Tromey  <tom@tromey.com>
381
382         * linux-tdep.c (linux_core_info_proc_mappings): Use
383         gdb::def_vector.
384         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
385         "size" argument.
386         (linux_corefile_thread): Update.
387         (linux_make_corefile_notes): Remove unused variable.
388
389 2017-11-04  Tom Tromey  <tom@tromey.com>
390
391         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
392         gdb::byte_vector.
393
394 2017-11-04  Tom Tromey  <tom@tromey.com>
395
396         * objfiles.c (do_free_objfile_cleanup): Remove.
397         * compile/compile-object-load.c (compile_object_load): Update.
398         * objfiles.h (make_cleanup_free_objfile): Remove.
399
400 2017-11-04  Tom Tromey  <tom@tromey.com>
401
402         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
403         (adi_read_versions): Change "tags" to "gdb_byte *".
404         (adi_print_versions): Likewise.
405
406 2017-11-04  Tom Tromey  <tom@tromey.com>
407
408         * breakpoint.c
409         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
410         from start_rbreak_breakpoints.
411         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
412         * breakpoint.h (class scoped_rbreak_breakpoints): New.
413         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
414         * symtab.c (do_end_rbreak_breakpoints): Remove.
415         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
416
417 2017-11-04  Tom Tromey  <tom@tromey.com>
418
419         * cp-namespace.c (reset_directive_searched): Remove.
420         (cp_lookup_symbol_via_imports): Use scoped_restore.
421         * cp-support.c (reset_directive_searched): Remove.
422         (make_symbol_overload_list_using): Use scoped_restore.
423         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
424         (reset_directive_searched): Remove.
425
426 2017-11-04  Tom Tromey  <tom@tromey.com>
427
428         * symfile.c (find_separate_debug_file_by_debuglink): Use
429         unique_xmalloc_ptr.
430
431 2017-11-04  Tom Tromey  <tom@tromey.com>
432
433         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
434         type of "info".
435         (compute_stack_depth): Likewise.
436         (do_compile_dwarf_expr_to_c): Use std::vector.
437
438 2017-11-04  Tom Tromey  <tom@tromey.com>
439
440         * compile/compile-object-load.c (link_callbacks_einfo): Use
441         std::string.
442
443 2017-11-04  Tom Tromey  <tom@tromey.com>
444
445         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
446         Use scoped_free_pendings.
447         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
448         scoped_free_pendings.
449         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
450         (xcoff_initial_scan): Likewise.
451         * buildsym.c (reset_symtab_globals): Update comment.
452         (scoped_free_pendings): Rename from really_free_pendings.
453         (prepare_for_building): Update comment.
454         (buildsym_init): Likewise.
455         * buildsym.h (class scoped_free_pendings): New class.
456         (really_free_pendings): Don't declare.
457
458 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
459
460         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
461         output when converting a zero value to a special byteorder format.
462
463 2017-11-02  Yao Qi  <yao.qi@linaro.org>
464
465         * frame.c (do_frame_register_read): Remove aspace.
466         * jit.c (jit_frame_sniffer): Likwise.
467         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
468         * regcache.c (regcache::regcache): Pass nullptr.
469         (regcache_print): Caller updated.
470         * regcache.h (regcache::regcache): Remove one constructor
471         parameter aspace.
472
473 2017-11-02  Yao Qi  <yao.qi@linaro.org>
474
475         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
476
477 2017-11-02  Yao Qi  <yao.qi@linaro.org>
478
479         * breakpoint.c (insert_single_step_breakpoints): Update.
480         * frame.c (struct frame_info) <aspace>: Add const.
481         (frame_save_as_regcache): Add const.
482         (get_frame_address_space): Return const address_space *.
483         * frame.h (get_frame_address_space): Update declaration.
484         * infrun.c (struct step_over_info) <aspace>: Add const.
485         (set_step_over_info): Make aspace const.
486         (displaced_step_prepare_throw): Change variable const.
487         (resume): Likewise.
488         (proceed): Likewise.
489         (adjust_pc_after_break): Likewise.
490         (save_waitstatus): Likewise.
491         (handle_signal_stop): Likewise.
492         (keep_going_pass_signal): Likewise.
493         * jit.c (jit_frame_sniffer): Add const.
494         * mips-tdep.c (mips_single_step_through_delay): Likewise.
495         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
496         * record-full.c (record_full_wait_1): Likewise.
497         * regcache.c (regcache::regcache): Change parameter to const.
498         * regcache.h (regcache::regcache): Likewise.
499         (regcache::aspace): Return const address_space *.
500         (regcache) <m_aspace>: Add const.
501
502 2017-11-02  Yao Qi  <yao.qi@linaro.org>
503
504         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
505         * frame.c (create_sentinel_frame): Likewise.
506         * infrun.c (displaced_step_prepare_throw): Likewise.
507         (resume): Likewise.
508         (thread_still_needs_step_over_bp): Likewise.
509         (proceed): Likewise.
510         (do_target_wait): Likewise.
511         (adjust_pc_after_break): Likewise.
512         (handle_syscall_event): Likewise.
513         (save_waitstatus): Likewise.
514         (handle_inferior_event_1): Likewise.
515         (handle_signal_stop): Likewise.
516         (keep_going_pass_signal): Likewise.
517         * linux-nat.c (status_callback): Likewise.
518         (save_stop_reason): Likewise.
519         (resume_stopped_resumed_lwps): Likewise.
520         * record-full.c (record_full_exec_insn): Likewise.
521         (record_full_wait_1): Likewise.
522         * regcache.c (get_regcache_aspace): Remove.
523         * regcache.h (get_regcache_aspace): Remove.
524
525 2017-11-02  Yao Qi  <yao.qi@linaro.org>
526
527         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
528         (init_regcache_descr): Use gdbarch_num_regs.
529         (regcache::regcache): Likewise.
530         (regcache::get_register_status): Likewise.
531         (regcache::assert_raw_regnum): Likewise.
532         (regcache::cooked_read): Likewise.
533         (regcache::cooked_read_value): Likewise.
534         (regcache::cooked_write): Likewise.
535         (regcache::dump): Likewise.
536         (regcache::num_raw_registers): New method.
537         * regcache.h (class regcache) <num_raw_registers>: New.
538
539 2017-11-02  Yao Qi  <yao.qi@linaro.org>
540
541         * regcache.c (regcache::assert_regnum): New method.
542         (regcache::invalidate): Call assert_regnum.
543         (regcache::raw_update): Likewise.
544         (regcache::raw_write): Likewise.
545         (regcache::raw_read_part): Likewise.
546         (regcache::raw_write_part): Likewise.
547         (regcache::raw_supply): Likewise.
548         (regcache::raw_supply_integer): Likewise.
549         (regcache::raw_supply_zeroed): Likewise.
550         (regcache::raw_collect): Likewise.
551         (regcache::raw_collect_integer): Likewise.
552         * regcache.h (regcache::assert_regnum): Declare.
553
554 2017-11-02  Yao Qi  <yao.qi@linaro.org>
555
556         * regcache.c (regcache::dump): Remove code.
557
558 2017-11-02  Yao Qi  <yao.qi@linaro.org>
559
560         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
561         Remove.
562         <sizeof_cooked_register_status>: Remove.
563         (init_regcache_descr): Update.
564         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
565         (regcache::save): Likewise.
566         (regcache::dump): Likewise.
567
568 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
569
570         * ft32-tdep.c (ft32_fetch_instruction): New function.
571         (ft32_analyze_prologue): Use ft32_fetch_instruction().
572
573 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
574
575         * cli/cli-script.c (execute_control_command): Rename to ...
576         (execute_control_command_1): ... this.
577         (execute_control_command): New function.
578
579 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
580
581         * tracepoint.c (tfind_command): Remove const_cast.
582
583 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
584
585         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
586
587 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
588
589         * common/common-utils.h (in_inclusive_range): New function.
590         * arm-tdep.c (arm_record_extension_space): Use
591         in_inclusive_range.
592         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
593         * cris-tdep.c (cris_spec_reg_applicable): Use
594         in_inclusive_range.
595
596 2017-10-30  Pedro Alves  <palves@redhat.com>
597             Simon Marchi <simon.marchi@ericsson.com>
598
599         * remote.c (remote_set_syscall_catchpoint): Build a std::string
600         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
601
602 2017-10-30  Pedro Alves  <palves@redhat.com>
603
604         * common/common-utils.c (string_appendf, string_vappendf): New
605         functions.
606         * common/common-utils.h (string_appendf, string_vappendf): New
607         declarations.
608         * unittests/common-utils-selftests.c (string_appendf_func)
609         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
610         (string_vappendf_tests): New functions.
611         (_initialize_common_utils_selftests): Register "string_appendf" and
612         "string_vappendf tests".
613
614 2017-10-30  Pedro Alves  <palves@redhat.com>
615
616         * unittests/common-utils-selftests.c (format_func): New typedef.
617         (string_printf_tests, string_vprintf_tests): Tests factored out
618         and merged to ...
619         (test_format_func): ... this new function.
620         (string_printf_tests, string_vprintf_tests): Reimplement on top of
621         test_format_func.
622
623 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
624
625         * darwin-nat.c: Remove include of gdb.h.
626
627 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
628
629         * xtensa-xtregs.c: Fix formatting issues.
630
631 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
632
633         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
634
635 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
636
637         PR python/21213
638         * python/py-infthread.c (thpy_get_inferior): Increment reference
639         of inferior before returning it.
640
641 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
642
643         * unittests/common-utils-selftests.c (format): Add
644         ATTRIBUTE_PRINTF.
645
646 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
647
648         * xml-syscall.c (struct syscall_desc): Add constructor.
649         <name>: Change type to std::string.
650         (syscall_desc_up): New typedef.
651         (syscall_desc_p): Remove typeder.
652         (DEF_VEC_P(syscall_desc_p)): Remove.
653         (struct syscall_group_desc): Add constructor.
654         <name>: Change type to std::string.
655         <syscalls>: Change type to std::vector.
656         (syscall_group_desc_up): New typedef.
657         (syscall_group_desc_p): Remove typedef.
658         (DEF_VEC_P(syscall_group_desc_p)): Remove.
659         (struct syscalls_info) <syscalls>: Change type to std::vector of
660         unique_ptr.
661         <groups>: Likewise.
662         <my_gdb_datadir>: Change type to std::string.
663         (syscalls_info_up): New typedef.
664         (allocate_syscalls_info): Remove.
665         (syscalls_info_free_syscalls_desc): Remove.
666         (syscalls_info_free_syscall_group_desc): Remove.
667         (free_syscalls_info): Remove.
668         (make_cleanup_free_syscalls_info): Remove.
669         (syscall_group_create_syscall_group_desc): Adjust.
670         (syscall_group_add_syscall): Adjust.
671         (syscall_create_syscall_desc): Adjust.
672         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
673         (init_syscalls_info): Adjust.
674         (syscall_group_get_group_by_name): Adjust.
675         (xml_get_syscall_number): Adjust.
676         (xml_get_syscall_name): Adjust.
677         (xml_list_of_syscalls): Adjust.
678         (xml_list_syscalls_by_group): Adjust.
679         (xml_list_of_groups): Adjust.
680
681 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
682
683         * probe.h: Don't include gdb_vecs.h.
684         (DEF_VEC_P (probe_p)): Remove.
685         (find_probes_in_objfile): Return an std::vector.
686         * probe.c (find_probes_in_objfile): Likewise.
687         * breakpoint.c (breakpoint_objfile_data)
688         <longjmp_probes>: Change type to std::vector.
689         <exception_probes>: Likewise.
690         (free_breakpoint_probes): Don't manually free vectors.
691         (create_longjmp_master_breakpoint): Adjust.
692         (create_exception_master_breakpoint): Adjust.
693         * solib-svr4.c (svr4_create_probe_breakpoints): Change
694         parameter type, adjust.
695         (svr4_create_solib_event_breakpoints): Adjust.
696
697 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
698
699         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
700         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
701         with new.
702         (free_breakpoint_probes): Rename to ...
703         (free_breakpoint_objfile_data): ... this, and call delete on
704         bp_objfile_data..
705
706 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
707
708         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
709         (loaded_script_ptr): Remove typedef.
710         (DEF_VEC_P (loaded_script_ptr)): Remove.
711         (struct collect_matching_scripts_data): Add constructor.
712         <scripts_p>: Change type to (pointer to) std::vector.
713         (collect_matching_scripts_data): Adjust.
714         (sort_scripts_by_name): Make suitable for std::sort.
715         (print_scripts): Don't sort vector, adjust to std::vector.
716         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
717
718 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
719
720         * symfile.c (filename_language): Make struct, not typedef.  Add
721         constructor.
722         <ext>: Change type to std::string.
723         (DEF_VEC_O (filename_language)): Remove.
724         (filename_language_table): Change type to std::vector.
725         (add_filename_language): Adjust.
726         (set_ext_lang_command): Adjust.
727         (info_ext_lang_command): Adjust.
728         (deduce_language_from_filename): Adjust.
729         (class scoped_restore_filename_language_table): Remove.
730         (test_filename_language): Use scoped_restore.
731         (test_set_ext_lang_command): Use scoped_restore, adjust to
732         std::vector change.
733
734 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
735
736         * symfile.c: Include selftest.h.
737         (class scoped_restore_filename_language_table): New.
738         (test_filename_language): New test.
739         (test_set_ext_lang_command): New test.
740         (_initialize_symfile): Register tests.
741
742 2017-10-27  Keith Seitz  <keiths@redhat.com>
743
744         * breakpoint.c (print_breakpoint_location): Use the symbol saved
745         in the bp_location, falling back to find_pc_sect_function when
746         needed.
747         (add_location_to_breakpoint): Save sal->symbol.
748         * breakpoint.h (struct bp_location) <symbol>: New field.
749         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
750         * symtab.h (struct symtab_and_line) <symbol>: New field.
751
752 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
753
754         PR gdb/13669
755         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
756         to rewind obstack.
757
758 2017-10-26  Pedro Alves  <palves@redhat.com>
759
760         * remote.c (remote_async_terminal_ours_p): Delete.
761         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
762         Remove references to 'remote_async_terminal_ours_p'.
763
764 2017-10-26  Yao Qi  <yao.qi@linaro.org>
765
766         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
767
768 2017-10-26  Yao Qi  <yao.qi@linaro.org>
769
770         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
771         aspace const.
772         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
773         Likewise.
774         * breakpoint.c (bpstat_check_location): Remove cast.
775         (breakpoint_hit_catch_fork): Make aspce const.
776         (breakpoint_hit_catch_solib): Likewise.
777         (breakpoint_hit_catch_exec): Likewise.
778         (breakpoint_hit_ranged_breakpoint): Likewise.
779         (breakpoint_hit_watchpoint): Likewise.
780         (base_breakpoint_breakpoint_hit): Likewise.
781         (bkpt_breakpoint_hit): Likewise.
782         (dprintf_breakpoint_hit): Likewise.
783         (tracepoint_breakpoint_hit): Likewise.
784         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
785
786 2017-10-26  Yao Qi  <yao.qi@linaro.org>
787
788         * breakpoint.c (breakpoint_location_address_match): Change
789         "struct address_space *" to "const address_space".
790         (breakpoint_location_address_range_overlap): Likewise.
791         (breakpoint_here_p): Likewise.
792         (breakpoint_in_range_p): Likewise.
793         (moribund_breakpoint_here_p): Likewise.
794         (bp_location_inserted_here_p): Likewise.
795         (software_breakpoint_inserted_here_p): Likewise.
796         (hardware_breakpoint_inserted_here_p): Likewise.
797         (hardware_watchpoint_inserted_in_range): Likewise.
798         (bpstat_check_location): Likewise.
799         (bpstat_stop_status): Likewise.
800         (breakpoint_address_match): Likewise.
801         (breakpoint_address_match_range): Likewise.
802         (breakpoint_location_address_match): Likewise.
803         (breakpoint_location_address_range_overlap): Likewise.
804         (insert_single_step_breakpoint): Likewise.
805         (breakpoint_has_location_inserted_here): Likewise.
806         (single_step_breakpoint_inserted_here_p): Likewise.
807         (pc_at_non_inline_function): Likewise.
808         * breakpoint.h (bpstat_stop_status): Update declaration.
809         (breakpoint_here_p): Likewise.
810         (breakpoint_in_range_p): Likewise.
811         (moribund_breakpoint_here_p): Likewise.
812         (breakpoint_inserted_here_p): Likewise.
813         (software_breakpoint_inserted_here_p): Likewise.
814         (hardware_breakpoint_inserted_here_p): Likewise.
815         (breakpoint_has_location_inserted_here): Likewise.
816         (single_step_breakpoint_inserted_here_p): Likewise.
817         (hardware_watchpoint_inserted_in_range): Likewise.
818         (breakpoint_address_match): Likewise.
819         (insert_single_step_breakpoint): Likewise.
820         (pc_at_non_inline_function): Likewise.
821         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
822         * record.c (record_check_stopped_by_breakpoint): Likewise.
823         * record.h (record_check_stopped_by_breakpoint): Likewise.
824         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
825
826 2017-10-25  Yao Qi  <yao.qi@linaro.org>
827
828         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
829         regcache->arch () instead get_regcache_arch.
830         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
831         Likewise.
832         (aarch64_fbsd_store_inferior_registers): Likewise.
833         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
834         (store_gregs_to_thread): Likewise.
835         (fetch_fpregs_from_thread): Likewise.
836         (store_fpregs_to_thread): Likewise.
837         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
838         (aarch64_store_return_value): Likewise.
839         (aarch64_software_single_step): Likewise.
840         * aix-thread.c (aix_thread_wait): Likewise.
841         (supply_reg32): Likewise.
842         (supply_sprs64): Likewise.
843         (supply_sprs32): Likewise.
844         (fill_gprs64): Likewise.
845         (fill_gprs32): Likewise.
846         (fill_sprs64): Likewise.
847         (fill_sprs32): Likewise.
848         (store_regs_user_thread): Likewise.
849         (store_regs_kernel_thread): Likewise.
850         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
851         (alphabsd_store_inferior_registers): Likewise.
852         * alpha-tdep.c (alpha_extract_return_value): Likewise.
853         (alpha_store_return_value): Likewise.
854         (alpha_deal_with_atomic_sequence): Likewise.
855         (alpha_next_pc): Likewise.
856         (alpha_software_single_step): Likewise.
857         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
858         (amd64bsd_store_inferior_registers): Likewise.
859         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
860         Likewise.
861         (amd64_linux_store_inferior_registers): Likewise.
862         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
863         (amd64_collect_native_gregset): Likewise.
864         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
865         (amd64obsd_collect_uthread): Likewise.
866         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
867         (amd64_collect_fpregset): Likewise.
868         (amd64_supply_fxsave): Likewise.
869         (amd64_supply_xsave): Likewise.
870         (amd64_collect_fxsave): Likewise.
871         (amd64_collect_xsave): Likewise.
872         * arc-tdep.c (arc_write_pc): Likewise.
873         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
874         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
875         (arm_fbsd_store_inferior_registers): Likewise.
876         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
877         (store_vfp_regs): Likewise.
878         (arm_linux_fetch_inferior_registers): Likewise.
879         (arm_linux_store_inferior_registers): Likewise.
880         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
881         (arm_linux_sigreturn_next_pc): Likewise.
882         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
883         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
884         (fetch_register): Likewise.
885         (store_register): Likewise.
886         * arm-tdep.c (arm_is_thumb): Likewise.
887         (displaced_in_arm_mode): Likewise.
888         (bx_write_pc): Likewise.
889         (arm_get_next_pcs_addr_bits_remove): Likewise.
890         (arm_software_single_step): Likewise.
891         (arm_extract_return_value): Likewise.
892         (arm_store_return_value): Likewise.
893         (arm_write_pc): Likewise.
894         * bfin-tdep.c (bfin_extract_return_value): Likewise.
895         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
896         (bsd_uthread_store_registers): Likewise.
897         * core-regset.c (fetch_core_registers): Likewise.
898         * corelow.c (get_core_registers): Likewise.
899         * cris-tdep.c (cris_store_return_value): Likewise.
900         (cris_extract_return_value): Likewise.
901         (find_step_target): Likewise.
902         (find_step_target): Likewise.
903         (cris_software_single_step): Likewise.
904         * ctf.c (ctf_fetch_registers): Likewise.
905         * darwin-nat.c (cancel_breakpoint): Likewise.
906         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
907         * frv-tdep.c (frv_extract_return_value): Likewise.
908         * ft32-tdep.c (ft32_store_return_value): Likewise.
909         (ft32_extract_return_value): Likewise.
910         * go32-nat.c (fetch_register): Likewise.
911         (go32_fetch_registers): Likewise.
912         (go32_store_registers): Likewise.
913         (store_register): Likewise.
914         * h8300-tdep.c (h8300_extract_return_value): Likewise.
915         (h8300_store_return_value): Likewise.
916         * hppa-linux-nat.c (fetch_register): Likewise.
917         (store_register): Likewise.
918         (hppa_linux_fetch_inferior_registers): Likewise.
919         (hppa_linux_store_inferior_registers): Likewise.
920         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
921         (i386_darwin_store_inferior_registers): Likewise.
922         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
923         (gnu_store_registers): Likewise.
924         * i386-linux-nat.c (fetch_register): Likewise.
925         (store_register): Likewise.
926         (supply_gregset): Likewise.
927         (fill_gregset): Likewise.
928         (i386_linux_fetch_inferior_registers): Likewise.
929         (i386_linux_store_inferior_registers): Likewise.
930         (i386_linux_resume): Likewise.
931         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
932         Likewise.
933         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
934         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
935         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
936         (i386obsd_collect_uthread): Likewise.
937         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
938         (i386_supply_gregset): Likewise.
939         (i386_collect_gregset): Likewise.
940         (i386_supply_fpregset): Likewise.
941         (i386_collect_fpregset): Likewise.
942         (i386_mpx_bd_base): Likewise.
943         * i386-v4-nat.c (supply_fpregset): Likewise.
944         (fill_fpregset): Likewise.
945         * i387-tdep.c (i387_supply_fsave): Likewise.
946         (i387_collect_fsave): Likewise.
947         (i387_supply_fxsave): Likewise.
948         (i387_collect_fxsave): Likewise.
949         (i387_supply_xsave): Likewise.
950         (i387_collect_xsave): Likewise.
951         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
952         (ia64_linux_store_registers): Likewise.
953         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
954         (ia64_extract_return_value): Likewise.
955         (ia64_store_return_value): Likewise.
956         (find_func_descr): Likewise.
957         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
958         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
959         (inf_ptrace_store_registers): Likewise.
960         * infrun.c (use_displaced_stepping): Likewise.
961         (displaced_step_prepare_throw): Likewise.
962         (resume): Likewise.
963         (proceed): Likewise.
964         (do_target_wait): Likewise.
965         (adjust_pc_after_break): Likewise.
966         (handle_inferior_event_1): Likewise.
967         (handle_signal_stop): Likewise.
968         (save_infcall_suspend_state): Likewise.
969         (restore_infcall_suspend_state): Likewise.
970         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
971         * jit.c (jit_frame_prev_register): Likewise.
972         * linux-nat.c (save_stop_reason): Likewise.
973         (linux_nat_wait_1): Likewise.
974         (resume_stopped_resumed_lwps): Likewise.
975         * linux-record.c (record_linux_sockaddr): Likewise.
976         (record_linux_msghdr): Likewise.
977         (record_linux_system_call): Likewise.
978         * linux-tdep.c (linux_collect_thread_registers): Likewise.
979         * lm32-tdep.c (lm32_extract_return_value): Likewise.
980         (lm32_store_return_value): Likewise.
981         * m32c-tdep.c (m32c_read_flg): Likewise.
982         (m32c_pseudo_register_read): Likewise.
983         (m32c_pseudo_register_write): Likewise.
984         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
985         (m32r_linux_collect_gregset): Likewise.
986         * m32r-tdep.c (m32r_store_return_value): Likewise.
987         (m32r_extract_return_value): Likewise.
988         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
989         (m68kbsd_collect_fpregset): Likewise.
990         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
991         * m68k-linux-nat.c (fetch_register): Likewise.
992         (old_fetch_inferior_registers): Likewise.
993         (old_store_inferior_registers): Likewise.
994         (store_regs): Likewise.
995         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
996         (m68k_svr4_store_return_value): Likewise.
997         * m88k-tdep.c (m88k_store_arguments): Likewise.
998         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
999         (mi_cmd_data_write_register_values): Likewise.
1000         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1001         (mips_fbsd_store_inferior_registers): Likewise.
1002         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1003         (mips_fbsd_supply_gregs): Likewise.
1004         (mips_fbsd_collect_fpregs): Likewise.
1005         (mips_fbsd_collect_gregs): Likewise.
1006         (mips_fbsd_supply_fpregset): Likewise.
1007         (mips_fbsd_collect_fpregset): Likewise.
1008         (mips_fbsd_supply_gregset): Likewise.
1009         (mips_fbsd_collect_gregset): Likewise.
1010         * mips-linux-nat.c (supply_gregset): Likewise.
1011         (fill_gregset): Likewise.
1012         (supply_fpregset): Likewise.
1013         (fill_fpregset): Likewise.
1014         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1015         (mips_fill_gregset): Likewise.
1016         (mips_supply_fpregset): Likewise.
1017         (mips_fill_fpregset): Likewise.
1018         (mips64_supply_gregset): Likewise.
1019         (micromips_linux_sigframe_validate): Likewise.
1020         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1021         (mipsnbsd_fetch_inferior_registers): Likewise.
1022         (mipsnbsd_store_inferior_registers): Likewise.
1023         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1024         (mipsnbsd_supply_gregset): Likewise.
1025         (mipsnbsd_iterate_over_regset_sections): Likewise.
1026         (mipsnbsd_supply_reg): Likewise.
1027         (mipsnbsd_supply_fpreg): Likewise.
1028         * mips-tdep.c (mips_in_frame_stub): Likewise.
1029         (mips_dummy_id): Likewise.
1030         (is_octeon_bbit_op): Likewise.
1031         (micromips_bc1_pc): Likewise.
1032         (extended_mips16_next_pc): Likewise.
1033         (mips16_next_pc): Likewise.
1034         (deal_with_atomic_sequence): Likewise.
1035         * moxie-tdep.c (moxie_process_readu): Likewise.
1036         * nios2-tdep.c (nios2_get_next_pc): Likewise.
1037         * nto-procfs.c (procfs_store_registers): Likewise.
1038         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1039         (ppcfbsd_store_inferior_registers): Likewise.
1040         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1041         (fetch_altivec_register): Likewise.
1042         (get_spe_registers): Likewise.
1043         (fetch_spe_register): Likewise.
1044         (fetch_altivec_registers): Likewise.
1045         (fetch_all_gp_regs): Likewise.
1046         (fetch_all_fp_regs): Likewise.
1047         (store_vsx_register): Likewise.
1048         (store_altivec_register): Likewise.
1049         (set_spe_registers): Likewise.
1050         (store_spe_register): Likewise.
1051         (store_altivec_registers): Likewise.
1052         (store_all_gp_regs): Likewise.
1053         (store_all_fp_regs): Likewise.
1054         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1055         (ppc_linux_collect_gregset): Likewise.
1056         (ppc_canonicalize_syscall): Likewise.
1057         (ppc_linux_record_signal): Likewise.
1058         (ppu2spu_prev_register): Likewise.
1059         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1060         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1061         (ppcobsd_store_registers): Likewise.
1062         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1063         Likewise.
1064         (ppc_ravenscar_generic_store_registers): Likewise.
1065         * procfs.c (procfs_fetch_registers): Likewise.
1066         (procfs_store_registers): Likewise.
1067         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1068         (ravenscar_store_registers): Likewise.
1069         (ravenscar_prepare_to_store): Likewise.
1070         * record-btrace.c (record_btrace_fetch_registers): Likewise.
1071         * record-full.c (record_full_wait_1): Likewise.
1072         (record_full_registers_change): Likewise.
1073         (record_full_store_registers): Likewise.
1074         (record_full_core_fetch_registers): Likewise.
1075         (record_full_save): Likewise.
1076         (record_full_goto_insn): Likewise.
1077         * regcache.c (regcache_register_size): Likewise.
1078         (get_regcache_arch): Remove.
1079         (regcache_read_pc): Likewise.
1080         * regcache.h (get_regcache_arch): Remove.
1081         * remote-sim.c (gdbsim_fetch_register): Likewise.
1082         (gdbsim_store_register): Likewise.
1083         * remote.c (fetch_register_using_p): Likewise.
1084         (send_g_packet): Likewise.
1085         (remote_prepare_to_store): Likewise.
1086         (store_registers_using_G): Likewise.
1087         * reverse.c (save_bookmark_command): Likewise.
1088         (goto_bookmark_command): Likewise.
1089         * rs6000-aix-tdep.c (branch_dest): Likewise.
1090         * rs6000-nat.c (rs6000_ptrace64): Likewise.
1091         (fetch_register): Likewise.
1092         * rs6000-tdep.c (ppc_supply_reg): Likewise.
1093         (ppc_collect_reg): Likewise.
1094         (ppc_collect_gregset): Likewise.
1095         (ppc_collect_fpregset): Likewise.
1096         (ppc_collect_vsxregset): Likewise.
1097         (ppc_collect_vrregset): Likewise.
1098         (ppc_displaced_step_hw_singlestep): Likewise.
1099         (rs6000_pseudo_register_read): Likewise.
1100         (rs6000_pseudo_register_write): Likewise.
1101         * s390-linux-nat.c (supply_gregset): Likewise.
1102         (fill_gregset): Likewise.
1103         (s390_linux_fetch_inferior_registers): Likewise.
1104         * s390-linux-tdep.c (s390_write_pc): Likewise.
1105         (s390_software_single_step): Likewise.
1106         (s390_all_but_pc_registers_record): Likewise.
1107         (s390_linux_syscall_record): Likewise.
1108         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1109         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1110         (shnbsd_store_inferior_registers): Likewise.
1111         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1112         (sh_extract_return_value_fpu): Likewise.
1113         (sh_store_return_value_nofpu): Likewise.
1114         (sh_corefile_supply_regset): Likewise.
1115         (sh_corefile_collect_regset): Likewise.
1116         * sh64-tdep.c (sh64_extract_return_value): Likewise.
1117         (sh64_store_return_value): Likewise.
1118         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1119         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1120         (sparc_store_inferior_registers): Likewise.
1121         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1122         (sparc_ravenscar_prepare_to_store): Likewise.
1123         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1124         (sparc_analyze_control_transfer): Likewise.
1125         (sparc_step_trap): Likewise.
1126         (sparc_software_single_step): Likewise.
1127         (sparc32_gdbarch_init): Likewise.
1128         (sparc_supply_rwindow): Likewise.
1129         (sparc_collect_rwindow): Likewise.
1130         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1131         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1132         (sparc64nbsd_collect_gregset): Likewise.
1133         (sparc64nbsd_supply_fpregset): Likewise.
1134         (sparc64nbsd_collect_fpregset): Likewise.
1135         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1136         (sparc64_supply_gregset): Likewise.
1137         (sparc64_collect_gregset): Likewise.
1138         (sparc64_supply_fpregset): Likewise.
1139         (sparc64_collect_fpregset): Likewise.
1140         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
1141         * spu-tdep.c (spu_unwind_sp): Likewise.
1142         (spu2ppu_prev_register): Likewise.
1143         (spu_memory_remove_breakpoint): Likewise.
1144         * stack.c (return_command): Likewise.
1145         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
1146         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
1147         * tracefile.c (trace_save_ctf): Likewise.
1148         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
1149         (do_windows_store_inferior_registers): Likewise.
1150         (windows_resume): Likewise.
1151         * xtensa-linux-nat.c (fill_gregset): Likewise.
1152         (supply_gregset_reg): Likewise.
1153         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
1154         (xtensa_register_read_masked): Likewise.
1155         (xtensa_supply_gregset): Likewise.
1156         (xtensa_extract_return_value): Likewise.
1157         (xtensa_store_return_value): Likewise.
1158
1159 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
1160
1161         * doublest.c (floatformat_from_string): New function.
1162         * doublest.h (floatformat_from_string): Add prototype.
1163
1164         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
1165         (OP_FLOAT): ... this.
1166         * expression.h: Do not include "doublest.h".
1167         (union exp_element): Replace doubleconst and decfloatconst by
1168         new element floatconst.
1169         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
1170         (ada_evaluate_subexp): Likewise.
1171         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
1172         OP_DOUBLE and OP_DECFLOAT.
1173         * expprint.c (print_subexp_standard): Likewise.
1174         (dump_subexp_body_standard): Likewise.
1175         * breakpoint.c (watchpoint_exp_is_const): Likewise.
1176
1177         * parse.c: Include "dfp.h".
1178         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1179         (write_exp_elt_floatcst): New function.
1180         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
1181         and OP_DECFLOAT.
1182         (operator_check_standard): Likewise.
1183         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
1184         Return target format buffer instead of host DOUBLEST.
1185         Use floatformat_from_string and decimal_from_string to parse
1186         either binary or decimal floating-point types.
1187         (parse_c_float): Remove.
1188         * parser-defs.h: Do not include "doublest.h".
1189         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1190         (write_exp_elt_floatcst): Add prototype.
1191         (parse_float): Update prototype.
1192         (parse_c_float): Remove.
1193
1194         * c-exp.y: Do not include "dfp.h".
1195         (typed_val_float): Use byte buffer instead of DOUBLEST.
1196         (typed_val_decfloat): Remove.
1197         (DECFLOAT): Remove.
1198         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1199         (parse_number): Update to new parse_float interface.
1200         Parse suffixes and determine type before calling parse_float.
1201         Handle decimal and binary FP types the same way.
1202
1203         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1204         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
1205         (parse_number): Update to new parse_float interface.
1206         Parse suffixes and determine type before calling parse_float.
1207
1208         * f-exp.y: Replace dval by typed_val_float.
1209         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1210         (parse_number): Use parse_float instead of atof.
1211
1212         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1213         (parse_go_float): Remove.
1214         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1215         (parse_number): Call parse_float instead of parse_go_float.
1216         Parse suffixes and determine type before calling parse_float.
1217
1218         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1219         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1220         (parse_number): Update to new parse_float interface.
1221         Parse suffixes and determine type before calling parse_float.
1222
1223         * m2-exp.y: Replace dval by byte buffer val.
1224         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1225         (parse_number): Call parse_float instead of atof.
1226
1227         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1228         (lex_number): Call parse_float instead of strtod.
1229         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
1230         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
1231         Use write_exp_elt_floatcst.
1232         (unit_testing): Remove static variable.
1233         (rust_type): Do not check unit_testing.
1234         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
1235
1236         * ada-exp.y (type_float, type_double): Remove.
1237         (typed_val_float): Use byte buffer instead of DOUBLEST.
1238         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1239         * ada-lex.l (processReal): Use parse_float instead of sscanf.
1240
1241 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
1242
1243         * aarch64-tdep.h (enum aarch64_regnum): Remove.
1244         * arch/aarch64.h: New file.
1245
1246 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1247
1248         * dfp.h (decimal_from_string): Use const reference for argument.
1249         * dfp.c (decimal_from_string): Likewise.
1250
1251 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1252
1253         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
1254         * sh64-tdep.c (sh64_do_fp_register): Likewise.
1255         * mips-tdep.c (mips_print_fp_register): Likewise.
1256
1257 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1258
1259         * common/format.h (enum argclass): Replace decfloat_arg by
1260         dec32float_arg, dec64float_arg, and dec128float_arg.
1261         * common/format.c (parse_format_string): Update to return
1262         new decimal float argument classes.
1263
1264         * printcmd.c (printf_decfloat): Rename to ...
1265         (printf_floating): ... this.  Add argclass argument, and use it
1266         instead of parsing the format string again.  Add support for
1267         binary floating-point values, using floatformat_to_string.
1268         Convert value to the target format if it doesn't already match.
1269         (ui_printf): Call printf_floating instead of printf_decfloat,
1270         also for double_arg / long_double_arg.  Pass argclass.
1271
1272         * dfp.c (decimal_to_string): Add format string argument.
1273         * dfp.h (decimal_to_string): Likewise.
1274
1275         * doublest.c (floatformat_to_string): Add format string argument.
1276         * doublest.h (floatformat_to_string): Likewise.
1277
1278 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1279
1280         * doublest.c (floatformat_precision): New routine.
1281         (floatformat_to_string): Likewise.
1282         * doublest.c (floatformat_to_string): Add prototype.
1283
1284         * printcmd.c (print_scalar_formatted): Only call print_floating
1285         on floating-point types.
1286         * valprint.c: Do not include "floatformat.h".
1287         (generic_val_print_decfloat): Remove.
1288         (generic_val_print): Call generic_val_print_float for both
1289         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
1290         (print_floating): Use floatformat_to_string.  Handle decimal float.
1291         (print_decimal_floating): Remove, merge into floatformat_to_string.
1292         * value.h (print_decimal_floating): Remove.
1293
1294         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
1295
1296 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1297
1298         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
1299
1300 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1301
1302         * memattr.h: Don't include vec.h.
1303         (struct mem_attrib): Initialize fields.
1304         <unknown>: New static method.
1305         (struct mem_region): Add constructors, operator<, initialize
1306         fields.
1307         * memattr.c: Include algorithm.
1308         (default_mem_attrib, unknown_mem_attrib): Remove.
1309         (user_mem_region_list): New global.
1310         (target_mem_region_list, mem_region_list): Change type to
1311         std::vector<mem_region>.
1312         (mem_use_target): Now a function.
1313         (target_mem_regions_valid): Change type to bool.
1314         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
1315         (require_user_regions): Adjust.
1316         (require_target_regions): Adjust.
1317         (create_mem_region): Adjust.
1318         (lookup_mem_region): Adjust.
1319         (invalidate_target_mem_regions): Adjust.
1320         (mem_clear): Rename to...
1321         (user_mem_clear): ... this, and adjust.
1322         (mem_command): Adjust.
1323         (info_mem_command): Adjust.
1324         (mem_enable, enable_mem_command, mem_disable,
1325         disable_mem_command): Adjust.
1326         (mem_delete): Adjust.
1327         (delete_mem_command): Adjust.
1328         * memory-map.h (parse_memory_map): Return an std::vector.
1329         * memory-map.c (parse_memory_map): Likewise.
1330         (struct memory_map_parsing_data): Add constructor.
1331         <memory_map>: Point to std::vector.
1332         (memory_map_start_memory): Adjust.
1333         (memory_map_end_memory): Adjust.
1334         (memory_map_end_property): Adjust.
1335         (clear_result): Remove.
1336         * remote.c (remote_memory_map): Return an std::vector.
1337         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
1338         Remove.
1339         (target_debug_print_mem_region_vector): New.
1340         * target-delegates.c: Regenerate.
1341         * target.h (mem_region_vector): New typedef.
1342         (to_memory_map): Return mem_region_vector.
1343         (target_memory_map): Return an std::vector.
1344         * target.c (target_memory_map): Return an std::vector.
1345         (flash_erase_command): Adjust.
1346
1347 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1348
1349         * memory-map.c (struct memory_map_parsing_data) <property_name>:
1350         Change type to std::string.
1351         (memory_map_start_property): Adjust.
1352         (memory_map_end_property): Adjust.
1353
1354 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1355
1356         * infrun.h: Include common/byte-vector.h.
1357         (struct displaced_step_closure): New struct.
1358         (struct buf_displaced_step_closure): New struct.
1359         * infrun.c (displaced_step_closure::~displaced_step_closure):
1360         Provide default implementation.
1361         (displaced_step_clear): Deallocate step closure with delete.
1362         * aarch64-tdep.c (displaced_step_closure): Rename to ...
1363         (aarch64_displaced_step_closure): ... this, extend
1364         displaced_step_closure.
1365         (aarch64_displaced_step_data) <dsc>: Change type to
1366         aarch64_displaced_step_closure.
1367         (aarch64_displaced_step_copy_insn): Adjust to type change, use
1368         unique_ptr.
1369         (aarch64_displaced_step_fixup): Add cast for displaced step
1370         closure.
1371         * amd64-tdep.c (displaced_step_closure): Rename to ...
1372         (amd64_displaced_step_closure): ... this, extend
1373         displaced_step_closure.
1374         <insn_buf>: Change type to std::vector<gdb_byte>.
1375         <max_len>: Remove.
1376         (fixup_riprel): Change type of DSC parameter, adjust to type
1377         change of insn_buf.
1378         (fixup_displaced_copy): Change type of DSC parameter.
1379         (amd64_displaced_step_copy_insn): Instantiate
1380         amd64_displaced_step_closure.
1381         (amd64_displaced_step_fixup): Add cast for closure type, adjust
1382         to type change of insn_buf.
1383         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
1384         parameter DSC.
1385         (arm_linux_copy_svc): Likewise.
1386         (cleanup_kernel_helper_return): Likewise.
1387         (arm_catch_kernel_helper_return): Likewise.
1388         (arm_linux_displaced_step_copy_insn): Instantiate
1389         arm_displaced_step_closure.
1390         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
1391         (displaced_read_reg): Change type of parameter DSC.
1392         (branch_write_pc): Likewise.
1393         (load_write_pc): Likewise.
1394         (alu_write_pc): Likewise.
1395         (displaced_write_reg): Likewise.
1396         (arm_copy_unmodified): Likewise.
1397         (thumb_copy_unmodified_32bit): Likewise.
1398         (thumb_copy_unmodified_16bit): Likewise.
1399         (cleanup_preload): Likewise.
1400         (install_preload): Likewise.
1401         (arm_copy_preload): Likewise.
1402         (thumb2_copy_preload): Likewise.
1403         (install_preload_reg): Likewise.
1404         (arm_copy_preload_reg): Likewise.
1405         (cleanup_copro_load_store): Likewise.
1406         (install_copro_load_store): Likewise.
1407         (arm_copy_copro_load_store) Likewise.
1408         (thumb2_copy_copro_load_store): Likewise.
1409         (cleanup_branch): Likewise.
1410         (install_b_bl_blx): Likewise.
1411         (arm_copy_b_bl_blx): Likewise.
1412         (thumb2_copy_b_bl_blx): Likewise.
1413         (thumb_copy_b): Likewise.
1414         (install_bx_blx_reg): Likewise.
1415         (arm_copy_bx_blx_reg): Likewise.
1416         (thumb_copy_bx_blx_reg): Likewise.
1417         (cleanup_alu_imm): Likewise.
1418         (arm_copy_alu_imm): Likewise.
1419         (thumb2_copy_alu_imm): Likewise.
1420         (cleanup_alu_reg): Likewise.
1421         (install_alu_reg): Likewise.
1422         (arm_copy_alu_reg): Likewise.
1423         (thumb_copy_alu_reg): Likewise.
1424         (cleanup_alu_shifted_reg): Likewise.
1425         (install_alu_shifted_reg): Likewise.
1426         (arm_copy_alu_shifted_reg): Likewise.
1427         (cleanup_load): Likewise.
1428         (cleanup_store): Likewise.
1429         (arm_copy_extra_ld_st): Likewise.
1430         (install_load_store): Likewise.
1431         (thumb2_copy_load_literal): Likewise.
1432         (thumb2_copy_load_reg_imm): Likewise.
1433         (arm_copy_ldr_str_ldrb_strb): Likewise.
1434         (cleanup_block_load_all): Likewise.
1435         (cleanup_block_store_pc): Likewise.
1436         (cleanup_block_load_pc): Likewise.
1437         (arm_copy_block_xfer): Likewise.
1438         (thumb2_copy_block_xfer): Likewise.
1439         (cleanup_svc): Likewise.
1440         (install_svc): Likewise.
1441         (arm_copy_svc): Likewise.
1442         (thumb_copy_svc): Likewise.
1443         (arm_copy_undef): Likewise.
1444         (thumb_32bit_copy_undef): Likewise.
1445         (arm_copy_unpred): Likewise.
1446         (arm_decode_misc_memhint_neon): Likewise.
1447         (arm_decode_unconditional): Likewise.
1448         (arm_decode_miscellaneous): Likewise.
1449         (arm_decode_dp_misc): Likewise.
1450         (arm_decode_ld_st_word_ubyte): Likewise.
1451         (arm_decode_media): Likewise.
1452         (arm_decode_b_bl_ldmstm): Likewise.
1453         (arm_decode_ext_reg_ld_st): Likewise.
1454         (thumb2_decode_dp_shift_reg): Likewise.
1455         (thumb2_decode_ext_reg_ld_st): Likewise.
1456         (arm_decode_svc_copro): Likewise.
1457         (thumb2_decode_svc_copro): Likewise.
1458         (install_pc_relative): Likewise.
1459         (thumb_copy_pc_relative_16bit): Likewise.
1460         (thumb_decode_pc_relative_16bit): Likewise.
1461         (thumb_copy_pc_relative_32bit): Likewise.
1462         (thumb_copy_16bit_ldr_literal): Likewise.
1463         (thumb_copy_cbnz_cbz): Likewise.
1464         (thumb2_copy_table_branch): Likewise.
1465         (cleanup_pop_pc_16bit_all): Likewise.
1466         (thumb_copy_pop_pc_16bit): Likewise.
1467         (thumb_process_displaced_16bit_insn): Likewise.
1468         (decode_thumb_32bit_ld_mem_hints): Likewise.
1469         (thumb_process_displaced_32bit_insn): Likewise.
1470         (thumb_process_displaced_insn): Likewise.
1471         (arm_process_displaced_insn): Likewise.
1472         (arm_displaced_init_closure): Likewise.
1473         (arm_displaced_step_fixup): Add cast for closure.
1474         * arm-tdep.h: Include infrun.h.
1475         (displaced_step_closure): Rename to ...
1476         (arm_displaced_step_closure): ... this, extend
1477         displaced_step_closure.
1478         <u::svc::copy_svc_os>: Change type of parameter DSC.
1479         <cleanup>: Likewise.
1480         (arm_process_displaced_insn): Likewise.
1481         (arm_displaced_init_closure): Likewise.
1482         (displaced_read_reg): Likewise.
1483         (displaced_write_reg): Likewise.
1484         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1485         Adjust.
1486         * i386-tdep.h: Include infrun.h.
1487         (i386_displaced_step_closure): New typedef.
1488         * i386-tdep.c (i386_displaced_step_copy_insn): Use
1489         i386_displaced_step_closure.
1490         (i386_displaced_step_fixup): Adjust.
1491         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
1492         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
1493         and unique_ptr.
1494         (ppc_displaced_step_fixup): Adjust.
1495         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
1496         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
1497         and unique_ptr.
1498         (s390_displaced_step_fixup): Adjust.
1499
1500 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1501
1502         * interps.h (interp_resume, interp_suspend, interp_set_temp):
1503         Remove declarations.
1504
1505 2017-10-20  Tom Tromey  <tom@tromey.com>
1506
1507         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
1508         std::vector.
1509         (gdb_bfd_record_inclusion): Update.
1510         (bfdp): Remove typedef.
1511
1512 2017-10-20  Tom Tromey  <tom@tromey.com>
1513
1514         * gdb_bfd.c (gdb_bfd_ref): Use new.
1515         (struct gdb_bfd_data): Add constructor, destructor, and member
1516         initializers.
1517         (gdb_bfd_unref): Use delete.
1518
1519 2017-10-20  Tom Tromey  <tom@tromey.com>
1520
1521         * exec.c (exec_file_attach): Use new_bfd_ref.
1522         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
1523         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1524         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
1525         new_bfd_ref.
1526         * gdb_bfd.h (new_bfd_ref): New function.
1527
1528 2017-10-20  Pedro Alves  <palves@redhat.com>
1529
1530         * main.c (captured_command_loop): Add attribute noinline.
1531
1532 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
1533
1534         * interps.c (struct interp_factory): Add constructor.
1535         (interp_factory_p): Remove typedef.
1536         (DEF_VEC_P(interp_factory_p)): Remove.
1537         (interpreter_factories): Change type to std::vector.
1538         (interp_factory_register): Adjust.
1539         (interp_lookup): Adjust.
1540         (interpreter_completer): Adjust.
1541
1542 2017-10-19  Tom Tromey  <tom@tromey.com>
1543
1544         * break-catch-syscall.c (catch_syscall_completer): Use
1545         std::string, gdb::unique_xmalloc_ptr.
1546
1547 2017-10-19  Tom Tromey  <tom@tromey.com>
1548
1549         * infcall.c (call_function_by_hand_dummy): Use std::string.
1550
1551 2017-10-19  Tom Tromey  <tom@tromey.com>
1552
1553         * mi/mi-main.c (mi_cmd_execute): Update.
1554         * top.h (prepare_execute_command): Return scoped_value_mark.
1555         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
1556         Add move constructor.
1557         * top.c (prepare_execute_command): Return scoped_value_mark.
1558         (execute_command): Update.
1559
1560 2017-10-19  Pedro Alves  <palves@redhat.com>
1561
1562         * xml-support.c (xml_fetch_content_from_file): Check fread's
1563         return.
1564
1565 2017-10-19  Pedro Alves  <palves@redhat.com>
1566
1567         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
1568         async.
1569         (handle_error_fd): New function.
1570         (ser_base_async): Add/delete an event loop file handler for
1571         error_fd.
1572
1573 2017-10-19  Pedro Alves  <palves@redhat.com>
1574
1575         * xml-support.c (xml_fetch_content_from_file): Don't read in
1576         chunks.  Instead use fseek to determine the file's size, and read
1577         it in one go.
1578
1579 2017-11-18  Keith Seitz  <keiths@redhat.com>
1580
1581         * c-exp.y (oper): Canonicalize conversion operators of user-defined
1582         types.
1583         Add whitespace to front of type name.
1584
1585 2017-10-18  Keith Seitz  <keiths@redhat.com>
1586
1587         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
1588         DW_AT_accessibility.
1589
1590 2017-10-18  Yao Qi  <yao.qi@linaro.org>
1591
1592         * features/tic6x-c62x-linux.c: Remove.
1593
1594 2017-10-17  Tom Tromey  <tom@tromey.com>
1595
1596         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
1597         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
1598         (do_mixed_source_and_assembly): Likewise.
1599
1600 2017-10-17  Tom Tromey  <tom@tromey.com>
1601
1602         * regcache.c (regcache::xfer_part): Remove assertion.
1603
1604 2017-10-17  Pedro Alves  <palves@redhat.com>
1605
1606         * xml-support.c (xml_fetch_content_from_file): Call
1607         unique_ptr::release() instead unique_ptr::get() when passing
1608         through xrealloc.
1609
1610 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1611
1612         * regcache.c (regcache::xfer_part): Remove parameters read and
1613         write, add parameter is_raw.  All callers are updated.
1614
1615 2017-10-16  Keith Seitz  <keiths@redhat.com>
1616
1617         * c-typeprint.c (enum access_specifier): Moved here from
1618         c_type_print_base.
1619         (output_access_specifier): New function.
1620         (c_type_print_base): Consider typedefs when assessing
1621         whether access labels are needed.
1622         Use output_access_specifier as needed.
1623         Output access specifier for typedefs, if needed.
1624         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
1625         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
1626         fields.
1627         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
1628         accessor macros.
1629
1630 2017-10-16  Tom Tromey  <tom@tromey.com>
1631
1632         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1633         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1634         * target.c (target_fileio_read_stralloc): Update.
1635         * sparc64-tdep.c (adi_is_addr_mapped): Update.
1636         * target.h (target_fileio_read_stralloc): Return
1637         unique_xmalloc_ptr.
1638
1639 2017-10-16  Tom Tromey  <tom@tromey.com>
1640
1641         * xml-syscall.c (xml_init_syscalls_info): Update.
1642         * xml-support.c (xinclude_start_include): Update.
1643         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1644         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1645         (xml_fetch_content_from_file): Likewise.
1646         * osdata.c (get_osdata): Update.
1647         * target.h (target_read_stralloc, target_get_osdata): Return
1648         unique_xmalloc_ptr.
1649         * solib-aix.c (solib_aix_get_library_list): Update.
1650         * solib-target.c (solib_target_current_sos): Update.
1651         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1652         * xml-tdesc.c (fetch_available_features_from_target): Update.
1653         (target_fetch_description_xml): Update.
1654         (file_read_description_xml): Update.
1655         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1656         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1657         (remote_pid_to_exec_file): Update.
1658         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1659         (target_get_osdata): Likewise.
1660
1661 2017-10-16  Tom Tromey  <tom@tromey.com>
1662
1663         * remote.c (remote_register_number_and_offset): Use std::vector.
1664         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1665         (putpkt_binary): Use gdb::def_vector.
1666         (compare_sections_command): Use gdb::byte_vector.
1667
1668 2017-10-16  Tom Tromey  <tom@tromey.com>
1669
1670         * ppc-linux-nat.c (hwdebug_insert_point): Use
1671         gdb::unique_xmalloc_ptr, XDUP.
1672
1673 2017-10-16  Tom Tromey  <tom@tromey.com>
1674
1675         * probe.c (parse_probes): Use std::string.
1676         (info_probes_for_ops, enable_probes_command)
1677         (disable_probes_command): Remove cleanups.
1678
1679 2017-10-16  Tom Tromey  <tom@tromey.com>
1680
1681         * buildsym.c (block_compar): Remove.
1682         (end_symtab_get_static_block): Use std::vector.
1683
1684 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
1685
1686         * memrange.h (struct mem_range): Define operator< and operator==.
1687         (mem_range_s): Remove.
1688         (DEF_VEC_O (mem_range_s)): Remove.
1689         (normalize_mem_ranges): Change parameter type to std::vector.
1690         * memrange.c (compare_mem_ranges): Remove.
1691         (normalize_mem_ranges): Change parameter type to std::vector,
1692         adjust to vector change.
1693         * exec.c (section_table_available_memory): Return vector, remove
1694         parameter.
1695         (section_table_read_available_memory): Adjust to std::vector
1696         change.
1697         * remote.c (remote_read_bytes): Adjust to std::vector
1698         change.
1699         * tracepoint.h (traceframe_available_memory): Change parameter
1700         type to std::vector.
1701         * tracepoint.c (traceframe_available_memory): Change parameter
1702         type to std::vector, adjust.
1703         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1704         std::vector change.
1705         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1706         unittests/memrange-selftests.c.
1707         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1708         * gdb/unittests/memrange-selftests.c: New file.
1709
1710 2017-10-16  Pedro Alves  <palves@redhat.com>
1711
1712         * elfread.c (probe_key_free): Rename range-for variable.
1713         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1714         (find_probe_by_pc, collect_probes): Rename range-for variable.
1715
1716 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1717
1718         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1719         * features/tic6x-c62x.c: Remove.
1720         * features/tic6x-c64x-linux.c: Remove.
1721         * features/tic6x-c64x.c: Remove.
1722         * features/tic6x-c64xp-linux.c: Remove.
1723         * features/tic6x-c64xp.c: Remove.
1724         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1725         initialize_tdesc_tic6x_*_linux functions.
1726         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1727         initialize_tdesc_tic6x_* functions.
1728
1729 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1730
1731         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1732         tic6x-c62x.
1733         * regformats/tic6x-c62x.dat: Remove.
1734         * regformats/tic6x-c64x.dat: Remove.
1735         * regformats/tic6x-c64xp.dat: Remove.
1736
1737 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1738
1739         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1740         (the !HAVE_LIBEXPAT version).
1741
1742 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1743
1744         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1745         const.
1746
1747 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1748
1749         * target.h: Include tracepoint.h.
1750         (enum trace_find_type): Move to tracepoint.h.
1751         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1752         * tracepoint.h: Don't include target.h
1753         (enum trace_find_type): Move from target.h.
1754         (parse_traceframe_info): Return a unique ptr.
1755         * tracepoint.c (current_traceframe_info): Change type to unique
1756         ptr.
1757         (free_traceframe_info): Remove.
1758         (clear_traceframe_info): Don't manually free
1759         current_traceframe_info.
1760         (free_result): Remove.
1761         (parse_traceframe_info): Return a unique ptr.
1762         (get_traceframe_info): Adjust to unique ptr.
1763         * ctf.c (ctf_traceframe_info): Return a unique ptr.
1764         * remote.c (remote_traceframe_info): Return a unique ptr.
1765         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1766         ptr.
1767         * target-debug.h (target_debug_print_traceframe_info_up): New
1768         macro.
1769         * target-delegates.c: Regenerate.
1770
1771 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1772
1773         * memrange.h (struct mem_range): Add constructors.
1774         * tracepoint.h (struct traceframe_info) <memory>: Change type to
1775         std::vector<mem_range>.
1776         * tracepoint.c (free_traceframe_info): Don't manually free
1777         vector.
1778         (traceframe_info_start_memory): Adjust to vector change.
1779         (traceframe_available_memory): Likewise.
1780         * tracefile-tfile.c (build_traceframe_info): Likewise.
1781         * ctf.c (ctf_traceframe_info): Likewise.
1782
1783 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1784
1785         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1786         std::vector<int>.
1787         * tracepoint.c (free_traceframe_info): Deallocate with delete.
1788         (traceframe_info_start_tvar): Adjust to vector change.
1789         (parse_traceframe_info): Allocate with new.
1790         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1791         vector change.
1792         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1793         change.
1794         tfile_traceframe_info): Allocate with new.
1795         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1796         change.
1797
1798 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1799
1800         * tracepoint.c (traceframe_info): Rename to...
1801         (current_traceframe_info): ...this.
1802         (clear_traceframe_info): Adjust.
1803         (get_traceframe_info): Adjust.
1804
1805 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1806
1807         * nat/linux-osdata.c: Include algorithm.
1808         (compare_processes): Remove.
1809         (struct pid_pgid_entry): New struct.
1810         (linux_xfer_osdata_processgroups): Use std::vector instead of
1811         XNEWVEC.
1812
1813 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1814
1815         * objfiles.h: Don't include symfile.h.
1816         (struct partial_symbol): Remove forward-declaration.
1817         (struct objfile) <global_psymbols, static_psymbols>: Change type
1818         to std::vector<partial_symbol *>.
1819         * objfiles.c (objfile::objfile): Don't memset those fields.
1820         (objfile::~objfile): Don't free those fields.
1821         * psympriv.h (struct psymbol_allocation_list): Remove
1822         forward-declaration.
1823         (add_psymbol_to_list): Change psymbol_allocation_list parameter
1824         to std::vector.
1825         (start_psymtab_common): Change parameters to std::vector.
1826         * psymtab.c: Include algorithm.
1827         (require_partial_symbols): Call shrink_to_fit.
1828         (find_pc_sect_psymbol): Adjust to vector change.
1829         (match_partial_symbol): Likewise.
1830         (lookup_partial_symbol): Likewise.
1831         (psym_relocate): Likewise.
1832         (dump_psymtab): Likewise.
1833         (recursively_search_psymtabs): Likewise.
1834         (compare_psymbols): Remove.
1835         (sort_pst_symbols): Adjust to vector change.
1836         (start_psymtab_common): Likewise.
1837         (end_psymtab_common): Likewise.
1838         (psymbol_bcache_full): De-constify return value.
1839         (add_psymbol_to_bcache): Likewise.
1840         (extend_psymbol_list): Remove.
1841         (append_psymbol_to_list): Adjust to vector change.
1842         (add_psymbol_to_list): Likewise.
1843         (init_psymbol_list): Likewise.
1844         (maintenance_info_psymtabs): Likewise.
1845         (maintenance_check_psymtabs): Likewise.
1846         * symfile.h (struct psymbol_allocation_list): Remove.
1847         * symfile.c (reread_symbols): Adjust to vector change.
1848         * dbxread.c (start_psymtab): Change type of parameters.
1849         (dbx_symfile_read): Adjust to vector change.
1850         (read_dbx_symtab): Likewise.
1851         (start_psymtab): Change type of parameters.
1852         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1853         (create_partial_symtab): Likewise.
1854         (add_partial_symbol): Likewise.
1855         (write_one_signatured_type): Likewise.
1856         (recursively_write_psymbols): Likewise.
1857         * mdebugread.c (parse_partial_symbols): Likewise.
1858         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1859         (scan_xcoff_symtab): Adjust to vector change.
1860         (xcoff_initial_scan): Likewise.
1861
1862 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
1863
1864         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1865
1866 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1867
1868         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1869         Remove s390x-*-expedite, add s390x-expedite.
1870
1871 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1872
1873         * features/s390-gs-linux64.c: Regenerated.
1874         * features/s390x-gs-linux64.c: Regenerated.
1875
1876 2017-10-13  Tom Tromey  <tom@tromey.com>
1877
1878         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1879         * solib.c (update_solib_list, reload_shared_libraries_1): Use
1880         delete.
1881         * symfile.c (symbol_file_add_with_addrs): Use new.
1882         (symbol_file_add_separate): Update comment.
1883         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1884         * jit.c (jit_object_close_impl): Use new.
1885         (jit_unregister_code): Use delete.
1886         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1887         (~objfile): Rename from free_objfile.
1888         (free_objfile_separate_debug, do_free_objfile_cleanup)
1889         (free_all_objfiles, objfile_purge_solibs): Use delete.
1890         * objfiles.h (struct objfile): Add constructor and destructor.
1891         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
1892         (allocate_objfile, free_objfile): Don't declare.
1893         (struct objstats): Add initializers.
1894
1895 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1896
1897         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1898         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1899         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1900         * gdbarch.h: Regenerate.
1901         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1902         Adjust comment.
1903         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1904         (i386_displaced_step_fixup): Adjust comment.
1905         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1906
1907 2017-10-12  Tom Tromey  <tom@tromey.com>
1908
1909         * prologue-value.h (pv_area::store_would_trash): Return bool.
1910         (pv_area::find_reg): Likewise.
1911         * prologue-value.c (pv_area::store_would_trash): Return bool.
1912         (pv_area::find_reg): Likewise.
1913
1914 2017-10-12  Tom Tromey  <tom@tromey.com>
1915
1916         * s390-linux-tdep.c (s390_store, s390_load)
1917         (s390_check_for_saved, s390_analyze_prologue): Update.
1918         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1919         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1920         * prologue-value.h (class pv_area): Move from prologue-value.c.
1921         Change names of members.  Add constructor, destructor, member
1922         functions.
1923         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1924         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1925         (pv_area_fetch, pv_area_scan): Don't declare.
1926         * prologue-value.c (struct pv_area::area_entry): Now member of
1927         pv_area.
1928         (struct pv_area): Move to prologue-value.h.
1929         (pv_area::pv_area): Rename from make_pv_area.
1930         (pv_area::~pv_area): Rename from free_pv_area.
1931         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1932         (clear_entries, find_entry, overlaps, store_would_trash, store)
1933         (fetch, find_reg, scan): Now member of pv_area.
1934         Remove "area" argument.  Update.
1935         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1936         Update.
1937         * mn10300-tdep.c (push_reg, check_for_saved)
1938         (mn10300_analyze_prologue): Update.
1939         * mep-tdep.c (is_arg_spill, check_for_saved)
1940         (mep_analyze_prologue): Update.
1941         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1942         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1943         (m32c_is_struct_return, m32c_analyze_prologue): Update.
1944         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1945         Update.
1946         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1947         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1948
1949 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1950
1951         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1952         * linux-nat.c (linux_nat_delete_thread): New variable.
1953         (lwp_free): Invoke linux_nat_delete_thread if set.
1954         (linux_nat_set_delete_thread): New function.
1955         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1956         thread delete callback.
1957         * arm-linux-nat.c (arm_linux_delete_thread): New function.
1958         (_initialize_arm_linux_nat): Assign thread delete callback.
1959         * s390-linux-nat.c (s390_delete_thread): New function.
1960         (_initialize_s390_nat): Assign thread delete callback.
1961         * x86-linux-nat.c (x86_linux_add_target): Likewise.
1962         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1963         function.
1964         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1965         declaration.
1966         * nat/x86-linux.c (x86_linux_delete_thread): New function.
1967         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1968
1969 2017-10-09  Tom Tromey  <tom@tromey.com>
1970
1971         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1972         std::string.
1973         * tui/tui-layout.c (enum tui_status): Use std::string.
1974
1975 2017-10-11  Tom Tromey  <tom@tromey.com>
1976
1977         * gdbthread.h (thread_command): Constify.
1978         * inferior.h (detach_command): Constify.
1979         * top.h (set_history, show_history): Constify.
1980         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1981         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1982         * bsd-kvm.c (bsd_kvm_cmd): Constify.
1983         * printcmd.c (set_command): Constify.
1984         (non_const_set_command): New function.
1985         * dcache.c (set_dcache_command, show_dcache_command): Constify.
1986         * breakpoint.c (enable_command, disable_command, delete_command)
1987         (catch_command, tcatch_command, set_breakpoint_cmd)
1988         (show_breakpoint_cmd): Constify.
1989         * macrocmd.c (macro_command): Constify.
1990         * infcmd.c (unset_command, kill_command, detach_command)
1991         (info_proc_cmd): Constify.
1992         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1993         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1994         (info_auto_load_cmd): Constify.
1995         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1996         (unset_tdesc_cmd): Constify.
1997         * ada-lang.c (set_ada_command, show_ada_command)
1998         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1999         * guile/guile.c (set_guile_command, show_guile_command)
2000         (info_guile_command): Constify.
2001         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2002         Constify.
2003         * skip.c (skip_command): Constify.
2004         * compile/compile.c (_initialize_compile): Constify.
2005         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2006         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2007         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2008         (maint_btrace_pt_show_cmd): Constify.
2009         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2010         Constify.
2011         * python/python.c (user_show_python, user_set_python): Constify.
2012         * mips-tdep.c (set_mips_command, show_mips_command)
2013         (set_mipsfpu_command): Constify.
2014         * record-btrace.c (cmd_record_btrace_start)
2015         (cmd_set_record_btrace, cmd_show_record_btrace)
2016         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2017         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2018         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2019         Constify.
2020         * symfile.c (overlay_command): Constify.
2021         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2022         * cli/cli-logging.c (set_logging_command, show_logging_command):
2023         Constify.
2024         * cli/cli-dump.c (dump_command, append_command)
2025         (srec_dump_command, ihex_dump_command, verilog_dump_command)
2026         (tekhex_dump_command, binary_dump_command)
2027         (binary_append_command): Constify.
2028         * cli/cli-decode.c (struct cmd_list_element): Change type of
2029         "fun".
2030         * cli/cli-cmds.c (info_command, show_command, set_debug)
2031         (show_debug): Constify.
2032         (show_command): Add non-const overload.
2033         * top.c (set_history, show_history): Constify.
2034         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2035         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2036         * target.c (target_command): Constify.
2037         * sparc64-tdep.c (info_adi_command): Constify.
2038         * record-full.c (cmd_record_full_start): Constify.
2039         (set_record_full_command): Constify.  Fix typo.
2040         (show_record_full_command): Constify.
2041         * thread.c (thread_command, thread_apply_command): Constify.
2042         * memattr.c (dummy_cmd): Constify.
2043         * value.c (function_command): Constify.
2044         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2045         * probe.c (info_probes_command): Constify.
2046         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2047         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2048         (show_thread_cmd, set_thread_default_cmd)
2049         (show_thread_default_cmd): Constify.
2050         (check_empty): Constify.
2051         * tracepoint.c (tfind_command): Constify.
2052         * cp-support.c (maint_cplus_command): Constify.
2053         * windows-tdep.c (info_w32_command): Constify.
2054         * record.c (cmd_record_start, set_record_command)
2055         (show_record_command, info_record_command, cmd_record_goto):
2056         Constify.
2057         * ravenscar-thread.c (set_ravenscar_command)
2058         (show_ravenscar_command): Constify.
2059         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2060         Constify.
2061         (add_internal_problem_command): Remove casts.
2062         * arc-tdep.c (maintenance_print_arc_command): Constify.
2063         * valprint.c (set_print, show_print, set_print_raw)
2064         (show_print_raw): Constify.
2065         * maint.c (maintenance_command, maintenance_info_command)
2066         (maintenance_print_command, maintenance_set_cmd)
2067         (maintenance_show_cmd, set_per_command_cmd)
2068         (show_per_command_cmd, maintenance_check_command): Constify.
2069         * language.c (set_check, show_check): Constify.
2070         * typeprint.c (show_print_type, set_print_type): Constify.
2071         * go32-nat.c (go32_info_dos_command): Constify.
2072
2073 2017-10-11  Tom Tromey  <tom@tromey.com>
2074
2075         * breakpoint.c (prepare_re_set_context): Remove.
2076         (breakpoint_re_set_one): Update.  Don't use cleanups.
2077         (breakpoint_re_set): Use scoped_restore, std::string, and
2078         scoped_restore_current_language.
2079
2080 2017-10-11  Tom Tromey  <tom@tromey.com>
2081
2082         * breakpoint.c (commands_command_1): Use std::string.
2083         (cleanup_executing_breakpoints): Remove.
2084         (bpstat_do_actions_1): Use scoped_restore.
2085         (bpstat_check_watchpoint): Use std::string.
2086         (decode_static_tracepoint_spec): Likewise.
2087         (break_range_command): Likewise.
2088         (watch_command_1): Likewise.
2089         (compare_breakpoints): Change argument types.
2090         (clear_command): Use std::vector.
2091         (cleanup_executing_breakpoints): Remove.
2092         (update_global_location_list): Use unique_xmalloc_ptr.
2093         (strace_command): Remove unused declaration.
2094
2095 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2096
2097         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2098         * NEWS: Mention new FreeBSD/arm native configuration.
2099         * configure.host: Add arm*-*-freebsd*.
2100         * configure.nat: Likewise.
2101         * arm-fbsd-nat.c: New file.
2102
2103 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2104
2105         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2106         (ALLDEPFILES): Add arm-fbsd-tdep.c.
2107         * NEWS: Mention new FreeBSD/arm target.
2108         * configure.tgt: Add arm*-*-freebsd*.
2109         * arm-fbsd-tdep.c: New file.
2110         * arm-fbsd-tdep.h: New file.
2111
2112 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2113
2114         * linux-tdep.c (linux_make_corefile_notes): Remove call to
2115         `gdbarch_elfcore_write_linux_prpsinfo'.
2116         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2117         method.
2118         (elf_internal_linux_prpsinfo): Remove declaration.
2119         * gdbarch.h: Regenerate.
2120         * gdbarch.c: Regenerate.
2121
2122 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2123
2124         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2125         `set_gdbarch_elfcore_write_linux_prpsinfo'.
2126
2127 2017-10-11  Pedro Alves  <palves@redhat.com>
2128
2129         * breakpoint.c (reattach_breakpoints): Delete.
2130         * breakpoint.h (reattach_breakpoints): Delete.
2131
2132 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
2133
2134         * symfile.c (registered_sym_fns): Make struct, not typedef.
2135         (DEF_VEC_O (registered_sym_fns)): Remove.
2136         (symtab_fns): Change type to std::vector.
2137         (add_symtab_fns): Adjust.
2138         (find_sym_fns): Adjust.
2139
2140 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
2141
2142         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
2143         * arc-tdep.h (arc_arch_is_em): New function.
2144         (arc_arch_is_hs): Likewise.
2145
2146 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
2147
2148         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
2149         parentheses in the declaration.
2150         (macro_lookup_inclusion): Likewise.
2151         (macro_lookup_definition): Likewise.
2152         * p-lang.h (pascal_builtin_types): Likewise.
2153         * tui/tui-data.c (tui_win_list): Likewise.
2154         * tui/tui-data.h (tui_win_list): Likewise.
2155         * utils.h (make_cleanup_free_section_addr_info): Likewise.
2156
2157 2017-10-11  Mark Rages  <markrages@gmail.com>
2158
2159         * target-memory.c (block_boundaries): Fix for block address not
2160         aligned on block size.
2161
2162 2017-10-10  Pedro Alves <palves@redhat.com>
2163             Tom Tromey  <tom@tromey.com>
2164
2165         * breakpoint.c (struct captured_breakpoint_query_args)
2166         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
2167         (print_breakpoint): New.
2168         * breakpoint.h (print_breakpoint): Declare.
2169         * common/common-exceptions.h (enum return_reason): Remove
2170         references to catch_exceptions.
2171         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
2172         Delete.
2173         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
2174         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
2175         * gdb.h: Delete.
2176         * gdbthread.h (thread_select): Declare.
2177         * mi/mi-cmd-break.c: Don't include gdb.h.
2178         (breakpoint_notify): Use print_breakpoint.
2179         * mi/mi-cmd-catch.c: Don't include gdb.h.
2180         * mi/mi-interp.c: Don't include gdb.h.
2181         (mi_print_breakpoint_for_event): New.
2182         (mi_breakpoint_created, mi_breakpoint_modified): Use
2183         mi_print_breakpoint_for_event.
2184         * mi/mi-main.c: Don't include gdb.h.
2185         (mi_cmd_thread_select): Parse the global thread ID here.  Use
2186         thread_select instead of gdb_thread_select.
2187         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
2188         of using gdb_list_thread_ids.
2189         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
2190         FILEIO_ENOSYS here.
2191         (remote_fileio_request): Use TRY/CATCH instead of
2192         catch_exceptions.
2193         * symfile-mem.c (struct symbol_file_add_from_memory_args)
2194         (symbol_file_add_from_memory_wrapper): Delete.
2195         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
2196         * thread.c: Don't include gdb.h.
2197         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
2198         (thread_alive): Use thread_select.
2199         (do_captured_thread_select): Delete, parts salvaged as ...
2200         (thread_select): ... this new function.
2201         (gdb_thread_select): Delete.
2202
2203 2017-10-10  Pedro Alves  <palves@redhat.com>
2204             Tom Tromey  <tom@tromey.com>
2205
2206         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
2207         and reverse logic.
2208         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
2209         No longer macros.  Instead ...
2210         (enum wp_check_result): They're now values of this new
2211         enumeration.
2212         (watchpoint_check): Change return type to wp_check_result and
2213         parameter type to bpstat.
2214         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
2215         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
2216         catch_errors.  Reverse logic of watchpoint_check call.
2217         (breakpoint_re_set_one): Now returns void and takes a breakpoint
2218         pointer as parameter.
2219         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
2220         * common/common-exceptions.c (throw_exception_sjlj): Update
2221         comments to avoid mentioning catch_errors.
2222         * exceptions.c (catch_errors): Delete.
2223         * exceptions.h: Update comments to avoid mentioning catch_errors.
2224         (catch_errors_ftype, catch_errors): Delete.
2225         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
2226         (hook_stop_stub): Delete.
2227         (restore_selected_frame): Change return type to void, and
2228         parameter type to const frame_id &.
2229         (restore_infcall_control_state): Use TRY/CATCH instead of
2230         catch_errors.
2231         * main.c (captured_command_loop): Return void and remove
2232         parameter.  Remove references to catch_errors.
2233         (captured_main): Use TRY/CATCH instead of catch_errors.
2234         * objc-lang.c (objc_submethod_helper_data)
2235         (find_objc_msgcall_submethod_helper): Delete.
2236         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
2237         catch_errors.
2238         * record-full.c (record_full_message): Return void.
2239         (record_full_message_args, record_full_message_wrapper): Delete.
2240         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
2241         instead of catch_errors.
2242         * solib-aix.c (solib_aix_open_symbol_file_object): Change
2243         parameter type to int.
2244         * solib-darwin.c (open_symbol_file_object): Ditto.
2245         * solib-dsbt.c (open_symbol_file_object): Ditto.
2246         * solib-frv.c (open_symbol_file_object): Ditto.
2247         * solib-svr4.c (open_symbol_file_object): Ditto.
2248         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
2249         * solib.c (update_solib_list): Use TRY/CATCH instead of
2250         catch_errors.
2251         * solist.h (struct target_so_ops) <open_symbol_file_object>:
2252         Change type.
2253         * symmisc.c (struct print_symbol_args): Remove.
2254         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
2255         (print_symbol): Change type.
2256         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
2257         and remove parameters.
2258         (catch_errors): New.
2259         (get_windows_debug_event): Adjust.
2260
2261 2017-10-09  Tom Tromey  <tom@tromey.com>
2262
2263         * mi/mi-main.c (free_splay_tree): Remove.
2264         (list_available_thread_groups): Use splay_tree_up.
2265         * common/gdb_splay_tree.h: New file.
2266
2267 2017-10-09  Tom Tromey  <tom@tromey.com>
2268
2269         * mi/mi-main.c (do_nothing): Remove.
2270         (list_available_thread_groups): Update.
2271
2272 2017-10-09  Pedro Alves  <palves@redhat.com>
2273
2274         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
2275         reading registers when switching context.
2276
2277 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
2278
2279         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
2280         (fbsd_convert_siginfo): Likewise.
2281         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
2282
2283 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
2284
2285         * configure.ac (try_guile_versions): Remove guile-2.2.
2286         * configure: Regenerate.
2287
2288 2017-10-09  Tom Tromey  <tom@tromey.com>
2289
2290         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
2291         (COMPILE.pre): Use $(CXX).
2292
2293 2017-10-09  Pedro Alves  <palves@redhat.com>
2294
2295         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
2296         Use bool.
2297         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2298         * cp-support.h (cp_remove_params): Now returns a
2299         gdb::unique_xmalloc_ptr.
2300         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
2301         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
2302         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
2303         returning a gdb::unique_xmalloc_ptr.
2304         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2305         * stack.c (find_frame_funname): Adjust to cp_remove_params
2306         returning a gdb::unique_xmalloc_ptr.
2307
2308 2017-10-08  Tom Tromey  <tom@tromey.com>
2309
2310         * dwarf2read.c (dwarf2_get_dwz_file): Use
2311         gdb::unique_xmalloc_ptr.
2312         (find_slot_in_mapped_hash): Likewise.
2313         (dwarf2_physname): Likewise.
2314         (create_dwo_unit_in_dwp_v1): Use std::string.
2315         (create_dwo_unit_in_dwp_v2): Likewise.
2316         (lookup_dwo_cutu): Likewise.
2317         (inherit_abstract_dies): Use std::vector.
2318         (read_array_type): Likewise.
2319         (dwarf_decode_macros): Remove unused declaration.
2320         (unsigned_int_compar): Remove.
2321         (dwarf2_build_psymtabs_hard): Use scoped_restore.
2322         (psymtabs_addrmap_cleanup): Remove.
2323
2324 2017-10-08  Tom Tromey  <tom@tromey.com>
2325
2326         * frame-unwind.c (frame_unwind_try_unwinder): Update.
2327         * frame.h (frame_cleanup_after_sniffer): Declare.
2328         (frame_prepare_for_sniffer): Return void.
2329         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
2330         type of argument.
2331         (frame_prepare_for_sniffer): Return void.
2332
2333 2017-10-08  Tom Tromey  <tom@tromey.com>
2334
2335         * utils.h (make_cleanup_value_free): Remove.
2336         * utils.c (do_value_free, struct cleanup): Remove.
2337         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
2338         Use gdb_value_up.
2339         * value.h (struct value_deleter): New.
2340         (gdb_value_up): New typedef.
2341
2342 2017-10-08  Tom Tromey  <tom@tromey.com>
2343
2344         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
2345         (make_cleanup_free_search_symbols): Remove.
2346         (search_symbols): Return std::vector.
2347         (symbol_search::compare_search_syms): Now member of
2348         symbol_search.  Change arguments.
2349         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
2350         (symtab_symbol_info, rbreak_command): Update.
2351         * symtab.h (struct symbol_search) <next>: Remove.
2352         Add constructors.
2353         (symbol_search::operator<): New function.
2354         (symbol_search::operator==): New function.
2355         (search_symbols): Remove std::vector.
2356         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
2357         (symbol_search::compare_search_syms): Declare.
2358
2359 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2360
2361         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
2362         arch/aarch64-insn.o.
2363         Remove one rule.
2364         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
2365
2366 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2367
2368         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
2369         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
2370         arch/arm-linux.o respectively.
2371         * configure.tgt: Likewise.
2372
2373 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2374
2375         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
2376         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
2377
2378 2017-10-06  Pedro Alves  <palves@redhat.com>
2379
2380         * windows-nat.c: Include <algorithm>.
2381
2382 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2383
2384         * configure.tgt (i386_tobjs): New variable.
2385         (amd64_tobjs): New variable.
2386         Set $cpu_obs and $os_obs.
2387
2388 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2389
2390         * Makefile.in (CONFIG_SRC_SUBDIR): New.
2391         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
2392         (clean): Remove object files and dependency files.
2393         (distclean): Remove the directory.
2394         * configure.ac: Invoke AC_CONFIG_COMMANDS.
2395         * configure: Re-generated.
2396         * configure.tgt: Replace amd64.o with arch/amd64.o.
2397
2398 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
2399
2400         PR build/22188
2401         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
2402         and SETEND.
2403
2404 2017-10-05  Pedro Alves  <palves@redhat.com>
2405
2406         * linux-nat.c (linux_child_follow_fork): When following the parent
2407         and detaching the child, consult the parent thread's architecture
2408         instead of the child's.
2409
2410 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2411
2412         * ax.h: Do not include "doublest.h".
2413         (union agent_val): Remove.
2414
2415 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2416
2417         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
2418         (decimal_to_string): Return std::string object.
2419         (decimal_from_string): Accept std::string object.  Return bool.
2420         (decimal_from_integral, decimal_from_doublest): Remove.
2421         (decimal_from_longest): Add prototype.
2422         (decimal_from_ulongest): Likewise.
2423         (decimal_to_longest): Likewise.
2424         (decimal_from_doublest): Likewise.
2425         * dfp.c: Do not include "gdbtypes.h" or "value.h".
2426         (MAX_DECIMAL_STRING): Move here.
2427         (decimal_to_string): Return std::string object.
2428         (decimal_from_string): Accept std::string object.  Return bool.
2429         (decimal_from_integral): Remove, replace by ...
2430         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
2431         (decimal_to_longest): New function.
2432         (decimal_from_floating): Remove, replace by ...
2433         (decimal_from_doublest): ... this new function.
2434         (decimal_to_doublest): Update to new decimal_to_string interface.
2435
2436         * value.c (unpack_long): Use decimal_to_longest.
2437         * valops.c (value_cast): Use decimal_from_doublest instead of
2438         decimal_from_floating.  Use decimal_from_[u]longest isntead of
2439         decimal_from_integral.
2440         * valarith.c (value_args_as_decimal): Likewise.
2441         * valprint.c (print_decimal_floating): Update to new
2442         decimal_to_string interface.
2443         * printcmd.c (printf_decfloat): Likewise.
2444         * c-exp.y (parse_number): Update to new decimal_from_string interface.
2445
2446 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2447
2448         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
2449         * gdbtypes.c: Include "floatformat.h".
2450         * value.c: Likewise.
2451         * m68k-tdep.c: Likewise.
2452
2453         * findvar.c: Do not include "floatformat.h".
2454         * amd64-darwin-tdep.c: Likewise.
2455         * arm-linux-tdep.c: Likewise.
2456         * i386-darwin-tdep.c: Likewise.
2457         * i387-tdep.c: Likewise.
2458         * m68k-linux-tdep.c: Likewise.
2459         * mep-tdep.c: Likewise.
2460         * mips-tdep.c: Likewise.
2461         * nios2-tdep.c: Likewise.
2462         * s390-linux-tdep.c: Likewise.
2463         * sparc-obsd-tdep.c: Likewise.
2464         * sparc-tdep.c: Likewise.
2465         * sparc64-tdep.c: Likewise.
2466         * spu-tdep.c: Likewise.
2467         * tic6x-tdep.c: Likewise.
2468         * tilegx-tdep.c: Likewise.
2469         * vax-tdep.c: Likewise.
2470         * xstormy16-tdep.c: Likewise.
2471         * xtensa-tdep.c: Likewise.
2472
2473         * top.c: Do not include "doublest.h".
2474         * aarch64-tdep.c: Likewise.
2475         * alpha-tdep.c: Likewise.
2476         * arm-linux-tdep.c: Likewise.
2477         * m68k-linux-tdep.c: Likewise.
2478         * tilegx-tdep.c: Likewise.
2479         * xstormy16-tdep.c: Likewise.
2480
2481 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2482
2483         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
2484         (mipsn32_fbsd_sigframe): Define.
2485         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
2486         for FreeBSD/mipsn32.
2487
2488 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2489
2490         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
2491         AT_HWCAP.
2492
2493 2017-10-05  Tristan Gingold  <tgingold@free.fr>
2494
2495         * MAINTAINERS (Misc): Update my email address.
2496
2497 2017-10-04  Pedro Alves  <palves@redhat.com>
2498
2499         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
2500         it instead of target_gdbarch.
2501         (get_remote_state, get_remote_packet_size): Adjust
2502         get_remote_arch_state calls, passing down target_gdbarch
2503         explicitly.
2504         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
2505         'gdbarch' and use it instead of target_gdbarch.
2506         (get_memory_packet_size): Adjust get_remote_arch_state calls,
2507         passing down target_gdbarch explicitly.
2508         (struct stop_reply) <arch>: New field.
2509         (remote_parse_stop_reply): Use the stopped thread's architecture,
2510         not the current inferior's.  Save the architecture in the
2511         stop_reply.
2512         (process_stop_reply): Use the stop reply's architecture.
2513         (process_g_packet, remote_fetch_registers)
2514         (remote_prepare_to_store, store_registers_using_G)
2515         (remote_store_registers): Adjust get_remote_arch_state calls,
2516         using the regcache's architecture.
2517         (remote_get_trace_status): Adjust get_remote_arch_state calls,
2518         passing down target_gdbarch explicitly.
2519         * spu-multiarch.c (spu_thread_architecture): Defer to the target
2520         beneath instead of calling target_gdbarch.
2521         * target.c (default_thread_architecture): Use the specified
2522         inferior's architecture, instead of the current inferior's
2523         architecture (via target_gdbarch).
2524
2525 2017-10-04  Pedro Alves  <palves@redhat.com>
2526
2527         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
2528         case.
2529         (regcache_print): Handle !target_has_registers here instead.
2530
2531 2017-10-04  Pedro Alves  <palves@redhat.com>
2532
2533         * frame.c (create_test_frame): Delete.
2534         * frame.h (create_test_frame): Delete.
2535         * gdbarch-selftests.c: Include gdbthread.h and target.h.
2536         (class regcache_test): Delete.
2537         (test_target_has_registers, test_target_has_stack)
2538         (test_target_has_memory, test_target_prepare_to_store)
2539         (test_target_store_registers): New functions.
2540         (test_target_ops): New class.
2541         (register_to_value_test): Error out if there's already a
2542         process_stratum (or higher) target pushed.  Create a fuller mock
2543         environment, with mock target_ops, inferior, address space, thread
2544         and inferior_ptid.
2545         * progspace.c (struct address_space): Move to ...
2546         * progspace.h (struct address_space): ... here.
2547         * regcache.h (regcache::~regcache, regcache::raw_write)
2548         [GDB_SELF_TEST]: No longer virtual.
2549
2550 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2551
2552         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
2553
2554 2017-10-04  Pedro Alves  <palves@redhat.com>
2555
2556         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
2557         out of 'between TRY and CATCH'.
2558
2559 2017-10-04  Pedro Alves  <palves@redhat.com>
2560
2561         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
2562         * common/common-exceptions.h (TRY): Open an outermost scope.
2563         Expand intro comment.
2564         (CATCH): Reindent.
2565         (END_CATCH): Close the outermost scope.
2566         * completer.c (complete_line_internal): Add missing END_CATCH.
2567
2568 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2569
2570         * NEWS (Changes since GDB 8.0): Add entry about new
2571         'set-cwd-on-gdbserver' feature.
2572         (New remote packets): Add entry for QSetWorkingDir.
2573         * common/common-inferior.h (set_inferior_cwd): New prototype.
2574         * infcmd.c (set_inferior_cwd): Remove "static".
2575         (show_cwd_command): Expand text to include remote debugging.
2576         * remote.c: Add PACKET_QSetWorkingDir.
2577         (remote_protocol_features) <QSetWorkingDir>: New entry for
2578         PACKET_QSetWorkingDir.
2579         (extended_remote_set_inferior_cwd): New function.
2580         (extended_remote_create_inferior): Call
2581         "extended_remote_set_inferior_cwd".
2582         (_initialize_remote): Call "add_packet_config_cmd" for
2583         QSetWorkingDir.
2584
2585 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2586
2587         * NEWS (New commands): Mention "set/show cwd".
2588         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
2589         "cd" command's help text.
2590         * common/common-inferior.h (get_inferior_cwd): New prototype.
2591         * infcmd.c (inferior_cwd_scratch): New global variable.
2592         (set_inferior_cwd): New function.
2593         (get_inferior_cwd): Likewise.
2594         (set_cwd_command): Likewise.
2595         (show_cwd_command): Likewise.
2596         (_initialize_infcmd): Add "set/show cwd" commands.
2597         * inferior.h (class inferior) <cwd>: New field.
2598         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
2599         (fork_inferior): Change inferior's cwd before its execution.
2600         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
2601         to CreateProcess.
2602
2603 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2604
2605         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
2606         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
2607         (COMMON_OBS): Add gdb_tilde_expand.o.
2608         * common/gdb_tilde_expand.c: New file.
2609         * common/gdb_tilde_expand.h: Likewise.
2610
2611 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
2612
2613         * gdbarch.sh (objfile): Remove duplicate declaration.
2614         * gdbarch.h: Regenerate.
2615
2616 2017-10-03  Tom Tromey  <tom@tromey.com>
2617
2618         * utils.c (internal_vproblem): Use string_vprintf.
2619
2620 2017-10-03  Tom Tromey  <tom@tromey.com>
2621
2622         * printcmd.c (info_symbol_command): Use std::string.
2623
2624 2017-10-03  Tom Tromey  <tom@tromey.com>
2625
2626         * top.c (gdb_safe_append_history): Use std::string.
2627
2628 2017-10-03  Tom Tromey  <tom@tromey.com>
2629
2630         * event-top.c (stdin_event_handler): Update.
2631         * main.c (captured_main_1): Update.
2632         * top.h (make_delete_ui_cleanup): Remove.
2633         (struct ui): Add constructor and destructor.
2634         (new_ui, delete_ui): Remove.
2635         * top.c (make_delete_ui_cleanup): Remove.
2636         (new_ui_command): Use std::unique_ptr.
2637         (delete_ui_cleanup): Remove.
2638         (ui::ui): Rename from new_ui.  Update.
2639         (free_ui): Remove.
2640         (ui::~ui): Rename from delete_ui.  Update.
2641
2642 2017-10-03  Tom Tromey  <tom@tromey.com>
2643
2644         * symfile.c (load_progress): Use gdb::byte_vector.
2645
2646 2017-10-03  Tom Tromey  <tom@tromey.com>
2647
2648         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2649         declaration.
2650         * printcmd.c (x_command): Remove unused declaration.
2651         * symfile.c (symbol_file_command): Remove unused declaration.
2652
2653 2017-10-03  Tom Tromey  <tom@tromey.com>
2654
2655         * utils.c (internal_vproblem): Use std::string.
2656         (defaulted_query): Likewise.
2657
2658 2017-10-03  Tom Tromey  <tom@tromey.com>
2659
2660         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2661         * top.c (execute_command_to_string): Update.
2662         * utils.c (make_cleanup_restore_page_info): Remove.
2663         (do_restore_page_info_cleanup): Remove.
2664         (set_batch_flag_and_restore_page_info):
2665         New.
2666         (make_cleanup_restore_page_info): Remove.
2667         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2668         (~set_batch_flag_and_restore_page_info): New
2669         (make_cleanup_restore_uinteger): Remove.
2670         (make_cleanup_restore_integer): Remove.
2671         (struct restore_integer_closure): Remove.
2672         (restore_integer): Remove.
2673         * utils.h (struct set_batch_flag_and_restore_page_info): New
2674         class.
2675         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2676         (make_cleanup_restore_page_info): Remove.
2677         (make_cleanup_restore_uinteger) Remove.
2678         (make_cleanup_restore_integer) Remove.
2679
2680 2017-10-03  Tom Tromey  <tom@tromey.com>
2681
2682         * record-full.h (record_full_gdb_operation_disable_set): Return
2683         scoped_restore_tmpl<int>.
2684         * infrun.c (adjust_pc_after_break): Update.
2685         (handle_signal_stop): Update.
2686         * record-full.c (record_full_gdb_operation_disable_set): Return
2687         scoped_restore_tmpl<int>.
2688         (record_full_wait_1, record_full_insert_breakpoint)
2689         (record_full_remove_breakpoint, record_full_save)
2690         (record_full_goto_insn): Update.
2691
2692 2017-10-02  Tom Tromey  <tom@tromey.com>
2693
2694         PR rust/22236:
2695         * rust-lang.c (rust_val_print_str): New function.
2696         (val_print_struct): Call it.
2697         (rust_subscript): Preserve name of slice type.
2698
2699 2017-10-02  Tom Tromey  <tom@tromey.com>
2700
2701         * rust-lang.c (rust_subscript): Handle slices in
2702         EVAL_AVOID_SIDE_EFFECTS case.
2703
2704 2017-10-02  Tom Tromey  <tom@tromey.com>
2705
2706         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2707
2708 2017-10-02  Tom Tromey  <tom@tromey.com>
2709
2710         * rust-lang.h (rust_slice_type): Add "extern".
2711
2712 2017-10-02  Tom Tromey  <tom@tromey.com>
2713             Pedro Alves  <palves@redhat.com>
2714
2715         * ada-lang.h (ada_exc_info::operator<): Make const.
2716         (ada_exc_info::operator==): Make const.
2717         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2718         Make const.
2719
2720 2017-09-29  Tom Tromey  <tom@tromey.com>
2721
2722         * target.c (read_whatever_is_readable): Change type of "result".
2723         Update.
2724         (free_memory_read_result_vector): Remove.
2725         (read_memory_robust): Change return type.  Update.
2726         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
2727         bin2hex, std::string.
2728         * target.h (memory_read_result_s): Remove typedef.
2729         (free_memory_read_result_vector): Remove.
2730         (read_memory_robust): Return std::vector.
2731
2732 2017-09-29  Tom Tromey  <tom@tromey.com>
2733
2734         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2735
2736 2017-09-29  Tom Tromey  <tom@tromey.com>
2737
2738         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2739         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
2740         operator< and operator==.
2741         (ada_exceptions_list): Return a std::vector.
2742         * ada-lang.c (ada_exc_info::operator<): Rename from
2743         compare_ada_exception_info.
2744         (ada_exc_info::operator==): New.
2745         (sort_remove_dups_ada_exceptions_list): Change type of
2746         "exceptions".
2747         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2748         (ada_add_global_exceptions): Likewise.
2749         (ada_exceptions_list_1): Return a std::vector.
2750         (ada_exceptions_list): Likewise.
2751
2752 2017-09-29  Tom Tromey  <tom@tromey.com>
2753
2754         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2755         'std::set *'.
2756         (print_one_inferior): Update.
2757         (free_vector_of_ints): Remove.
2758         (list_available_thread_groups): Change "ids" to std::set.
2759         (mi_cmd_list_thread_groups): Update.
2760         (struct collect_cores_data) <core>: Now a std::set.
2761         (collect_cores): Update.
2762         (unique): Remove.
2763         (print_one_inferior): Update.
2764
2765 2017-09-29  Tom Tromey  <tom@tromey.com>
2766
2767         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2768         (mi_execute_async_cli_command): Likewise.
2769         (mi_cmd_trace_frame_collected): Use field_fmt.
2770
2771 2017-09-29  Tom Tromey  <tom@tromey.com>
2772
2773         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2774         gdb::byte_vector.
2775
2776 2017-09-29  Tom Tromey  <tom@tromey.com>
2777
2778         * mi/mi-parse.c (mi_parse): Remove unused declaration.
2779
2780 2017-09-29  Tom Tromey  <tom@tromey.com>
2781
2782         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2783
2784 2017-09-29  Tom Tromey  <tom@tromey.com>
2785
2786         * varobj.h (varobj_gen_name): Return std::string.
2787         * varobj.c (varobj_gen_name): Return std::string.
2788         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2789         (mi_cmd_var_delete): Don't copy "name".
2790
2791 2017-09-29  Tom Tromey  <tom@tromey.com>
2792
2793         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2794         (mi_cmd_break_insert_1): Update.
2795
2796 2017-09-29  Tom Tromey  <tom@tromey.com>
2797
2798         * target.h (make_scoped_defer_target_commit_resume): Update.
2799         * target.c (make_scoped_defer_target_commit_resume): Rename from
2800         make_cleanup_defer_target_commit_resume.  Return a
2801         scoped_restore.
2802         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2803
2804 2017-09-29  Tom Tromey  <tom@tromey.com>
2805
2806         * main.c (captured_main_1): Remove unused declaration.
2807         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2808
2809 2017-09-29  Tom Tromey  <tom@tromey.com>
2810
2811         * symtab.c (search_symbols): Remove unused outer cleanup.
2812         (make_source_files_completion_list): Remove unused declaration.
2813
2814 2017-09-29  Tom Tromey  <tom@tromey.com>
2815
2816         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2817
2818 2017-09-29  Tom Tromey  <tom@tromey.com>
2819
2820         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2821         gdb::byte_vector.
2822
2823 2017-09-29  Tom Tromey  <tom@tromey.com>
2824
2825         * complaints.c (vcomplaint): Use std::string.
2826
2827 2017-09-29  Tom Tromey  <tom@tromey.com>
2828
2829         * tracepoint.c (trace_variable_command): Use std::string.
2830         (encode_actions_1): Remove unused declarations.
2831         (create_tsv_from_upload): Use std::string.
2832
2833 2017-09-29  Tom Tromey  <tom@tromey.com>
2834
2835         * cp-support.c (gdb_demangle): Use std::string.
2836
2837 2017-09-29  Tom Tromey  <tom@tromey.com>
2838
2839         * stack.c (parse_frame_specification): Use std::string
2840         (info_frame_command): Use gdb::unique_xmalloc_ptr.
2841
2842 2017-09-29  Tom Tromey  <tom@tromey.com>
2843
2844         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2845
2846 2017-09-29  Tom Tromey  <tom@tromey.com>
2847
2848         * utils.c (vfprintf_maybe_filtered): Use std::string.
2849         (vfprintf_unfiltered): Likewise.
2850
2851 2017-09-29  Tom Tromey  <tom@tromey.com>
2852
2853         * event-top.c (top_level_prompt): Return std::string.
2854         (display_gdb_prompt): Update.
2855
2856 2017-09-29  Tom Tromey  <tom@tromey.com>
2857
2858         * unittests/common-utils-selftests.c (format): New function.
2859         (string_vprintf_tests): New function.
2860         (_initialize_common_utils_selftests): Register new tests.
2861         * common/common-utils.c (string_vprintf): New function.
2862         * common/common-utils.h (string_vprintf): Declare.
2863
2864 2017-09-29  Pedro Alves  <palves@redhat.com>
2865
2866         * common/rsp-low.c (unpack_varlen_hex): Constify.
2867         * common/rsp-low.h (unpack_varlen_hex): Constify.
2868         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2869         Constify.
2870         * remote.c (remote_set_permissions, read_ptid)
2871         (remote_current_thread, remote_get_threads_with_qthreadinfo)
2872         (remote_static_tracepoint_marker_at)
2873         (remote_static_tracepoint_markers_by_strid)
2874         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2875         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2876         (parse_tracepoint_definition, parse_tsv_definition)
2877         (parse_static_tracepoint_marker_definition): Constify.
2878         * tracepoint.h (parse_static_tracepoint_marker_definition)
2879         (parse_trace_status, parse_tracepoint_status)
2880         (parse_tracepoint_definition, parse_tsv_definition): Constify.
2881
2882 2017-09-29  Pedro Alves  <palves@redhat.com>
2883
2884         * remote.c (target_buf, target_buf_size): Delete.
2885         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2886         Use the connection's packet buffer instead.
2887         All callers adjusted.
2888         (_initialize_remote): Remove references to target_buf and
2889         target_buf_size.
2890
2891 2017-09-28  Pedro Alves  <palves@redhat.com>
2892
2893         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2894         unittests/common-utils-selftests.c.
2895         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2896         (COMMON_OBS): Remove utils-selftests.o.
2897         * utils-selftests.c: Move to ...
2898         * unittests/common-utils-selftests.c: ... here and rename self
2899         test to "string_printf".
2900
2901 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2902
2903         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2904         having NULL cus or tus.
2905
2906 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2907
2908         * arm-tdep.c: (convert_from_extended): Remove.
2909         (convert_to_extended): Likewise.
2910         (arm_extract_return_value): Use convert_typed_floating.
2911         (arm_store_return_value): Likewise.
2912
2913         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2914         * sh-tdep.c: Do not include "floatformat.h".
2915         (sh_littlebyte_bigword_type): New function.
2916         (sh_register_convert_to_virtual): Use convert_typed_floating.
2917         (sh_register_convert_to_raw): Likewise.
2918         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2919         (sh64_littlebyte_bigword_type): New function.
2920         (sh64_extract_return_value): Use convert_typed_floating.
2921         (sh64_register_convert_to_virtual): Likewise.
2922         (sh64_register_convert_to_raw): Likewise.
2923
2924 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2925
2926         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2927         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2928
2929         * gdbtypes.h (union type_specific): Make field floatformat hold
2930         just a single struct floatformat, not an array.
2931         (floatformat_from_type): Move here.
2932         * gdbtypes.c (floatformat_from_type): Move here.  Update to
2933         changed TYPE_FLOATFORMAT definition.
2934         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2935         (recursive_dump_type): Likewise.
2936         (init_float_type): Install correct floatformat for byte order.
2937         (arch_float_type): Likewise.
2938
2939 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2940
2941         * gdbtypes.c (init_type): Change incoming argument from
2942         length-in-bytes to length-in-bits.  Assert length is a
2943         multiple of TARGET_CHAR_BITS.
2944         (arch_type, arch_flags_type): Likewise.
2945         (init_integer_type): Update call to init_type.
2946         (init_character_type): Likewise.
2947         (init_boolean_type): Likewise.
2948         (init_float_type): Likewise.
2949         (init_decfloat_type): Likewise.
2950         (init_complex_type): Likewise.
2951         (init_pointer_type): Likewise.
2952         (objfile_type): Likewise.
2953         (arch_integer_type): Update call to arch_type.
2954         (arch_character_type): Likewise.
2955         (arch_boolean_type): Likewise.
2956         (arch_float_type): Likewise.
2957         (arch_decfloat_type): Likewise.
2958         (arch_complex_type): Likewise.
2959         (arch_pointer_type): Likewise.
2960         (gdbtypes_post_init): Likewise.
2961
2962         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2963         (read_base_type): Likewise.
2964         * mdebugread.c (basic_type): Likewise.
2965         * stabsread.c (dbx_init_float_type): Likewise.
2966         (rs6000_builtin_type): Likewise.
2967         (read_range_type): Likewise.  Also, fix call to init_integer_type
2968         with erroneous length argument.
2969
2970         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2971         * d-lang.c (build_d_types): Likewise.
2972         * f-lang.c (build_fortran_types): Likewise.
2973         * go-lang.c (build_go_types): Likewise.
2974         * opencl-lang.c (build_opencl_types): Likewise.
2975         * jit.c (finalize_symtab): Likewise.
2976         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2977         (build_std_type_info_type): Likewise.
2978         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
2979         update call to arch_flags_type.
2980
2981         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2982         arch_type.
2983         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2984         * windows-tdep.c (windows_get_tlb_type): Likewise.
2985
2986         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2987         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2988         * m32c-tdep.c (make_types): Likewise.
2989         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2990         (rl78_psw_type): Update call to arch_flags_type.
2991         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2992         * rx-tdep.c (rx_psw_type): Likewise.
2993         (rx_fpsw_type): Likewise.
2994         * sparc-tdep.c (sparc_psr_type): Likewise.
2995         (sparc_fsr_type): Likewise.
2996         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2997         (sparc64_ccr_type): Likewise.
2998         (sparc64_fsr_type): Likewise.
2999         (sparc64_fprs_type): Likewise.
3000
3001 2017-09-27  Tom Tromey  <tom@tromey.com>
3002
3003         * findcmd.c (find_command): Constify.
3004
3005 2017-09-27  Tom Tromey  <tom@tromey.com>
3006
3007         * ada-tasks.c (task_command_1, task_command): Constify.
3008
3009 2017-09-27  Tom Tromey  <tom@tromey.com>
3010
3011         * symtab.c (maintenance_print_symbol_cache)
3012         (maintenance_flush_symbol_cache)
3013         (maintenance_print_symbol_cache_statistics): Constify.
3014
3015 2017-09-27  Tom Tromey  <tom@tromey.com>
3016
3017         * inferior.c (detach_inferior_command, kill_inferior_command)
3018         (inferior_command): Constify.
3019
3020 2017-09-27  Tom Tromey  <tom@tromey.com>
3021
3022         * regcache.c (regcache_print, maintenance_print_registers)
3023         (maintenance_print_raw_registers)
3024         (maintenance_print_cooked_registers)
3025         (maintenance_print_register_groups)
3026         (maintenance_print_remote_registers): Constify.
3027
3028 2017-09-27  Tom Tromey  <tom@tromey.com>
3029
3030         * printcmd.c (map_display_numbers, undisplay_command)
3031         (enable_disable_display_command, enable_display_command)
3032         (disable_display_command): Constify.
3033
3034 2017-09-27  Tom Tromey  <tom@tromey.com>
3035
3036         * breakpoint.h (delete_command): Don't declare.
3037         * breakpoint.c (delete_command, enable_once_command)
3038         (enable_count_command, enable_delete_command, breakpoint_1)
3039         (maintenance_info_breakpoints, stopin_command, stopat_command)
3040         (delete_command, delete_trace_command, save_breakpoints)
3041         (save_breakpoints_command, save_tracepoints_command): Constify.
3042
3043 2017-09-27  Tom Tromey  <tom@tromey.com>
3044
3045         * macrocmd.c (macro_expand_command, macro_expand_once_command)
3046         (skip_ws, extract_identifier, macro_define_command)
3047         (macro_undef_command, macro_list_command): Constify.
3048
3049 2017-09-27  Tom Tromey  <tom@tromey.com>
3050
3051         * infcmd.c (environment_info, set_environment_command)
3052         (unset_environment_command, path_info, info_proc_cmd_1)
3053         (info_proc_cmd_mappings, info_proc_cmd_stat)
3054         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3055         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3056
3057 2017-09-27  Tom Tromey  <tom@tromey.com>
3058
3059         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3060         Constify.
3061
3062 2017-09-27  Tom Tromey  <tom@tromey.com>
3063
3064         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3065
3066 2017-09-27  Tom Tromey  <tom@tromey.com>
3067
3068         * demangle.c (demangle_command): Constify.
3069
3070 2017-09-27  Tom Tromey  <tom@tromey.com>
3071
3072         * progspace.c (maintenance_info_program_spaces_command):
3073         Constify.
3074
3075 2017-09-27  Tom Tromey  <tom@tromey.com>
3076
3077         * compile/compile.c (check_raw_argument, compile_file_command)
3078         (compile_code_command, compile_print_command): Constify.
3079
3080 2017-09-27  Tom Tromey  <tom@tromey.com>
3081
3082         * reggroups.c (maintenance_print_reggroups): Constify.
3083
3084 2017-09-27  Tom Tromey  <tom@tromey.com>
3085
3086         * dwarf2read.c (save_gdb_index_command): Constify.
3087
3088 2017-09-27  Tom Tromey  <tom@tromey.com>
3089
3090         * stap-probe.c (info_probes_stap_command): Constify.
3091
3092 2017-09-27  Tom Tromey  <tom@tromey.com>
3093
3094         * fork-child.c (unset_exec_wrapper_command): Constify.
3095
3096 2017-09-27  Tom Tromey  <tom@tromey.com>
3097
3098         * btrace.c (get_uint, get_context_size, no_chunk)
3099         (maint_btrace_packet_history_cmd)
3100         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3101         (maint_info_btrace_cmd): Constify.
3102
3103 2017-09-27  Tom Tromey  <tom@tromey.com>
3104
3105         * reverse.c (delete_bookmark_command): Constify.
3106
3107 2017-09-27  Tom Tromey  <tom@tromey.com>
3108
3109         * remote.c (set_memory_packet_size)
3110         (set_memory_write_packet_size, show_memory_write_packet_size)
3111         (set_memory_read_packet_size, show_memory_read_packet_size)
3112         (compare_sections_command, packet_command, remote_put_command)
3113         (remote_get_command, remote_delete_command): Constify.
3114
3115 2017-09-27  Tom Tromey  <tom@tromey.com>
3116
3117         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3118         (set_mipsfpu_double_command, set_mipsfpu_none_command)
3119         (set_mipsfpu_auto_command): Constify.
3120
3121 2017-09-27  Tom Tromey  <tom@tromey.com>
3122
3123         * cli/cli-cmds.h (cd_command): Constify.
3124         * cli/cli-cmds.c (cd_command): Constify.
3125
3126 2017-09-27  Tom Tromey  <tom@tromey.com>
3127
3128         * thread.c (thread_name_command, thread_find_command): Constify.
3129
3130 2017-09-27  Tom Tromey  <tom@tromey.com>
3131
3132         * probe.c (enable_probes_command, disable_probes_command):
3133         Constify.
3134
3135 2017-09-27  Tom Tromey  <tom@tromey.com>
3136
3137         * symfile.c (symbol_file_command): Constify.
3138         * gdbcore.h (deprecated_file_changed_hook): Constify.
3139         * exec.c (deprecated_file_changed_hook, exec_file_command)
3140         (file_command): Constify.
3141         * defs.h (symbol_file_command): Constify.
3142
3143 2017-09-27  Tom Tromey  <tom@tromey.com>
3144
3145         * remote-fileio.c (set_system_call_allowed)
3146         (show_system_call_allowed): Constify.
3147
3148 2017-09-27  Tom Tromey  <tom@tromey.com>
3149
3150         * tracepoint.c (delete_trace_variable_command)
3151         (tfind_end_command, tfind_start_command, tfind_pc_command)
3152         (tfind_tracepoint_command, tfind_line_command)
3153         (tfind_range_command, tfind_outside_command): Constify.
3154
3155 2017-09-27  Tom Tromey  <tom@tromey.com>
3156
3157         * ax-gdb.c (maint_agent_printf_command, agent_command)
3158         (agent_eval_command): Constify.
3159
3160 2017-09-27  Tom Tromey  <tom@tromey.com>
3161
3162         * tracepoint.c (info_scope_command): Constify.
3163         * python/python.c (gdbpy_decode_line): Constify.
3164         * python/py-breakpoint.c (bppy_init): Constify.
3165         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
3166         * location.h: (new_linespec_location)
3167         (string_to_event_location_basic, string_to_event_location):
3168         Constify.
3169         * location.c (new_linespec_location)
3170         (string_to_event_location_basic, string_to_event_location):
3171         Constify.
3172         * linespec.h (decode_line_with_current_source)
3173         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
3174         * linespec.c (linespec_lex_to_end)
3175         (decode_line_with_current_source)
3176         (decode_line_with_last_displayed): Constify.
3177         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
3178         Constify.
3179         * cli/cli-cmds.c (edit_command, list_command): Constify.
3180         * breakpoint.h (until_break_command, watch_command_wrapper)
3181         (awatch_command_wrapper, rwatch_command_wrapper)
3182         (init_ada_exception_breakpoint): Constify.
3183         * breakpoint.c (break_command_1, dprintf_command)
3184         (break_range_command, watch_command_wrapper)
3185         (rwatch_command_wrapper, awatch_command_wrapper)
3186         (until_break_command, init_ada_exception_breakpoint)
3187         (strace_marker_create_sals_from_location, trace_command)
3188         (ftrace_command, strace_command, struct tracepoint): Constify.
3189         * ax-gdb.c (agent_command_1): Constify.
3190         * ada-lang.c (ada_exception_sal): Constify.
3191
3192 2017-09-27  Tom Tromey  <tom@tromey.com>
3193
3194         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
3195         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
3196         (get_context_size, no_chunk, get_insn_history_modifiers)
3197         (cmd_record_insn_history, get_call_history_modifiers)
3198         (cmd_record_call_history): Constify.
3199
3200 2017-09-27  Tom Tromey  <tom@tromey.com>
3201
3202         * source.c (show_substitute_path_command)
3203         (unset_substitute_path_command, set_substitute_path_command):
3204         Constify.
3205
3206 2017-09-27  Tom Tromey  <tom@tromey.com>
3207
3208         * typeprint.c (maintenance_print_type): Constify.
3209         * maint.c (maintenance_dump_me, maintenance_demangle)
3210         (maintenance_time_display, maintenance_info_sections)
3211         (maintenance_print_statistics, maintenance_deprecate)
3212         (maintenance_undeprecate): Constify.
3213         (maintenance_do_deprecate): Constify.  Use std::string.
3214         (maintenance_selftest): Constify.
3215         * gdbtypes.h (maintenance_print_type): Constify.
3216
3217 2017-09-27  Tom Tromey  <tom@tromey.com>
3218
3219         * hppa-tdep.c (unwind_command): Constify.
3220
3221 2017-09-27  Tom Tromey  <tom@tromey.com>
3222
3223         * target-descriptions.c (unset_tdesc_filename_cmd)
3224         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
3225         Constify.
3226
3227 2017-09-27  Tom Tromey  <tom@tromey.com>
3228
3229         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
3230
3231 2017-09-27  Tom Tromey  <tom@tromey.com>
3232
3233         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
3234
3235 2017-09-27  Tom Tromey  <tom@tromey.com>
3236
3237         * tui/tui-regs.c (tui_reg_command): Constify.
3238
3239 2017-09-27  Tom Tromey  <tom@tromey.com>
3240
3241         * skip.c (skip_file_command, skip_function_command)
3242         (skip_enable_command, skip_disable_command, skip_delete_command):
3243         Constify.
3244
3245 2017-09-27  Tom Tromey  <tom@tromey.com>
3246
3247         * record-btrace.c (cmd_record_btrace_bts_start)
3248         (cmd_record_btrace_pt_start): Constify.
3249
3250 2017-09-27  Tom Tromey  <tom@tromey.com>
3251
3252         * symmisc.c (maintenance_print_symbols)
3253         (maintenance_print_msymbols, maintenance_print_objfiles)
3254         (maintenance_info_symtabs, maintenance_check_symtabs)
3255         (maintenance_expand_symtabs, maintenance_info_line_tables):
3256         Constify.
3257
3258 2017-09-27  Tom Tromey  <tom@tromey.com>
3259
3260         * top.c (new_ui_command): Constify.
3261
3262 2017-09-27  Tom Tromey  <tom@tromey.com>
3263
3264         * symfile.c (add_symbol_file_command)
3265         (remove_symbol_file_command, list_overlays_command)
3266         (map_overlay_command, unmap_overlay_command)
3267         (overlay_auto_command, overlay_manual_command)
3268         (overlay_off_command, overlay_load_command): Constify.
3269
3270 2017-09-27  Tom Tromey  <tom@tromey.com>
3271
3272         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
3273         (info_spu_mailbox_command, info_spu_dma_command)
3274         (info_spu_proxydma_command): Constify.
3275
3276 2017-09-27  Tom Tromey  <tom@tromey.com>
3277
3278         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
3279
3280 2017-09-27  Tom Tromey  <tom@tromey.com>
3281
3282         * cli/cli-script.c (user_defined_command): Constify.
3283
3284 2017-09-27  Tom Tromey  <tom@tromey.com>
3285
3286         * cli/cli-dump.c (dump_memory_command, dump_value_command)
3287         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
3288         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
3289         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
3290         (dump_binary_value, append_binary_memory, append_binary_value):
3291         Constify.
3292         (struct dump_context) <func>: Constify.
3293         (add_dump_command): Update.
3294
3295 2017-09-27  Tom Tromey  <tom@tromey.com>
3296
3297         * cli/cli-cmds.c (show_version, show_configuration)
3298         (source_command, show_user): Constify.
3299
3300 2017-09-27  Tom Tromey  <tom@tromey.com>
3301
3302         * target.c (maintenance_print_target_stack): Constify.
3303
3304 2017-09-27  Tom Tromey  <tom@tromey.com>
3305
3306         * interps.c (interpreter_exec_cmd): Constify.
3307
3308 2017-09-27  Tom Tromey  <tom@tromey.com>
3309
3310         * record-full.c (cmd_record_full_restore): Constify.
3311
3312 2017-09-27  Tom Tromey  <tom@tromey.com>
3313
3314         * memattr.c (enable_mem_command, disable_mem_command)
3315         (delete_mem_command): Constify.
3316
3317 2017-09-27  Tom Tromey  <tom@tromey.com>
3318
3319         * value.c (show_convenience): Constify.
3320
3321 2017-09-27  Tom Tromey  <tom@tromey.com>
3322
3323         * gdbcore.h (core_file_command): Update.
3324         * corefile.c (core_file_command): Constify.
3325
3326 2017-09-27  Tom Tromey  <tom@tromey.com>
3327
3328         * user-regs.c (maintenance_print_user_registers): Constify.
3329
3330 2017-09-27  Tom Tromey  <tom@tromey.com>
3331
3332         * cp-namespace.c (maintenance_cplus_namespace): Constify.
3333
3334 2017-09-27  Tom Tromey  <tom@tromey.com>
3335
3336         * cp-support.c (first_component_command): Constify.
3337
3338 2017-09-27  Tom Tromey  <tom@tromey.com>
3339
3340         * psymtab.c (maintenance_print_psymbols)
3341         (maintenance_info_psymtabs, maintenance_check_psymtabs):
3342         Constify.
3343
3344 2017-09-27  Tom Tromey  <tom@tromey.com>
3345
3346         * windows-tdep.c (display_tib): Constify.
3347
3348 2017-09-27  Tom Tromey  <tom@tromey.com>
3349
3350         * linux-fork.c (delete_checkpoint_command)
3351         (detach_checkpoint_command): Constify.
3352
3353 2017-09-27  Tom Tromey  <tom@tromey.com>
3354
3355         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
3356
3357 2017-09-27  Tom Tromey  <tom@tromey.com>
3358
3359         * arc-tdep.c (dump_arc_instruction_command): Constify.
3360
3361 2017-09-27  Tom Tromey  <tom@tromey.com>
3362
3363         * valprint.c (set_radix, show_radix): Constify.
3364
3365 2017-09-27  Tom Tromey  <tom@tromey.com>
3366
3367         * dtrace-probe.c (info_probes_dtrace_command): Constify.
3368
3369 2017-09-27  Tom Tromey  <tom@tromey.com>
3370
3371         * command.h (not_just_help_class_command): Update.
3372         * cli/cli-decode.h (not_just_help_class_command): Update.
3373         * cli/cli-decode.c (not_just_help_class_command): Constify.
3374
3375 2017-09-27  Tom Tromey  <tom@tromey.com>
3376
3377         * gdb_bfd.c (maintenance_info_bfds): Constify.
3378
3379 2017-09-27  Tom Tromey  <tom@tromey.com>
3380
3381         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
3382         overloads.
3383         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
3384         (do_const_cfunc): New function.
3385         (cmd_cfunc_eq): New overload.
3386         (cli_user_command_p): Check do_const_cfunc.
3387         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
3388         const_cfunc.
3389         * command.h (add_cmd): Add const overload and no-function
3390         overload.
3391         (set_cmd_cfunc): Add const overload.
3392         (cmd_const_cfunc_ftype): Declare.
3393         (cmd_cfunc_eq): Add const overload.
3394         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
3395         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
3396         overload.
3397
3398 2017-09-27  Tom Tromey  <tom@tromey.com>
3399
3400         * macroexp.c (get_next_token_for_substitution): New function.
3401         (substitute_args): Call it.  Check for __VA_OPT__.
3402
3403 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3404             Pedro Alves <palves@redhat.com>
3405
3406         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
3407         producer_is_icc_lt_14.
3408         (producer_is_icc_lt_14): New function.
3409         (check_producer): Add code for checking version of ICC.
3410         (producer_is_icc): Move to producer.c.
3411         (read_structure_type): Restrict ICC workaround to ICC<14.
3412         * producer.c: Include selftest.h.
3413         (producer_is_icc, producer_parsing_tests, _initialize_producer):
3414         New functions.
3415         * producer.h (producer_is_icc): New declaration.
3416
3417 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3418
3419         * Makefile.in (SFILES): Add producer.c.
3420         (COMMON_OBS): Add producer.o
3421         * amd64-tdep.c (producer.h): Add new include.
3422         * dwarf2read.c (producer.h): Add new include.
3423         * producer.c: New file.
3424         * producer.h: New file.
3425         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
3426         producer.c.
3427         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
3428         producer.h.
3429
3430 2017-09-26  Matthias Klose  <doko@ubuntu.com>
3431
3432         * configure.ac: Search ncursesw before ncurses.
3433         Check ncursesw/ncurses.h before ncurses/ncurses.h.
3434         * gdb_curses.h: Include <ncursesw/ncurses.h>
3435         * config.in, configure: Regenerate.
3436
3437 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3438
3439         PR gdb/22185
3440         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
3441         obsolete.
3442         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
3443         Remove i386sol2 support.
3444         * configure.nat <i386sol2>: Remove.
3445         <sol2-64>: Fold into ...
3446         <sol2>: ... this.
3447         Move common settings to default section.
3448         Add sol-thread.o.
3449         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
3450         x86_64-*-solaris2.1[0-9]*>: Rename to ...
3451         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
3452         <i[34567]86-*-solaris*>: Remove.
3453         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
3454
3455         * configure.ac: Remove wctype in libw check.
3456         (_MSE_INT_H): Don't define on Solaris 7-9.
3457         <solaris*>: Remove libthread_db.so.1 check.
3458         * configure: Regenerate.
3459         * config.in: Regenerate.
3460
3461         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
3462         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
3463         (gdb_ps_size_t): Remove.
3464         Use base types in users.
3465         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
3466
3467         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
3468
3469 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3470
3471         PR build/22206
3472         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
3473         (adi_is_addr_mapped): Likewise.
3474         (PSR_ICC): Don't redefine.
3475         (PSR_IMPL): Likewise.
3476
3477 2017-09-25  Tom Tromey  <tom@tromey.com>
3478
3479         * regcache.c (regcache::dump): Use string_printf.
3480
3481 2017-09-25  Tom Tromey  <tom@tromey.com>
3482
3483         * regcache.c (class regcache_invalidator): New.
3484         (struct register_to_invalidate): Remove.
3485         (make_cleanup_regcache_invalidate): Remove.
3486         (regcache::raw_write): Use regcache_invalidator.
3487
3488 2017-09-25  Tom Tromey  <tom@tromey.com>
3489
3490         * spu-tdep.c (spu2ppu_sniffer): Update.
3491         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
3492         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
3493         Remove.
3494         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
3495         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
3496         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
3497         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
3498         (frame_pop): Update.
3499
3500 2017-09-25  Tom Tromey  <tom@tromey.com>
3501
3502         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
3503         * regcache.h (regcache_xfree): Don't declare.
3504         * regcache.c (regcache_xfree): Remove.
3505         (do_regcache_xfree): Use delete.
3506         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
3507         * linux-fork.c (free_fork): Use delete.
3508         (fork_save_infrun_state): Likewise.
3509         * jit.c (jit_dealloc_cache): Use delete.
3510         * infrun.c (discard_infcall_suspend_state): Use delete.
3511
3512 2017-09-25  Tom Tromey  <tom@tromey.com>
3513
3514         * regcache.h (regcache_xmalloc): Don't declare.
3515         (regcache_raw_set_cached_value): Update comment.
3516         * regcache.c (regcache_xmalloc): Remove.
3517         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
3518         * jit.c (jit_frame_sniffer): Use new.
3519         * frame.c (frame_save_as_regcache): Use new.
3520
3521 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3522
3523         * NEWS: Advertise support for guarded-storage registers on IBM z.
3524
3525 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3526
3527         * s390-linux-nat.c (have_regset_gs): New static variable.
3528         (s390_linux_fetch_inferior_registers): Handle guarded-storage
3529         control block and guarded-storage broadcast control regsets.
3530         (s390_read_description): Detect whether the target has
3531         guarded-storage support, return appropriate tdesc.
3532         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
3533         (features/s390x-gs-linux64.c): Likewise.
3534         (struct gdbarch_tdep) <have_gs>: New field.
3535         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
3536         (s390_gsbc_regset): New variables.
3537         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
3538         and s390_gsbc_regset, if applicable.
3539         (s390_core_read_description): Check whether core file was from a
3540         target with guarded-storage support; include appropriate regsets.
3541         (s390_gdbarch_init): Add registers for guarded-storage support.
3542         (_initialize_s390_tdep): Initialize new target descriptions that
3543         include registers for guarded-storage support.
3544         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
3545         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
3546         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
3547         (S390_NUM_REGS): Adjust macro definition.
3548         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
3549         (tdesc_s390x_gs_linux64): New declarations.
3550
3551 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3552
3553         * features/s390-gs-linux64.xml: New file.
3554         * features/s390-gs.xml: New file.
3555         * features/s390-gsbc.xml: New file.
3556         * features/s390x-gs-linux64.xml: New file.
3557         * features/Makefile (WHICH): Add s390-gs-linux64 and
3558         s390x-gs-linux64.
3559         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
3560         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
3561         * features/s390-gs-linux64.c: New generated file.
3562         * features/s390x-gs-linux64.c: New file.
3563         * regformats/s390-gs-linux64.dat: New file.
3564         * regformats/s390x-gs-linux64.dat: New file.
3565
3566 2017-09-23  Tom Tromey  <tom@tromey.com>
3567
3568         * defs.h (make_cleanup_override_quit_handler): Don't declare.
3569
3570 2017-09-22  Tom Tromey  <tom@tromey.com>
3571
3572         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
3573         type to scoped_restore_tmpl.
3574         <scoped_input_handler>: Initialize m_quit_handler directly.
3575
3576 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3577
3578         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
3579         (cd_command): Likewise.  Free "current_directory" before
3580         assigning to it.
3581         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
3582         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
3583         * top.c (gdb_dirbuf): Remove global declaration.
3584         * top.h (gdb_dirbuf): Likewise.
3585
3586 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3587
3588         * gnulib/aclocal.m4: Regenerate.
3589         * gnulib/config.in: Regenerate.
3590         * gnulib/configure: Regenerate.
3591         * gnulib/import/Makefile.am: Regenerate.
3592         * gnulib/import/Makefile.in: Regenerate.
3593         * gnulib/import/assure.h: New file.
3594         * gnulib/import/at-func.c: Likewise
3595         * gnulib/import/chdir-long.c: New file.
3596         * gnulib/import/chdir-long.h: New file.
3597         * gnulib/import/cloexec.c: New file.
3598         * gnulib/import/cloexec.h: New file.
3599         * gnulib/import/close.c: New file.
3600         * gnulib/import/closedir.c: New file.
3601         * gnulib/import/dirent-private.h: New file.
3602         * gnulib/import/dup-safer.c: New file.
3603         * gnulib/import/dup.c: New file.
3604         * gnulib/import/dup2.c: New file.
3605         * gnulib/import/error.c: New file.
3606         * gnulib/import/error.h: New file.
3607         * gnulib/import/exitfail.c: New file.
3608         * gnulib/import/exitfail.h: New file.
3609         * gnulib/import/fchdir.c: New file.
3610         * gnulib/import/fcntl.c: New file.
3611         * gnulib/import/fcntl.in.h: New file.
3612         * gnulib/import/fd-hook.c: New file.
3613         * gnulib/import/fd-hook.h: New file.
3614         * gnulib/import/fd-safer.c: New file.
3615         * gnulib/import/fdopendir.c: New file.
3616         * gnulib/import/filename.h: New file.
3617         * gnulib/import/filenamecat-lgpl.c: New file.
3618         * gnulib/import/filenamecat.h: New file.
3619         * gnulib/import/fstat.c: New file.
3620         * gnulib/import/fstatat.c: New file.
3621         * gnulib/import/getcwd-lgpl.c: New file.
3622         * gnulib/import/getcwd.c: New file.
3623         * gnulib/import/getdtablesize.c: New file.
3624         * gnulib/import/getlogin_r.c: New file.
3625         * gnulib/import/getprogname.c: New file.
3626         * gnulib/import/getprogname.h: New file.
3627         * gnulib/import/gettext.h: New file.
3628         * gnulib/import/glob-libc.h: New file.
3629         * gnulib/import/glob.c: New file.
3630         * gnulib/import/glob.in.h: New file.
3631         * gnulib/import/intprops.h: New file.
3632         * gnulib/import/m4/chdir-long.m4: New file.
3633         * gnulib/import/m4/close.m4: New file.
3634         * gnulib/import/m4/closedir.m4: New file.
3635         * gnulib/import/m4/d-ino.m4: New file.
3636         * gnulib/import/m4/d-type.m4: New file.
3637         * gnulib/import/m4/dup.m4: New file.
3638         * gnulib/import/m4/dup2.m4: New file.
3639         * gnulib/import/m4/error.m4: New file.
3640         * gnulib/import/m4/fchdir.m4: New file.
3641         * gnulib/import/m4/fcntl.m4: New file.
3642         * gnulib/import/m4/fcntl_h.m4: New file.
3643         * gnulib/import/m4/fdopendir.m4: New file.
3644         * gnulib/import/m4/filenamecat.m4: New file.
3645         * gnulib/import/m4/fstat.m4: New file.
3646         * gnulib/import/m4/fstatat.m4: New file.
3647         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3648         * gnulib/import/m4/getcwd-path-max.m4: New file.
3649         * gnulib/import/m4/getcwd.m4: New file.
3650         * gnulib/import/m4/getdtablesize.m4: New file.
3651         * gnulib/import/m4/getlogin_r.m4: New file.
3652         * gnulib/import/m4/getprogname.m4: New file.
3653         * gnulib/import/m4/glob.m4: New file.
3654         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3655         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3656         * gnulib/import/m4/mempcpy.m4: New file.
3657         * gnulib/import/m4/memrchr.m4: New file.
3658         * gnulib/import/m4/mode_t.m4: New file.
3659         * gnulib/import/m4/msvc-inval.m4: New file.
3660         * gnulib/import/m4/msvc-nothrow.m4: New file.
3661         * gnulib/import/m4/open.m4: New file.
3662         * gnulib/import/m4/openat.m4: New file.
3663         * gnulib/import/m4/opendir.m4: New file.
3664         * gnulib/import/m4/readdir.m4: New file.
3665         * gnulib/import/m4/realloc.m4: New file.
3666         * gnulib/import/m4/rewinddir.m4: New file.
3667         * gnulib/import/m4/save-cwd.m4: New file.
3668         * gnulib/import/m4/strdup.m4: New file.
3669         * gnulib/import/m4/strerror.m4: New file.
3670         * gnulib/import/m4/unistd-safer.m4: New file.
3671         * gnulib/import/mempcpy.c: New file.
3672         * gnulib/import/memrchr.c: New file.
3673         * gnulib/import/msvc-inval.c: New file.
3674         * gnulib/import/msvc-inval.h: New file.
3675         * gnulib/import/msvc-nothrow.c: New file.
3676         * gnulib/import/msvc-nothrow.h: New file.
3677         * gnulib/import/open.c: New file.
3678         * gnulib/import/openat-die.c: New file.
3679         * gnulib/import/openat-priv.h: New file.
3680         * gnulib/import/openat-proc.c: New file.
3681         * gnulib/import/openat.c: New file.
3682         * gnulib/import/openat.h: New file.
3683         * gnulib/import/opendir.c: New file.
3684         * gnulib/import/pipe-safer.c: New file.
3685         * gnulib/import/readdir.c: New file.
3686         * gnulib/import/realloc.c: New file.
3687         * gnulib/import/rewinddir.c: New file.
3688         * gnulib/import/save-cwd.c: New file.
3689         * gnulib/import/save-cwd.h: New file.
3690         * gnulib/import/strdup.c: New file.
3691         * gnulib/import/strerror-override.c: New file.
3692         * gnulib/import/strerror-override.h: New file.
3693         * gnulib/import/strerror.c: New file.
3694         * gnulib/import/unistd--.h: New file.
3695         * gnulib/import/unistd-safer.h: New file.
3696         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3697         "getcwd" and "glob".
3698         * ser-tcp.c: Undefine "close" before redefining it.
3699
3700 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3701
3702         * guile/scm-value.c (gdbscm_value_address): Initialize address,
3703         get rid of res_val.
3704
3705 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3706
3707         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3708         <sol2,sparc>: Likewise.
3709         <sol2-64,i386>: Likewise.
3710
3711         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3712         -Wdeprecated-declarations on *-*-solaris*.
3713         * configure: Regenerate.
3714
3715         * procfs.c: Include "nat/inferior.h".
3716         (procfs_info_proc): Fix typo.
3717
3718 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3719
3720         * remote.c (vector): Include.
3721         (struct private_thread_info): Add field, thread_handle.
3722         (free_private_thread_info): Deallocate storage associated with
3723         thread handle.
3724         (get_private_info_thread): Initialize `thread_handle' field.
3725         (struct thread_item): Add field, thread_handle.
3726         (clear_threads_listing_context): Deallocate storage associated
3727         with thread handle.
3728         (start_thread): Add support for "handle" attribute.
3729         (thread_attributes): Add "handle".
3730         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3731         field.
3732         (remote_update_thread_list): Update thread_handle.
3733         (remote_thread_handle_to_thread_info): New function.
3734         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3735
3736 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3737
3738         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3739         function.
3740         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3741         * python/python-internal.h (thread_object_type): Declare.
3742
3743 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3744
3745         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3746         (target_thread_handle_to_thread_info): Declare.
3747         * target.c (target_thread_handle_to_thread_info): New function.
3748         * target-delegates.c: Regenerate.
3749         * gdbthread.h (find_thread_by_handle): Declare.
3750         * thread.c (find_thread_by_handle): New function.
3751         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3752         function.
3753         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3754
3755 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3756
3757         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3758
3759 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3760
3761         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3762
3763 2017-09-21  Yao Qi  <yao.qi@linaro.org>
3764
3765         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3766         to gdb_target_obs.
3767
3768 2017-09-20  Tom Tromey  <tom@tromey.com>
3769
3770         * breakpoint.c (struct counted_command_line): Remove.
3771         (breakpoint_commands): Update.
3772         (alloc_counted_command_line, incref_counted_command_line)
3773         (decref_counted_command_line, do_cleanup_counted_command_line)
3774         (make_cleanup_decref_counted_command_line): Remove.
3775         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3776         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3777         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3778         (save_breakpoints): Update.
3779         * breakpoint.h (counted_command_line): Now a typedef to
3780         shared_ptr.
3781         (struct breakpoint) <commands>: Now a counted_command_line.
3782         (struct bpstats) <command>: Likewise.
3783
3784 2017-09-20  Tom Tromey  <tom@tromey.com>
3785
3786         * breakpoint.c (struct commands_info, do_map_commands_command):
3787         Remove.
3788         (commands_command_1): Update.
3789         (iterate_over_related_breakpoints): Take a function_view.
3790         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3791         (delete_command): Update.
3792         (map_breakpoint_numbers): Take a function_view.
3793         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3794         (disable_command): Update.
3795         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3796         (enable_command): Update.
3797         (struct disp_data, do_enable_breakpoint_disp)
3798         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3799         (do_map_enable_delete_breakpoint): Remove.
3800         (enable_once_command, enable_count_command, enable_delete_command)
3801         (delete_trace_variable_command): Update.
3802
3803 2017-09-20  Tom Tromey  <tom@tromey.com>
3804
3805         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
3806         (bpstat_clear): Use delete.
3807         (bpstats): New constructors.
3808         (bpstat_copy, bpstat_stop_status): Use new.
3809         (dprintf_after_condition_true): Update.
3810         * breakpoint.h (bpstats::bpstats): Add constructors.
3811         (bpstats::~bpstats): Add destructor.
3812
3813 2017-09-20  Pedro Alves  <palves@redhat.com>
3814
3815         * eval.c (make_params): Delete, refactored as ...
3816         (class fake_method): ... this new type's ctor.
3817         (fake_method::~fake_method): New.
3818         (evaluate_subexp_standard): Use 'fake_method'.
3819
3820 2017-09-20  Tom Tromey  <tom@tromey.com>
3821
3822         * windows-nat.c (get_windows_debug_event, windows_wait)
3823         (do_initial_windows_stuff, windows_attach): Update.
3824         * utils.c (vwarning, internal_vproblem): Update.
3825         (ui_unregister_input_event_handler_cleanup)
3826         (prepare_to_handle_input): Remove.
3827         (class scoped_input_handler): New.
3828         (defaulted_query, prompt_for_continue): Update.
3829         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3830         Update.
3831         * top.c (undo_terminal_modifications_before_exit): Update.
3832         * target/target.h (target_terminal_init, target_terminal_inferior)
3833         (target_terminal_ours): Don't declare.
3834         (class target_terminal): New.
3835         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3836         (target_terminal_ours_for_output)
3837         (make_cleanup_restore_target_terminal): Don't declare.
3838         (target_terminal_info): Remove.
3839         * target.c (enum terminal_state, terminal_state): Remove.
3840         (target_terminal::terminal_state): Define.
3841         (target_terminal::init): Rename from target_terminal_init.
3842         (target_terminal::inferior): Rename from
3843         target_terminal_inferior.
3844         (target_terminal::ours): Rename from target_terminal_ours.
3845         (target_terminal::ours_for_output): Rename from
3846         target_terminal_ours_for_output.
3847         (target_terminal::info): New method.
3848         (cleanup_restore_target_terminal)
3849         (make_cleanup_restore_target_terminal): Remove.
3850         * solib.c (handle_solib_event): Update.
3851         * remote.c (remote_serial_quit_handler): Update.
3852         (remote_terminal_inferior, remote_wait_as): Update.
3853         * record-full.c (record_full_wait_1): Update.
3854         * nto-procfs.c (procfs_create_inferior): Update.
3855         * nat/fork-inferior.c (startup_inferior): Update.
3856         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3857         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3858         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3859         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3860         (mi_breakpoint_created, mi_breakpoint_deleted)
3861         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3862         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3863         (mi_user_selected_context_changed, report_initial_inferior):
3864         Update.
3865         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3866         (linux_nat_terminal_inferior): Update.
3867         * infrun.c (follow_fork_inferior)
3868         (handle_vfork_child_exec_or_exit, do_target_resume)
3869         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3870         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3871         Update.
3872         * inflow.c (child_terminal_init, info_terminal_command): Update.
3873         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3874         (attach_command): Update.
3875         * infcall.c (call_thread_fsm_should_stop): Update.
3876         * gnu-nat.c (gnu_attach): Update.
3877         * extension.c (struct active_ext_lang_state)
3878         (restore_active_ext_lang): Update.
3879         * exceptions.c (print_flush): Update.
3880         * event-top.c (async_enable_stdin, default_quit_handler): Update.
3881         (struct quit_handler_cleanup_data, restore_quit_handler)
3882         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3883         Remove.
3884         * cp-support.c (gdb_demangle): Update.
3885         * breakpoint.c (update_inserted_breakpoint_locations)
3886         (insert_breakpoint_locations, handle_jit_event)
3887         (disable_breakpoints_in_unloaded_shlib): Update.
3888         * annotate.c (annotate_breakpoints_invalid)
3889         (annotate_frames_invalid): Update.
3890
3891 2017-09-20  Tom Tromey  <tom@tromey.com>
3892
3893         * main.c (catch_command_errors): Rename from
3894         catch_command_errors_const.
3895         (captured_main_1): Update.
3896
3897 2017-09-20  Pedro Alves  <palves@redhat.com>
3898
3899         * cli/cli-cmds.c (list_command): Use print_sal_location.
3900         (print_sal_location): New function.
3901         (ambiguous_line_spec): Use print_sal_location.
3902         * linespec.c (symbol_to_sal): Record the symbol in the sal.
3903         * symtab.c (find_function_start_sal): Likewise.
3904         * symtab.h (symtab_and_line::symbol): New field.
3905
3906 2017-09-20  Pedro Alves  <palves@redhat.com>
3907
3908         * linespec.c (minsym_found): Handle non-text minsyms.
3909         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3910
3911 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3912
3913         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3914         backslash.
3915
3916 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3917
3918         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3919         vmovups instead vmovaps.
3920         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3921
3922 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
3923
3924         * NEWS (Changes since GDB 8.0): Add starti.
3925         * infcmd.c (enum run_break): New.
3926         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3927         case.
3928         (run_command): Use enum run_how.
3929         (start_command): Likewise.
3930         (starti_command): New function.
3931         (RUN_ARGS_HELP): New macro.
3932         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3933         commands.  Add starti command.
3934
3935 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3936
3937         * Makefile.in (monitor.o): Remove the rule.
3938
3939 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3940
3941         * annotate.h (struct annotate_arg_emitter): Use
3942         DISABLE_COPY_AND_ASSIGN.
3943         * common/refcounted-object.h (refcounted_object): Likewise.
3944         * completer.h (struct completion_result): Likewise.
3945         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3946         * filename-seen-cache.h (filename_seen_cache): Likewise.
3947         * gdbcore.h (thread_section_name): Likewise.
3948         * gdb_regex.h (compiled_regex): Likewise.
3949         * gdbthread.h (scoped_restore_current_thread): Likewise.
3950         * inferior.h (scoped_restore_current_inferior): Likewise.
3951         * jit.c (jit_reader): Likewise.
3952         * linespec.h (struct linespec_result): Likewise.
3953         * mi/mi-parse.h (struct mi_parse): Likewise.
3954         * nat/fork-inferior.c (execv_argv): Likewise.
3955         * progspace.h (scoped_restore_current_program_space): Likewise.
3956         * python/python-internal.h (class gdbpy_enter): Likewise.
3957         * regcache.h (regcache): Likewise.
3958         * target-descriptions.c (struct tdesc_reg): Likewise.
3959         (struct tdesc_type): Likewise.
3960         (struct tdesc_feature): Likewise.
3961         * ui-out.h (ui_out_emit_type): Likewise.
3962
3963 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3964
3965         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3966         label abort_expression.
3967
3968 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3969
3970         * common/buffer.c (buffer_xml_printf): Adjust.
3971         * common/xml-utils.c (xml_escape_text): Change return type to
3972         std::string, update code accordingly.
3973         * common/xml-utils.h (xml_escape_text): Change return type to
3974         std::string.
3975         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3976         * windows-tdep.c (windows_xfer_shared_library): Adjust.
3977         * unittests/xml-utils-selftests.c (test_xml_escape_text):
3978         Adjust.
3979
3980 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3981
3982         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3983         (SUBDIR_UNITTESTS_OBS): Add new object file.
3984         * unittests/xml-utils-selftests.c: New file.
3985
3986 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3987
3988         * common/selftest.h (selftest): New struct/interface.
3989         (register_test): Add name parameter, add new overload.
3990         (run_tests): Add filter parameter.
3991         (for_each_selftest_ftype): New typedef.
3992         (for_each_selftest): New declaration.
3993         * common/selftest.c (tests): Change type to
3994         map<string, unique_ptr<selftest>>.
3995         (simple_selftest): New struct.
3996         (register_test): New function.
3997         (register_test): Add name parameter and use it.
3998         (run_tests): Add filter parameter and use it.  Add prints.
3999         Adjust to vector -> map change.
4000         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4001         registering selftests.
4002         * arm-tdep.c (_initialize_arm_tdep): Likewise.
4003         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4004         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4005         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4006         * findvar.c (_initialize_findvar): Likewise.
4007         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4008         * maint.c (maintenance_selftest): Update call to run_tests.
4009         (maintenance_info_selftests): New function.
4010         (_initialize_maint_cmds): Register "maintenance info selftests"
4011         command.  Update "maintenance selftest" doc.
4012         * regcache.c (_initialize_regcache): Add names when registering
4013         selftests.
4014         * rust-exp.y (_initialize_rust_exp): Likewise.
4015         * selftest-arch.c (gdbarch_selftest): New struct.
4016         (gdbarch_tests): Remove.
4017         (register_test_foreach_arch): Add name parameter.  Call
4018         register_test.
4019         (tests_with_arch): Remove, move most content to
4020         gdbarch_selftest::operator().
4021         (_initialize_selftests_foreach_arch): Remove.
4022         * selftest-arch.h (register_test_foreach_arch): Add name
4023         parameter.
4024         (run_tests_with_arch): New declaration.
4025         * utils-selftests.c (_initialize_utils_selftests): Add names
4026         when registering selftests.
4027         * utils.c (_initialize_utils): Likewise.
4028         * unittests/array-view-selftests.c
4029         (_initialize_array_view_selftests): Likewise.
4030         * unittests/environ-selftests.c (_initialize_environ_selftests):
4031         Likewise.
4032         * unittests/function-view-selftests.c
4033         (_initialize_function_view_selftests): Likewise.
4034         * unittests/offset-type-selftests.c
4035         (_initialize_offset_type_selftests): Likewise.
4036         * unittests/optional-selftests.c
4037         (_initialize_optional_selftests): Likewise.
4038         * unittests/scoped_restore-selftests.c
4039         (_initialize_scoped_restore_selftests): Likewise.
4040         * NEWS: Document "maintenance selftest" and "maint info
4041         selftests".
4042
4043 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4044
4045         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4046         scoped_restore.
4047
4048 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4049
4050         * mi/mi-main.c (mi_load_progress): Make uiout variable
4051         a unique_ptr.
4052
4053 2017-09-15  Pedro Alves  <palves@redhat.com>
4054
4055         * compile/compile-c-types.c (convert_enum, convert_int)
4056         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4057
4058 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
4059
4060         * dwarf2read.c (copy_string): Remove.
4061         (parse_macro_definition): Replace copy_string with savestring.
4062
4063 2017-09-15  Yao Qi  <yao.qi@linaro.org>
4064
4065         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4066         gdb_target_obs.
4067         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4068         Likewise.
4069         (i[34567]86-*-linux*): Likewise.
4070
4071 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4072
4073         * dwarf2expr.h (dwarf_stack_value): Add constructor.
4074         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4075         <stack>: Change type to std::vector.
4076         <stack_len, stack_allocated>: Remove.
4077         <grow_stack>: Remove.
4078         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4079         (dwarf_expr_context::~dwarf_expr_context): Remove.
4080         (dwarf_expr_context::grow_stack): Remove.
4081         (dwarf_expr_context::push): Adjust.
4082         (dwarf_expr_context::pop): Adjust.
4083         (dwarf_expr_context::fetch): Adjust.
4084         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4085         (dwarf_expr_context::stack_empty_p): Adjust.
4086         (dwarf_expr_context::execute_stack_op): Adjust.
4087
4088 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4089
4090         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4091         return type to bool.
4092         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4093
4094 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4095
4096         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4097         Change type to bool.
4098         (dwarf_stack_value) <in_stack_memory>: Likewise.
4099         (dwarf_expr_context) <push_address>: Change parameter type to
4100         bool.
4101         <fetch_in_stack_memory>: Change return type to bool.
4102         <push>: Change parameter type to bool.
4103         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4104         to bool.
4105         (dwarf_expr_context::push_address): Likewise.
4106         (dwarf_expr_context::fetch_in_stack_memory): Change return type
4107         to bool.
4108         (dwarf_expr_context::execute_stack_op): Adjust.
4109         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4110
4111 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4112
4113         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4114         (struct dwarf_expr_context) <n_pieces>: Remove.
4115         <pieces>: Change type to std::vector.
4116         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4117         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4118         pieces.
4119         (dwarf_expr_context::add_piece): Adjust.
4120         * dwarf2loc.c (struct piece_closure): Initialize fields.
4121         <n_pieces>: Remove.
4122         <pieces>: Change type to std::vector.
4123         (allocate_piece_closure): Adjust, change parameter to
4124         std::vector rvalue and std::move it to piece_closure.
4125         (rw_pieced_value): Adjust.
4126         (check_pieced_synthetic_pointer): Adjust.
4127         (indirect_synthetic_pointer): Adjust.
4128         (coerce_pieced_ref): Adjust.
4129         (free_pieced_value_closure):  Adjust.  Use delete to free
4130         piece_closure.
4131         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
4132         to allocate_piece_closure.
4133         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4134
4135 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4136
4137         * probe.h (probe_ops_cp): Remove typedef.
4138         (DEF_VEC_P (probe_ops_cp)): Remove.
4139         (all_probe_ops): Change type to std::vector.
4140         * probe.c (info_probes_for_ops): Adjust to vector change.
4141         (probe_linespec_to_ops): Likewise.
4142         (all_probe_ops): Change type to std::vector.
4143         (_initialize_probe): Adjust to vector change.
4144         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
4145         * elfread.c (elf_get_probes): Likewise.
4146         * stap-probe.c (_initialize_stap_probe): Likewise.
4147
4148 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4149
4150         * probe.h (struct bound_probe): Define constructors.
4151         * probe.c (bound_probe_s): Remove typedef.
4152         (DEF_VEC_O (bound_probe_s)): Remove VEC.
4153         (collect_probes): Change return type to std::vector, remove
4154         cleanup.
4155         (compare_probes): Return bool, change parameter type.  Change
4156         semantic to "less than".
4157         (gen_ui_out_table_header_info): Change parameter to std::vector
4158         and update.
4159         (exists_probe_with_pops): Likewise.
4160         (info_probes_for_ops): Update to std::vector change.
4161         (enable_probes_command): Likewise.
4162         (disable_probes_command): Likewise.
4163
4164 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4165
4166         * probe.h (struct probe_ops) <get_probes>: Change parameter from
4167         vec to std::vector.
4168         * probe.c (parse_probes_in_pspace): Update.
4169         (find_probes_in_objfile): Update.
4170         (find_probe_by_pc): Update.
4171         (collect_probes): Update.
4172         (probe_any_get_probes): Update.
4173         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
4174         return type to reference to std::vector.
4175         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
4176         std::vector and update.
4177         (dtrace_process_dof): Likewise.
4178         (dtrace_get_probes): Likewise.
4179         * elfread.c (elf_get_probes): Change return type to std::vector,
4180         store an std::vector in bfd_data.
4181         (probe_key_free): Update to std::vector.
4182         * stap-probe.c (handle_stap_probe): Change parameter to
4183         std::vector and update.
4184         (stap_get_probes): Likewise.
4185         * symfile-debug.c (debug_sym_get_probes): Change return type to
4186         std::vector and update.
4187
4188 2017-09-11  Tom Tromey  <tom@tromey.com>
4189
4190         * breakpoint.c (program_breakpoint_here_p): Update.
4191         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
4192         from make_show_memory_breakpoints_cleanup.  Return a
4193         scoped_restore_tmpl<int>.
4194         (restore_show_memory_breakpoints): Remove.
4195         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
4196         * mem-break.c (memory_validate_breakpoint): Update.
4197         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
4198         (ia64_memory_remove_breakpoint): Update.
4199         (ia64_breakpoint_from_pc): Update.
4200         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
4201         from make_show_memory_breakpoints_cleanup.
4202
4203 2017-09-11  Tom Tromey  <tom@tromey.com>
4204
4205         * d-namespace.c (d_lookup_symbol): Use std::string.
4206         (find_symbol_in_baseclass): Likewise.
4207
4208 2017-09-11  Tom Tromey  <tom@tromey.com>
4209
4210         * ctf.c (ctf_start): Use std::string.
4211
4212 2017-09-11  Tom Tromey  <tom@tromey.com>
4213
4214         * ada-lang.c (is_known_support_routine): Update.
4215         (ada_unhandled_exception_name_addr_from_raise): Update.
4216         * guile/scm-frame.c (gdbscm_frame_name): Update.
4217         * python/py-frame.c (frapy_name): Update.
4218         (frapy_function): Update.
4219         * stack.h (find_frame_funname): Update.
4220         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
4221         (print_frame): Update.
4222
4223 2017-09-11  Tom Tromey  <tom@tromey.com>
4224
4225         * findcmd.c (put_bits): Take a gdb::byte_vector.
4226         (parse_find_args): Return gdb::byte_vector.  "args" now const.
4227         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
4228         cleanups.
4229         (find_command): Update.
4230
4231 2017-09-11  Tom Tromey  <tom@tromey.com>
4232
4233         * cli/cli-script.c (class scoped_restore_hook_in): New.
4234         (clear_hook_in_cleanup): Remove.
4235         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
4236         scoped_restore_hook_in.
4237
4238 2017-09-11  Tom Tromey  <tom@tromey.com>
4239
4240         * cli/cli-script.c (restore_interp): Remove.
4241         (read_command_lines): Use scoped_restore_interp.
4242         * interps.c (scoped_restore_interp::set_temp): Rename from
4243         interp_set_temp.
4244         * interps.h (class scoped_restore_interp): New.
4245         (interp_set_temp): Remove.
4246
4247 2017-09-11  Tom Tromey  <tom@tromey.com>
4248
4249         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4250         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
4251         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
4252         scoped_restore.
4253         (mi_cmd_break_insert_1): Update.
4254         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
4255         scoped_restore.
4256
4257 2017-09-11  Tom Tromey  <tom@tromey.com>
4258
4259         * demangle.c (demangle_command): Update.
4260         * breakpoint.c (disable_command): Update.
4261         (enable_command): Update.
4262         (find_location_by_number): Make "number" const.  Use
4263         get_number_trailer.
4264         * cli/cli-utils.c (extract_arg): Return std::string.
4265         * probe.c (parse_probe_linespec): Update.  Change types.
4266         (collect_probes): Take string arguments.
4267         (parse_probe_linespec): Likewise.
4268         (info_probes_for_ops): Update.
4269         (enable_probes_command): Update.
4270         (disable_probes_command): Update.
4271         * break-catch-sig.c (catch_signal_split_args): Update.
4272         * mi/mi-parse.c (mi_parse): Update.
4273
4274 2017-09-11  Tom Tromey  <tom@tromey.com>
4275
4276         * language.h (language_enum): Make argument const.
4277         * language.c (language_enum): Make argument const.
4278
4279 2017-09-11  Tom Tromey  <tom@tromey.com>
4280
4281         * common/common-utils.h (skip_to_space): Remove macro, redeclare
4282         as function.
4283         (skip_to_space): Rename from skip_to_space_const.
4284         * common/common-utils.c (skip_to_space): New function.
4285         (skip_to_space): Rename from skip_to_space_const.
4286         * cli/cli-utils.h (get_number): Rename from get_number_const.
4287         (extract_arg): Rename from extract_arg_const.
4288         * cli/cli-utils.c (get_number): Rename from get_number_const.
4289         (extract_arg): Rename from extract_arg_const.
4290         (number_or_range_parser::get_number): Use ::get_number.
4291         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
4292         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
4293         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
4294         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
4295         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
4296         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
4297         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
4298         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
4299
4300 2017-09-11  Tom Tromey  <tom@tromey.com>
4301
4302         * python/python.c (do_start_initialization): Use
4303         py-event-types.def to initialize types.
4304         Define all object type structures.
4305         * python/python-internal.h: Don't declare event initialization
4306         functions.
4307         * python/py-threadevent.c (thread_event_object_type): Don't
4308         define.
4309         * python/py-stopevent.c (stop_event_object_type): Don't define.
4310         * python/py-signalevent.c (signal_event_object_type): Don't
4311         declare or define.
4312         * python/py-newobjfileevent.c (new_objfile_event_object_type)
4313         (clear_objfiles_event_object_type): Don't declare or define.
4314         * python/py-infevents.c (inferior_call_pre_event_object_type)
4315         (inferior_call_post_event_object_type)
4316         (register_changed_event_object_type)
4317         (memory_changed_event_object_type): Don't declare or define.
4318         * python/py-inferior.c (new_thread_event_object_type)
4319         (new_inferior_event_object_type)
4320         (inferior_deleted_event_object_type): Don't declare or define.
4321         * python/py-exitedevent.c (exited_event_object_type): Don't
4322         declare or define.
4323         * python/py-evts.c (gdbpy_initialize_py_events): Use
4324         py-all-events.def.
4325         * python/py-events.h (thread_event_object_type): Don't declare.
4326         (events_object): Use py-all-events.def.
4327         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
4328         py-event-types.def.
4329         * python/py-event-types.def: New file.
4330         * python/py-continueevent.c (create_continue_event_object): Don't
4331         declare or define.
4332         * python/py-bpevent.c (breakpoint_event_object_type): Don't
4333         declare or define.
4334         * python/py-all-events.def: New file.
4335
4336 2017-09-11  Tom Tromey  <tom@tromey.com>
4337
4338         * python/py-threadevent.c (create_thread_event_object): Return
4339         gdbpy_ref.
4340         * python/py-stopevent.h (create_stop_event_object)
4341         (create_breakpoint_event_object, create_signal_event_object):
4342         Update.
4343         * python/py-stopevent.c (create_stop_event_object): Return
4344         gdbpy_ref.
4345         (emit_stop_event): Update.
4346         * python/py-signalevent.c (create_signal_event_object): Return
4347         gdbpy_ref.
4348         * python/py-infevents.c (create_inferior_call_event_object):
4349         Update.
4350         * python/py-event.h (create_event_object)
4351         (create_thread_event_object): Update.
4352         * python/py-event.c (create_event_object): Return gdbpy_ref.
4353         * python/py-continueevent.c: Return gdbpy_ref.
4354         * python/py-bpevent.c (create_breakpoint_event_object): Return
4355         gdbpy_ref.
4356
4357 2017-09-11  Tom Tromey  <tom@tromey.com>
4358
4359         PR python/15622:
4360         * NEWS: Add entry.
4361         * python/python.c (do_start_initialization): Initialize new event
4362         types.
4363         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
4364         (gdbpy_initialize_inferior_deleted_event)
4365         (gdbpy_initialize_new_thread_event): Declare.
4366         * python/py-threadevent.c (create_thread_event_object): Add option
4367         "thread" parameter.
4368         * python/py-inferior.c (new_thread_event_object_type)
4369         (new_inferior_event_object_type)
4370         (inferior_deleted_event_object_type): Declare.
4371         (python_new_inferior, python_inferior_deleted): New functions.
4372         (add_thread_object): Emit new_thread event.
4373         (gdbpy_initialize_inferior): Attach new functions to corresponding
4374         observers.
4375         (new_thread, new_inferior, inferior_deleted): Define new event
4376         types.
4377         * python/py-evts.c (gdbpy_initialize_py_events): Add new
4378         registries.
4379         * python/py-events.h (events_object) <new_inferior,
4380         inferior_deleted, new_thread>: New fields.
4381         * python/py-event.h (create_thread_event_breakpoint): Add optional
4382         "thread" parameter.
4383
4384 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4385
4386         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
4387         check current_ui instead.
4388         (internal_vproblem): Likewise.
4389
4390 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
4391
4392         * thread.c (print_thread_info_1): Remove unnecessary calls to
4393         uiout->is_mi_like_p.
4394
4395 2017-09-09  Tom Tromey  <tom@tromey.com>
4396
4397         * namespace.h (add_using_directive): Update.
4398         * namespace.c (add_using_directive): Change type of excludes to
4399         std::vector.
4400         * dwarf2read.c (read_import_statement): Use std::vector.
4401         (read_namespace): Update.
4402         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4403
4404 2017-09-09  Tom Tromey  <tom@tromey.com>
4405
4406         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
4407
4408 2017-09-09  Tom Tromey  <tom@tromey.com>
4409
4410         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
4411
4412 2017-09-09  Tom Tromey  <tom@tromey.com>
4413
4414         * stack.c (func_command): Use gdb::def_vector.
4415
4416 2017-09-09  Tom Tromey  <tom@tromey.com>
4417
4418         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
4419         ui_out_emit_list, ui_out_emit_tuple.
4420         (mi_cmd_var_update): Likewise.
4421
4422 2017-09-09  Tom Tromey  <tom@tromey.com>
4423
4424         * mi/mi-interp.c (mi_user_selected_context_changed): Use
4425         ui_out_redirect_pop.
4426         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
4427         ui_out_redirect_pop.
4428         * utils.c (do_ui_out_redirect_pop)
4429         (make_cleanup_ui_out_redirect_pop): Remove.
4430         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
4431         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
4432         * ui-out.h (ui_out_redirect_pop): New class.
4433
4434 2017-09-09  Tom Tromey  <tom@tromey.com>
4435
4436         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
4437         (list_available_thread_groups, mi_cmd_list_thread_groups)
4438         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
4439         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
4440         Likewise.
4441
4442 2017-09-09  Tom Tromey  <tom@tromey.com>
4443
4444         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
4445         ui_out_emit_tuple.
4446
4447 2017-09-09  Tom Tromey  <tom@tromey.com>
4448
4449         * target.c (flash_erase_command): Use ui_out_emit_tuple.
4450         * stack.c (print_frame): Use ui_out_emit_tuple.
4451         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
4452         (info_spu_mailbox_command, info_spu_dma_command)
4453         (info_spu_proxydma_command): Likewise.
4454         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
4455         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
4456         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
4457         ui_out_emit_tuple.
4458         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
4459
4460 2017-09-09  Tom Tromey  <tom@tromey.com>
4461
4462         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
4463         (class ui_out_emit_table): Update comment.
4464         * ui-out.c (do_cleanup_table_end)
4465         (make_cleanup_ui_out_table_begin_end): Remove.
4466         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
4467         (info_spu_dma_cmdlist): Likewise.
4468         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
4469         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
4470         ui_out_emit_table.
4471
4472 2017-09-09  Tom Tromey  <tom@tromey.com>
4473
4474         * thread.c (print_thread_info_1): Use ui_out_emit_table,
4475         ui_out_emit_list, gdb::optional.
4476
4477 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
4478
4479         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
4480         prototype.
4481         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
4482         prototype.
4483         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
4484         prototype.
4485         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
4486         * ada-exp.y: Remove _initialize_ada_exp prototype.
4487         * ada-lang.c: Remove _initialize_ada_language prototype.
4488         * ada-tasks.c: Remove _initialize_tasks prototype.
4489         * addrmap.c: Remove _initialize_addrmap prototype.
4490         * agent.c: Remove _initialize_agent prototype.
4491         * aix-thread.c: Remove _initialize_aix_thread prototype.
4492         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
4493         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
4494         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
4495         prototype.
4496         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
4497         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
4498         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
4499         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
4500         prototype.
4501         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
4502         prototype.
4503         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
4504         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
4505         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
4506         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
4507         prototype.
4508         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
4509         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
4510         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
4511         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
4512         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4513         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
4514         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
4515         prototype.
4516         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
4517         prototype.
4518         * annotate.c: Remove _initialize_annotate prototype.
4519         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
4520         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
4521         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
4522         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
4523         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
4524         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
4525         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
4526         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
4527         prototype.
4528         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
4529         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
4530         * auto-load.c: Remove _initialize_auto_load prototype.
4531         * auxv.c: Remove _initialize_auxv prototype.
4532         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
4533         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
4534         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
4535         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
4536         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
4537         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
4538         prototype.
4539         * break-catch-throw.c: Remove _initialize_break_catch_throw
4540         prototype.
4541         * breakpoint.c: Remove _initialize_breakpoint prototype.
4542         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
4543         * btrace.c: Remove _initialize_btrace prototype.
4544         * charset.c: Remove _initialize_charset prototype.
4545         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
4546         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
4547         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
4548         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
4549         * cli/cli-script.c: Remove _initialize_cli_script prototype.
4550         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
4551         * coffread.c: Remove _initialize_coffread prototype.
4552         * compile/compile.c: Remove _initialize_compile prototype.
4553         * complaints.c: Remove _initialize_complaints prototype.
4554         * completer.c: Remove _initialize_completer prototype.
4555         * copying.awk: Remove _initialize_copying prototype.
4556         * copying.c: Regenerate.
4557         * core-regset.c: Remove _initialize_core_regset prototype.
4558         * corefile.c: Remove _initialize_core prototype.
4559         * corelow.c: Remove _initialize_corelow prototype.
4560         * cp-abi.c: Remove _initialize_cp_abi prototype.
4561         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
4562         * cp-support.c: Remove _initialize_cp_support prototype.
4563         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
4564         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
4565         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
4566         * ctf.c: Remove _initialize_ctf prototype.
4567         * d-lang.c: Remove _initialize_d_language prototype.
4568         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
4569         prototype.
4570         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
4571         * dbxread.c: Remove _initialize_dbxread prototype.
4572         * dcache.c: Remove _initialize_dcache prototype.
4573         * demangle.c: Remove _initialize_demangler prototype.
4574         * disasm-selftests.c: Remove _initialize_disasm_selftests
4575         prototype.
4576         * disasm.c: Remove _initialize_disasm prototype.
4577         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
4578         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
4579         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
4580         prototype.
4581         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
4582         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
4583         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
4584         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
4585         * elfread.c: Remove _initialize_elfread prototype.
4586         * exec.c: Remove _initialize_exec prototype.
4587         * extension.c: Remove _initialize_extension prototype.
4588         * f-lang.c: Remove _initialize_f_language prototype.
4589         * f-valprint.c: Remove _initialize_f_valprint prototype.
4590         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
4591         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
4592         * filesystem.c: Remove _initialize_filesystem prototype.
4593         * findcmd.c: Remove _initialize_mem_search prototype.
4594         * fork-child.c: Remove _initialize_fork_child prototype.
4595         * frame-base.c: Remove _initialize_frame_base prototype.
4596         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
4597         * frame.c: Remove _initialize_frame prototype.
4598         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
4599         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
4600         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
4601         * gcore.c: Remove _initialize_gcore prototype.
4602         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
4603         * gdbarch.c: Regenerate.
4604         * gdbarch.sh: Remove _initialize_gdbarch prototype.
4605         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
4606         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
4607         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
4608         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
4609         * go-lang.c: Remove _initialize_go_language prototype.
4610         * go32-nat.c: Remove _initialize_go32_nat prototype.
4611         * guile/guile.c: Remove _initialize_guile prototype.
4612         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4613         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4614         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4615         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4616         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4617         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4618         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4619         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4620         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
4621         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
4622         prototype.
4623         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
4624         prototype.
4625         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
4626         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
4627         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
4628         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
4629         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4630         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4631         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4632         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4633         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4634         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4635         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4636         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4637         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4638         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4639         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4640         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4641         prototype.
4642         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4643         prototype.
4644         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4645         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4646         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4647         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4648         * infcall.c: Remove _initialize_infcall prototype.
4649         * infcmd.c: Remove _initialize_infcmd prototype.
4650         * inferior.c: Remove _initialize_inferiors prototype.
4651         * inflow.c: Remove _initialize_inflow prototype.
4652         * infrun.c: Remove _initialize_infrun prototype.
4653         * interps.c: Remove _initialize_interpreter prototype.
4654         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4655         * jit.c: Remove _initialize_jit prototype.
4656         * language.c: Remove _initialize_language prototype.
4657         * linux-fork.c: Remove _initialize_linux_fork prototype.
4658         * linux-nat.c: Remove _initialize_linux_nat prototype.
4659         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4660         * linux-thread-db.c: Remove _initialize_thread_db prototype.
4661         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4662         * m2-lang.c: Remove _initialize_m2_language prototype.
4663         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4664         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4665         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4666         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4667         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4668         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4669         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4670         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4671         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4672         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4673         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4674         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4675         * machoread.c: Remove _initialize_machoread prototype.
4676         * macrocmd.c: Remove _initialize_macrocmd prototype.
4677         * macroscope.c: Remove _initialize_macroscope prototype.
4678         * maint.c: Remove _initialize_maint_cmds prototype.
4679         * mdebugread.c: Remove _initialize_mdebugread prototype.
4680         * memattr.c: Remove _initialize_mem prototype.
4681         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4682         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4683         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4684         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4685         * mi/mi-main.c: Remove _initialize_mi_main prototype.
4686         * microblaze-linux-tdep.c: Remove
4687         _initialize_microblaze_linux_tdep prototype.
4688         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4689         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4690         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4691         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4692         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4693         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4694         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4695         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4696         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4697         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4698         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4699         prototype.
4700         * mipsread.c: Remove _initialize_mipsread prototype.
4701         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4702         prototype.
4703         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4704         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4705         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4706         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4707         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4708         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4709         prototype.
4710         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4711         * nto-procfs.c: Remove _initialize_procfs prototype.
4712         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4713         * objc-lang.c: Remove _initialize_objc_language prototype.
4714         * objfiles.c: Remove _initialize_objfiles prototype.
4715         * observer.c: Remove observer_test_first_notification_function,
4716         observer_test_second_notification_function,
4717         observer_test_third_notification_function, and
4718         _initialize_observer prototypes.
4719         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4720         * osabi.c: Remove _initialize_gdb_osabi prototype.
4721         * osdata.c: Remove _initialize_osdata prototype.
4722         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4723         * parse.c: Remove _initialize_parse prototype.
4724         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4725         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4726         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4727         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4728         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4729         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4730         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4731         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4732         * printcmd.c: Remove _initialize_printcmd prototype.
4733         * probe.c: Remove _initialize_probe prototype.
4734         * proc-api.c: Remove _initialize_proc_api prototype.
4735         * proc-events.c: Remove _initialize_proc_events prototype.
4736         * proc-service.c: Remove _initialize_proc_service prototype.
4737         * procfs.c: Remove _initialize_procfs prototype.
4738         * psymtab.c: Remove _initialize_psymtab prototype.
4739         * python/python.c: Remove _initialize_python prototype.
4740         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4741         * record-btrace.c: Remove _initialize_record_btrace prototype.
4742         * record-full.c: Remove _initialize_record_full prototype.
4743         * record.c: Remove _initialize_record prototype.
4744         * regcache.c: Remove _initialize_regcache prototype.
4745         * reggroups.c: Remove _initialize_reggroup prototype.
4746         * remote-notif.c: Remove _initialize_notif prototype.
4747         * remote-sim.c: Remove _initialize_remote_sim prototype.
4748         * remote.c: Remove _initialize_remote prototype.
4749         * reverse.c: Remove _initialize_reverse prototype.
4750         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4751         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4752         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4753         prototype.
4754         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4755         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4756         * rust-exp.y: Remove _initialize_rust_exp prototype.
4757         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4758         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4759         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4760         * score-tdep.c: Remove _initialize_score_tdep prototype.
4761         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4762         prototype.
4763         * ser-go32.c: Remove _initialize_ser_dos prototype.
4764         * ser-mingw.c: Remove _initialize_ser_windows prototype.
4765         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4766         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4767         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4768         * serial.c: Remove _initialize_serial prototype.
4769         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4770         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4771         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4772         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4773         * skip.c: Remove _initialize_step_skip prototype.
4774         * sol-thread.c: Remove _initialize_sol_thread prototype.
4775         * solib-aix.c: Remove _initialize_solib_aix prototype.
4776         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4777         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4778         * solib-frv.c: Remove _initialize_frv_solib prototype.
4779         * solib-spu.c: Remove _initialize_spu_solib prototype.
4780         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4781         * solib-target.c: Remove _initialize_solib_target prototype.
4782         * solib.c: Remove _initialize_solib prototype.
4783         * source.c: Remove _initialize_source prototype.
4784         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4785         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4786         prototype.
4787         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4788         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4789         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4790         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4791         prototype.
4792         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4793         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4794         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4795         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4796         prototype.
4797         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4798         prototype.
4799         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4800         prototype.
4801         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4802         prototype.
4803         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4804         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4805         prototype.
4806         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4807         prototype.
4808         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4809         prototype.
4810         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4811         prototype.
4812         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4813         prototype.
4814         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4815         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4816         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4817         * stabsread.c: Remove _initialize_stabsread prototype.
4818         * stack.c: Remove _initialize_stack prototype.
4819         * stap-probe.c: Remove _initialize_stap_probe prototype.
4820         * std-regs.c: Remove _initialize_frame_reg prototype.
4821         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4822         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4823         * symfile.c: Remove _initialize_symfile prototype.
4824         * symmisc.c: Remove _initialize_symmisc prototype.
4825         * symtab.c: Remove _initialize_symtab prototype.
4826         * target-dcache.c: Remove _initialize_target_dcache prototype.
4827         * target-descriptions.c: Remove _initialize_target_descriptions
4828         prototype.
4829         * thread.c: Remove _initialize_thread prototype.
4830         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4831         prototype.
4832         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4833         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4834         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4835         prototype.
4836         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4837         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4838         * tracefile.c: Remove _initialize_tracefile prototype.
4839         * tracepoint.c: Remove _initialize_tracepoint prototype.
4840         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4841         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4842         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4843         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4844         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4845         * tui/tui-win.c: Remove _initialize_tui_win prototype.
4846         * tui/tui.c: Remove _initialize_tui prototype.
4847         * typeprint.c: Remove _initialize_typeprint prototype.
4848         * user-regs.c: Remove _initialize_user_regs prototype.
4849         * utils.c: Remove _initialize_utils prototype.
4850         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4851         * valarith.c: Remove _initialize_valarith prototype.
4852         * valops.c: Remove _initialize_valops prototype.
4853         * valprint.c: Remove _initialize_valprint prototype.
4854         * value.c: Remove _initialize_values prototype.
4855         * varobj.c: Remove _initialize_varobj prototype.
4856         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4857         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4858         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4859         * windows-nat.c: Remove _initialize_windows_nat,
4860         _initialize_check_for_gdb_ini, and _initialize_loadable
4861         prototypes.
4862         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4863         * xcoffread.c: Remove _initialize_xcoffread prototype.
4864         * xml-support.c: Remove _initialize_xml_support prototype.
4865         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4866         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4867         prototype.
4868         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4869         prototype.
4870         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4871
4872 2017-09-08  Keith Seitz  <keiths@redhat.com>
4873
4874         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4875         field.
4876
4877 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
4878
4879         * f-valprint.c (f_val_print): Remove check for one byte
4880         sized integers. Remove printing of character type.
4881
4882 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
4883             Christoph Weinmann  <christoph.t.weinmann@intel.com>
4884             Bernhard Heckel  <bernhard.heckel@intel.com>
4885
4886         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4887         to maintain proper indentation when printing pointers/refs.
4888
4889 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4890
4891         GDB 8.0.1 released.
4892
4893 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4894
4895         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4896
4897 2017-09-05  Tom Tromey  <tom@tromey.com>
4898
4899         * parse.c (funcall_chain): Now a std::vector.
4900         (start_arglist, end_arglist): Simplify.
4901         (free_funcalls): Remove.
4902         (parse_exp_in_context_1): Remove cleanup.
4903
4904 2017-09-05  Tom Tromey  <tom@tromey.com>
4905
4906         * go-exp.y (go_parse): Don't create a cleanup.
4907
4908 2017-09-05  Tom Tromey  <tom@tromey.com>
4909
4910         * d-exp.y (PrimaryExpression): Use std::string.
4911         (d_parse): Don't create a cleanup.
4912
4913 2017-09-05  Tom Tromey  <tom@tromey.com>
4914
4915         * utils.c (do_clear_parser_state): Remove.
4916         (make_cleanup_clear_parser_state): Remove.
4917         * p-exp.y (pascal_parse): Use scoped_restore.
4918         * m2-exp.y (m2_parse): Use scoped_restore.
4919         * f-exp.y (f_parse): Use scoped_restore.
4920         * d-exp.y (d_parse): Use scoped_restore.
4921         * c-exp.y (c_parse): Use scoped_restore.
4922         * ada-exp.y (ada_parse): Use scoped_restore.
4923         * utils.h (make_cleanup_clear_parser_state): Remove.
4924
4925 2017-09-06  Keith Seitz  <keiths@redhat.com>
4926
4927         * dwarf2read.c (dw2_linkage_name_attr): New function.
4928         (dw2_linkage_name): New function.
4929         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4930         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4931         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4932
4933 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4934
4935         * config/djgpp/djconfig.sh: Correct shell portability issue.
4936
4937 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4938
4939         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4940
4941 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4942
4943         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4944         * NEWS: Mention new FreeBSD/mips native configuration.
4945         * configure.host: Add aarch64*-*-freebsd*.
4946         * configure.nat: Likewise.
4947         * aarch64-fbsd-nat.c: New file.
4948
4949 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4950
4951         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4952         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4953         * NEWS: Mention new FreeBSD/aarch64 target.
4954         * configure.tgt: Add aarch64*-*-freebsd*.
4955         * aarch64-fbsd-tdep.c: New file.
4956         * aarch64-fbsd-tdep.h: New file.
4957
4958 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4959
4960         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4961
4962 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
4963
4964         * parse.c (find_minsym_type_and_address): Don't relocate addresses
4965         of TLS symbols.
4966
4967 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4968
4969         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4970         call.
4971
4972 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4973
4974         * infrun.c (follow_exec): Call add_thread after
4975         target_find_description.
4976
4977 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4978
4979         * infrun.c (handle_inferior_event_1): When exec'ing, read
4980         stop_pc after follow_exec.
4981
4982 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4983
4984         * remote.c (process_g_packet): Update error message.
4985
4986 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4987
4988         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4989         targets.
4990
4991 2017-09-05  Pedro Alves  <palves@redhat.com>
4992
4993         * eval.c (eval_call, evaluate_funcall): New functions, factored
4994         out from ...
4995         (evaluate_subexp_standard): ... this.
4996
4997 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4998
4999         * amd64-tdep.c (amd64_target_description): Create target
5000         descriptions.
5001         (_initialize_amd64_tdep): Don't call functions
5002         initialize_tdesc_amd64_*.  Add self tests.
5003         * arch/amd64.c (amd64_create_target_description): Add parameter
5004         is_linux.  Call set_tdesc_osabi if is_linux is true.
5005         * arch/amd64.h (amd64_create_target_description): Update the
5006         declaration.
5007         * arch/i386.c (i386_create_target_description): Add parameter
5008         is_linux.  Call set_tdesc_osabi if is_linux is true.
5009         * arch/i386.h (i386_create_target_description): Update
5010         declaration.
5011         * configure.tgt: Add i386.o to gdb_target_obs.
5012         * features/Makefile (XMLTOC): Remove i386/*.xml.
5013         * features/i386/amd64-avx-avx512.c: Remove.
5014         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5015         * features/i386/amd64-avx-mpx.c: Remove.
5016         * features/i386/amd64-avx.c: Remove.
5017         * features/i386/amd64-mpx.c: Remove.
5018         * features/i386/amd64.c: Remove.
5019         * features/i386/i386-avx-avx512.c: Remove.
5020         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5021         * features/i386/i386-avx-mpx.c: Remove.
5022         * features/i386/i386-avx.c: Remove.
5023         * features/i386/i386-mmx.c: Remove.
5024         * features/i386/i386-mpx.c: Remove.
5025         * features/i386/i386.c: Remove.
5026         * i386-tdep.c: Don't include features/i386/i386*.c., include
5027         target-descriptions.h and arch/i386.h.
5028         (i386_target_description): Create target descriptions.
5029         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5030         functions.  Do self tests.
5031
5032 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5033
5034         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5035         * features/i386/amd64-avx-avx512-linux.c: Removed.
5036         * features/i386/amd64-avx-linux.c: Removed.
5037         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5038         * features/i386/amd64-avx-mpx-linux.c: Removed.
5039         * features/i386/amd64-linux.c: Removed.
5040         * features/i386/amd64-mpx-linux.c: Removed.
5041         * features/i386/x32-avx-avx512-linux.c: Removed.
5042         * features/i386/x32-avx-linux.c: Removed.
5043         * features/i386/x32-linux.c: Removed.
5044
5045 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5046
5047         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
5048         features/i386/*.c.
5049         (amd64_linux_read_description): Call
5050         amd64_create_target_description.
5051         * arch/amd64.c: New file.
5052         * arch/amd64.h: New file.
5053         * configure.tgt (x86_64-*-linux*): Append amd64.o.
5054         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5055
5056 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5057
5058         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5059         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
5060         (amd64_linux_read_description): Create target descriptions.
5061         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5062         functions.  Add unit tests.
5063         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5064         x32-core.xml.
5065         * features/i386/64bit-avx.c: Generated.
5066         * features/i386/64bit-avx512.c: Generated.
5067         * features/i386/64bit-core.c: Generated.
5068         * features/i386/64bit-linux.c: Generated.
5069         * features/i386/64bit-mpx.c: Generated.
5070         * features/i386/64bit-pkeys.c: Generated.
5071         * features/i386/64bit-segments.c: Generated.
5072         * features/i386/64bit-sse.c: Generated.
5073         * features/i386/x32-core.c: Generated.
5074         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5075         c files for amd64-linux and x32-linux.
5076
5077 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5078
5079         * amd64-linux-tdep.c (amd64_linux_read_description): New
5080         function.
5081         (amd64_linux_core_read_description): Call
5082         amd64_linux_read_description.
5083         (amd64_linux_init_abi): Likewise.
5084         (amd64_x32_linux_init_abi): Likewise.
5085         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5086         * x86-linux-nat.c (x86_linux_read_description): Call
5087         amd64_linux_read_description.
5088
5089 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5090
5091         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5092         comments.
5093
5094 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5095
5096         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5097         * features/i386/i386-avx-avx512-linux.c: Remove.
5098         * features/i386/i386-avx-linux.c: Remove.
5099         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5100         * features/i386/i386-avx-mpx-linux.c: Remove.
5101         * features/i386/i386-linux.c: Remove.
5102         * features/i386/i386-mmx-linux.c: Remove.
5103         * features/i386/i386-mpx-linux.c: Remove.
5104
5105 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5106
5107         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5108         (SFILES): Add arch/i386.c.
5109         (HFILES_NO_SRCDIR): Add arch/i386.h.
5110         * arch/i386.c: New file.
5111         * arch/i386.h: New file.
5112         * arch/tdesc.h (allocate_target_description): Declare.
5113         (set_tdesc_architecture): Declare.
5114         (set_tdesc_osabi): Declare.
5115         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5116         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5117         include arch/i386.h.
5118         (i386_linux_read_description): Remove code and call
5119         i386_create_target_description.
5120         (set_tdesc_architecture): New function.
5121         (set_tdesc_osabi): New function.
5122         * target-descriptions.h (allocate_target_description): Remove.
5123
5124 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5125
5126         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5127         * target-descriptions.c (tdesc_create_feature): Likewise, and
5128         adjust code.
5129         * features/i386/32bit-avx.c: Re-generated.
5130         * features/i386/32bit-avx512.c: Re-generated.
5131         * features/i386/32bit-core.c: Re-generated.
5132         * features/i386/32bit-linux.c: Re-generated.
5133         * features/i386/32bit-mpx.c: Re-generated.
5134         * features/i386/32bit-pkeys.c: Re-generated.
5135         * features/i386/32bit-sse.c: Re-generated.
5136
5137 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5138
5139         * regformats/regdef.h (struct reg): Override operator == and !=.
5140
5141 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5142
5143         * arch/tdesc.h: New file.
5144         * regformats/regdat.sh: Generate code using tdesc_create_reg.
5145         * target-descriptions.c: Update comments.
5146         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
5147         declarations.
5148         * features/i386/32bit-avx.c: Re-generated.
5149         * features/i386/32bit-avx512.c: Re-generated.
5150         * features/i386/32bit-core.c: Re-generated.
5151         * features/i386/32bit-linux.c: Re-generated.
5152         * features/i386/32bit-mpx.c: Re-generated.
5153         * features/i386/32bit-pkeys.c: Re-generated.
5154         * features/i386/32bit-sse.c: Re-generated.
5155
5156 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5157
5158         * regformats/regdat.sh: Update generated code.
5159
5160 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5161
5162         * regformats/regdat.sh: Adjust code order.
5163
5164 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5165
5166         * expprint.c (dump_subexp_body_standard): Use constant format
5167         string in fprintf_filtered call.
5168
5169 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5170
5171         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
5172         NetBSD/i386.
5173         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
5174
5175 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5176
5177         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
5178
5179 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5180
5181         * bsd-kvm.o: Define _KMEMUSER.
5182         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
5183         * configure: Regenerate.
5184
5185 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5186
5187         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
5188         * i386-fbsd-nat.c: Likewise.
5189
5190 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5191
5192         * unittests/array-view-selftests.c: Add include of <array>.
5193
5194 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5195
5196         * spu-tdep.c (flush_ea_cache): Add missing argument to
5197         call_function_by_hand.
5198
5199 2017-09-04  Pedro Alves  <palves@redhat.com>
5200
5201         * NEWS (Safer support for debugging with no debug info): New.
5202
5203 2017-09-04  Pedro Alves  <palves@redhat.com>
5204
5205         * c-exp.y (function_method, function_method_void): Add current
5206         instance flags to TYPE_INSTANCE.
5207         * dwarf2read.c (check_modifier): New.
5208         (compute_delayed_physnames): Assert that only C++ adds delayed
5209         physnames.  Mark fn_fields as const/volatile depending on
5210         physname.
5211         * eval.c (make_params): New type_instance_flags parameter.  Use
5212         it as the new type's instance flags.
5213         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
5214         flags element and pass it to make_params.
5215         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
5216         instance flags element.
5217         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
5218         * gdbtypes.h: Include "enum-flags.h".
5219         (type_instance_flags): New enum-flags type.
5220         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
5221         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
5222         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
5223         (follow_type_instance_flags): New function.
5224         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
5225         * parser-defs.h (follow_type_instance_flags): Declare.
5226         * valops.c (value_struct_elt_for_reference): const/volatile must
5227         match too.
5228
5229 2017-09-04  Pedro Alves  <palves@redhat.com>
5230
5231         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
5232         function/method scopes; lookup the nested name as a function local
5233         static variable.
5234
5235 2017-09-04  Pedro Alves  <palves@redhat.com>
5236
5237         (%type <voidval>): Add function_method.
5238         * c-exp.y (exp): New production for calls with no arguments.
5239         (function_method, function_method_void_or_typelist): New
5240         productions.
5241         (exp): New production for "method()::static_var".
5242         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
5243         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5244         Handle OP_FUNC_STATIC_VAR.
5245         * parse.c (operator_length_standard):
5246         Handle OP_FUNC_STATIC_VAR.
5247
5248 2017-09-04  Pedro Alves  <palves@redhat.com>
5249
5250         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
5251         handling.
5252         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5253         Ditto.
5254         * parse.c (operator_length_standard, operator_check_standard):
5255         Ditto.
5256         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
5257
5258 2017-09-04  Pedro Alves  <palves@redhat.com>
5259
5260         * ax-gdb.c: Include "typeprint.h".
5261         (gen_expr_for_cast): New function.
5262         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
5263         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
5264         type is unknown.
5265         * dwarf2read.c (new_symbol_full): Fallback to int instead of
5266         nodebug_data_symbol.
5267         * eval.c: Include "typeprint.h".
5268         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
5269         Error out if symbol has unknown type.
5270         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
5271         evaluate_subexp_for_cast.
5272         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
5273         OP_VAR_MSYM_VALUE.
5274         (evaluate_subexp_for_cast): New function.
5275         * gdbtypes.c (init_nodebug_var_type): New function.
5276         (objfile_type): Use it to initialize types of variables with no
5277         debug info.
5278         * typeprint.c (error_unknown_type): New.
5279         * typeprint.h (error_unknown_type): New declaration.
5280         * compile/compile-c-types.c (convert_type_basic): Handle
5281         TYPE_CODE_ERROR; warn and fallback to int for variables with
5282         unknown type.
5283
5284 2017-09-04  Pedro Alves  <palves@redhat.com>
5285
5286         * eval.c (evaluate_var_value): New function, factored out from ...
5287         (evaluate_subexp_standard): ... here.
5288
5289 2017-09-04  Pedro Alves  <palves@redhat.com>
5290
5291         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
5292         Remove useless assignments to 'op'.
5293
5294 2017-09-04  Pedro Alves  <palves@redhat.com>
5295
5296         * eval.c (eval_skip_value): New function.
5297         (evaluate_subexp_standard): Use it.
5298
5299 2017-09-04  Pedro Alves  <palves@redhat.com>
5300
5301         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
5302         function name from symbol/minsym and pass it to
5303         error_call_unknown_return_type.
5304
5305 2017-09-04  Pedro Alves  <palves@redhat.com>
5306
5307         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
5308         * ax-gdb.c (gen_msym_var_ref): New function.
5309         (gen_expr): Handle OP_VAR_MSYM_VALUE.
5310         * eval.c (evaluate_var_msym_value): New function.
5311         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
5312         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
5313         to call_function_by_hand.
5314         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5315         Handle OP_VAR_MSYM_VALUE.
5316         (union exp_element) <msymbol>: New field.
5317         * minsyms.h (struct type): Forward declare.
5318         (find_minsym_type_and_address): Declare.
5319         * parse.c (write_exp_elt_msym): New function.
5320         (write_exp_msymbol): Delete, refactored as ...
5321         (find_minsym_type_and_address): ... this new function.
5322         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
5323         (operator_length_standard, operator_check_standard): Handle
5324         OP_VAR_MSYM_VALUE.
5325         * std-operator.def (OP_VAR_MSYM_VALUE): New.
5326
5327 2017-09-04  Pedro Alves  <palves@redhat.com>
5328
5329         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
5330         TYPE_GNU_IFUNC specially here.  Throw error if return type is
5331         unknown.
5332         * ada-typeprint.c (print_func_type): Handle functions with unknown
5333         return type.
5334         * c-typeprint.c (c_type_print_base): Handle functions and methods
5335         with unknown return type.
5336         * compile/compile-c-symbols.c (convert_symbol_bmsym)
5337         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
5338         * compile/compile-c-types.c: Include "objfiles.h".
5339         (convert_func): For functions with unknown return type, warn and
5340         default to int.
5341         * compile/compile-object-run.c (compile_object_run): Adjust call
5342         to call_function_by_hand_dummy.
5343         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
5344         call_function_by_hand.
5345         * eval.c (evaluate_subexp_standard): Adjust calls to
5346         call_function_by_hand.  Handle functions and methods with unknown
5347         return type.  Pass expect_type to call_function_by_hand.
5348         * f-typeprint.c (f_type_print_base): Handle functions with unknown
5349         return type.
5350         * gcore.c (call_target_sbrk): Adjust call to
5351         call_function_by_hand.
5352         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
5353         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
5354         an integer address type instead of nodebug.
5355         * guile/scm-value.c (gdbscm_value_call): Adjust call to
5356         call_function_by_hand.
5357         * infcall.c (error_call_unknown_return_type): New function.
5358         (call_function_by_hand): New "default_return_type" parameter.
5359         Pass it down.
5360         (call_function_by_hand_dummy): New "default_return_type"
5361         parameter.  Use it instead of defaulting to int.  If there's no
5362         default and the return type is unknown, throw an error.  If
5363         there's a default return type, and the called function has no
5364         debug info, then assume the function is prototyped.
5365         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
5366         New "default_return_type" parameter.
5367         (error_call_unknown_return_type): New declaration.
5368         * linux-fork.c (call_lseek): Cast return type of lseek.
5369         (inferior_call_waitpid, checkpoint_command): Adjust calls to
5370         call_function_by_hand.
5371         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
5372         calls to call_function_by_hand.
5373         * m2-typeprint.c (m2_procedure): Handle functions with unknown
5374         return type.
5375         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5376         (value_nsstring, print_object_command): Adjust calls to
5377         call_function_by_hand.
5378         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
5379         functions with unknown return type.
5380         (pascal_type_print_func_varspec_suffix): New function.
5381         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
5382         TYPE_CODE_METHOD>: Use it.
5383         * python/py-value.c (valpy_call): Adjust call to
5384         call_function_by_hand.
5385         * rust-lang.c (rust_evaluate_funcall): Adjust call to
5386         call_function_by_hand.
5387         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
5388         call_function_by_hand.
5389         * valops.c (value_allocate_space_in_inferior): Adjust call to
5390         call_function_by_hand.
5391         * typeprint.c (type_print_unknown_return_type): New function.
5392         * typeprint.h (type_print_unknown_return_type): New declaration.
5393
5394 2017-09-04  Pedro Alves  <palves@redhat.com>
5395
5396         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
5397         types with more than one parameter as prototyped.
5398
5399 2017-09-04  Pedro Alves  <palves@redhat.com>
5400
5401         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
5402         (disassemble_command): Use gdb_disassembly_flags instead of bare
5403         int.
5404         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
5405         (dump_insns, do_mixed_source_and_assembly_deprecated)
5406         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
5407         Use gdb_disassembly_flags instead of bare int.
5408         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
5409         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
5410         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
5411         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
5412         (enum gdb_disassembly_flag): ... values of this new enumeration.
5413         (gdb_disassembly_flags): Define.
5414         (gdb_disassembly)
5415         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
5416         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
5417         gdb_disassembly_flags instead of bare int.
5418         * record-btrace.c (btrace_insn_history)
5419         (record_btrace_insn_history, record_btrace_insn_history_range)
5420         (record_btrace_insn_history_from): Use gdb_disassembly_flags
5421         instead of bare int.
5422         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
5423         Use gdb_disassembly_flags instead of bare int.
5424         * target-debug.h (target_debug_print_gdb_disassembly_flags):
5425         Define.
5426         * target-delegates.c: Regenerate.
5427         * target.c (target_insn_history, target_insn_history_from)
5428         (target_insn_history_range): Use gdb_disassembly_flags instead of
5429         bare int.
5430         * target.h: Include "disasm.h".
5431         (struct target_ops) <to_insn_history, to_insn_history_from,
5432         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
5433         int.
5434         (target_insn_history, target_insn_history_from)
5435         (target_insn_history_range): Use gdb_disassembly_flags instead of
5436         bare int.
5437
5438 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5439
5440         * cli/cli-script.c (build_command_line): For if/while commands,
5441         check whether args is empty.
5442
5443 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5444
5445         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
5446         (enum command_control_type): Likewise.
5447         (struct command_line): Likewise.
5448         (free_command_lines): Likewise.
5449         (struct command_lines_deleter): Likewise.
5450         (command_line_up): Likewise.
5451         (read_command_lines): Likewise.
5452         (read_command_lines_1): Likewise.
5453         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
5454         (enum command_control_type): Likewise.
5455         (struct command_line): Likewise.
5456         (free_command_lines): Likewise.
5457         (struct command_lines_deleter): Likewise.
5458         (command_line_up): Likewise.
5459         (read_command_lines): Likewise.
5460         (read_command_lines_1): Likewise.
5461         * breakpoint.h: Include cli/cli-script.h.
5462         * extension-priv.h: Likewise.
5463         * gdbcmd.h: Likewise.
5464
5465 2017-09-04  Pedro Alves  <palves@redhat.com>
5466
5467         * ada-lang.c (is_known_support_routine): Move sal declaration to
5468         where it is initialized.
5469         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
5470         (parse_breakpoint_sals, decode_static_tracepoint_spec)
5471         (clear_command, update_static_tracepoint): Remove init_sal
5472         references.  Move declarations closer to initializations.
5473         * cli/cli-cmds.c (list_command): Move sal declarations closer to
5474         initializations.
5475         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
5476         references.  Move sal declarations closer to initializations.
5477         * frame.c (find_frame_sal): Return a symtab_and_line via function
5478         return instead of output parameter.  Remove init_sal references.
5479         * frame.h (find_frame_sal): Return a symtab_and_line via function
5480         return instead of output parameter.
5481         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
5482         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
5483         instead of memset.
5484         (gdbscm_find_pc_line): Remove init_sal reference.
5485         * infcall.c (call_function_by_hand_dummy): Remove init_sal
5486         references.  Move declarations closer to initializations.
5487         * infcmd.c (set_step_frame): Update.  Move declarations closer to
5488         initializations.
5489         (finish_backward): Remove init_sal references.  Move declarations
5490         closer to initializations.
5491         * infrun.c (process_event_stop_test, handle_step_into_function)
5492         (insert_hp_step_resume_breakpoint_at_frame)
5493         (insert_step_resume_breakpoint_at_caller): Likewise.
5494         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
5495         (symbol_to_sal): Likewise.
5496         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
5497         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
5498         to its initialization.
5499         * reverse.c (save_bookmark_command): Use new/delete.  Remove
5500         init_sal references.  Move declarations closer to initializations.
5501         * source.c (get_current_source_symtab_and_line): Remove brace
5502         initialization.
5503         (set_current_source_symtab_and_line): Now takes the sal by const
5504         reference.  Remove brace initialization.
5505         (line_info): Remove init_sal reference.
5506         * source.h (set_current_source_symtab_and_line): Now takes a
5507         symtab_and_line via const reference.
5508         * stack.c (set_current_sal_from_frame): Adjust.
5509         (print_frame_info): Adjust.
5510         (get_last_displayed_sal): Return the sal via function return
5511         instead of via output parameter.  Simplify.
5512         (frame_info): Adjust.
5513         * stack.h (get_last_displayed_sal): Return the sal via function
5514         return instead of via output parameter.
5515         * symtab.c (init_sal): Delete.
5516         (find_pc_sect_line): Remove init_sal references.  Move
5517         declarations closer to initializations.
5518         (find_function_start_sal): Remove init_sal references.  Move
5519         declarations closer to initializations.
5520         * symtab.h (struct symtab_and_line): In-class initialize all
5521         fields.
5522         * tracepoint.c (set_traceframe_context)
5523         (print_one_static_tracepoint_marker): Remove init_sal references.
5524         Move declarations closer to initializations.
5525         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
5526         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
5527         declarations closer to initializations.
5528         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
5529         init_sal references.  Adjust.
5530
5531 2017-09-04  Pedro Alves  <palves@redhat.com>
5532
5533         * ax-gdb.c (agent_command_1): Use range-for.
5534         * break-catch-throw.c (re_set_exception_catchpoint): Update.
5535         * breakpoint.c: Include "common/array-view.h".
5536         (init_breakpoint_sal, create_breakpoint_sal): Change sals
5537         parameter from struct symtabs_and_lines to
5538         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
5539         (breakpoint_sals_to_pc): Change sals parameter from struct
5540         symtabs_and_lines to std::vector reference.
5541         (check_fast_tracepoint_sals): Change sals parameter from struct
5542         symtabs_and_lines to std::array_view.  Use range-for.
5543         (decode_static_tracepoint_spec): Return a std::vector instead of
5544         symtabs_and_lines.  Update.
5545         (create_breakpoint): Update.
5546         (break_range_command, until_break_command, clear_command): Update.
5547         (base_breakpoint_decode_location, bkpt_decode_location)
5548         (bkpt_probe_create_sals_from_location)
5549         (bkpt_probe_decode_location, tracepoint_decode_location)
5550         (tracepoint_probe_decode_location)
5551         (strace_marker_create_sals_from_location): Return a std::vector
5552         instead of symtabs_and_lines.
5553         (strace_marker_create_breakpoints_sal): Update.
5554         (strace_marker_decode_location): Return a std::vector instead of
5555         symtabs_and_lines.  Update.
5556         (update_breakpoint_locations): Change struct symtabs_and_lines
5557         parameters to gdb::array_view.  Adjust.
5558         (location_to_sals): Return a std::vector instead of
5559         symtabs_and_lines.  Update.
5560         (breakpoint_re_set_default): Use std::vector instead of struct
5561         symtabs_and_lines.
5562         (decode_location_default): Return a std::vector instead of
5563         symtabs_and_lines.  Update.
5564         * breakpoint.h: Include "common/array-view.h".
5565         (struct breakpoint_ops) <decode_location>: Now returns a
5566         std::vector instead of returning a symtabs_and_lines via output
5567         parameter.
5568         (update_breakpoint_locations): Change sals parameters to use
5569         gdb::array_view.
5570         * cli/cli-cmds.c (edit_command, list_command): Update to use
5571         std::vector and gdb::array_view.
5572         (ambiguous_line_spec): Adjust to use gdb::array_view and
5573         range-for.
5574         (compare_symtabs): Rename to ...
5575         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
5576         const reference and adjust.
5577         (filter_sals): Rewrite using std::vector and standard algorithms.
5578         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
5579         (jump_command): Update to use std::vector.
5580         * linespec.c (struct linespec_state) <canonical_names>: Update
5581         comment.
5582         (add_sal_to_sals_basic): Delete.
5583         (add_sal_to_sals, filter_results, convert_results_to_lsals)
5584         (decode_line_2, create_sals_line_offset)
5585         (convert_address_location_to_sals, convert_linespec_to_sals)
5586         (convert_explicit_location_to_sals, parse_linespec)
5587         (event_location_to_sals, decode_line_full, decode_line_1)
5588         (decode_line_with_current_source)
5589         (decode_line_with_last_displayed, decode_objc)
5590         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
5591         (linespec_result::~linespec_result): Adjust to use std::vector
5592         instead of symtabs_and_lines.
5593         * linespec.h (linespec_sals::sals): Now a std::vector.
5594         (struct linespec_result): Use std::vector, bool, and in-class
5595         initialization.
5596         (decode_line_1, decode_line_with_current_source)
5597         (decode_line_with_last_displayed): Return std::vector.
5598         * macrocmd.c (info_macros_command): Use std::vector.
5599         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
5600         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
5601         std::vector.
5602         * probe.h (parse_probes): Return a std::vector.
5603         * python/python.c (gdbpy_decode_line): Use std::vector and
5604         gdb::array_view.
5605         * source.c (select_source_symtab, line_info): Use std::vector.
5606         * stack.c (func_command): Use std::vector.
5607         * symtab.h (struct symtabs_and_lines): Delete.
5608         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
5609
5610 2017-09-04  Pedro Alves  <palves@redhat.com>
5611
5612         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5613         unittests/array-view-selftests.c.
5614         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5615         * common/array-view.h: New file.
5616         * unittests/array-view-selftests.c: New file.
5617
5618 2017-09-04  Pedro Alves  <palves@redhat.com>
5619
5620         * cli/cli-cmds.c (edit_command): Pass message to
5621         ambiguous_line_spec.
5622         (list_command): Pass message to ambiguous_line_spec.  Say
5623         "first"/"last" instead of "start" and "end" to be consistent with
5624         the manual.
5625         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
5626         them to print formatted message.
5627
5628 2017-09-04  Pedro Alves  <palves@redhat.com>
5629
5630         * btrace.c (ftrace_add_pt): Pass btrace_insn to
5631         ftrace_update_insns by reference instead of pointer.
5632
5633 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5634
5635         * i386-go32-tdep.c: Include x86-xstate.h.
5636         (i386_go32_init_abi): Call i386_target_description.
5637         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5638         if xcr0 is X86_XSTATE_X87_MASK.
5639         * i386-tdep.h (tdesc_i386): Remove the declaration.
5640         (tdesc_i386_mmx): Likewise.
5641
5642 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5643
5644         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5645         X86_XSTATE_SSE_MASK instead of 0.
5646
5647 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5648
5649         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5650         i386_target_description.
5651         * i386-fbsd-nat.c (i386fbsd_read_description): Call
5652         i386_target_description.
5653         * i386-tdep.c (i386_gdbarch_init): Likewise.
5654
5655 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5656
5657         * amd64-darwin-tdep.c: Include "x86-xstate.h".
5658         (x86_darwin_init_abi_64): Call amd64_target_description.
5659         * amd64-dicos-tdep.c: Likewise.
5660         * amd64-fbsd-nat.c: Likewise.
5661         * amd64-fbsd-tdep.c: Likewise.
5662         * amd64-nbsd-tdep.c: Likewise.
5663         * amd64-obsd-tdep.c: Likewise.
5664         * amd64-sol2-tdep.c: Likewise.
5665         * amd64-windows-tdep.c: Likewise.
5666         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5667
5668 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5669
5670         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5671         (btrace_function) <insn>: Change type to use std::vector.
5672         * btrace.c (ftrace_debug, ftrace_call_num_insn,
5673         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5674         ftrace_update_insns, ftrace_compute_global_level_offset,
5675         btrace_stitch_bts, btrace_clear, btrace_insn_get,
5676         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5677         change to std::vector.
5678         (ftrace_update_insns): Adjust to change to std::vector, change
5679         type of INSN parameter.
5680         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5681         * record-btrace.c (btrace_call_history_insn_range,
5682         btrace_compute_src_line_range,
5683         record_btrace_frame_prev_register): Adjust to change to
5684         std::vector.
5685         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5686         to change to std::vector.
5687
5688 2017-09-03  Tom Tromey  <tom@tromey.com>
5689
5690         * corefile.c (reopen_exec_file): Use std::string.
5691
5692 2017-09-03  Tom Tromey  <tom@tromey.com>
5693
5694         * compile/compile.c (compile_register_name_mangled): Return
5695         std::string.
5696         * compile/compile-loc2c.c (pushf_register_address): Update.
5697         (pushf_register): Update.
5698         * compile/compile-c-types.c (convert_array): Update.
5699         * compile/compile-c-symbols.c (generate_vla_size): Update.
5700         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5701         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5702         (convert_one_symbol): Update.
5703         (generate_c_for_for_one_variable): Update.
5704         * compile/compile-c-support.c (c_get_range_decl_name): Return a
5705         std::string.
5706         (generate_register_struct): Update.
5707         * compile/compile-internal.h (c_get_range_decl_name): Return a
5708         std::string.
5709         (compile_register_name_mangled): Return std::string.
5710
5711 2017-09-03  Tom Tromey  <tom@tromey.com>
5712
5713         * utils.c (perror_string): Return a std::string.
5714         (throw_perror_with_name, perror_warning_with_name): Update.
5715
5716 2017-09-03  Tom Tromey  <tom@tromey.com>
5717
5718         * demangle.c (demangle_command): Use std::string,
5719         unique_xmalloc_ptr.
5720
5721 2017-09-03  Tom Tromey  <tom@tromey.com>
5722
5723         * cli/cli-setshow.c (do_set_command): Use std::string.
5724
5725 2017-09-03  Tom Tromey  <tom@tromey.com>
5726
5727         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5728
5729 2017-09-03  Tom Tromey  <tom@tromey.com>
5730
5731         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5732
5733 2017-09-03  Tom Tromey  <tom@tromey.com>
5734
5735         * mi/mi-cmd-env.c (env_execute_cli_command): Use
5736         gdb::unique_xmalloc_ptr.
5737
5738 2017-09-03  Tom Tromey  <tom@tromey.com>
5739
5740         * thread.c (print_thread_info_1): Use string_printf.
5741         (thread_apply_command, thread_apply_all_command): Use
5742         std::string.
5743
5744 2017-09-03  Tom Tromey  <tom@tromey.com>
5745
5746         * valprint.c (val_print_string): Update.
5747         * gdbcore.h (memory_error_message): Return std::string.
5748         * corefile.c (memory_error_message): Return std::string.
5749         (memory_error): Update.
5750         * breakpoint.c (insert_bp_location): Update.
5751
5752 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
5753
5754         * target/waitstatus.h (target_waitstatus_to_string): Change
5755         return type to std::string.
5756         * target/waitstatus.c (target_waitstatus_to_string): Return
5757         std::string.
5758         * target.h (target_waitstatus_to_string): Remove declaration.
5759         * infrun.c (resume, clear_proceed_status_thread,
5760         print_target_wait_results, do_target_wait, save_waitstatus,
5761         stop_all_threads): Adjust.
5762         * record-btrace.c (record_btrace_wait): Adjust.
5763         * target-debug.h
5764         (target_debug_print_struct_target_waitstatus_p): Adjust.
5765
5766 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
5767
5768         PR gdb/22046
5769         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5770         detection.
5771
5772 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
5773
5774         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5775         for setting/unsetting environment variables on the remote target.
5776         (New remote packets): Add entries for QEnvironmentHexEncoded,
5777         QEnvironmentUnset and QEnvironmentReset.
5778         * common/environ.c (gdb_environ::operator=): Extend method to
5779         handle m_user_set_env_list and m_user_unset_env_list.
5780         (gdb_environ::clear): Likewise.
5781         (match_var_in_string): Change type of first parameter from 'char
5782         *' to 'const char *'.
5783         (gdb_environ::set): Extend method to handle
5784         m_user_set_env_list and m_user_unset_env_list.
5785         (gdb_environ::unset): Likewise.
5786         (gdb_environ::clear_user_set_env): New method.
5787         (gdb_environ::user_set_envp): Likewise.
5788         (gdb_environ::user_unset_envp): Likewise.
5789         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5790         m_user_unset_env_list on move constructor/assignment.
5791         (unset): Add new default parameter 'update_unset_list = true'.
5792         (clear_user_set_env): New method.
5793         (user_set_envp): Likewise.
5794         (user_unset_envp): Likewise.
5795         (m_user_set_env_list): New std::set.
5796         (m_user_unset_env_list): Likewise.
5797         * common/rsp-low.c (hex2str): New function.
5798         (bin2hex): New overload for bin2hex function.
5799         * common/rsp-low.c (hex2str): New prototype.
5800         (str2hex): New overload prototype.
5801         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5802         QEnvironmentUnset and QEnvironmentReset.
5803         (remote_protocol_features): Add QEnvironmentHexEncoded,
5804         QEnvironmentUnset and QEnvironmentReset packets.
5805         (send_environment_packet): New function.
5806         (extended_remote_environment_support): Likewise.
5807         (extended_remote_create_inferior): Call
5808         extended_remote_environment_support.
5809         (_initialize_remote): Add QEnvironmentHexEncoded,
5810         QEnvironmentUnset and QEnvironmentReset packet configs.
5811         * unittests/environ-selftests.c (gdb_selftest_env_var):
5812         New variable.
5813         (test_vector_initialization): New function.
5814         (test_init_from_host_environ): Likewise.
5815         (test_reinit_from_host_environ): Likewise.
5816         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5817         Likewise.
5818         (test_unset_set_empty_vector): Likewise.
5819         (test_vector_clear): Likewise.
5820         (test_std_move): Likewise.
5821         (test_move_constructor):
5822         (test_self_move): Likewise.
5823         (test_set_unset_reset): Likewise.
5824         (run_tests): Rewrite in terms of the functions above.
5825
5826 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
5827
5828         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5829         (adi_available): Use a temp variable of type CORE_ADDR as argument
5830         3 when calling target_auxv_search.
5831         (adi_normalize_address): Use masks and xor operators to calculate
5832         normalized address.
5833         (adi_read_versions, adi_write_versions, adi_print_versions)
5834         (do_examine, do_assign): Use paddress.
5835
5836 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
5837
5838         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5839         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5840         out of loop and add supply of FIR.
5841         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5842         add collect of FIR.
5843
5844 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
5845
5846         PR gdb/21827
5847         * cli/cli-script.c (define_command): Don't convert command name
5848         to lower case.
5849
5850 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
5851
5852         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5853         Update all callers accordingly. Remove all code blocks handling
5854         the case where DISPP is not NULL.
5855
5856 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5857
5858         PR symtab/22003
5859         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5860         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5861         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5862
5863 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5864
5865         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5866         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5867         (read_comp_units_from_section): New parameter abbrev_section, use
5868         read_and_check_comp_unit_head, allocate signatured_type if needed.
5869         (create_all_comp_units): Update read_comp_units_from_section caller.
5870
5871 2017-08-23  Pedro Alves  <palves@redhat.com>
5872
5873         PR remote/21852
5874         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5875         to null_ptid and switch to thread without reading the registers
5876         after adding the inferior.
5877
5878 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5879
5880         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5881         compile-gcc.
5882         * compile/compile.c (compile_gcc, show_compile_gcc): New.
5883         (compile_to_object): Implement compile_gcc.
5884         (_initialize_compile): Install "set compile-gcc".  Initialize
5885         compile_gcc.
5886
5887 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5888
5889         * compile/compile.c (compile_to_object): Conditionally call
5890         set_verbose.  Conditionally call compile or compile_v0.
5891
5892 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
5893
5894         * sparc64-tdep.h: (adi_normalize_address): New export.
5895         * sparc-nat.h: (open_adi_tag_fd): New export.
5896         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5897         * sparc64-linux-tdep.c:
5898         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5899         (sparc64_linux_handle_segmentation_fault): New function.
5900         (sparc64_linux_init_abi): Register
5901         sparc64_linux_handle_segmentation_fault
5902         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5903         (sparc64_addr_bits_remove): New function.
5904         (sparc64_init_abi): Register sparc64_addr_bits_remove.
5905         (MAX_PROC_NAME_SIZE): New macro.
5906         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5907         (sparc64adilist): New variable.
5908         (adi_proc_list): New variable.
5909         (find_adi_info): New function.
5910         (add_adi_info): New function.
5911         (get_adi_info_proc): New function.
5912         (get_adi_info): New function.
5913         (info_adi_command): New function.
5914         (read_maps_entry): New function.
5915         (adi_available): New function.
5916         (adi_normalize_address): New function.
5917         (adi_align_address): New function.
5918         (adi_convert_byte_count): New function.
5919         (adi_tag_fd): New function.
5920         (adi_is_addr_mapped): New function.
5921         (adi_read_versions): New function.
5922         (adi_write_versions): New function.
5923         (adi_print_versions): New function.
5924         (do_examine): New function.
5925         (do_assign): New function.
5926         (adi_examine_command): New function.
5927         (adi_assign_command): New function.
5928         (_initialize_sparc64_adi_tdep): New function.
5929
5930 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
5931
5932         * breakpoint.c (breakpoints_info): Rename to ...
5933         (info_breakpoints_command): ... this.
5934         (watchpoints_info): Rename to ...
5935         (info_watchpoints_command): ... this.
5936         (tracepoints_info): Rename to ...
5937         (info_tracepoints_command): ... this.
5938         (_initialize_breakpoint): Adjust.
5939         * dcache.c (dcache_info): Rename to ...
5940         (info_display_command): ... this.
5941         (_initialize_dcache): Adjust.
5942         * frame.h (args_info): Rename to ...
5943         (info_args_command): ... this.
5944         (locals_info): Rename to ...
5945         (info_locals_command): ... this.
5946         * infcmd.c (nofp_registers_info): Rename to ...
5947         (info_registers_command): ... this.
5948         (float_info): Rename to ...
5949         (info_float_command): ... this.
5950         (program_info): Rename to ...
5951         (info_program_command): ... this.
5952         (all_registers_info): Rename to ...
5953         (info_all_registers_command): ... this.
5954         (vector_info): Rename to ...
5955         (info_vector_command): ... this.
5956         (float_info): Rename to ...
5957         (info_float_command): ... this.
5958         (_initialize_infcmd): Adjust.
5959         * inferior.h (term_info): Rename to ...
5960         (info_terminal_command): ... this.
5961         * inflow.c (term_info): Rename to ...
5962         (info_terminal_command): ... this.
5963         (_initialize_inflow): Adjust.
5964         * infrun.c (signals_info): Rename to ...
5965         (info_signals_command): ... this.
5966         (_initialize_infrun): Adjust.
5967         * objc-lang.c (classes_info): Rename to ...
5968         (info_classes_command): ... this.
5969         (selectors_info): Rename to ...
5970         (info_selectors_command): ... this.
5971         (_initialize_objc_language): Adjust.
5972         * printcmd.c (sym_info): Rename to ...
5973         (info_symbol_command): ... this.
5974         (address_info): Rename to ...
5975         (info_address_command): ... this.
5976         (display_info): Rename to ...
5977         (info_display_command): ... this.
5978         (_initialize_printcmd): Adjust.
5979         * reverse.c (bookmarks_info): Rename to ...
5980         (info_breakpoints_command): ... this.
5981         (_initialize_reverse): Adjust.
5982         * ser-go32.c (dos_info): Rename to ...
5983         (info_serial_command): ... this.
5984         (_initialize_ser_dos): Adjust.
5985         * skip.c (skip_info): Rename to ...
5986         (info_skip_command): ... this.
5987         (_initialize_step_skip): Adjust.
5988         * source.c (line_info): Rename to ...
5989         (info_line_command): ... this.
5990         (source_info): Rename to ...
5991         (info_source_command)
5992         * stack.c (frame_info): Rename to ...
5993         (info_frame_command): ... this.
5994         (locals_info): Rename to ...
5995         (info_locals_command): ... this.
5996         (args_info): Rename to ...
5997         (info_args_command): ... this.
5998         (_initialize_stack): Adjust.
5999         * symtab.c (sources_info): Rename to ...
6000         (info_sources_command): ... this.
6001         (variables_info): Rename to ...
6002         (info_variables_command): ... this.
6003         (functions_info): Rename to ...
6004         (info_functions_command): ... this.
6005         (types_info): Rename to ...
6006         (info_types_command): ... this.
6007         (_initialize_symtab): Adjust.
6008         * target.c (target_info): Rename to ...
6009         (info_target_command): ... this.
6010         (initialize_targets): Adjust.
6011         * tracepoint.c (tvariables_info): Rename to ...
6012         (info_tvariables_command): ... this.
6013         (scope_info): Rename to ...
6014         (info_scope_command): ... this.
6015         (trace_dump_actions): Adjust.
6016         (_initialize_tracepoint): Adjust.
6017
6018 2017-08-22  Tom Tromey  <tom@tromey.com>
6019
6020         * breakpoint.h (install_breakpoint): Update.
6021         * breakpoint.c (add_solib_catchpoint): Update.
6022         (install_breakpoint): Change argument to a std::unique_ptr.
6023         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6024         (create_breakpoint_sal, create_breakpoint): Update.
6025         (watch_command_1, catch_exec_command_1)
6026         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6027         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6028         Return the breakpoint.
6029         (set_raw_breakpoint_without_location, set_raw_breakpoint)
6030         (new_single_step_breakpoint): Update.
6031         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6032         std::unique_ptr.
6033         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6034         std::unique_ptr.
6035         * break-catch-sig.c (create_signal_catchpoint): Use
6036         std::unique_ptr.
6037         * ada-lang.c (create_ada_exception_catchpoint): Use
6038         std::unique_ptr.
6039
6040 2017-08-22  Tom Tromey  <tom@tromey.com>
6041
6042         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6043
6044 2017-08-22  Tom Tromey  <tom@tromey.com>
6045
6046         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6047         (lookup_partial_symbol): Update.
6048
6049 2017-08-22  Tom Tromey  <tom@tromey.com>
6050
6051         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6052         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6053         (find_and_open_source, symtab_to_fullname): Update.
6054         * psymtab.c (psymtab_to_fullname): Update.
6055
6056 2017-08-22  Tom Tromey  <tom@tromey.com>
6057
6058         * exec.c (exec_file_attach): Update.
6059         * linux-thread-db.c (try_thread_db_load): Update.
6060         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6061         * utils.c (gdb_realpath): Change return type.
6062         (gdb_realpath_keepfile): Update.
6063         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6064         (_initialize_utils): Register the new self test.
6065         * source.c (openp): Update.
6066         (find_and_open_source): Update.
6067         * nto-tdep.c (nto_find_and_open_solib): Update.
6068         * main.c (set_gdb_data_directory): Update.
6069         (captured_main_1): Update.
6070         * dwarf2read.c (dwarf2_get_dwz_file): Update
6071         (dw2_map_symbol_filenames): Update.
6072         * auto-load.c (auto_load_safe_path_vec_update): Update.
6073         (filename_is_in_auto_load_safe_path_vec): Change type of
6074         "filename_realp".
6075         (auto_load_objfile_script): Update.
6076         (file_is_auto_load_safe): Update.  Use std::string.
6077         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6078
6079 2017-08-22  Tom Tromey  <tom@tromey.com>
6080
6081         * utils.c (gdb_realpath_keepfile): Return a
6082         gdb::unique_xmalloc_ptr.
6083         * exec.c (exec_file_attach): Update.
6084         * utils.h (gdb_realpath_keepfile): Return a
6085         gdb::unique_xmalloc_ptr.
6086
6087 2017-08-22  Tom Tromey  <tom@tromey.com>
6088
6089         * compile/compile.c (compile_file_command): Use
6090         gdb::unique_xmalloc_ptr, std::string.
6091         * utils.c (gdb_abspath): Change return type.
6092         * source.c (openp): Update.
6093         * objfiles.c (allocate_objfile): Update.
6094         * main.c (set_gdb_data_directory): Update.
6095         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6096
6097 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
6098
6099         * cli-cmds.c (list_commands): List actual code around more than
6100         one location.
6101
6102 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
6103
6104         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6105
6106 2017-08-21  Pedro Alves  <palves@redhat.com>
6107
6108         PR gdb/19487
6109         * c-exp.y (variable production): Handle function aliases.
6110         * minsyms.c (msymbol_is_text): New function.
6111         * minsyms.h (msymbol_is_text): Declare.
6112         * symtab.c (find_function_alias_target): New function.
6113         * symtab.h (find_function_alias_target): Declare.
6114
6115 2017-08-21  Pedro Alves  <palves@redhat.com>
6116
6117         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6118         typedefs.
6119         * typeprint.c (whatis_exp): If handling "whatis", and expression
6120         is OP_TYPE, strip one typedef level.  Otherwise don't strip
6121         typedefs here.
6122         * valops.c (value_cast): Save "to" type before resolving
6123         stubs/typedefs.  Use that type as resulting value's type.
6124
6125 2017-08-18  Tom Tromey  <tom@tromey.com>
6126             Pedro Alves  <palves@redhat.com>
6127
6128         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6129         * sol-thread.c (sol_thread_resume, sol_thread_wait)
6130         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6131         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6132         * proc-service.c (ps_xfer_memory): Use scoped_restore.
6133         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6134         (linux_get_siginfo_data): Add "thread" argument.  Use
6135         scoped_restore.
6136         * linux-nat.c (linux_child_follow_fork)
6137         (check_stopped_by_watchpoint): Use scoped_restore.
6138         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
6139         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
6140         (restore_inferior_ptid, save_inferior_ptid): Remove.
6141         * btrace.c (btrace_fetch): Use scoped_restore.
6142         * bsd-uthread.c (bsd_uthread_fetch_registers)
6143         (bsd_uthread_store_registers): Use scoped_restore.
6144         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
6145         scoped_restore.
6146         * aix-thread.c (aix_thread_resume, aix_thread_wait)
6147         (aix_thread_xfer_partial): Use scoped_restore.
6148         * inferior.h (save_inferior_ptid): Remove.
6149
6150 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6151
6152         PR tdep/21818
6153         * arm-tdep.c (gdb_print_insn_arm): Mark
6154         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
6155
6156 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6157
6158         * NEWS: Mention GDBserver's new option "--selftest".
6159         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
6160         * selftest.c: Move it to common/selftest.c.
6161         * selftest.h: Move it to common/selftest.h.
6162         * selftest-arch.c (reset): New function.
6163         (tests_with_arch): Call reset.
6164
6165 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6166
6167         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
6168         instead of exception_fprintf and printf_filtered.
6169
6170 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6171
6172         * selftest.c (register_self_test): Rename it to
6173         selftests::register_test.
6174         (run_self_tests): selftest::run_tests.
6175         * selftest.h: Update declarations.
6176         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
6177         selftests::register_test_foreach_arch.
6178         * selftest-arch.h: Update declaration.
6179         * aarch64-tdep.c: Update.
6180         * arm-tdep.c: Likewise.
6181         * disasm-selftests.c: Likewise.
6182         * dwarf2loc.c: Likewise.
6183         * dwarf2-frame.c: Likewise.
6184         * findvar.c: Likewise.
6185         * gdbarch-selftests.c: Likewise.
6186         * maint.c (maintenance_selftest): Likewise.
6187         * regcache.c: Likewise.
6188         * rust-exp.y: Likewise.
6189         * selftest-arch.c: Likewise.
6190         * unittests/environ-selftests.c: Likewise.
6191         * unittests/function-view-selftests.c: Likewise.
6192         * unittests/offset-type-selftests.c: Likewise.
6193         * unittests/optional-selftests.c: Likewise.
6194         * unittests/scoped_restore-selftests.c: Likewise.
6195         * utils-selftests.c: Likewise.
6196
6197 2017-08-17  Pedro Alves  <palves@redhat.com>
6198
6199         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
6200         local.
6201
6202 2017-08-17  Pedro Alves  <palves@redhat.com>
6203
6204         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
6205         field.
6206         (reset_die_in_process): Delete, replaced by ...
6207         (process_die_scope): ... this new class.  Make it responsible for
6208         freeing cu->line_header too.
6209         (process_die): Use process_die_scope.
6210         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
6211         cu->line_header_die_owner.  Don't release the line header if it's
6212         owned by the CU.
6213         (setup_type_unit_groups): Make the CU/DIE own the line header.
6214         Don't release the line header here.
6215
6216 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
6217
6218         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
6219
6220 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6221
6222         * NEWS: Mention new shortcuts for nexti and stepi in TUI
6223         Single-Key mode
6224
6225 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6226
6227         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
6228         mode command list.
6229
6230 2017-08-15  Stafford Horne  <shorne@gmail.com>
6231
6232         * MAINTAINERS (Write After Approval): Add Stafford Horne.
6233
6234 2017-08-15  Stafford Horne  <shorne@gmail.com>
6235
6236         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
6237
6238 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
6239
6240         PR gdb/21954
6241         * infcmd.c (unset_environment_command): Use the 'clear' method on
6242         the environment instead of resetting it.
6243
6244 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
6245
6246         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
6247         platforms.
6248
6249 2017-08-14  Tom Tromey  <tom@tromey.com>
6250
6251         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
6252         (print_binary_chars): Likewise.
6253         (BITS_IN_BYTES): Remove.
6254
6255 2017-08-14  Tom Tromey  <tom@tromey.com>
6256
6257         PR gdb/21675
6258         * valprint.c (LOW_ZERO): Change value to 034.
6259         (print_octal_chars): Add static_asserts for octal constants.
6260         * printcmd.c (print_scalar_formatted): Add 'd' case.
6261
6262 2017-08-11  Tom Tromey  <tom@tromey.com>
6263
6264         * symfile.c (add_symbol_file_command): Use std::vector.
6265
6266 2017-08-14  Tom Tromey  <tom@tromey.com>
6267
6268         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
6269         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6270         std::move.
6271         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
6272
6273 2017-08-11  Pedro Alves  <palves@redhat.com>
6274
6275         * infrun.c (process_event_stop_test): Adjust
6276         function_name_is_marked_for_skip call.
6277         * skip.c: Include <list>.
6278         (skiplist_entry): Make it a class with private fields, and
6279         getters/setters.
6280         (skiplist_entry_chain): Delete.
6281         (skiplist_entries): New.
6282         (skiplist_entry_count): Delete.
6283         (highest_skiplist_entry_num): New.
6284         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
6285         (add_skiplist_entry): Delete.
6286         (skiplist_entry::skiplist_entry): New.
6287         (skiplist_entry::add_entry): New.
6288         (skip_file_command, skip_function): Adjust.
6289         (compile_skip_regexp): Delete.
6290         (skip_command): Don't compile regexp here.  Adjust to use
6291         skiplist_entry::add_entry.
6292         (skip_info): Adjust to use range-for and getters.
6293         (skip_enable_command, skip_disable_command): Adjust to use
6294         range-for and setters.
6295         (skip_delete_command): Adjust to use std::list.
6296         (add_skiplist_entry): Delete.
6297         (skip_file_p): Delete, refactored as ...
6298         (skiplist_entry::do_skip_file_p): ... this new method.
6299         (skip_gfile_p): Delete, refactored as ...
6300         (skiplist_entry::do_gskip_file_p): ... this new method.
6301         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
6302         (skiplist_entry::skip_function_p): ... this new method.
6303         (function_name_is_marked_for_skip): Now returns bool, and takes
6304         the function sal by const reference.  Adjust to use range-for and
6305         skiplist_entry methods.
6306         (_initialize_step_skip): Remove references to
6307         skiplist_entry_chain, skiplist_entry_count.
6308         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
6309         takes the function sal by const reference.
6310
6311 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6312
6313         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
6314         (dwarf2_frame_cache): Remove reset_cache_cleanup.
6315         (dwarf2_frame_cache):
6316         * frame-unwind.c (frame_unwind_try_unwinder): Catch
6317         RETURN_MASK_ALL and set *this_case to NULL.
6318         * frame-unwind.h: Update comments.
6319
6320 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6321
6322         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
6323         (dwarf2_frame_state_copy_regs): Remove.
6324         (dwarf2_frame_state_free_regs): Remove.
6325         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
6326         (dwarf2_restore_rule): Call method .alloc_regs instead of
6327         dwarf2_frame_state_alloc_regs.
6328         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
6329         constructor.  Call std::move.
6330         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
6331         (dwarf2_frame_cache): Likewise.
6332
6333         [GDB_SELF_TEST]: Include selftest.h and
6334         selftest-arch.h.
6335         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
6336         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
6337         execute_cfa_program_test.
6338
6339         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
6340         copy ctor, assignment operator, move assignment.
6341         <alloc_regs>: New method.
6342         <swap>: New method.
6343         (struct dwarf2_frame_state): Delete dtor.
6344         (dwarf2_frame_state_alloc_regs): Remove declaration.
6345         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
6346         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
6347
6348 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6349
6350         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
6351         (dwarf2_frame_state::dwarf2_frame_state): New.
6352         (dwarf2_frame_state::~dwarf2_frame_state): New.
6353         (dwarf2_fetch_cfa_info): Update.
6354         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
6355         rather than a pointer.  Update code.
6356         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
6357         dtor.
6358         <data_align, code_align, retaddr_column>: Change them to const.
6359         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
6360         to bool.
6361
6362 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6363
6364         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
6365         <loc.exp>: New field.
6366         * dwarf2-frame.c (execute_cfa_program): Update.
6367         (dwarf2_frame_prev_register): Update.
6368
6369 2017-08-10  Pedro Alves  <palves@redhat.com>
6370
6371         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
6372
6373 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6374
6375         * fbsd-nat.c (struct fbsd_fork_info): Remove.
6376         (fbsd_pending_children): Use std::list.
6377         (fbsd_remember_child): Likewise.
6378         (fbsd_is_child_pending): Likewise.
6379         (fbsd_pending_vfork_done): Use std::forward_list.
6380         (fbsd_add_vfork_done): Likewise.
6381         (fbsd_is_vfork_done_pending): Likewise.
6382         (fbsd_next_vfork_done): Likewise.
6383
6384 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6385
6386         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
6387         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
6388         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
6389         for `mapfilename'.
6390         (fbsd_xfer_partial): Use gdb::byte_vector.
6391         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
6392
6393 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6394
6395         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
6396         "filestuff.h".
6397         (fbsd_find_memory_regions): Fix `mapfile' initialization.
6398
6399 2017-08-09  Tom Tromey  <tom@tromey.com>
6400
6401         * skip.c (skiplist_entry): New constructor.
6402         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
6403         (skiplist_entry::file_is_glob): Now bool.
6404         (skiplist_entry::file, skiplist_entry::function): Now
6405         std::string.
6406         (make_skip_entry): Return a unique_ptr.  Use new.
6407         (free_skiplist_entry, free_skiplist_entry_cleanup)
6408         (make_free_skiplist_entry_cleanup): Remove.
6409         (skip_command, skip_disable_command, add_skiplist_entry)
6410         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
6411         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
6412         (function_name_is_marked_for_skip): Update.
6413         (skip_delete_command): Update.  Use delete.
6414
6415 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
6416
6417         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
6418         (aarch64_linux_core_read_description): New function.
6419         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
6420
6421 2017-08-09  Pedro Alves  <palves@redhat.com>
6422
6423         * cp-name-parser.y (cp_comp_to_string): Return a
6424         gdb::unique_xmalloc_ptr<char>.
6425         * cp-support.c (replace_typedefs_qualified_name)
6426         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
6427         (cp_canonicalize_string_full): Use op= instead of explicit
6428         convertion.
6429         (cp_class_name_from_physname, method_name_from_physname)
6430         (cp_func_name, cp_remove_params): Adjust to use
6431         gdb::unique_xmalloc_ptr<char>.
6432         * cp-support.h (cp_comp_to_string): Return a
6433         gdb::unique_xmalloc_ptr<char>.
6434         * python/py-type.c (typy_lookup_type): Adjust to use
6435         gdb::unique_xmalloc_ptr<char>.
6436
6437 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
6438
6439         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
6440
6441 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
6442             Yao Qi  <yao.qi@linaro.org>
6443
6444         * cp-support.c (cp_canonicalize_string_full): Use
6445         gdb::unique_xmalloc_ptr<char>.
6446         (cp_canonicalize_string): Likewise.
6447
6448 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6449
6450         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
6451         * regformats/i386/amd64-avx-avx512.dat: Remove.
6452         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
6453         * regformats/i386/amd64-avx-mpx.dat:Remove.
6454         * regformats/i386/amd64-avx.dat: Remove.
6455         * regformats/i386/amd64-mpx.dat: Remove.
6456         * regformats/i386/i386-avx-avx512.dat: Remove.
6457         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
6458         * regformats/i386/i386-avx-mpx.dat: Remove.
6459         * regformats/i386/i386-mmx.dat: Remove.
6460         * regformats/i386/i386-mpx.dat: Remove.
6461
6462 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6463
6464         * amd64-tdep.h (tdesc_x32): Remove the declaration.
6465         * amd64-tdep.c: Don't include features/i386/x32*.c.
6466         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
6467         functions.
6468         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
6469         and i386/x32-avx-avx512.
6470         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
6471         and i386/x32.xml.
6472         * features/i386/x32-avx-avx512.c: Removed.
6473         * features/i386/x32-avx-avx512.xml: Removed.
6474         * features/i386/x32-avx.c: Removed.
6475         * features/i386/x32-avx.xml: Removed.
6476         * features/i386/x32.c: Removed.
6477         * features/i386/x32.xml: Removed.
6478         * regformats/i386/x32-avx-avx512.dat: Removed.
6479         * regformats/i386/x32-avx.dat: Removed.
6480         * regformats/i386/x32.dat: Removed.
6481
6482 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6483
6484         PR breakpoints/21886
6485         * mem-break.c (default_memory_insert_breakpoint): Use
6486         `->placed_address' rather than `->reqstd_address' for the
6487         breakpoint location.
6488
6489 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6490
6491         * arch-utils.c (default_print_insn): Remove arch/mach/endian
6492         assertions.
6493
6494 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6495
6496         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
6497         a union of `tdep_info', `tdesc_data' and `id'.
6498         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
6499         rather than `info.tdep_info'.
6500         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
6501         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6502         * i386-tdep.c (i386_gdbarch_init): Likewise.
6503         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
6504         * mips-tdep.c (mips_gdbarch_init): Likewise.
6505         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6506         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6507         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
6508         `info.tdep_info'.
6509         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
6510         `info.tdep_info'.
6511         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6512         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
6513         `info.tdep_info'.
6514         * spu-tdep.c (spu_gdbarch_init): Likewise.
6515         * gdbarch.h: Regenerate.
6516
6517 2017-08-07  Leszek Swirski  <leszeks@google.com>
6518
6519         PR symtab/20899
6520         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
6521
6522 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
6523
6524         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
6525         (gdbsim_open): Rename gdb_argv args object to argv.
6526
6527 2017-08-05  Tom Tromey  <tom@tromey.com>
6528
6529         * compile/compile-object-load.c (compile_object_load): Use
6530         gdb::unique_xmalloc_ptr.
6531         * cli/cli-dump.c (scan_filename): Rename from
6532         scan_filename_with_cleanup.  Change return type.
6533         (scan_expression): Rename from scan_expression_with_cleanup.
6534         Change return type.
6535         (dump_memory_to_file, dump_value_to_file, restore_command):
6536         Use gdb::unique_xmalloc_ptr.  Update.
6537         * cli/cli-cmds.c (find_and_open_script): Use
6538         gdb::unique_xmalloc_ptr.
6539         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
6540         * symmisc.c (maintenance_print_symbols)
6541         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
6542         * symfile.c (symfile_bfd_open, generic_load)
6543         (add_symbol_file_command, remove_symbol_file_command): Use
6544         gdb::unique_xmalloc_ptr.
6545         * source.c (openp): Use gdb::unique_xmalloc_ptr.
6546         * psymtab.c (maintenance_print_psymbols): Use
6547         gdb::unique_xmalloc_ptr.
6548         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
6549         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
6550         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
6551         (reload_shared_libraries_1): Likewise.
6552
6553 2017-08-05  Tom Tromey  <tom@tromey.com>
6554
6555         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
6556         (rust_op_vector, rust_set_vector): New typedefs.
6557         (current_parser): New global.
6558         (work_obstack): Change to pointer type.  Update all users.
6559         (rust_ast, pstate): Remove globals.
6560         (struct rust_parser): New.
6561         (%union) <params, field_inits>: Change type.
6562         (start, tuple_expr, unit_expr, struct_expr_list, literal)
6563         (field_expr, expr_list, maybe_expr_list, type_list): Update.
6564         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
6565         (convert_params_to_types, convert_params_to_expression): Change
6566         type of "params".
6567         (ast_string): Change type of "fields".
6568         (rust_parse): Make a rust_parser.  Remove cleanups.
6569         (rust_lex_tests): Make and install an auto_obstack.
6570
6571 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6572
6573         * configure.srv (ipa_x32_linux_regobj): New.
6574         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
6575         instead of X86_TDESC_AVX512.
6576         (initialize_low_tracepoint): Call
6577         init_registers_x32_avx_avx512_linux.
6578
6579 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6580
6581         * utils.h (gdb_argv): Add namespace std for nullptr_t.
6582
6583 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6584
6585         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
6586
6587 2017-08-03  Tom Tromey  <tom@tromey.com>
6588
6589         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
6590         Remove.
6591         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
6592
6593 2017-08-03  Tom Tromey  <tom@tromey.com>
6594
6595         * python/py-param.c (compute_enum_values): Use gdb_argv.
6596
6597 2017-08-03  Tom Tromey  <tom@tromey.com>
6598
6599         * utils.h (struct gdb_argv_deleter): New.
6600         (gdb_argv): New class.
6601         * utils.c (gdb_argv::reset): New method.
6602         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
6603         * tracefile.c (tsave_command): Use gdb_argv.
6604         * top.c (new_ui_command): Use gdb_argv.
6605         * symmisc.c (maintenance_print_symbols)
6606         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
6607         * symfile.c (symbol_file_command, generic_load)
6608         (remove_symbol_file_command): Use gdb_argv.
6609         * stack.c (backtrace_command): Use gdb_argv.
6610         * source.c (add_path, show_substitute_path_command)
6611         (unset_substitute_path_command, set_substitute_path_command):
6612         Use gdb_argv.
6613         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
6614         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6615         * remote.c (extended_remote_run, remote_put_command)
6616         (remote_get_command, remote_delete_command): Use gdb_argv.
6617         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6618         (gdbsim_open): Use gdb_argv.
6619         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6620         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
6621         * procfs.c (procfs_info_proc): Use gdb_argv.
6622         * interps.c (interpreter_exec_cmd): Use gdb_argv.
6623         * infrun.c (handle_command): Use gdb_argv.
6624         * inferior.c (add_inferior_command, clone_inferior_command):
6625         Use gdb_argv.
6626         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
6627         * exec.c (exec_file_command): Use gdb_argv.
6628         * cli/cli-cmds.c (alias_command): Use gdb_argv.
6629         * compile/compile.c (build_argc_argv): Use gdb_argv.
6630
6631 2017-08-03  Tom Tromey  <tom@tromey.com>
6632
6633         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6634
6635 2017-08-03  Tom Tromey  <tom@tromey.com>
6636
6637         * python/python.c (compute_python_string): Return std::string.
6638         (gdbpy_eval_from_control_command): Update.
6639         (do_start_initialization): Use std::string.
6640         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6641         xstrprintf.
6642         * python/py-breakpoint.c (local_setattro): Use string_printf, not
6643         xstrprintf.
6644
6645 2017-08-03  Tom Tromey  <tom@tromey.com>
6646
6647         * top.h (do_restore_instream_cleanup): Remove.
6648         * top.c (do_restore_instream_cleanup): Remove.
6649         (read_command_file): Use scoped_restore.
6650         * cli/cli-script.c (execute_user_command): Use scoped_restore.
6651
6652 2017-08-03  Tom Tromey  <tom@tromey.com>
6653
6654         * cli/cli-script.c (execute_user_command)
6655         (execute_control_command): Use scoped_restore.
6656
6657 2017-08-03  Tom Tromey  <tom@tromey.com>
6658
6659         * cli/cli-script.c (do_restore_user_call_depth): Remove.
6660         (execute_user_command): Remove user_call_depth; use
6661         user_args_stack's size instead.
6662
6663 2017-08-03  Tom Tromey  <tom@tromey.com>
6664
6665         * top.h (in_user_command): Remove.
6666         * top.c (in_user_command): Remove.
6667         * cli/cli-script.c (do_restore_user_call_depth)
6668         (execute_user_command): Update.
6669
6670 2017-08-03  Tom Tromey  <tom@tromey.com>
6671
6672         * valops.c (search_struct_method): Use gdb::byte_vector.
6673         * valarith.c (value_concat): Use std::vector.
6674         * target.c (memory_xfer_partial): Use gdb::byte_vector.
6675         (simple_search_memory): Likewise.
6676         * printcmd.c (find_string_backward): Use gdb::byte_vector.
6677         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6678         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6679         * elfread.c (elf_rel_plt_read): Use std::string.
6680         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6681         * cli/cli-dump.c (restore_section_callback): Use
6682         gdb::byte_vector.
6683
6684 2017-08-03  Tom Tromey  <tom@tromey.com>
6685
6686         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6687
6688 2017-08-03  Tom Tromey  <tom@tromey.com>
6689
6690         * tui/tui-regs.c (tui_restore_gdbout): Remove.
6691         (tui_register_format): Use scoped_restore.
6692
6693 2017-08-03  Tom Tromey  <tom@tromey.com>
6694
6695         * reverse.c (exec_direction_default): Remove.
6696         (exec_reverse_once): Use scoped_restore.
6697         * remote.c (restore_remote_timeout): Remove.
6698         (remote_flash_erase, remote_flash_write, remote_flash_done)
6699         (readchar, remote_serial_write): Use scoped_restore.
6700         * cli/cli-script.c (struct source_cleanup_lines_args)
6701         (source_cleanup_lines): Remove.
6702         (script_from_file): Use scoped_restore.
6703         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6704         (source_command): Use scoped_restore.
6705
6706 2017-08-03  Tom Tromey  <tom@tromey.com>
6707
6708         * utils.h (make_cleanup_free_so): Remove.
6709         * utils.c (do_free_so, make_cleanup_free_so): Remove.
6710         * solist.h (struct so_deleter): New.
6711         (so_list_up): New typedef.
6712         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6713
6714 2017-08-03  Tom Tromey  <tom@tromey.com>
6715
6716         * utils.h (make_cleanup_restore_current_language): Remove.
6717         * utils.c (do_restore_current_language)
6718         (make_cleanup_restore_current_language): Remove.
6719         * parse.c (parse_exp_in_context_1)
6720         (parse_expression_with_language): Use
6721         scoped_restore_current_language.
6722         * mi/mi-main.c (mi_cmd_execute): Use
6723         scoped_restore_current_language.
6724         * language.h (scoped_restore_current_language): New class.
6725
6726 2017-08-03  Tom Tromey  <tom@tromey.com>
6727
6728         * compile/compile.c (cleanup_unlink_file): Remove.
6729         (compile_to_object): Use gdb::unlinker.
6730         (eval_compile_command): Likewise.
6731
6732 2017-08-03  Tom Tromey  <tom@tromey.com>
6733
6734         * utils.h (make_cleanup_fclose): Remove.
6735         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6736
6737 2017-08-03  Tom Tromey  <tom@tromey.com>
6738
6739         * top.c (open_terminal_stream): Return gdb_file_up.
6740         (new_ui_command): Update.
6741
6742 2017-08-03  Tom Tromey  <tom@tromey.com>
6743
6744         * source.c (print_source_lines_base, forward_search_command)
6745         (reverse_search_command): Use gdb_file_up.
6746
6747 2017-08-03  Tom Tromey  <tom@tromey.com>
6748
6749         * fbsd-nat.c (fbsd_find_memory_regions): Update.
6750
6751 2017-08-03  Tom Tromey  <tom@tromey.com>
6752
6753         * cli/cli-cmds.c (find_and_open_script): Change return type.
6754         Remove "streamp" and "full_path" parameters.
6755         (source_script_with_search): Update.
6756         * auto-load.c (source_script_file): Update.
6757         * cli/cli-cmds.h (find_and_open_script): Change type.
6758         (open_script): New struct.
6759
6760 2017-08-03  Tom Tromey  <tom@tromey.com>
6761
6762         * xml-support.c (xml_fetch_content_from_file): Update.
6763         * ui-file.c (stdio_file::open): Update.
6764         * tracefile-tfile.c (tfile_start): Update.
6765         * remote.c (remote_file_put, remote_file_get): Update.
6766         * nat/linux-procfs.c (linux_proc_get_int)
6767         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6768         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6769         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6770         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6771         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6772         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6773         * linux-nat.c (linux_proc_pending_signals): Update.
6774         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6775         (file_closer): Remove.
6776         * compile/compile.c (compile_to_object): Update.
6777         * common/filestuff.h (struct gdb_file_deleter): New.
6778         (gdb_file_up): New typedef.
6779         (gdb_fopen_cloexec): Change return type.
6780         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6781         * cli/cli-dump.c (fopen_with_cleanup): Remove.
6782         (dump_binary_file, restore_binary_file): Update.
6783         * auto-load.c (auto_load_objfile_script_1): Update.
6784
6785 2017-08-03  Tom Tromey  <tom@tromey.com>
6786
6787         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6788         (info_static_tracepoint_markers_command): Likewise.
6789         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6790         * skip.c (skip_info): Use ui_out_emit_table.
6791         * progspace.c (print_program_space): Use ui_out_emit_table.
6792         * osdata.c (info_osdata): Use ui_out_emit_table.
6793         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6794         ui_out_emit_table.
6795         * linux-thread-db.c (info_auto_load_libthread_db): Use
6796         ui_out_emit_table.
6797         * inferior.c (print_inferior): Use ui_out_emit_table.
6798         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6799         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6800         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6801         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6802         * ui-out.h (class ui_out_emit_table): New.
6803
6804 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
6805
6806         * mips-tdep.c (mips_fpu_type_str): New function.
6807         (mips_dump_tdep): Call it.
6808
6809 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
6810
6811         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6812         `->mips_fpu_type'.
6813
6814 2017-07-31  Xavier Roirand  <roirand@adacore.com>
6815
6816         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6817
6818 2017-07-27  Xavier Roirand  <roirand@adacore.com>
6819
6820         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6821
6822 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6823
6824         * cli/cli-cmds.c (maintenancechecklist): New variable.
6825         * gdbcmd.h (maintenancechecklist): Declare it.
6826         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6827         Call i386_linux_read_description with different masks.
6828         * maint.c (maintenance_check_command): New function.
6829         (_initialize_maint_cmds): Call add_prefix_cmd.
6830         * target-descriptions.c (tdesc_reg): override operator != and ==.
6831         (tdesc_type): Likewise.
6832         (tdesc_feature): Likewise.
6833         (target_desc): Likewise.
6834         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6835         (maintenance_check_xml_descriptions): New function.
6836         (_initialize_target_descriptions) Add command "xml-descriptions".
6837         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6838
6839 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6840
6841         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6842         Include features/i386/32bit-*.c.
6843         (i386_linux_read_description): Generate target description if it
6844         doesn't exist.
6845         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6846         functions.
6847         * features/i386/32bit-linux.c: Re-generated.
6848         * features/i386/32bit-sse.c: Likewise.
6849         * target-descriptions.c (print_c_feature::visit): Print code to
6850         set register number if needed.
6851         (print_c_feature) <m_next_regnum>: New field.
6852
6853 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6854
6855         * features/Makefile (CFILES): Rename with TDESC_CFILES.
6856         (FEATURE_XMLFILES): New.
6857         (FEATURE_CFILES): New.
6858         New rules.
6859         (clean-cfiles): Remove generated c files.
6860         * features/i386/32bit-avx.c: Generated.
6861         * features/i386/32bit-avx512.c: Generated.
6862         * features/i386/32bit-core.c: Generated.
6863         * features/i386/32bit-linux.c: Generated.
6864         * features/i386/32bit-mpx.c: Generated.
6865         * features/i386/32bit-pkeys.c: Generated.
6866         * features/i386/32bit-sse.c: Generated.
6867         * target-descriptions.c: Include algorithm.
6868         (tdesc_element_visitor): Add method visit_end.
6869         (print_c_tdesc): Implement visit_end.
6870         (print_c_tdesc:: m_filename_after_features): Move it to
6871         protected.
6872         (print_c_feature): New class.
6873         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6874         name starts with "i386/32bit-".
6875
6876 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6877
6878         * target-descriptions.c (tdesc_element_visitor): New class.
6879         (tdesc_element): New class.
6880         (tdesc_reg): Inherit from tdesc_element.
6881         (tdesc_reg::accept): New function.
6882         (tdesc_type): Inherit from tdesc_element.
6883         (tdesc_type::accept): New function.
6884         (tdesc_feature): Inherit from tdesc_element.
6885         (tdesc_feature::accept): New function.
6886         (target_desc): Inherit from tdesc_element.
6887         (target_desc::target_desc): New.
6888         (target_desc::~target_desc): New.
6889         (target_desc::accept): New.
6890         (allocate_target_description): Use new.
6891         (free_target_description): Use delete.
6892         (print_c_tdesc): New class.
6893         (maint_print_c_tdesc_cmd): Adjust.
6894
6895         * features/aarch64.c: Re-generated.
6896         * features/arc-arcompact.c: Re-generated.
6897         * features/arc-v2.c: Re-generated.
6898         * features/arm/arm-with-iwmmxt.c: Re-generated.
6899         * features/arm/arm-with-m.c: Re-generated.
6900         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6901         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6902         * features/arm/arm-with-neon.c: Re-generated.
6903         * features/arm/arm-with-vfpv2.c: Re-generated.
6904         * features/arm/arm-with-vfpv3.c: Re-generated.
6905         * features/i386/amd64-avx-avx512.c: Re-generated.
6906         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6907         * features/i386/amd64-avx.c: Re-generated.
6908         * features/i386/amd64-avx-linux.c: Re-generated.
6909         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6910         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6911         * features/i386/amd64-avx-mpx.c: Re-generated.
6912         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6913         * features/i386/amd64.c: Re-generated.
6914         * features/i386/amd64-linux.c: Re-generated.
6915         * features/i386/amd64-mpx.c: Re-generated.
6916         * features/i386/amd64-mpx-linux.c: Re-generated.
6917         * features/i386/i386-avx-avx512.c: Re-generated.
6918         * features/i386/i386-avx-avx512-linux.c: Re-generated.
6919         * features/i386/i386-avx.c: Re-generated.
6920         * features/i386/i386-avx-linux.c: Re-generated.
6921         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6922         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6923         * features/i386/i386-avx-mpx.c: Re-generated.
6924         * features/i386/i386-avx-mpx-linux.c: Re-generated.
6925         * features/i386/i386.c: Re-generated.
6926         * features/i386/i386-linux.c: Re-generated.
6927         * features/i386/i386-mmx.c: Re-generated.
6928         * features/i386/i386-mmx-linux.c: Re-generated.
6929         * features/i386/i386-mpx.c: Re-generated.
6930         * features/i386/i386-mpx-linux.c: Re-generated.
6931         * features/i386/x32-avx-avx512.c: Re-generated.
6932         * features/i386/x32-avx-avx512-linux.c: Re-generated.
6933         * features/i386/x32-avx.c: Re-generated.
6934         * features/i386/x32-avx-linux.c: Re-generated.
6935         * features/i386/x32.c: Re-generated.
6936         * features/i386/x32-linux.c: Re-generated.
6937         * features/microblaze.c: Re-generated.
6938         * features/microblaze-with-stack-protect.c: Re-generated.
6939         * features/mips64-dsp-linux.c: Re-generated.
6940         * features/mips64-linux.c: Re-generated.
6941         * features/mips-dsp-linux.c: Re-generated.
6942         * features/mips-linux.c: Re-generated.
6943         * features/nds32.c: Re-generated.
6944         * features/nios2.c: Re-generated.
6945         * features/nios2-linux.c: Re-generated.
6946         * features/rs6000/powerpc-32.c: Re-generated.
6947         * features/rs6000/powerpc-32l.c: Re-generated.
6948         * features/rs6000/powerpc-403.c: Re-generated.
6949         * features/rs6000/powerpc-403gc.c : Re-generated.
6950         * features/rs6000/powerpc-405.c: Re-generated.
6951         * features/rs6000/powerpc-505.c: Re-generated.
6952         * features/rs6000/powerpc-601.c: Re-generated.
6953         * features/rs6000/powerpc-602.c: Re-generated.
6954         * features/rs6000/powerpc-603.c: Re-generated.
6955         * features/rs6000/powerpc-604.c: Re-generated.
6956         * features/rs6000/powerpc-64.c: Re-generated.
6957         * features/rs6000/powerpc-64l.c: Re-generated.
6958         * features/rs6000/powerpc-7400.c: Re-generated.
6959         * features/rs6000/powerpc-750.c: Re-generated.
6960         * features/rs6000/powerpc-860.c: Re-generated.
6961         * features/rs6000/powerpc-altivec32.c: Re-generated.
6962         * features/rs6000/powerpc-altivec32l.c: Re-generated.
6963         * features/rs6000/powerpc-altivec64.c: Re-generated.
6964         * features/rs6000/powerpc-altivec64l.c: Re-generated.
6965         * features/rs6000/powerpc-cell32l.c: Re-generated.
6966         * features/rs6000/powerpc-cell64l.c: Re-generated.
6967         * features/rs6000/powerpc-e500.c: Re-generated.
6968         * features/rs6000/powerpc-e500l.c: Re-generated.
6969         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6970         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6971         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6972         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6973         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6974         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6975         * features/rs6000/powerpc-vsx32.c: Re-generated.
6976         * features/rs6000/powerpc-vsx32l.c: Re-generated.
6977         * features/rs6000/powerpc-vsx64.c: Re-generated.
6978         * features/rs6000/powerpc-vsx64l.c: Re-generated.
6979         * features/rs6000/rs6000.c: Re-generated.
6980         * features/s390-linux32.c: Re-generated.
6981         * features/s390-linux32v1.c: Re-generated.
6982         * features/s390-linux32v2.c: Re-generated.
6983         * features/s390-linux64.c: Re-generated.
6984         * features/s390-linux64v1.c: Re-generated.
6985         * features/s390-linux64v2.c: Re-generated.
6986         * features/s390-te-linux64.c: Re-generated.
6987         * features/s390-tevx-linux64.c: Re-generated.
6988         * features/s390-vx-linux64.c: Re-generated.
6989         * features/s390x-linux64.c: Re-generated.
6990         * features/s390x-linux64v1.c: Re-generated.
6991         * features/s390x-linux64v2.c: Re-generated.
6992         * features/s390x-te-linux64.c: Re-generated.
6993         * features/s390x-tevx-linux64.c: Re-generated.
6994         * features/s390x-vx-linux64.c: Re-generated.
6995         * features/sparc/sparc32-solaris.c: Re-generated.
6996         * features/sparc/sparc64-solaris.c: Re-generated.
6997         * features/tic6x-c62x.c: Re-generated.
6998         * features/tic6x-c62x-linux.c: Re-generated.
6999         * features/tic6x-c64x.c: Re-generated.
7000         * features/tic6x-c64x-linux.c: Re-generated.
7001         * features/tic6x-c64xp.c: Re-generated.
7002         * features/tic6x-c64xp-linux.c: Re-generated.
7003
7004 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7005
7006         * i386-linux-tdep.c (i386_linux_read_description): New function.
7007         (i386_linux_core_read_description): Call
7008         i386_linux_read_description.
7009         * i386-linux-tdep.h (i386_linux_read_description): Declare.
7010         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7011         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7012         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7013         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7014         * x86-linux-nat.c (x86_linux_read_description): Call
7015         i386_linux_read_description.
7016
7017 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7018
7019         * NEWS: Mention it.
7020         * features/Makefile (%.c: %.xml): Pass the xml file name to
7021         command "maint print c-tdesc".
7022         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7023         name from 'arg'.
7024
7025 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7026
7027         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
7028         in-class initialization.
7029         (tdesc_create_feature): Call new instead of XCNEW.
7030         (free_target_description): Ue delete.
7031
7032 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
7033
7034         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7035
7036 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7037
7038         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7039         constant.
7040         (amd64_x32_init_abi): Likewise.
7041         * amd64-tdep.h (amd64_init_abi): Update declaration.
7042         (amd64_x32_init_abi): Likewise.
7043
7044 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7045
7046         PR tdep/21717
7047         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7048         condition for FPSCR.
7049         (arm_linux_store_inferior_registers): Likewise.
7050
7051 2017-07-22  Tom Tromey  <tom@tromey.com>
7052
7053         * break-catch-syscall.c (struct catch_syscall_inferior_data)
7054         <syscalls_counts>: Now a std::vector.
7055         (get_catch_syscall_inferior_data): Use "new".
7056         (catch_syscall_inferior_data_cleanup): Use "delete".
7057         (insert_catch_syscall, remove_catch_syscall)
7058         (clear_syscall_counts): Update.
7059
7060 2017-07-22  Tom Tromey  <tom@tromey.com>
7061
7062         * break-catch-syscall.c (syscall_catchpoint)
7063         <syscalls_to_be_caught>: Now a std::vector<int>
7064         (~syscall_catchpoint): Remove.
7065         (insert_catch_syscall, remove_catch_syscall)
7066         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7067         (print_mention_catch_syscall, print_recreate_catch_syscall):
7068         Update.
7069         (create_syscall_event_catchpoint): Change type of "filter"
7070         parameter.
7071         (catch_syscall_split_args): Return a std::vector.
7072         (catch_syscall_command_1, catching_syscall_number_1): Update.
7073
7074 2017-07-22  Tom Tromey  <tom@tromey.com>
7075
7076         * break-catch-throw.c (struct exception_catchpoint)
7077         <exception_rx>: Now a std::string.
7078         (~exception_catchpoint): Remove.
7079         (print_one_detail_exception_catchpoint): Update.
7080         (handle_gnu_v3_exceptions): Change type of except_rx.
7081         (extract_exception_regexp): Return a std::string.
7082         (catch_exception_command_1): Update.
7083
7084 2017-07-22  Tom Tromey  <tom@tromey.com>
7085
7086         * break-catch-sig.c (gdb_signal_type): Remove typedef.
7087         (struct signal_catchpoint) <signals_to_be_caught>: Now a
7088         std::vector.
7089         <catch_all>: Now a bool.
7090         (~signal_catchpoint): Remove.
7091         (signal_catchpoint_insert_location)
7092         (signal_catchpoint_remove_location)
7093         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7094         (signal_catchpoint_print_mention)
7095         (signal_catchpoint_print_recreate)
7096         (signal_catchpoint_explains_signal): Update.
7097         (create_signal_catchpoint): Change type of "filter" and
7098         "catch_all".
7099         (catch_signal_split_args): Return a std::vector.  Change type of
7100         "catch_all".
7101         (catch_signal_command): Update.
7102
7103 2017-07-20  Pedro Alves  <palves@redhat.com>
7104
7105         * ada-lang.c (ada_language_defn): Make extern.
7106         (_initialize_ada_language): Remove add_language call.
7107         * c-lang.c (c_language_defn, cplus_language_defn)
7108         (asm_language_defn, minimal_language_defn): Make extern.
7109         (_initialize_c_language): Delete.
7110         * completer.c (compare_cstrings): Delete, moved to utils.h.
7111         * d-lang.c (d_language_defn): Make extern.
7112         (_initialize_d_language): Remove add_language calls.
7113         * defs.h (enum language): Add comment.
7114         * f-lang.c (f_language_defn): Make extern.
7115         (_initialize_f_language): Remove add_language call.
7116         * go-lang.c (go_language_defn): Make extern.
7117         (_initialize_go_language): Remove add_language call.
7118         * language.c: Include <algorithm>.
7119         (languages): Redefine as const array.
7120         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7121         (set_language_command): Handle "local".  Use for-range loop.
7122         (set_language): Remove loop.
7123         (language_enum): Rewrite.
7124         (language_def, language_str): Remove loops.
7125         (add_language): Delete.
7126         (add_set_language_command): New, based on add_languages.
7127         (skip_language_trampoline): Adjust.
7128         (local_language_defn): Delete.
7129         (language_gdbarch_post_init): Adjust.
7130         (_initialize_language): Remove add_language calls.  Call
7131         add_set_language_command.
7132         * language.h (add_language): Delete.
7133         (auto_language_defn)
7134         (unknown_language_defn, minimal_language_defn, ada_language_defn)
7135         (asm_language_defn, c_language_defn, cplus_language_defn)
7136         (d_language_defn, f_language_defn, go_language_defn)
7137         (m2_language_defn, objc_language_defn, opencl_language_defn)
7138         (pascal_language_defn, rust_language_defn): Declare.
7139         * m2-lang.c (m2_language_defn): Make extern.
7140         (_initialize_m2_language): Remove add_language call.
7141         * objc-lang.c (objc_language_defn): Make extern.
7142         (_initialize_objc_language): Remove add_language call.
7143         * opencl-lang.c (opencl_language_defn): Make extern.
7144         (_initialize_opencl_language): Remove add_language call.
7145         * p-lang.c (pascal_language_defn): Make extern.
7146         (_initialize_pascal_language): Delete.
7147         * rust-lang.c (rust_language_defn): Make extern.
7148         (_initialize_rust_language): Delete.
7149         * utils.h (compare_cstrings): New static inline function.
7150
7151 2017-07-20  Pedro Alves  <palves@redhat.com>
7152
7153         * ada-lang.c (ada_to_fixed_type_1): Adjust.
7154         (get_var_value): Constify parameters.
7155         (get_int_var_value): Change prototype.
7156         (to_fixed_range_type): Adjust.
7157         * ada-lang.h (get_int_var_value): Change prototype.
7158
7159 2017-07-20  Pedro Alves  <palves@redhat.com>
7160
7161         * dwarf2read.c (dw2_lookup_symbol): Use
7162         SYMBOL_MATCHES_SEARCH_NAME.
7163         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
7164
7165 2017-07-20  Pedro Alves  <palves@redhat.com>
7166
7167         * block.c (block_iter_name_step, block_iter_name_first)
7168         (block_iter_name_next): Delete.
7169         (block_lookup_symbol_primary): Adjust to use
7170         dict_iter_match_first/dict_iter_match_next.
7171         * block.h (block_iter_name_first, block_iter_name_next): Delete
7172         declarations.
7173         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
7174         dict_iter_match_first/dict_iter_match_next.
7175
7176 2017-07-20  Pedro Alves  <palves@redhat.com>
7177
7178         * cp-support.c (cp_find_first_component_aux): Add missing case for
7179         end of string.
7180
7181 2017-07-18  David Blaikie  <dblaikie@gmail.com>
7182
7183         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
7184         of dwo_cu's dwo_file.
7185
7186 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7187
7188         * remote.c (store_registers_using_G): Remove one line comment.
7189
7190 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7191
7192         * regcache.c (regcache_cpy): Simplify it.
7193         (regcache::cpy_no_passthrough): Remove it.
7194         * regcache.h (cpy_no_passthrough): Remove it.
7195         (regcache_dup, regcache_cpy): Update comments.
7196
7197 2017-07-18  Pedro Alves  <palves@redhat.com>
7198
7199         * remote-sim.c (sim_command_completer): Adjust to work with a
7200         completion_tracker instead of a VEC.
7201
7202 2017-07-17  Pedro Alves  <palves@redhat.com>
7203
7204         * completer.c (complete_source_filenames): New function.
7205         (complete_address_and_linespec_locations): New function.
7206         (location_completer): Use complete_address_and_linespec_locations.
7207         (completion_tracker::build_completion_result): Honor the tracker's
7208         request to suppress append.
7209         * completer.h (completion_tracker::suppress_append_ws)
7210         (completion_tracker::set_suppress_append_ws): New methods.
7211         (completion_tracker::m_suppress_append_ws): New field.
7212         (complete_source_filenames): New declaration.
7213         * linespec.c (linespec_complete_what): New.
7214         (struct ls_parser) <complete_what, completion_word,
7215         completion_quote_char, completion_quote_end, completion_tracker>:
7216         New fields.
7217         (string_find_incomplete_keyword_at_end): New.
7218         (linespec_lexer_lex_string): Record quote char.  If in completion
7219         mode, don't throw.
7220         (linespec_lexer_consume_token): Advance the completion word point.
7221         (linespec_lexer_peek_token): Save/restore completion info.
7222         (save_stream_and_consume_token): New.
7223         (set_completion_after_number): New.
7224         (linespec_parse_basic): Set what to complete next depending on
7225         token.  Handle function and label completions specially.
7226         (parse_linespec): Disable objc shortcut in completion mode.  Set
7227         what to complete next depending on token type.  Skip keyword if in
7228         completion mode.
7229         (complete_linespec_component, linespec_complete): New.
7230         * linespec.h (linespec_complete): Declare.
7231
7232 2017-07-17  Pedro Alves  <palves@redhat.com>
7233
7234         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
7235         Handle 'operator<' / 'operator<<'.
7236
7237 2017-07-17  Pedro Alves  <palves@redhat.com>
7238
7239         * completer.c (collect_explicit_location_matches): Handle
7240         MATCH_LABEL.
7241         (convert_explicit_location_to_linespec): New, factored out from
7242         ...
7243         (convert_explicit_location_to_sals): ... this.
7244         (complete_label): New.
7245         (linespec_complete_label, find_label_symbols_in_block): New.
7246         (find_label_symbols): Add completion_mode parameter and adjust to
7247         call find_label_symbols_in_block.
7248         * linespec.h (linespec_complete_label): Declare.
7249
7250 2017-07-17  Pedro Alves  <palves@redhat.com>
7251
7252         * ada-lang.c (ada_collect_symbol_completion_matches): Add
7253         complete_symbol_mode parameter.
7254         * cli/cli-cmds.c (complete_command): Get the completion result out
7255         of the handle_brkchars tracker if used a custom word point.
7256         * completer.c: Include "linespec.h".
7257         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
7258         (advance_to_expression_complete_word_point): New.
7259         (completion_tracker::completes_to_completion_word): New.
7260         (complete_files_symbols): Pass down
7261         complete_symbol_mode::EXPRESSION.
7262         (explicit_options, probe_options): New.
7263         (collect_explicit_location_matches): Complete on the
7264         explictit_loc->foo instead of word.  Use
7265         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
7266         keyword and options completions.
7267         (backup_text_ptr): Delete.
7268         (skip_keyword): New.
7269         (complete_explicit_location): Remove 'word' parameter.  Add
7270         language, quoted_arg_start and quoted_arg_end parameters.
7271         Rewrite, parsing left to right.
7272         (location_completer): Rewrite.
7273         (location_completer_handle_brkchars): New function.
7274         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
7275         (enum complete_line_internal_reason): Adjust comments.
7276         (completion_tracker::discard_completions): New.
7277         (completer_handle_brkchars_func_for_completer): Handle
7278         location_completer.
7279         (gdb_custom_word_point_brkchars)
7280         (gdb_org_rl_basic_quote_characters): New.
7281         (gdb_completion_word_break_characters_throw)
7282         (completion_find_completion_word): Handle trackers that use a
7283         custom word point.
7284         (completion_tracker::advance_custom_word_point_by): New.
7285         (completion_tracker::build_completion_result): Don't rely on
7286         readline appending the quote char.
7287         (gdb_rl_attempted_completion_function_throw): Handle trackers that
7288         use a custom word point.
7289         (gdb_rl_attempted_completion_function): Restore
7290         rl_basic_quote_characters.
7291         * completer.h (class completion_tracker): Extend intro comment.
7292         (completion_tracker::set_quote_char)
7293         (completion_tracker::quote_char)
7294         (completion_tracker::set_use_custom_word_point)
7295         (completion_tracker::use_custom_word_point)
7296         (completion_tracker::custom_word_point)
7297         (completion_tracker::set_custom_word_point)
7298         (completion_tracker::advance_custom_word_point_by)
7299         (completion_tracker::completes_to_completion_word)
7300         (completion_tracker::discard_completions): New methods.
7301         (completion_tracker::m_quote_char)
7302         (completion_tracker::m_use_custom_word_point)
7303         (completion_tracker::m_custom_word_point): New fields.
7304         (advance_to_expression_complete_word_point): Declare.
7305         * f-lang.c (f_collect_symbol_completion_matches): Add
7306         complete_symbol_mode parameter.
7307         * language.h (struct language_defn)
7308         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
7309         parameter.
7310         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
7311         (linespec_complete_function): New function.
7312         (linespec_lexer_lex_keyword): Adjust.
7313         * linespec.h (linespec_keywords, linespec_complete_function): New
7314         declarations.
7315         * location.c (find_end_quote): New function.
7316         (explicit_location_lex_one): Add explicit_completion_info
7317         parameter.  Save quoting info.  Don't throw if being called for
7318         completion.  Don't handle Ada operators here.
7319         (is_cp_operator, skip_op_false_positives, first_of)
7320         (explicit_location_lex_one_function): New function.
7321         (string_to_explicit_location): Replace 'dont_throw' parameter with
7322         an explicit_completion_info pointer parameter.  Handle it.  Don't
7323         use explicit_location_lex_one to lex function names.  Use
7324         explicit_location_lex_one_function instead.
7325         * location.h (struct explicit_completion_info): New.
7326         (string_to_explicit_location): Replace 'dont_throw' parameter with
7327         an explicit_completion_info pointer parameter.
7328         * symtab.c (default_collect_symbol_completion_matches_break_on):
7329         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
7330         (default_collect_symbol_completion_matches)
7331         (collect_symbol_completion_matches): Add complete_symbol_mode
7332         parameter.
7333         (collect_symbol_completion_matches_type): Pass down
7334         complete_symbol_mode::EXPRESSION.
7335         (collect_file_symbol_completion_matches): Add complete_symbol_mode
7336         parameter.  Handle LINESPEC mode.
7337         * symtab.h (complete_symbol_mode): New.
7338         (default_collect_symbol_completion_matches_break_on)
7339         (default_collect_symbol_completion_matches)
7340         (collect_symbol_completion_matches)
7341         (collect_file_symbol_completion_matches): Add complete_symbol_mode
7342         parameter.
7343
7344 2017-07-17  Pedro Alves  <palves@redhat.com>
7345
7346         * utils.c (enum class strncmp_iw_mode): New.
7347         (strcmp_iw): Rename to ...
7348         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
7349         parameters.  Handle them.
7350         (strncmp_iw): New.
7351         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
7352         * utils.h (strncmp_iw): Declare.
7353         (strcmp_iw): Move describing comments here.
7354
7355 2017-07-17  Pedro Alves  <palves@redhat.com>
7356
7357         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
7358         CP_OPERATOR_STR.
7359         * c-typeprint.c (is_type_conversion_operator): Use
7360         CP_OPERATOR_STR.
7361         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
7362         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
7363         CP_OPERATOR_LEN.
7364         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
7365         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
7366         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
7367         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
7368         CP_OPERATOR_STR.
7369         * location.c: Include "cp-support.h".
7370         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
7371         CP_OPERATOR_STR.
7372         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
7373         CP_OPERATOR_LEN.
7374
7375 2017-07-17  Pedro Alves  <palves@redhat.com>
7376
7377         * cli/cli-cmds.c (complete_command): Use a completion tracker
7378         along with completion_find_completion_word for handle_brkchars
7379         phase.
7380         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
7381         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
7382         (struct gdb_rl_completion_word_info): New.
7383         (gdb_rl_find_completion_word): New.
7384         (completion_find_completion_word): New.
7385         * completer.h (completion_find_completion_word): Declare.
7386
7387 2017-07-17  Pedro Alves  <palves@redhat.com>
7388
7389         * ada-lang.c (symbol_completion_match): Adjust comments.
7390         (symbol_completion_add): Replace vector parameter with
7391         completion_tracker parameter.  Use it.
7392         (ada_make_symbol_completion_list): Rename to...
7393         (ada_collect_symbol_completion_matches): ... this.  Add
7394         completion_tracker parameter and use it.
7395         (ada_language_defn): Adjust.
7396         * break-catch-syscall.c (catch_syscall_completer): Adjust
7397         prototype and work with completion_tracker instead of VEC.
7398         * breakpoint.c (condition_completer): Adjust prototype and work
7399         with completion_tracker instead of VEC.
7400         * c-lang.c (c_language_defn, cplus_language_defn)
7401         (asm_language_defn, minimal_language_defn): Adjust to renames.
7402         * cli/cli-cmds.c (complete_command): Rework using
7403         completion_tracker.  Catch exceptions when completing.
7404         * cli/cli-decode.c (integer_unlimited_completer)
7405         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
7406         with completion_tracker instead of VEC.
7407         * command.h (struct completion_tracker): Forward declare.
7408         (completer_ftype, completer_handle_brkchars_ftype): Change
7409         types.
7410         (complete_on_cmdlist, complete_on_enum): Adjust.
7411         * completer.c: Include <algorithm>.
7412         (struct gdb_completer_state): New.
7413         (current_completion): New global.
7414         (readline_line_completion_function): Delete.
7415         (noop_completer, filename_completer)
7416         (filename_completer_handle_brkchars, complete_files_symbols)
7417         (linespec_location_completer): Adjust to work with a
7418         completion_tracker instead of a VEC.
7419         (string_or_empty): New.
7420         (collect_explicit_location_matches): Adjust to work with a
7421         completion_tracker instead of a VEC.
7422         (explicit_location_completer): Rename to ...
7423         (complete_explicit_location): ... this and adjust to work with a
7424         completion_tracker instead of a VEC.
7425         (location_completer): Adjust to work with a completion_tracker
7426         instead of a VEC.
7427         (add_struct_fields): Adjust to work with a completion_list instead
7428         of VEC.
7429         (expression_completer): Rename to ...
7430         (complete_expression): ... this and adjust to work with a
7431         completion_tracker instead of a VEC.  Use complete_files_symbols.
7432         (expression_completer): Reimplement on top of complete_expression.
7433         (symbol_completer): Adjust to work with a completion_tracker
7434         instead of a VEC.
7435         (enum complete_line_internal_reason): Add describing comments.
7436         (complete_line_internal_normal_command): Adjust to work with a
7437         completion_tracker instead of a VEC.
7438         (complete_line_internal): Rename to ...
7439         (complete_line_internal_1): ... this and adjust to work with a
7440         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
7441         handle_brkchars phase.
7442         (new_completion_tracker): Delete.
7443         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
7444         complete_line_internal_1.
7445         (free_completion_tracker): Delete.
7446         (INITIAL_COMPLETION_HTAB_SIZE): New.
7447         (completion_tracker::completion_tracker)
7448         (completion_tracker::~completion_tracker): New.
7449         (maybe_add_completion): Delete.
7450         (completion_tracker::maybe_add_completion)
7451         (completion_tracker::add_completion)
7452         (completion_tracker::add_completions): New.
7453         (throw_max_completions_reached_error): Delete.
7454         (complete_line): Adjust to work with a completion_tracker instead
7455         of a VEC.  Don't create a completion_tracker_t or check for max
7456         completions here.
7457         (command_completer, command_completer_handle_brkchars)
7458         (signal_completer, reg_or_group_completer_1)
7459         (reg_or_group_completer, default_completer_handle_brkchars):
7460         Adjust to work with a completion_tracker.
7461         (gdb_completion_word_break_characters_throw): New.
7462         (gdb_completion_word_break_characters): Reimplement.
7463         (line_completion_function): Delete.
7464         (completion_tracker::recompute_lowest_common_denominator)
7465         (expand_preserving_ws)
7466         (completion_tracker::build_completion_result)
7467         (completion_result::completion_result)
7468         (completion_result::completion_result)
7469         (completion_result::~completion_result)
7470         (completion_result::completion_result)
7471         (completion_result::release_match_list, compare_cstrings)
7472         (completion_result::sort_match_list)
7473         (completion_result::reset_match_list)
7474         (gdb_rl_attempted_completion_function_throw)
7475         (gdb_rl_attempted_completion_function): New.
7476         * completer.h (completion_list, struct completion_result)
7477         (class completion_tracker): New.
7478         (complete_line): Add completion_tracker parameter.
7479         (readline_line_completion_function): Delete.
7480         (gdb_rl_attempted_completion_function): New.
7481         (noop_completer, filename_completer, expression_completer)
7482         (location_completer, symbol_completer, command_completer)
7483         (signal_completer, reg_or_group_completer): Update prototypes.
7484         (completion_tracker_t, new_completion_tracker)
7485         (make_cleanup_free_completion_tracker): Delete.
7486         (enum maybe_add_completion_enum): Delete.
7487         (maybe_add_completion): Delete.
7488         (throw_max_completions_reached_error): Delete.
7489         * corefile.c (complete_set_gnutarget): Adjust to work with a
7490         completion_tracker instead of a VEC.
7491         * cp-abi.c (cp_abi_completer): Adjust to work with a
7492         completion_tracker instead of a VEC.
7493         * d-lang.c (d_language_defn): Adjust.
7494         * disasm.c (disassembler_options_completer): Adjust to work with a
7495         completion_tracker instead of a VEC.
7496         * f-lang.c (f_make_symbol_completion_list): Rename to ...
7497         (f_collect_symbol_completion_matches): ... this.  Adjust to work
7498         with a completion_tracker instead of a VEC.
7499         (f_language_defn): Adjust.
7500         * go-lang.c (go_language_defn): Adjust.
7501         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
7502         Adjust to work with a completion_tracker instead of a VEC.
7503         * infrun.c (handle_completer): Likewise.
7504         * interps.c (interpreter_completer): Likewise.
7505         * interps.h (interpreter_completer): Likewise.
7506         * language.c (unknown_language_defn, auto_language_defn)
7507         (local_language_defn): Adjust.
7508         * language.h (language_defn::la_make_symbol_completion_list):
7509         Rename to ...
7510         (language_defn::la_collect_symbol_completion_matches): ... this
7511         and adjust to work with a completion_tracker instead of a VEC.
7512         * m2-lang.c (m2_language_defn): Adjust.
7513         * objc-lang.c (objc_language_defn): Adjust.
7514         * opencl-lang.c (opencl_language_defn): Adjust.
7515         * p-lang.c (pascal_language_defn): Adjust.
7516         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
7517         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
7518         with a completion_tracker.
7519         * rust-lang.c (rust_language_defn): Adjust.
7520         * symtab.c (free_completion_list, do_free_completion_list)
7521         (return_val, completion_tracker): Delete.
7522         (completion_list_add_name, completion_list_add_symbol)
7523         (completion_list_add_msymbol, completion_list_objc_symbol)
7524         (completion_list_add_fields, add_symtab_completions): Add
7525         completion_tracker parameter and use it.
7526         (default_make_symbol_completion_list_break_on_1): Rename to...
7527         (default_collect_symbol_completion_matches_break_on): ... this.
7528         Add completion_tracker parameter and use it instead of allocating
7529         a completion tracker here.
7530         (default_make_symbol_completion_list_break_on): Delete old
7531         implementation.
7532         (default_make_symbol_completion_list): Delete.
7533         (default_collect_symbol_completion_matches): New.
7534         (make_symbol_completion_list): Delete.
7535         (collect_symbol_completion_matches): New.
7536         (make_symbol_completion_type): Rename to ...
7537         (collect_symbol_completion_matches_type): ... this.  Add
7538         completion_tracker parameter and use it instead of VEC.
7539         (make_file_symbol_completion_list_1): Rename to...
7540         (collect_file_symbol_completion_matches): ... this.  Add
7541         completion_tracker parameter and use it instead of VEC.
7542         (make_file_symbol_completion_list): Delete.
7543         (add_filename_to_list): Use completion_list instead of a VEC.
7544         (add_partial_filename_data::list): Now a completion_list.
7545         (make_source_files_completion_list): Work with a completion_list
7546         instead of a VEC.
7547         * symtab.h: Include "completer.h".
7548         (default_make_symbol_completion_list_break_on)
7549         (default_make_symbol_completion_list, make_symbol_completion_list)
7550         (make_symbol_completion_type, make_file_symbol_completion_list)
7551         (make_source_files_completion_list): Delete.
7552         (default_collect_symbol_completion_matches_break_on)
7553         (default_collect_symbol_completion_matches)
7554         (collect_symbol_completion_matches)
7555         (collect_symbol_completion_matches_type)
7556         (collect_file_symbol_completion_matches)
7557         (make_source_files_completion_list): New.
7558         * top.c (init_main): Don't install a rl_completion_entry_function
7559         hook.  Install a rl_attempted_completion_function hook instead.
7560         * tui/tui-layout.c (layout_completer): Adjust to work with a
7561         completion_tracker.
7562         * tui/tui-regs.c (tui_reggroup_completer):
7563         * tui/tui-win.c (window_name_completer, focus_completer)
7564         (winheight_completer): Adjust to work with a completion_tracker.
7565         * value.c: Include "completer.h".
7566         (complete_internalvar): Adjust to work with a completion_tracker.
7567         * value.h (complete_internalvar): Likewise.
7568
7569 2017-07-17  Pedro Alves  <palves@redhat.com>
7570
7571         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
7572         renames.
7573         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
7574         comments to completer_ftype's declaration.
7575         <completer_handle_brkchars>: Change type to
7576         completer_handle_brkchars_ftype.
7577         * command.h (completer_ftype): Add describing comment and give
7578         names to parameters.
7579         (completer_ftype_void): Rename to ...
7580         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
7581         (set_cmd_completer_handle_brkchars): Adjust.
7582         * completer.c (filename_completer_handle_brkchars): New function.
7583         (complete_line_internal_normal_command): New function, factored
7584         out from ...
7585         (complete_line_internal): ... here.
7586         (command_completer_handle_brkchars)
7587         (default_completer_handle_brkchars)
7588         (completer_handle_brkchars_func_for_completer): New functions.
7589         * completer.h (set_gdb_completion_word_break_characters): Delete
7590         declaration.
7591         (completer_handle_brkchars_func_for_completer): New declaration.
7592         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
7593         completer_handle_brkchars_func_for_completer.
7594
7595 2017-07-17  Pedro Alves  <palves@redhat.com>
7596
7597         * completer.c (symbol_completer): New function, based on
7598         make_symbol_completion_list_fn.
7599         * completer.h (symbol_completer): New declaration.
7600         * guile/scm-cmd.c (cmdscm_completers): Adjust.
7601         * python/py-cmd.c (completers): Adjust.
7602         * symtab.c (make_symbol_completion_list_fn): Delete.
7603         * symtab.h (make_symbol_completion_list_fn): Delete.
7604         * cli/cli-decode.c (add_cmd): Adjust.
7605
7606 2017-07-17  Pedro Alves  <palves@redhat.com>
7607
7608         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
7609         * dwarf2read.c: Include "filename-seen-cache.h".
7610         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
7611         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
7612         * filename-seen-cache.c: New file.
7613         * filename-seen-cache.h: New file.
7614         * symtab.c: Include "filename-seen-cache.h".
7615         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7616         (create_filename_seen_cache, clear_filename_seen_cache)
7617         (delete_filename_seen_cache, filename_seen): Delete, parts moved
7618         to filename-seen-cache.h/filename-seen-cache.c.
7619         (output_source_filename, sources_info)
7620         (maybe_add_partial_symtab_filename)
7621         (make_source_files_completion_list): Adjust to use
7622         filename_seen_cache.
7623
7624 2017-07-17  Pedro Alves  <palves@redhat.com>
7625
7626         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
7627         fields.
7628         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
7629         dwarf2_debug_sections*)): New.
7630         (dwarf2_per_objfile::dwarf2_per_objfile(const
7631         dwarf2_per_objfile&)): Declare as deleted.
7632         (dwarf2_per_objfile::operator=): Declare as deleted.
7633         (dwarf2_per_objfile::dwarf2_per_objfile)
7634         (dwarf2_per_objfile::~dwarf2_per_objfile)
7635         (dwarf2_per_objfile::free_cached_comp_units): New.
7636         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7637         ctor.  Call dwarf2_per_objfile's ctor manually.
7638         (dwarf2_locate_sections): Deleted/refactored as ...
7639         (dwarf2_per_objfile::locate_sections): ... this new method.
7640         (free_cached_comp_units): Defer to
7641         dwarf2_per_objfile::free_cached_comp_units.
7642         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7643
7644 2017-07-14  Tom Tromey  <tom@tromey.com>
7645
7646         PR rust/21764:
7647         * rust-exp.y (convert_ast_to_expression): Add "want_type"
7648         parameter.
7649         <UNOP_SIZEOF>: Split into separate case.
7650         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
7651
7652 2017-07-14  Tom Tromey  <tom@tromey.com>
7653
7654         PR rust/21763:
7655         * symtab.c (symbol_matches_domain): Add language_rust to special
7656         case.
7657         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7658         treat LOC_TYPEDEF symbols as variables.
7659
7660 2017-07-14  Pedro Alves  <palves@redhat.com>
7661
7662         * symtab.c (make_file_symbol_completion_list_1): Iterate over
7663         symtabs matching all symtabs with SRCFILE as file name instead of
7664         only considering the first hit, with lookup_symtab.
7665
7666 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7667
7668         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7669         operator_name parameters.
7670         (gen_expr): Update function call.
7671
7672 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7673
7674         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7675         parameter.
7676         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7677         Likewise.
7678         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7679         parameter, use agent_expr::gdbarch instead, update function
7680         calls.
7681         (locexpr_tracepoint_var_ref): Likewise.
7682         (loclist_tracepoint_var_ref): Likewise.
7683         * ax-gdb.c (gen_trace_static_fields): Likewise.
7684         (gen_traced_pop): Likewise.
7685         (gen_frame_args_address): Likewise.
7686         (gen_frame_locals_address): Likewise.
7687         (gen_var_ref): Likewise.
7688         (gen_struct_ref_recursive): Likewise.
7689         (gen_static_field): Likewise.
7690         (gen_maybe_namespace_elt): Likewise.
7691         (gen_expr): Likewise.
7692         (gen_trace_for_var): Likewise.
7693         (gen_trace_for_expr): Likewise.
7694         (gen_trace_for_return_address): Likewise.
7695
7696 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7697
7698         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7699         parameter.
7700         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7701
7702 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7703
7704         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7705         from ax, update calls.
7706         (gen_usual_arithmetic): Likewise.
7707         (gen_integral_promotions): Likewise.
7708         (gen_bitfield_ref): Likewise.
7709         (gen_primitive_field): Likewise.
7710         (gen_struct_ref_recursive): Likewise.
7711         (gen_struct_ref): Likewise.
7712         (gen_maybe_namespace_elt): Likewise.
7713         (gen_struct_elt_for_reference): Likewise.
7714         (gen_namespace_elt): Likewise.
7715         (gen_aggregate_elt_ref): Likewise.
7716         (gen_expr): Get gdbarch from ax, update calls.
7717         (gen_expr_binop_rest): Likewise.
7718
7719 2017-07-13  Pedro Alves  <palves@redhat.com>
7720
7721         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7722         as default tdesc.
7723         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7724         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7725         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7726         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
7727         tdep.
7728         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7729         Get final tdesc from the tdep.
7730         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7731         default tdesc.
7732         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7733         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7734         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7735         Use it as default tdesc.
7736         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7737         down to amd_init_abi.  No longer handle fallback tdesc here.
7738         * amd64-tdep.h (tdesc_x32): Declare.
7739         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7740         parameter.
7741         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7742         as default tdesc.
7743
7744 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7745
7746         * s390-linux-tdep.c (s390_process_record): Add support for
7747         instructions new in arch12.
7748
7749 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7750
7751         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7752         PT_GETFSBASE and PT_GETGSBASE.
7753         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7754         PT_SETGSBASE.
7755
7756 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7757
7758         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7759         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7760         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7761         those rules.
7762         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7763         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7764         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7765         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7766         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7767         * features/i386/amd64.xml: Add 64bit-segments.xml.
7768         * features/i386/amd64-avx-avx512.c: Regenerated.
7769         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7770         * features/i386/amd64-avx-mpx.c: Regenerated.
7771         * features/i386/amd64-avx.c: Regenerated.
7772         * features/i386/amd64-mpx.c: Regenerated.
7773         * features/i386/amd64.c: Regenerated.
7774         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7775         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7776         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7777         * regformats/i386/amd64-avx.dat: Regenerated.
7778         * regformats/i386/amd64-mpx.dat: Regenerated.
7779         * regformats/i386/amd64.dat: Regenerated.
7780
7781 2017-07-10  Yao Qi  <yao.qi@linaro.org>
7782
7783         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7784         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7785
7786 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
7787
7788         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7789         unsetenv.
7790         * gnulib/aclocal.m4: Regenerate.
7791         * gnulib/config.in: Regenerate.
7792         * gnulib/configure: Regenerate.
7793         * gnulib/import/Makefile.am: Regenerate.
7794         * gnulib/import/Makefile.in: Regenerate.
7795         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7796         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7797         * gnulib/import/m4/environ.m4: New file.
7798         * gnulib/import/m4/setenv.m4: New file.
7799         * gnulib/import/setenv.c: New file.
7800         * gnulib/import/unsetenv.c: New file.
7801
7802 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
7803
7804         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7805         address when op is DW_OP_addr.
7806
7807 2017-07-09  Tom Tromey  <tom@tromey.com>
7808
7809         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7810         check and apply to outer type.
7811
7812 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7813
7814         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7815         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7816         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7817         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7818
7819 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7820
7821         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7822
7823 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7824
7825         * corelow.c (get_core_siginfo): Remove.
7826         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7827         instead of get_core_siginfo.
7828         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7829         * gdbarch.h: Re-generate.
7830         * gdbarch.c: Re-generate.
7831         * linux-tdep.c (linux_core_xfer_siginfo): New.
7832         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7833
7834 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7835
7836         * corelow.c (thread_section_name): Move to ...
7837         * gdbcore.h (thread_section_name): ... here.
7838
7839 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7840
7841         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7842         (struct siginfo32): New.
7843         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7844         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7845         via ptrace(PT_LWPINFO).
7846
7847 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7848
7849         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7850         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7851         (fbsd_get_siginfo_type): New.
7852         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7853         (_initialize_fbsd_tdep): New.
7854
7855 2017-07-06  David Blaikie  <dblaikie@gmail.com>
7856
7857         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7858         a singular dwo_unit*) to support multiple CUs in the same way that
7859         multiple TUs are supported.
7860         (create_cus_hash_table): Replace create_dwo_cu with a function for
7861         parsing multiple CUs from a DWO file.
7862         (open_and_init_dwo_file): Use create_cus_hash_table rather than
7863         create_dwo_cu.
7864         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7865         htab_find, rather than comparing the signature to a singleton CU in
7866         the dwo_file.
7867
7868 2017-07-06  Pedro Alves  <palves@redhat.com>
7869
7870         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7871
7872 2017-07-04  Pedro Alves  <palves@redhat.com>
7873
7874         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7875         * gdbtypes.h (TYPE_STATIC): Delete.
7876         (struct fn_field) <is_public, is_abstract, is_static, is_final,
7877         is_synchronized, is_native>: Delete.
7878         <dummy>: Bump.
7879         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7880         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7881         (TYPE_FN_FIELD_ABSTRACT): Delete.
7882
7883 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
7884
7885         * buffer.h (buffer_finish): Fix spelling mistakes.
7886
7887 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
7888
7889         * .dir-locals.el: Automatically switch to C-style comments in
7890         versions of Emacs that support the feature.
7891
7892 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7893             Pedro Alves  <palves@redhat.com>
7894
7895         PR cli/21688
7896         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7897         (process_next_line): New variable 'inline_cmd'.
7898         Adjust 'if' clauses for "python", "compile" and "guile" to use
7899         'command_name_equals' and check for '!inline_cmd'.
7900
7901 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7902
7903         PR cli/21688
7904         * cli/cli-script.c (command_name_equals_not_inline): New function.
7905         (process_next_line): Adjust 'if' clauses for "python", "compile"
7906         and "guile" to use command_name_equals_not_inline.
7907
7908 2017-06-29  Pedro Alves  <palves@redhat.com>
7909
7910         * completer.c (expression_completer): Call
7911         linespec_location_completer instead of location_completer.
7912
7913 2017-06-29  Pedro Alves  <palves@redhat.com>
7914
7915         * completer.c (expression_completer): Remove code that recomputes
7916         'text' from 'word'.
7917
7918 2017-06-29  Yao Qi  <yao.qi@linaro.org>
7919
7920         * regformats/regdat.sh: Generate code with
7921         "ifndef IN_PROCESS_AGENT".
7922
7923 2017-06-28  Pedro Alves  <palves@redhat.com>
7924
7925         * command.h: Include "common/scoped_restore.h".
7926
7927 2017-06-28  Yao Qi  <yao.qi@linaro.org>
7928
7929         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7930         instead of obstack_grow.
7931
7932 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
7933
7934         PR gdb/21337
7935         * symfile.c (reread_symbols): Call objfiles_changed just before
7936         read_symbols.
7937
7938 2017-06-27  Pedro Alves  <palves@redhat.com>
7939
7940         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7941         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7942         (completion_list_add_symbol, completion_list_add_msymbol):
7943         ... these new functions.
7944         (add_symtab_completions)
7945         (default_make_symbol_completion_list_break_on_1): Adjust.
7946
7947 2017-06-27  Pedro Alves  <palves@redhat.com>
7948
7949         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7950         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
7951         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7952         dtor.
7953         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
7954         'storage_obstack' field an auto_obstack.  In-class initialize all
7955         non-bitfield fields.  Make minsyms_read bool.
7956         * symfile.c (read_symbols): Adjust.
7957
7958 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
7959
7960         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7961         (gdbsim_store_register): Likewise.
7962
7963 2017-06-27  Pedro Alves  <palves@redhat.com>
7964
7965         * c-exp.y (name_obstack): Now an auto_obstack.
7966         (yylex): Use auto_obstack::clear.
7967         (c_parse): Use auto_obstack::clear instead of reinitializing and
7968         freeing the obstack.
7969         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7970         * d-exp.y (name_obstack): Now an auto_obstack.
7971         (yylex): Use auto_obstack::clear.
7972         (d_parse): Use auto_obstack::clear instead of reinitializing and
7973         freeing the obstack.
7974         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7975         auto_obstack.
7976         * dwarf2read.c (create_addrmap_from_index)
7977         (dwarf2_build_psymtabs_hard)
7978         (update_enumeration_type_from_children): Likewise.
7979         * gdb_obstack.h (auto_obstack): New type.
7980         * go-exp.y (name_obstack): Now an auto_obstack.
7981         (build_packaged_name): Use auto_obstack::clear.
7982         (go_parse): Use auto_obstack::clear instead of reinitializing and
7983         freeing the obstack.
7984         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7985         auto_obstack.
7986         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7987         * rust-exp.y (work_obstack): Now an auto_obstack.
7988         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7989         reinitializing and freeing the obstack.
7990         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7991         (host_char_to_target): Use auto_obstack.
7992         * utils.h (make_cleanup_obstack_free): Delete declaration.
7993         * valprint.c (generic_emit_char, generic_printstr): Use
7994         auto_obstack.
7995
7996 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7997
7998         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7999         thread.
8000         (darwin_init_thread_list): Don't update dummy thread.
8001         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8002
8003 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8004
8005         * record-full.c (netorder16): Remove.
8006
8007 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8008
8009         * common/diagnostics.h: Define macros for GCC.
8010         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8011         * common/vec.h: Include diagnostics.h.
8012         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8013         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8014         warning.
8015
8016 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8017
8018         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8019         New macro.
8020         * ada-lex.l: Ignore deprecated register warnings.
8021
8022 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8023
8024         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8025         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8026
8027 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8028
8029         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8030         its own line.
8031
8032 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8033
8034         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8035
8036 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
8037
8038         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8039         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8040         (xtensa_register_read_masked): Likewise.
8041
8042 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
8043
8044         * common/environ.c (gdb_environ::unset): Update comment.
8045
8046 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8047
8048         * python/py-unwind.c (pyuw_sniffer): Allocate space for
8049         registers.
8050
8051 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8052
8053         * record-full.c (record_full_exec_insn): Use byte_vector.
8054
8055 2017-06-22  Yao Qi  <yao.qi@linaro.org>
8056
8057         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8058         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8059
8060 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8061
8062         * remote.c (cached_reg): Move from here...
8063         * regcache.h (cached_reg): ...to here.
8064         * python/py-unwind.c (struct reg_info): Remove.
8065         (cached_frame_info): Use cached_reg_t.
8066         (pyuw_prev_register): Likewise.
8067         (pyuw_sniffer): Use cached_reg_t and allocate registers.
8068         (pyuw_dealloc_cache): Free all registers.
8069
8070 2017-06-22  Pedro Alves  <palves@redhat.com>
8071             Simon Marchi  <simon.marchi@ericsson.com>
8072
8073         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8074         warning.
8075         * common/diagnostics.h: New file.
8076
8077 2017-06-22  Pedro Alves  <palves@redhat.com>
8078
8079         * common/agent.h: Add include guards.
8080
8081 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
8082
8083         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8084         talk about addressable units instead of bytes.
8085
8086 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8087
8088         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8089         of '::const_iterator'.
8090
8091 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8092
8093         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8094         'unittests/environ-selftests.c'.
8095         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8096         * charset.c (find_charset_names): Declare object 'iconv_env'.
8097         Update code to use 'iconv_env' object.  Remove call to
8098         'free_environ'.
8099         * common/environ.c: Include <utility>.
8100         (make_environ): Delete function.
8101         (free_environ): Delete function.
8102         (gdb_environ::clear): New function.
8103         (gdb_environ::operator=): New function.
8104         (gdb_environ::get): Likewise.
8105         (environ_vector): Delete function.
8106         (set_in_environ): Delete function.
8107         (gdb_environ::set): New function.
8108         (unset_in_environ): Delete function.
8109         (gdb_environ::unset): New function.
8110         (gdb_environ::envp): Likewise.
8111         * common/environ.h: Include <vector>.
8112         (struct gdb_environ): Delete; transform into...
8113         (class gdb_environ): ... this class.
8114         (free_environ): Delete prototype.
8115         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8116         environ_vector): Likewise.
8117         * infcmd.c (run_command_1): Update code to call
8118         'envp' from 'gdb_environ' class.
8119         (environment_info): Update code to call methods from 'gdb_environ'
8120         class.
8121         (unset_environment_command): Likewise.
8122         (path_info): Likewise.
8123         (path_command): Likewise.
8124         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8125         (inferior::inferior): Initialize 'environment' using the host's
8126         information.
8127         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8128         Include "environ.h".
8129         (class inferior) <environment>: Change type from 'struct
8130         gdb_environ' to 'gdb_environ'.
8131         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8132         methods from 'gdb_environ' class.
8133         * solib.c (solib_find_1): Likewise
8134         * unittests/environ-selftests.c: New file.
8135
8136 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8137
8138         * features/i386/i386-linux.xml: Exchange the order of including
8139         32bit-linux.xml and 32bit-sse.xml.
8140         * features/i386/i386-linux.c: Regenerated.
8141
8142 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8143
8144         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
8145         Delete copy ctor and assignment operator.
8146         (tdesc_type): Likewise.
8147         (tdesc_feature): Likewise.
8148         (tdesc_free_reg): Remove.
8149         (tdesc_create_reg): Use new.
8150         (tdesc_free_type): Remove.
8151         (tdesc_create_vector): Use new.
8152         (tdesc_create_union): Likewise.
8153         (tdesc_create_flags): Likewise.
8154         (tdesc_create_enum): Likewise.
8155         (tdesc_free_feature): Delete.
8156         (free_target_description): Use delete.
8157
8158 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
8159
8160         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
8161         registers.
8162
8163 2017-06-19  Pedro Alves  <palves@redhat.com>
8164
8165         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
8166         after gdb::unlinker.
8167
8168 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
8169
8170         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
8171         gdb_environ to access an environment variable.
8172
8173 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
8174
8175         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
8176         gdb_byte*.
8177
8178 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8179
8180         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
8181
8182 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8183
8184         * configure: Re-generate.
8185         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
8186
8187 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8188
8189         * configure: Re-generate.
8190         * warning.m4: Pass -Werror to compiler when checking for
8191         supported warning flags.
8192
8193 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8194
8195         * Makefile.in (COMPILE.pre): Add "-x c++".
8196
8197 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
8198             Pedro Alves  <palves@redhat.com>
8199             Yao Qi  <yao.qi@linaro.org>
8200
8201         * defs.h (RequireLongest): New.
8202         (extract_integer): Declare function template.
8203         (extract_signed_integer): Remove the declaration, but define it
8204         static inline.
8205         (extract_unsigned_integer): Likewise.
8206         (store_integer): Declare function template.
8207         (store_signed_integer): Remove the declaration, but define it
8208         static inline.
8209         (store_unsigned_integer): Likewise.
8210         * findvar.c (extract_integer): New function template.
8211         (extract_signed_integer): Remove.
8212         (extract_unsigned_integer): Remove.
8213         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
8214         instantiations.
8215         (store_integer): New function template.
8216         (store_signed_integer): Remove.
8217         (store_unsigned_integer): Remove.
8218         (store_integer): Explicit instantiations.
8219         * regcache.c (regcache_raw_read_signed): Update.
8220         (regcache::raw_read): New function.
8221         (regcache::raw_read_signed): Remove.
8222         (regcache::raw_read_unsigned): Remove.
8223         (regcache_raw_read_unsigned): Update.
8224         (regcache_raw_write_unsigned): Update.
8225         (regcache::raw_write_signed): Remove.
8226         (regcache::raw_write): New function.
8227         (regcache_cooked_read_signed): Update.
8228         (regcache::raw_write_unsigned): Remove.
8229         (regcache::cooked_read_signed): Remove.
8230         (regcache_cooked_read_unsigned): Update.
8231         (regcache::cooked_read_unsigned): Remove.
8232         (regcache_cooked_write_signed): Update.
8233         (regcache_cooked_write_unsigned): Update.
8234         * regcache.h (regcache) <raw_read_signed>: Remove.
8235         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
8236         <raw_read, raw_write>: New.
8237         <cooked_read_signed, cooked_write_signed>: Remove.
8238         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
8239         <cooked_read, cooked_write>: New.
8240         * sh64-tdep.c (sh64_pseudo_register_read): Update.
8241         (sh64_pseudo_register_write): Update.
8242
8243 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
8244
8245         * arc-tdep.c (arc_disassembler_options): New variable.
8246         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
8247         of default_print_insn.
8248         (arc_delayed_print_insn): Set info->section when needed,
8249         use default_print_insn to retrieve a disassembler.
8250
8251 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
8252
8253         PR gdb/21574
8254         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
8255         to mention $SHELL and startup-with-shell.
8256
8257 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
8258
8259         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
8260
8261 2017-06-14  Yao Qi  <yao.qi@linaro.org>
8262
8263         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
8264         default_print_insn instead of print_insn_aarch64.
8265         * arm-tdep.c (gdb_print_insn_arm): Call
8266         default_print_insn instead of print_insn_big_arm
8267         and print_insn_little_arm.
8268         * i386-tdep.c (i386_print_insn): Call default_print_insn
8269         instead of print_insn_i386.
8270         * ia64-tdep.c (ia64_print_insn): Call
8271         default_print_insn instead of print_insn_ia64.
8272         * mips-tdep.c (gdb_print_insn_mips): Call
8273         default_print_insn instead of print_insn_big_mips
8274         and print_insn_little_mips.
8275         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
8276         instead of print_insn_spu.
8277
8278 2017-06-14  Pedro Alves  <palves@redhat.com>
8279
8280         * ada-lang.c: Include "common/byte-vector.h".
8281         (ada_value_primitive_packed_val): Use gdb::byte_vector.
8282         * charset.c (wchar_iterator::iterate): Resize the vector instead
8283         of reserving it.
8284         * common/byte-vector.h: Include "common/def-vector.h".
8285         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
8286         * cli/cli-dump.c: Include "common/byte-vector.h".
8287         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
8288         * common/byte-vector.h: New file.
8289         * common/def-vector.h: New file.
8290         * common/default-init-alloc.h: New file.
8291         * dwarf2loc.c: Include "common/byte-vector.h".
8292         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
8293         instead of reserving it.
8294         * dwarf2read.c: Include "common/byte-vector.h".
8295         (data_buf::m_vec): Now a gdb::byte_vector.
8296         * gdb_regex.c: Include "common/def-vector.h".
8297         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
8298         * mi/mi-main.c: Include "common/byte-vector.h".
8299         (mi_cmd_data_read_memory): Use gdb::byte_vector.
8300         * printcmd.c: Include "common/byte-vector.h".
8301         (print_scalar_formatted): Use gdb::byte_vector.
8302         * valprint.c: Include "common/byte-vector.h".
8303         (maybe_negate_by_bytes, print_decimal_chars): Use
8304         gdb::byte_vector.
8305
8306 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8307
8308         * darwin-nat.c: Include "nat/fork-inferior.h".
8309
8310 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8311
8312         * configure.nat: Factor out Darwin bits that are not
8313         architecture-specific.  Add fork-inferior.o.
8314
8315 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8316
8317         * configure.nat: Factor out AIX bits that are not
8318         architecture-specific.  Add fork-inferior.o.
8319
8320 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8321
8322         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
8323         (read_pieced_value, write_pieced_value): ...here.  Reduce to
8324         wrappers that just call rw_pieced_value.
8325
8326 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8327
8328         * dwarf2loc.c (write_pieced_value): When writing the data for a
8329         memory piece, use write_memory_with_notification instead of
8330         write_memory.
8331
8332 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8333
8334         * valops.c (read_value_memory): Change embedded_offset to
8335         represent a bit offset instead of a byte offset.
8336         * value.h (read_value_memory): Adjust comment.
8337
8338 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8339
8340         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
8341         dest_offset_bits and source_offset_bits.
8342         (write_pieced_value): Likewise.
8343
8344 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8345
8346         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
8347         given by DW_OP_bit_piece.
8348         (write_pieced_value): Likewise.
8349
8350 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8351
8352         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
8353         some other preparations to the places where sufficient information
8354         is available.
8355         (write_pieced_value): Likewise.
8356
8357 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8358
8359         * dwarf2loc.c (bits_to_bytes): New function.
8360         (read_pieced_value): Fix offset calculations for register pieces
8361         on big-endian targets.
8362         (write_pieced_value): Likewise.
8363
8364 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8365
8366         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
8367         (write_pieced_value): Likewise.
8368
8369 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8370
8371         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
8372         transfer the source value's least significant bits, instead of its
8373         lowest-addressed ones.  Rename type_len to max_offset.
8374         (read_pieced_value): Mirror above changes to write_pieced_value as
8375         applicable.
8376
8377 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8378
8379         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
8380         truncate full bytes from dest_offset_bits before using it as an
8381         offset into the buffer.
8382
8383 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8384
8385         * dwarf2loc.c (write_pieced_value): Include transfer size in
8386         byte-wise check.
8387
8388 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8389
8390         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
8391         calculation of this_size.
8392
8393 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8394
8395         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
8396         when targeting a bit-field.
8397         (write_pieced_value): Likewise.
8398
8399 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8400
8401         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
8402         (allocate_piece_closure): Drop addr_size parameter.
8403         (dwarf2_evaluate_loc_desc_full): Adjust call to
8404         allocate_piece_closure.
8405
8406 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8407
8408         PR gdb/21226
8409         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
8410         the LSB end, independent of endianness.
8411
8412 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8413
8414         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
8415         size capping.
8416
8417 2017-06-13  Yao Qi  <yao.qi@linaro.org>
8418
8419         * mips-linux-nat.c: Move include features/mips*-linux.c to
8420         mips-linux-tdep.c.
8421         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
8422         to mips-linux-tdep.c.
8423         * mips-linux-tdep.c: Include features/mips*-linux.c
8424         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
8425         functions.
8426         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
8427         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
8428         (tdesc_mips64_dsp_linux): Declare.
8429
8430 2017-06-12  Tom Tromey  <tom@tromey.com>
8431
8432         * valprint.h (val_print_type_code_int): Remove.
8433         * valprint.c (generic_val_print_int): Always call
8434         val_print_scalar_formatted.
8435         (val_print_type_code_int): Remove.
8436         * printcmd.c (print_scalar_formatted): Handle options->format==0.
8437         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
8438         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
8439         * ada-valprint.c (ada_val_print_num): Use
8440         val_print_scalar_formatted.
8441
8442 2017-06-12  Tom Tromey  <tom@tromey.com>
8443
8444         * printcmd.c (print_scalar_formatted): Unify the two switches.
8445         Don't convert scalars to LONGEST.
8446
8447 2017-06-12  Tom Tromey  <tom@tromey.com>
8448
8449         PR exp/16225:
8450         * valprint.h (print_decimal_chars): Update.
8451         * valprint.c (maybe_negate_by_bytes): New function.
8452         (print_decimal_chars): Add "is_signed" argument.
8453         * printcmd.c (print_scalar_formatted): Update.
8454
8455 2017-06-12  Tom Tromey  <tom@tromey.com>
8456
8457         PR exp/16225:
8458         * valprint.h (print_binary_chars, print_hex_chars): Update.
8459         * valprint.c (val_print_type_code_int): Update.
8460         (print_binary_chars): Add "zero_pad" argument.
8461         (emit_octal_digit): New function.
8462         (print_octal_chars): Don't zero-pad.
8463         (print_decimal_chars): Likewise.
8464         (print_hex_chars): Add "zero_pad" argument.
8465         * sh64-tdep.c (sh64_do_fp_register): Update.
8466         * regcache.c (regcache::dump): Update.
8467         * printcmd.c (print_scalar_formatted): Update.
8468         * infcmd.c (default_print_one_register_info): Update.
8469
8470 2017-06-12  Pedro Alves  <palves@redhat.com>
8471             Alan Hayward  <alan.hayward@arm.com>
8472
8473         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
8474         (mips_eabi_push_dummy_call): Rename local 'regsize' to
8475         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
8476         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
8477         Assert that abi_regsize bytes fit in 'ref_valbuf'.
8478
8479 2017-06-12  Pedro Alves  <palves@redhat.com>
8480
8481         * dwarf2read.c (mapped_symtab::data): Now a vector of
8482         symtab_index_entry instead of vector of
8483         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
8484         whether an element's name is NULL instead of checking whether the
8485         element itself is NULL.
8486         (find_slot): Change return type.  Adjust.
8487         (hash_expand, , add_index_entry, uniquify_cu_indices)
8488         (write_hash_table): Adjust.
8489
8490 2017-06-12  Pedro Alves  <palves@redhat.com>
8491
8492         * dwarf2read.c (recursively_count_psymbols): New function.
8493         (write_psymtabs_to_index): Call it to compute number of psyms and
8494         pass estimate size of psyms_seen to unordered_set's ctor.
8495
8496 2017-06-12  Pedro Alves  <palves@redhat.com>
8497
8498         * dwarf2read.c (write_hash_table): Check if key already exists
8499         before emplacing.
8500
8501 2017-06-12  Pedro Alves  <palves@redhat.com>
8502
8503         * dwarf2read.c (data_buf::append_space): Rename to...
8504         (data_buf::grow): ... this, and make private.  Adjust all callers.
8505         (data_buf::append_uint): New method.
8506         (add_address_entry, write_one_signatured_type)
8507         (write_psymtabs_to_index): Use it.
8508
8509 2017-06-12  Pedro Alves  <palves@redhat.com>
8510
8511         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
8512         (file_write (FILE *, const std::vector<Elem>&)): Delete.
8513         (data_buf::file_write): Call ::fwrite directly.
8514
8515 2017-06-12  Pedro Alves  <palves@redhat.com>
8516
8517         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
8518         std::vector::erase.
8519
8520 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8521
8522         Code cleanup: C++ify .gdb_index producer.
8523         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
8524         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
8525         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
8526         (create_strtab, add_string): Remove.
8527         (file_write, data_buf): New.
8528         (struct symtab_index_entry): Use std::vector for cu_indices.
8529         (struct mapped_symtab): Use std::vector for data.
8530         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
8531         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
8532         Remove.
8533         (find_slot): Change return type.  Update it to the new data structures.
8534         (hash_expand, add_index_entry): Update it to the new data structures.
8535         (offset_type_compare): Remove.
8536         (uniquify_cu_indices): Update it to the new data structures.
8537         (c_str_view, c_str_view_hasher, vector_hasher): New.
8538         (add_indices_to_cpool): Remove.
8539         (write_hash_table): Update it to the new data structures.
8540         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
8541         (eq_psymtab_cu_index): Remove.
8542         (psym_index_map): New typedef.
8543         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
8544         reference and std::unordered_map for cu_index_htab.
8545         (add_address_entry, add_address_entry_worker, write_address_map)
8546         (write_psymbols): Update it to the new data structures.
8547         (write_obstack): Remove.
8548         (struct signatured_type_index_data): Change types_list to a data_buf
8549         reference and psyms_seen to a std::unordered_set reference.
8550         (write_one_signatured_type, recursively_write_psymbols)
8551         (write_psymtabs_to_index): Update it to the new data structures.
8552
8553 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
8554
8555         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
8556         separate-debug-file commands.
8557         * symfile.h (separate_debug_file_debug): New global.
8558         * symfile.c (separate_debug_file_debug): New global.
8559         (separate_debug_file_exists, find_separate_debug_file): Add
8560         debug output.
8561         (_initialize_symfile): Add "set debug separate-debug-file"
8562         command.
8563         * build-id.c (build_id_to_debug_bfd,
8564         find_separate_debug_file_by_buildid): Add debug output.
8565
8566 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8567
8568         * gdbarch.sh (displaced_step_free_closure): Remove.
8569         * gdbarch.h, gdbarch.c: Re-generate.
8570         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
8571         displaced_step_free_closure.
8572         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
8573         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
8574         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8575         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8576         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8577         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8578         * arch-utils.h (simple_displaced_step_free_closure): Remove.
8579         * arch-utils.c (simple_displaced_step_free_closure): Remove.
8580         * infrun.c (displaced_step_clear): Call xfree instead of
8581         gdbarch_displaced_step_free_closure.
8582
8583 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
8584
8585         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
8586         NULL".
8587
8588 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
8589
8590         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
8591         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
8592         (mn10300_push_dummy_call): Likewise.
8593
8594 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8595
8596         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
8597
8598 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8599
8600         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
8601
8602 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8603
8604         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
8605         able to start inferiors using a shell.
8606         (New remote packets): Announce new packet "QStartupWithShell".
8607         * remote.c: Add PACKET_QStartupWithShell.
8608         (extended_remote_create_inferior): Handle new
8609         PACKET_QStartupWithShell.
8610         (remote_protocol_features) <QStartupWithShell>: New entry for
8611         PACKET_QStartupWithShell.
8612         (_initialize_remote): Call "add_packet_config_cmd" for
8613         QStartupShell.
8614
8615 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8616             Pedro Alves  <palves@redhat.com>
8617
8618         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8619         and "nat/fork-inferior.h".
8620         * common/common-inferior.h: New file, with contents from
8621         "gdb/inferior.h".
8622         * commom/common-utils.c: Include "common-utils.h".
8623         (stringify_argv): New function.
8624         * common/common-utils.h (stringify_argv): New prototype.
8625         * configure.nat: Add "fork-inferior.o" as a dependency for
8626         "*linux*", "fbsd*" and "nbsd*" hosts.
8627         * corefile.c (get_exec_file): Update comment.
8628         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
8629         instead of "startup_inferior".
8630         (darwin_create_inferior): Call "add_thread_silent" after
8631         "fork_inferior".
8632         * fork-child.c: Cleanup unnecessary includes.
8633         (SHELL_FILE): Move to "common/common-fork-child.c".
8634         (environ): Likewise.
8635         (exec_wrapper): Initialize.
8636         (get_exec_wrapper): New function.
8637         (breakup_args): Move to "common/common-fork-child.c"; rename to
8638         "breakup_args_for_exec".
8639         (escape_bang_in_quoted_argument): Move to
8640         "common/common-fork-child.c".
8641         (saved_ui): New variable.
8642         (prefork_hook): New function.
8643         (postfork_hook): Likewise.
8644         (postfork_child_hook): Likewise.
8645         (gdb_startup_inferior): Likewise.
8646         (fork_inferior): Move to "common/common-fork-child.c".  Update
8647         function to support gdbserver.
8648         (startup_inferior): Likewise.
8649         * gdbcore.h (get_exec_file): Remove declaration.
8650         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8651         instead of "startup_inferior".  Call "add_thread_silent" after
8652         "fork_inferior".
8653         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8654         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8655         instead of "startup_inferior".  Call "add_thread_silent" after
8656         "fork_inferior".
8657         * inferior.h: Include "common-inferior.h".
8658         (trace_start_error): Move to "common/common-utils.h".
8659         (trace_start_error_with_name): Likewise.
8660         (fork_inferior): Move prototype to "nat/fork-inferior.h".
8661         (startup_inferior): Likewise.
8662         (gdb_startup_inferior): New prototype.
8663         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8664         * nat/fork-inferior.h: New file.
8665         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8666         instead of "startup_inferior".  Call "add_thread_silent" after
8667         "fork_inferior".
8668         * target.h (target_terminal_init): Move prototype to
8669         "target/target.h".
8670         (target_terminal_inferior): Likewise.
8671         (target_terminal_ours): Likewise.
8672         * target/target.h (target_terminal_init): New prototype, moved
8673         from "target.h".
8674         (target_terminal_inferior): Likewise.
8675         (target_terminal_ours): Likewise.
8676         * utils.c (gdb_flush_out_err): New function.
8677
8678 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8679
8680         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8681         * common/common-gdbthread.h: New file, with parts from
8682         "gdb/gdbthread.h".
8683         * gdbthread.h: Include "common-gdbthread.h".
8684         (switch_to_thread): Moved to "common/common-gdbthread.h".
8685
8686 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8687
8688         * Makefile.in (SFILES): Add "common/job-control.c".
8689         (HFILES_NO_SRCDIR): Add "common/job-control.h".
8690         (COMMON_OBS): Add "job-control.o".
8691         * common/job-control.c: New file, with contents from
8692         "gdb/inflow.c".
8693         * common/job-control.h: New file, with contents from "terminal.h".
8694         * fork-child.c: Include "job-control.h".
8695         * inflow.c: Include "job-control.h".
8696         (gdb_setpgid): Move to "common/common-inflow.c".
8697         (_initialize_inflow): Move setting of "job_control" to
8698         "handle_job_control".
8699         * terminal.h (job_control): Moved to "common/common-terminal.h".
8700         (gdb_setpgid): Likewise.
8701         * top.c: Include "job_control.h".
8702         * utils.c: Likewise.
8703         (job_control): Moved to "job-control.c".
8704
8705 2017-06-07  Pedro Alves  <palves@redhat.com>
8706
8707         * Makefile.in (SFILES): Add gdb_regex.c.
8708         (COMMON_OBS): Add gdb_regex.o.
8709         * ada-lang.c (ada_add_standard_exceptions)
8710         (ada_add_exceptions_from_frame, name_matches_regex)
8711         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8712         parameter type to compiled_regex.  Adjust.
8713         (ada_exceptions_list): Use compiled_regex.
8714         * break-catch-throw.c (exception_catchpoint::pattern): Now a
8715         std::unique_ptr<compiled_regex>.
8716         (exception_catchpoint::~exception_catchpoint): Remove regfree
8717         call.
8718         (check_status_exception_catchpoint): Adjust to use compiled_regex.
8719         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8720         * breakpoint.c (solib_catchpoint::compiled): Now a
8721         std::unique_ptr<compiled_regex>.
8722         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8723         (check_status_catch_solib): Adjust to use compiled_regex.
8724         (add_solib_catchpoint): Adjust to use compiled_regex.
8725         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8726         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8727         compiled_regex reference.  Adjust to use it.
8728         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8729         declaration.  Include "gdb_regex.h".
8730         (apropos_cmd): Change regex parameter to compiled_regex reference.
8731         * gdb_regex.c: New file.
8732         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8733         declarations.
8734         (class compiled_regex): New.
8735         * linux-tdep.c: Include "common/gdb_optional.h".
8736         (struct mapping_regexes): New, factored out from
8737         mapping_is_anonymous_p, and adjusted to use compiled_regex.
8738         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8739         gdb::optional and remove cleanups.  Adjust to compiled_regex.
8740         * probe.c: Include "common/gdb_optional.h".
8741         (collect_probes): Use compiled_regex and gdb::optional and remove
8742         cleanups.
8743         * skip.c: Include "common/gdb_optional.h".
8744         (skiplist_entry::compiled_function_regexp): Now a
8745         gdb::optional<compiled_regex>.
8746         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8747         (free_skiplist_entry): Remove regfree call.
8748         (compile_skip_regexp, skip_rfunction_p): Adjust to use
8749         compiled_regex and gdb::optional.
8750         * symtab.c: Include "common/gdb_optional.h".
8751         (search_symbols): Use compiled_regex and gdb::optional.
8752         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8753         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
8754         to gdb_regex.c.
8755
8756 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8757
8758         * regcache.c (regcache::save): Avoid buffer use.
8759         (regcache::dump): Likewise.
8760
8761 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8762
8763         * sh-tdep.c (sh_pseudo_register_read): Remove
8764         MAX_REGISTER_SIZE.
8765         (sh_pseudo_register_write): Likewise.
8766         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8767         (sh64_pseudo_register_write): Likewise
8768
8769 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8770
8771         * aarch64-tdep.c (aarch64_store_return_value): Use
8772         V_REGISTER_SIZE.
8773         (aarch64_pseudo_read_value): Likewise.
8774         (aarch64_pseudo_write): Likewise.
8775
8776 2017-06-06  Yao Qi  <yao.qi@linaro.org>
8777
8778         * regformats/regdef.h (set_register_cache): Remove the
8779         declaration.
8780
8781 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
8782
8783         * frame.c (frame_unwind_register_signed): Use
8784         frame_unwind_register_value.
8785
8786 2017-06-06  Pedro Alves  <palves@redhat.com>
8787
8788         PR breakpoints/21553
8789         * breakpoint.c (create_breakpoints_sal_default)
8790         (init_breakpoint_sal, create_breakpoint_sal): Use
8791         gdb::unique_xmalloc_ptr for string parameters.
8792         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8793         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
8794         (base_breakpoint_create_breakpoints_sal)
8795         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8796         (strace_marker_create_breakpoints_sal)
8797         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8798         string parameters.
8799         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8800         gdb::unique_xmalloc_ptr for string parameters.
8801         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8802         parameters.
8803
8804 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8805
8806         * alpha-tdep.c (alpha_register_to_value): Use
8807         get_frame_register_value.
8808         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8809
8810 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8811
8812         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8813         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8814         (ia64_value_to_register): Likewise.
8815         (ia64_extract_return_value): Likewise.
8816         (ia64_store_return_value): Likewise.
8817         (ia64_push_dummy_call): Likewise.
8818
8819 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
8820
8821         GDB 8.0 released.
8822
8823 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
8824
8825         * x86-linux-nat.c (struct arch_lwp_info): Remove.
8826
8827 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
8828
8829         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8830         parameter.
8831         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8832
8833 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8834
8835         * event-loop.c (poll_timers): Unallocate timer using delete
8836         instead of xfree.
8837
8838 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8839
8840         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8841         (struct breakpoint) <~breakpoint>: New.
8842         (struct watchpoint): Inherit from breakpoint.
8843         <~watchpoint>: New.
8844         <base>: Remove.
8845         (struct tracepoint): Inherit from breakpoint.
8846         <base>: Remove.
8847         * breakpoint.c (longjmp_breakpoint_ops): Remove.
8848         (struct longjmp_breakpoint): Inherit from breakpoint.
8849         <~longjmp_breakpoint>: New.
8850         <base>: Remove.
8851         (new_breakpoint_from_type): Remove casts.
8852         (watchpoint_in_thread_scope): Remove reference to base field.
8853         (watchpoint_del_at_next_stop): Likewise.
8854         (update_watchpoint): Likewise.
8855         (watchpoint_check): Likewise.
8856         (bpstat_check_watchpoint): Likewise.
8857         (set_longjmp_breakpoint): Likewise.
8858         (struct fork_catchpoint): Inherit from breakpoint.
8859         <base>: Remove.
8860         (struct solib_catchpoint): Inherit from breakpoint.
8861         <~solib_catchpoint>: New.
8862         <base>: Remove.
8863         (dtor_catch_solib): Change to ...
8864         (solib_catchpoint::~solib_catchpoint): ... this.
8865         (breakpoint_hit_catch_solib): Remove reference to base field.
8866         (add_solib_catchpoint): Likewise.
8867         (create_fork_vfork_event_catchpoint): Likewise.
8868         (struct exec_catchpoint): Inherit from breakpoint.
8869         <~exec_catchpoint>: New.
8870         <base>: Remove.
8871         (dtor_catch_exec): Change to ...
8872         (exec_catchpoint::~exec_catchpoint): ... this.
8873         (dtor_watchpoint): Change to ...
8874         (watchpoint::~watchpoint): ... this.
8875         (watch_command_1): Remove reference to base field.
8876         (catch_exec_command_1): Likewise.
8877         (base_breakpoint_dtor): Change to ...
8878         (breakpoint::~breakpoint): ... this.
8879         (base_breakpoint_ops): Remove dtor field value.
8880         (longjmp_bkpt_dtor): Change to ...
8881         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8882         (strace_marker_create_breakpoints_sal): Remove reference to base
8883         field.
8884         (delete_breakpoint): Don't manually call breakpoint destructor.
8885         (create_tracepoint_from_upload): Remove reference to base field.
8886         (trace_pass_set_count): Likewise.
8887         (initialize_breakpoint_ops): Don't initialize
8888         momentary_breakpoint_ops, don't set dtors.
8889         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8890         <~ada_catchpoint>: New.
8891         <base>: Remove.
8892         (create_excep_cond_exprs): Remove reference to base field.
8893         (dtor_exception): Change to ...
8894         (ada_catchpoint::~ada_catchpoint): ... this.
8895         (dtor_catch_exception): Remove.
8896         (dtor_catch_exception_unhandled): Remove.
8897         (dtor_catch_assert): Remove.
8898         (create_ada_exception_catchpoint): Remove reference to base
8899         field.
8900         (initialize_ada_catchpoint_ops): Don't set dtors.
8901         * break-catch-sig.c (struct signal_catchpoint): Inherit from
8902         breakpoint.
8903         <~signal_catchpoint>: New.
8904         <base>: Remove.
8905         (signal_catchpoint_dtor): Change to ...
8906         (signal_catchpoint::~signal_catchpoint): ... this.
8907         (create_signal_catchpoint): Remove reference to base field.
8908         (initialize_signal_catchpoint_ops): Don't set dtor.
8909         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8910         from breakpoint.
8911         <~syscall_catchpoint>: New.
8912         <base>: Remove.
8913         (dtor_catch_syscall): Change to ...
8914         (syscall_catchpoint::~syscall_catchpoint): ... this.
8915         (create_syscall_event_catchpoint): Remove reference to base
8916         field.
8917         (initialize_syscall_catchpoint_ops): Don't set dtor.
8918         * break-catch-throw.c (struct exception_catchpoint): Inherit
8919         from breakpoint.
8920         <~exception_catchpoint>: New.
8921         <base>: Remove.
8922         (dtor_exception_catchpoint): Change to ...
8923         (exception_catchpoint::~exception_catchpoint): ... this.
8924         (handle_gnu_v3_exceptions): Remove reference to base field.
8925         (initialize_throw_catchpoint_ops): Don't set dtor.
8926         * ctf.c (ctf_get_traceframe_address): Remove reference to base
8927         field.
8928         * remote.c (remote_get_tracepoint_status): Likewise.
8929         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8930         * tracefile.c (tracefile_fetch_registers): Likewise.
8931         * tracepoint.c (actions_command): Likewise.
8932         (validate_actionline): Likewise.
8933         (tfind_1): Likewise.
8934         (get_traceframe_location): Likewise.
8935         (find_matching_tracepoint_location): Likewise.
8936         (parse_tracepoint_status): Likewise.
8937         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8938
8939 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8940
8941         * breakpoint.c (struct longjmp_breakpoint): New struct.
8942         (is_tracepoint_type): Change return type to bool.
8943         (is_longjmp_type): New function.
8944         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8945         (set_raw_breakpoint_without_location): Use
8946         new_breakpoint_from_type.
8947         (set_raw_breakpoint): Likewise.
8948
8949 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8950
8951         * breakpoint.c (new_breakpoint_from_type): New function.
8952         (create_breakpoint_sal): Use new_breakpoint_from_type and
8953         unique_ptr.
8954         (create_breakpoint): Likewise.
8955
8956 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
8957
8958         * memattr.c (mem_info_command): Rename to ...
8959         (info_mem_command): ... this.
8960         (mem_enable_command): Rename to ...
8961         (enable_mem_command): ... this.
8962         (mem_disable_command): Rename to ...
8963         (disable_mem_command): ... this.
8964         (mem_delete_command): Rename to ...
8965         (delete_mem_command): ... this.
8966         (_initialize_mem): Adjust function names.
8967
8968 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8969
8970         * btrace.c (handle_pt_insn_events): New.
8971         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
8972         STATUS.  Split into this and ...
8973         (handle_pt_insn_event_flags): ... this.
8974
8975 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8976
8977         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8978         and struct pt_insn.resynced.
8979         * configure: Regenerated.
8980         * config.in: Regenerated.
8981
8982 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8983
8984         * btrace.c (ftrace_find_call_by_number): New function.
8985         (ftrace_new_function): Store objects, not pointers.
8986         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8987         ftrace_new_gap, ftrace_update_function,
8988         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8989         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8990         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8991         btrace_ends_with_single_insn, btrace_call_get): Account for
8992         btrace_thread_info::functions now storing objects.
8993         * btrace.h (struct btrace_thread_info): Add constructor.
8994         (struct btrace_thread_info) <functions>: Make std::vector.
8995         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8996         Initialize with default values.
8997         * record-btrace.c (record_btrace_frame_sniffer): Account for
8998         btrace_thread_info::functions now storing objects.
8999
9000 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9001
9002         * btrace.c: Remove typedef bfun_s.
9003         (ftrace_new_gap): Directly add gaps to the list of gaps.
9004         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9005         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9006         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9007         instead of gdb VEC.
9008
9009 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9010
9011         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9012         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9013         with btrace_thread_info::next_segment and
9014         btrace_thread_info::prev_segment.
9015         * btrace.h: Remove struct btrace_func_link.
9016         (struct btrace_function): Replace pair of function segment pointers
9017         with pair of indices.
9018         * python/py-record-btrace.c (btpy_call_prev_sibling,
9019         btpy_call_next_sibling): Replace references to
9020         btrace_thread_info::segment with btrace_thread_info::next_segment and
9021         btrace_thread_info::prev_segment.
9022         * record-btrace.c (record_btrace_frame_this_id): Use
9023         btrace_find_call_by_number.
9024
9025 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9026
9027         * btrace.c (ftrace_new_function, ftrace_fixup_level,
9028         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9029         btrace_insn_next, btrace_insn_prev): Remove references to
9030         btrace_thread_info::flow.
9031         * btrace.h (struct btrace_function): Remove FLOW.
9032
9033 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9034
9035         * btrace.c (ftrace_find_call_by_number): New function.
9036         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9037         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9038         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9039         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9040         index.
9041         * btrace.h (struct btrace_function): Turn UP into an index.
9042         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9043         as an index.
9044         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9045         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9046         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9047
9048 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9049
9050         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9051         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9052         ftrace_update_function, ftrace_compute_global_level_offset,
9053         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9054         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9055         btrace_insn_end, btrace_is_empty): Remove references to
9056         btrace_thread_info::begin and btrace_thread_info::end.
9057         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9058         (struct btrace_thread_info) <functions>: Adjust comment.
9059         * record-btrace.c (record_btrace_start_replaying): Remove reference to
9060         btrace_thread_info::begin.
9061
9062 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9063
9064         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9065         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9066         ftrace_update_function): Remove arguments that implicitly were always
9067         BTINFO->END.
9068         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9069         Don't pass BTINFO->END.
9070
9071 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9072
9073         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9074         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9075         btrace_find_insn_by_number): Replace function segment pointer with
9076         index.
9077         (btrace_insn_cmp): Simplify.
9078         * btrace.h: (struct btrace_insn_iterator) Rename index to
9079         insn_index.  Replace function segment pointer with index into function
9080         segment vector.
9081         * record-btrace.c (record_btrace_call_history): Replace function
9082         segment pointer use with index.
9083         (record_btrace_frame_sniffer): Retrieve function call segment through
9084         vector.
9085         (record_btrace_set_replay): Remove defunc't safety check.
9086
9087 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9088
9089         * btrace.c (btrace_ends_with_single_insn): New function.
9090         (btrace_call_get, btrace_call_number, btrace_call_begin,
9091         btrace_call_end, btrace_call_next, btrace_call_prev,
9092         btrace_find_call_by_number): Use index into call segment vector
9093         instead of pointer.
9094         (btrace_call_cmp): Simplify.
9095         * btrace.h (struct btrace_call_iterator): Replace function call segment
9096         pointer with index into vector.
9097         * record-btrace.c (record_btrace_call_history): Use index instead of
9098         pointer.
9099
9100 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9101
9102         * btrace.c (btrace_insn_begin, btrace_insn_end,
9103         btrace_find_insn_by_number): Add btinfo to iterator.
9104         * btrace.h (struct btrace_insn_iterator): Add btinfo.
9105
9106 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9107
9108         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9109         and save pointers directly.
9110         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9111         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9112         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
9113         changed signature of functions.
9114         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9115         (btrace_fetch): Remove code that adds btrace_function pointers to
9116         vector of btrace_functions.
9117         (btrace_clear): Simplify freeing vector of btrace_functions.
9118
9119 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9120
9121         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9122         Replace VEC_* with std::vector functions.
9123         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9124         (struct btrace_thread_info)<functions>: Change type to std::vector.
9125
9126 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9127
9128         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
9129         "Removed targets and native configurations" up.  Merge duplicate
9130         "New commands" sub-sections.  Add "New options" sub-sections.
9131
9132 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
9133
9134         * defs.h (copy_integer_to_size): New declaration.
9135         * findvar.c (copy_integer_to_size): New function.
9136         (do_cint_test): New selftest function.
9137         (copy_integer_to_size_test): Likewise.
9138         (_initialize_findvar): Likewise.
9139         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
9140         (mips_fbsd_collect_reg): Use raw_collect_integer.
9141         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
9142         (mips64_fill_gregset): Use raw_collect_integer
9143         (mips64_fill_fpregset): Use raw_supply_integer.
9144         * regcache.c (regcache::raw_supply_integer): New function.
9145         (regcache::raw_collect_integer): Likewise.
9146         * regcache.h: (regcache::raw_supply_integer): New declaration.
9147         (regcache::raw_collect_integer): Likewise.
9148
9149 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9150
9151         * Makefile.in (SFILES): Add gdbarch-selftests.c.
9152         (COMMON_OBS): Add gdbarch-selftests.o.
9153         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
9154         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
9155         * gdbarch-selftests.c: New file.
9156         * regcache.h (regcache) <~regcache>: Mark it virtual if
9157         GDB_SELF_TEST.
9158         <raw_write>: Likewise.
9159
9160 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9161
9162         * regcache.c (current_regcache): Change it to
9163         regcache::current_regcache.
9164         (regcache_observer_target_changed): Update.
9165         (regcache_thread_ptid_changed): Make it a regcache static
9166         method.
9167         (regcache_thread_ptid_changed): Update.
9168         (class regcache_access): New.
9169         (current_regcache_test): Update.
9170         (_initialize_regcache): Update.
9171         * regcache.h: Include forward_list.
9172         (regcache): Declare regcache_thread_ptid_changed and declare
9173         registers_changed_ptid as friend.
9174
9175 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9176
9177         * i387-tdep.c (i387_register_to_value): Use register_size
9178         instead of TYPE_LENGTH.
9179         * m68k-tdep.c (m68k_register_to_value): Likewise.
9180
9181 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9182
9183         * i387-tdep.c (i387_convert_register_p): Return false if type
9184         code isn't TYPE_CODE_FLT.
9185
9186 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9187
9188         * alpha-tdep.c (alpha_convert_register_p): Return true if type
9189         length is 4.
9190         (alpha_register_to_value): Remove type length check.
9191         (alpha_value_to_register): Likewise.
9192
9193 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9194
9195         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
9196         TYPE_CODE_FLT.
9197
9198 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9199
9200         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
9201         TYPE_CODE_FLT or not.
9202
9203 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9204
9205         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
9206         * avr-tdep.c (avr_gdbarch_init): Likewise.
9207         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9208         * cris-tdep.c (cris_gdbarch_init): Likewise.
9209         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9210         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9211         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9212         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
9213         * mep-tdep.c (mep_gdbarch_init): Likewise.
9214         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9215         * mips-tdep.c (mips_gdbarch_init): Likewise.
9216         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9217         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9218         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9219         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9220         * v850-tdep.c (v850_gdbarch_init): Likewise.
9221
9222 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9223
9224         * selftest-arch.c (tests_with_arch): Call registers_changed
9225         and reinit_frame_cache.
9226         * selftest.c (run_self_tests): Likewise.
9227
9228 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9229
9230         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
9231         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
9232
9233 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9234
9235         * rl78-tdep.c (rl78_gdbarch_init): Don't call
9236         set_gdbarch_print_insn.
9237
9238 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9239
9240         * h8300-tdep.c (h8300_gdbarch_init): Don't call
9241         set_gdbarch_print_insn.
9242
9243 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9244
9245         * alpha-tdep.c (alpha_gdbarch_init): Don't call
9246         set_gdbarch_print_insn.
9247         * arc-tdep.c (arc_gdbarch_init): Likewise.
9248         * arch-utils.c: include dis-asm.h.
9249         (default_print_insn): New function.
9250         * arch-utils.h (default_print_insn): Declare.
9251         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
9252         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9253         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
9254         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
9255         * frv-tdep.c (frv_gdbarch_init): Likewise.
9256         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9257         * gdbarch.sh (print_insn): Use default_print_insn.
9258         * gdbarch.c: Regenerated.
9259         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
9260         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
9261         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9262         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
9263         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9264         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
9265         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
9266         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
9267         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
9268         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9269         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9270         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9271         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9272         * mt-tdep.c (mt_gdbarch_init): Likewise.
9273         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9274         * nios2-tdep.c (nios2_print_insn): Remove.
9275         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
9276         * rx-tdep.c (rx_gdbarch_init): Likewise.
9277         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9278         * score-tdep.c (score_print_insn): Remove.
9279         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
9280         * sh-tdep.c (sh_gdbarch_init): Likewise.
9281         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9282         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9283         * tic6x-tdep.c (tic6x_print_insn): Remove.
9284         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
9285         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
9286         * v850-tdep.c (v850_gdbarch_init): Likewise.
9287         * vax-tdep.c (vax_gdbarch_init): Likewise.
9288         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9289         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
9290
9291 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
9292
9293         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
9294         (MIPS_FP0_REGNUM): Remove.
9295         (MIPS_FSR_REGNUM): Remove.
9296         (mips_fbsd_supply_fpregs): Use mips_regnum.
9297         (mips_fbsd_supply_gregs): Likewise.
9298         (mips_fbsd_collect_fpregs): Likewise.
9299         (mips_fbsd_collect_gregs): Likewise.
9300
9301 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
9302
9303         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
9304         (getpfpregs_supplies): New function.
9305         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
9306         getfpregs_supplies.
9307         (mips_fbsd_store_inferior_registers): Likewise.
9308
9309 2017-05-22  Pedro Alves <palves@redhat.com>
9310
9311         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
9312         maintainer.
9313
9314 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
9315
9316         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
9317         (store_register): Likewise.
9318         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
9319         (get_decimal_float_return_value): Likewise.
9320         (do_ppc_sysv_return_value): Likewise.
9321         (ppc64_sysv_abi_push_integer): Likewise.
9322         (ppc64_sysv_abi_push_freg): Likewise.
9323         (ppc64_sysv_abi_return_value_base): Likewise.
9324         (ppc64_sysv_abi_return_value): Likewise.
9325         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
9326         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
9327         * rs6000-nat.c: Likewise.
9328         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
9329         (rs6000_value_to_register): Likewise.
9330         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
9331
9332 2017-05-21  Tom Tromey  <tom@tromey.com>
9333
9334         PR rust/21466:
9335         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
9336         arrays as "[T]", not "[T; ]".
9337
9338 2017-05-19  Tom Tromey  <tom@tromey.com>
9339
9340         PR rust/21484:
9341         * rust-lang.c (exp_descriptor_rust): New function.
9342         (rust_language_defn): Use it.
9343         * p-lang.c (pascal_language_defn): Update.
9344         * opencl-lang.c (opencl_language_defn): Update.
9345         * objc-lang.c (objc_language_defn): Update.
9346         * m2-lang.c (m2_language_defn): Update.
9347         * language.h (struct language_defn)
9348         <la_watch_location_expression>: New member.
9349         * language.c (unknown_language_defn, auto_language_defn)
9350         (local_language_defn): Update.
9351         * go-lang.c (go_language_defn): Update.
9352         * f-lang.c (f_language_defn): Update.
9353         * d-lang.c (d_language_defn): Update.
9354         * c-lang.h (c_watch_location_expression): Declare.
9355         * c-lang.c (c_watch_location_expression): New function.
9356         (c_language_defn, cplus_language_defn, asm_language_defn)
9357         (minimal_language_defn): Use it.
9358         * breakpoint.c (watch_command_1): Call
9359         la_watch_location_expression.
9360         * ada-lang.c (ada_language_defn): Update.
9361
9362 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9363
9364         PR tui/21482
9365         * gdb_curses.h (NOMACROS): Define.
9366         (NCURSES_NOMACROS): Define.
9367
9368 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9369
9370         PR tui/21482
9371         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
9372         arg to char *.
9373         * tui/tui-wingeneral.c (box_win): Likewise.
9374         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
9375         (tui_show_source_line): Likewise.
9376         (tui_show_exec_info_content): Likewise.
9377
9378 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
9379
9380         * sparc-tdep.c (sparc_structure_return_p)
9381         (sparc_arg_on_registers_p): New functions.
9382         (sparc32_store_arguments): Use them.
9383         * sparc64-tdep.c (sparc64_16_byte_align_p)
9384         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
9385         Handle TYPE_CODE_ARRAY.
9386
9387 2017-05-17  Yao Qi  <yao.qi@linaro.org>
9388
9389         * cli/cli-decode.c (add_alias_cmd): New function.
9390         * command.h (add_alias_cmd): Declare.
9391         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
9392         instead call add_alias_cmd.
9393
9394 2017-05-17  Pedro Alves  <palves@redhat.com>
9395
9396         * Makefile.in (nat_extra_makefile_frag): Rename to ...
9397         (nat_makefile_frag): ... this.  All references updated.
9398         * configure.ac: Likewise.
9399         * configure.nat: Likewise.  Enhance comments.
9400         * configure: Regenerate.
9401
9402 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9403
9404         * procfs.c (procfs_create_inferior): Change prototype to match
9405         definition.
9406
9407 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
9408
9409         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
9410         C++ compiler warning.
9411
9412 2017-05-12  Tom Tromey  <tom@tromey.com>
9413
9414         PR rust/21483:
9415         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
9416         recurse, just call value_struct_elt directly.
9417
9418 2017-05-12  Tom Tromey  <tom@tromey.com>
9419
9420         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
9421         OP_RUST_ARRAY>: Fix.
9422
9423 2017-05-12  Tom Tromey  <tom@tromey.com>
9424
9425         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
9426
9427 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9428
9429         * regcache.c: Include <forward_list>.
9430         (struct regcache_list): Remove.
9431         (current_regcache): Update.
9432         (get_thread_arch_aspace_regcache): Update for std::forward_list.
9433         (regcache_thread_ptid_changed): Likewise.
9434         (registers_changed_ptid): Likewise.
9435         (current_regcache_size): Likewise.
9436
9437 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9438
9439         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
9440         (current_regcache_size): New function.
9441         (current_regcache_test): New function.
9442         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
9443
9444 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9445
9446         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
9447         (print_gp_register_row): Use get_frame_register_value.
9448
9449 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9450
9451         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
9452         (mips_supply_fpregset): Likewise.
9453         (mips64_supply_gregset): Likewise.
9454
9455 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9456
9457         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
9458         regcache->raw_supply_zeroed.
9459
9460 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9461
9462         * configure.nat: Rearrange 'case' statements to match
9463         host before cpu.
9464
9465 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9466
9467         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
9468         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
9469         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
9470         "@nat_extra_makefile_frag@".
9471         (Makefile): Remove dependency on "@frags@".
9472         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
9473         (data-directory/Makefile): Likewise.
9474         * config/aarch64/linux.mh: Deleted; moved contents to
9475         "gdb/configure.nat".
9476         * config/alpha/alpha-linux.mh: Likewise.
9477         * config/alpha/nbsd.mh: Likewise.
9478         * config/arm/linux.mh: Likewise.
9479         * config/arm/nbsdelf.mh: Likewise.
9480         * config/i386/cygwin.mh: Likewise.
9481         * config/i386/cygwin64.mh: Likewise.
9482         * config/i386/darwin.mh: Likewise.
9483         * config/i386/fbsd.mh: Likewise.
9484         * config/i386/fbsd64.mh: Likewise.
9485         * config/i386/go32.mh: Likewise.
9486         * config/i386/i386gnu.mh: Likewise.
9487         * config/i386/i386sol2.mh: Likewise.
9488         * config/i386/linux.mh: Likewise.
9489         * config/i386/linux64.mh: Likewise.
9490         * config/i386/mingw.mh: Likewise.
9491         * config/i386/mingw64.mh: Likewise.
9492         * config/i386/nbsd64.mh: Likewise.
9493         * config/i386/nbsdelf.mh: Likewise.
9494         * config/i386/nto.mh: Likewise.
9495         * config/i386/obsd.mh: Likewise.
9496         * config/i386/obsd64.mh: Likewise.
9497         * config/i386/sol2-64.mh: Likewise.
9498         * config/ia64/linux.mh: Likewise.
9499         * config/m32r/linux.mh: Likewise.
9500         * config/m68k/linux.mh: Likewise.
9501         * config/m68k/nbsdelf.mh: Likewise.
9502         * config/m68k/obsd.mh: Likewise.
9503         * config/m88k/obsd.mh: Likewise.
9504         * config/mips/fbsd.mh: Likewise.
9505         * config/mips/linux.mh: Likewise.
9506         * config/mips/nbsd.mh: Likewise.
9507         * config/mips/obsd64.mh: Likewise.
9508         * config/pa/linux.mh: Likewise.
9509         * config/pa/nbsd.mh: Likewise.
9510         * config/pa/obsd.mh: Likewise.
9511         * config/powerpc/aix.mh: Likewise.
9512         * config/powerpc/fbsd.mh: Likewise.
9513         * config/powerpc/linux.mh: Likewise.
9514         * config/powerpc/nbsd.mh: Likewise.
9515         * config/powerpc/obsd.mh: Likewise.
9516         * config/powerpc/ppc64-linux.mh: Likewise.
9517         * config/powerpc/spu-linux.mh: Likewise.
9518         * config/s390/linux.mh: Likewise.
9519         * config/sh/nbsd.mh: Likewise.
9520         * config/sparc/fbsd.mh: Likewise.
9521         * config/sparc/linux.mh: Likewise.
9522         * config/sparc/linux64.mh: Likewise.
9523         * config/sparc/nbsd64.mh: Likewise.
9524         * config/sparc/nbsdelf.mh: Likewise.
9525         * config/sparc/obsd64.mh: Likewise.
9526         * config/sparc/sol2.mh: Likewise.
9527         * config/tilegx/linux.mh: Likewise.
9528         * config/vax/nbsdelf.mh: Likewise.
9529         * config/vax/obsd.mh: Likewise.
9530         * config/xtensa/linux.mh: Likewise.
9531         * config/i386/i386gnu.mn: New file, with excerpts from
9532         "config/i386/i386gnu.mh".
9533         * configure: Regenerate.
9534         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
9535         *.mh files under "gdb/config".
9536         * configure.nat: New file, with contents from the
9537         "gdb/config/*/*.mh" files.
9538
9539 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
9540
9541         * btrace.c (btrace_clear): Free insn vector.
9542
9543 2017-05-05  Pedro Alves  <palves@redhat.com>
9544
9545         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
9546         * configure: Regenerate.
9547
9548 2017-05-04  Pedro Alves  <palves@redhat.com>
9549
9550         * Makefile.in (SFILES): Add progspace-and-thread.c.
9551         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
9552         (COMMON_OBS): Add progspace-and-thread.o.
9553         * breakpoint.c: Include "progspace-and-thread.h".
9554         (update_inserted_breakpoint_locations)
9555         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
9556         Use scoped_restore_current_pspace_and_thread.
9557         (create_std_terminate_master_breakpoint): Use
9558         scoped_restore_current_program_space.
9559         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
9560         (print_breakpoint_location): Use
9561         scoped_restore_current_program_space.
9562         (bp_loc_is_permanent): Use
9563         scoped_restore_current_pspace_and_thread.
9564         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
9565         (download_tracepoint_locations): Use
9566         scoped_restore_current_pspace_and_thread.
9567         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
9568         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
9569         (enum step_over_calls_kind): Moved from inferior.h.
9570         (class scoped_restore_current_thread): New class.
9571         * gdbthread.h (make_cleanup_restore_current_thread): Delete
9572         declaration.
9573         (scoped_restore_current_thread): New class.
9574         * infcmd.c: Include "common/gdb_optional.h".
9575         (continue_1, proceed_after_attach): Use
9576         scoped_restore_current_thread.
9577         (notice_new_inferior): Use scoped_restore_current_thread.
9578         * inferior.c: Include "progspace-and-thread.h".
9579         (restore_inferior, save_current_inferior): Delete.
9580         (add_inferior_command, clone_inferior_command): Use
9581         scoped_restore_current_pspace_and_thread.
9582         * inferior.h (scoped_restore_current_inferior): New class.
9583         * infrun.c: Include "progspace-and-thread.h" and
9584         "common/gdb_optional.h".
9585         (follow_fork_inferior): Use
9586         scoped_restore_current_pspace_and_thread.
9587         (scoped_restore_exited_inferior): New class.
9588         (handle_vfork_child_exec_or_exit): Use
9589         scoped_restore_exited_inferior,
9590         scoped_restore_current_pspace_and_thread,
9591         scoped_restore_current_thread and scoped_restore.
9592         (fetch_inferior_event): Use scoped_restore_current_thread.
9593         * linespec.c (decode_line_full, decode_line_1): Use
9594         scoped_restore_current_program_space.
9595         * mi/mi-main.c: Include "progspace-and-thread.h".
9596         (exec_continue): Use scoped_restore_current_thread.
9597         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
9598         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
9599         * proc-service.c (ps_pglobal_lookup): Use
9600         scoped_restore_current_program_space.
9601         * progspace-and-thread.c: New file.
9602         * progspace-and-thread.h: New file.
9603         * progspace.c (release_program_space, clone_program_space): Use
9604         scoped_restore_current_program_space.
9605         (restore_program_space, save_current_program_space)
9606         (save_current_space_and_thread): Delete.
9607         (switch_to_program_space_and_thread): Moved to
9608         progspace-and-thread.c.
9609         * progspace.h (save_current_program_space)
9610         (save_current_space_and_thread): Delete declarations.
9611         (scoped_restore_current_program_space): New class.
9612         * remote.c (remote_btrace_maybe_reopen): Use
9613         scoped_restore_current_thread.
9614         * symtab.c: Include "progspace-and-thread.h".
9615         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9616         * thread.c (print_thread_info_1): Use
9617         scoped_restore_current_thread.
9618         (struct current_thread_cleanup): Delete.
9619         (do_restore_current_thread_cleanup)
9620         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
9621         (scoped_restore_current_thread::~scoped_restore_current_thread):
9622         ... this new dtor.
9623         (make_cleanup_restore_current_thread): Rename/convert to ...
9624         (scoped_restore_current_thread::scoped_restore_current_thread):
9625         ... this new ctor.
9626         (thread_apply_all_command): Use scoped_restore_current_thread.
9627         (thread_apply_command): Use scoped_restore_current_thread.
9628         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
9629         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9630
9631 2017-05-04  Pedro Alves  <palves@redhat.com>
9632
9633         * thread.c (make_cleanup_restore_current_thread): Move
9634         find_thread_ptid call before the is_stopped call.  Assert that the
9635         thread is found.  Replace is_stopped call by checking the thread's
9636         state directly.  Remove unnecessary NULL-thread check.
9637
9638 2017-05-04  Pedro Alves  <palves@redhat.com>
9639
9640         * corelow.c (thread_section_name): New class.
9641         (get_core_register_section, get_core_siginfo): Use it.
9642
9643 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9644
9645         * corelow.c (sniff_core_bfd): Remove extra semicolon.
9646         (get_core_register_section): Remove xfree of NULL pointer.
9647
9648 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
9649
9650         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9651         * regcache.c (regcache::raw_supply_zeroed): New function.
9652         * regcache.h (regcache::raw_supply_zeroed): New declaration.
9653
9654 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9655
9656         * gdbarch.sh: Remove commented out definition of
9657         TARGET_CHAR_BIT.
9658         * gdbarch.h: Re-generate.
9659
9660 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
9661
9662         * configure: Regenerate.
9663
9664 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
9665
9666         * solib-target.c (solib_target_relocate_section_addresses):
9667         Remove num_section_bases, num_bases, segment_bases variables.
9668
9669 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9670
9671         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9672
9673 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9674
9675         * solib-target.c: Include <vector>
9676         (struct lm_info_target) <~lm_info_target>: Remove.
9677         <segment_bases, section_bases>: Change type to
9678         std::vector<CORE_ADDR>.
9679         (library_list_start_segment, library_list_start_section,
9680         library_list_end_library,
9681         solib_target_relocate_section_addresses): Adjust.
9682
9683 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9684
9685         * gdbarch.sh (software_single_step): Change return type to
9686         std::vector<CORE_ADDR>.
9687         * gdbarch.c, gdbarch.h: Re-generate.
9688         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9689         Adjust.
9690         (arm_deal_with_atomic_sequence_raw): Adjust.
9691         (thumb_get_next_pcs_raw): Adjust.
9692         (arm_get_next_pcs_raw): Adjust.
9693         (arm_get_next_pcs): Adjust.
9694         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9695         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9696         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9697         (alpha_software_single_step): Adjust.
9698         * alpha-tdep.h (alpha_software_single_step): Adjust.
9699         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9700         * arm-tdep.c (arm_software_single_step): Adjust.
9701         (arm_breakpoint_kind_from_current_state): Adjust.
9702         * arm-tdep.h (arm_software_single_step): Adjust.
9703         * breakpoint.c (insert_single_step_breakpoint): Adjust.
9704         * cris-tdep.c (cris_software_single_step): Adjust.
9705         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9706         (micromips_deal_with_atomic_sequence): Adjust.
9707         (deal_with_atomic_sequence): Adjust.
9708         (mips_software_single_step): Adjust.
9709         * mips-tdep.h (mips_software_single_step): Adjust.
9710         * moxie-tdep.c (moxie_software_single_step): Adjust.
9711         * nios2-tdep.c (nios2_software_single_step): Adjust.
9712         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9713         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9714         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9715         * s390-linux-tdep.c (s390_software_single_step): Adjust.
9716         * sparc-tdep.c (sparc_software_single_step): Adjust.
9717         * spu-tdep.c (spu_software_single_step): Adjust.
9718         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9719
9720 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9721
9722         * gdbarch.sh: Use semi-colon as field separator instead of colon.
9723         * gdbarch.h: Re-generate.
9724
9725 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9726
9727         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9728         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9729         * python/py-instruction.c, python/py-instruction.h: New file.
9730         * python/py-record.c: Add py-instruction.h include.
9731         (gdbpy_initialize_record): Make gdb.Instruction a super class of
9732         gdb.RecordInstruction.
9733         * python/python-internal.h: Add gdbpy_initialize_instruction
9734         declaration.
9735         * python/python.c (do_start_initialization): Add
9736         gdbpy_initialize_instruction.
9737
9738 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9739
9740         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9741         Remove.
9742         (btrace_func_from_recpy_func): New function.
9743         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9744         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9745         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9746         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9747         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9748         Also, use new helper functions.
9749         (btpy_list_item): Use new helper functions.
9750         (recpy_bt_function_call_history): Use new type name.
9751         (btpy_call_getset): Remove.
9752         (gdbpy_initialize_btrace): Remove code to initialize
9753         gdb.BtraceFunctionCall.
9754         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9755         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9756         recpy_bt_func_prev, recpy_bt_func_next): New export.
9757         * python/py-record.c (recpy_func_type): New static object.
9758         (recpy_func_new, recpy_func_level, recpy_func_symbol,
9759         recpy_func_instructions, recpy_func_up, recpy_func_prev,
9760         recpy_func_next): New function.
9761         (recpy_element_hash, recpy_element_richcompare): Updated comment.
9762         (recpy_func_getset): New static object.
9763         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9764         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9765
9766 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9767
9768         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9769         (btpy_object, btpy_insn_type, btpy_new): Remove.
9770         (btpy_list_object): Use gdb.RecordInstruction type instead of
9771         gdb.BtraceInstruction type.
9772         (btrace_insn_from_recpy_insn): New function.
9773         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9774         btpy_new.
9775         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9776         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9777         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9778         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9779         instead of btpy_object.
9780         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9781         btpy_insn_data, btpy_insn_decode): Rename to ...
9782         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9783         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9784         recpy_bt_insn_decode): This.  Also, use new helper functions.
9785         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9786         recpy_insn_type.
9787         (btpy_insn_getset): Remove.
9788         (gdbpy_initialize_btrace): Remove code to initialize
9789         gdb.BtraceInstruction.  Use recpy_element_object.
9790         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9791         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9792         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9793         * python/py-record.c (recpy_insn_type): New static object.
9794         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9795         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9796         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9797         New function.
9798         (recpy_insn_getset): New static object.
9799         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9800         * python/py-record.h (recpy_element_object): New typedef.
9801         (recpy_insn_type, recpy_insn_new): New export.
9802
9803 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9804
9805         * py-record-btrace.c (btpy_insn_new): Removed.
9806         (btpy_insn_or_gap_new): New function.
9807         (btpy_insn_error): Removed.
9808         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9809         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9810         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9811         btpy_insn_or_gap_new instead of btpy_insn_new.
9812         (btpy_insn_getset): Remove btpy_insn_error.
9813         * py-record.c (recpy_gap_type): New static object.
9814         (recpy_gap_object): New typedef.
9815         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9816         recpy_gap_reason_string): New function.
9817         (recpy_gap_getset): New static object.
9818         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9819         * py-record.h (recpy_gap_new): New export.
9820
9821 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9822
9823         * python/py-record.c (recpy_ptid): Remove.
9824         (recpy_record_getset): Remove recpy_ptid.
9825
9826 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9827
9828         * btrace.c (btrace_fetch): Set inferior_ptid.
9829         * python/py-record-btrace.c: Add "py-record.h" include.
9830         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9831         recpy_bt_end, recpy_bt_instruction_history,
9832         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9833         in gdb.Record object instead of current ptid.
9834         * python/py-record.c: Include new "py-record.h" file.
9835         (recpy_record_object): Moved to py-record.h.
9836         * python/py-record.h: New file.
9837
9838 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9839
9840         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9841         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9842         indentation.
9843
9844 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
9845
9846         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9847         the past maintainers section.
9848
9849 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9850
9851         * infcmd.c (get_return_value): Use regcache ctor, and remove
9852         cleanup.
9853
9854 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9855             Pedro Alves  <palves@redhat.com>
9856
9857         * regcache.c (regcache::regcache): New tag dispatch ctor.
9858         (do_cooked_read): Moved above.
9859         (regcache_dup): Use the tag dispatch ctor..
9860         * regcache.h (regcache): Declare ctor, delete copy ctor and
9861         assignment operator, remove friend regcache_dup.
9862
9863 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9864
9865         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9866         call method save instead of regcache_cpy.
9867         * regcache.h (struct regcache): Make regcache_dup a friend.
9868
9869 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9870
9871         * regcache.c (struct regcache): Move to regcache.h
9872         (regcache::arch): New method.
9873         (regcache_get_ptid): Update.
9874         (get_regcache_arch): Call arch method.
9875         (get_regcache_aspace): Call method aspace.
9876         (register_buffer): Change it to method.
9877         (regcache_save): Change it to regcache::save.
9878         (regcache_restore): Likewise.
9879         (regcache_cpy_no_passthrough): Remove the declaration.
9880         (regcache_cpy): Call methods restore and cpy_no_passthrough.
9881         (regcache_cpy_no_passthrough): Change it to method
9882         cpy_no_passthrough.
9883         (regcache_register_status): Change it to method
9884         get_register_status.
9885         (regcache_invalidate): Change it to method invalidate.
9886         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9887         (regcache_raw_update): Change it to method raw_update.
9888         (regcache_raw_read): Likewise.
9889         (regcache_raw_read_signed): Likewise.
9890         (regcache_raw_read_unsigned): Likewise.
9891         (regcache_raw_write_signed): Likewise.
9892         (regcache_raw_write_unsigned): Likewise.
9893         (regcache_cooked_read): Likewise.
9894         (regcache_cooked_read_value): Likewise.
9895         (regcache_cooked_read_signed): Likewise.
9896         (regcache_cooked_read_unsigned): Likewise.
9897         (regcache_cooked_write_signed): Likewise.
9898         (regcache_cooked_write_unsigned): Likewise.
9899         (regcache_raw_set_cached_value): Likewise.
9900         (regcache_raw_write): Likewise.
9901         (regcache_cooked_write): Likewise.
9902         (regcache_xfer_part): Likewise.
9903         (regcache_raw_read_part): Likewise.
9904         (regcache_raw_write_part): Likewise.
9905         (regcache_cooked_read_part): Likewise.
9906         (regcache_cooked_write_part): Likewise.
9907         (regcache_raw_supply): Likewise.
9908         (regcache_raw_collect): Likewise.
9909         (regcache_transfer_regset): Likewise.
9910         (regcache_supply_regset): Likewise.
9911         (regcache_collect_regset): Likewise.
9912         (regcache_debug_print_register): Likewise.
9913         (enum regcache_dump_what): Move it to regcache.h.
9914         (regcache_dump): Change it to method dump.
9915         * regcache.h (enum regcache_dump_what): New.
9916         (class regcache): New.
9917         * target.c (target_fetch_registers): Call method
9918         debug_print_register.
9919         (target_store_registers): Likewise.
9920
9921 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9922
9923         * windows-nat.c (struct lm_info_windows): Initialize field.
9924         (windows_make_so): Allocate lm_info_windows with new.
9925         (windows_free_so): Free lm_info_windows with delete.
9926
9927 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9928
9929         * solib-darwin.c (struct lm_info_darwin): Initialize field.
9930         (darwin_current_sos): Allocate lm_info_darwin with new, remove
9931         cleanup.
9932         (darwin_free_so): Free lm_info_darwin with delete.
9933
9934 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9935
9936         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9937         <l_addr_p>: Change type to bool.
9938         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9939         (svr4_free_so): Free lm_info_svr4 with delete.
9940         (svr4_copy_library_list): Replace memcpy with call to copy
9941         constructor.
9942         (library_list_start_library, svr4_default_sos): Allocate
9943         lm_info_svr4 with new.
9944
9945 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9946
9947         * solib-target.c (struct lm_info_target): Add destructor,
9948         initialize fields.
9949         <name>: Change type to std::string.
9950         (library_list_start_library): Allocate lm_info_target with new.
9951         (solib_target_free_library_list): Free lm_info_target with
9952         delete.
9953         (solib_target_current_sos): Adapt to std::string.
9954         (solib_target_free_so): Free lm_info_target with delete.
9955
9956 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9957
9958         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9959         fields.
9960         (frv_current_sos): Allocate lm_info_frv with new.
9961         (frv_relocate_main_executable): Free lm_info_frv with delete,
9962         allocate with new.
9963         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9964
9965 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9966
9967         * solib-frv.c (struct lm_info_frv): Fix indentation.
9968
9969 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9970
9971         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9972         map field.
9973         (dsbt_current_sos): Allocate lm_info_dsbt with new.
9974         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9975         and allocate with new.
9976         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9977
9978 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9979
9980         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9981         <filename, member_name>: Change type to std::string.
9982         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9983         (library_list_start_library): Allocate lm_info_aix with new.
9984         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9985         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9986         with copy constructor.
9987
9988 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9989
9990         * solist.h (struct lm_info): Remove.
9991         (struct lm_info_base): New class.
9992         (struct so_list) <lm_info>: Change type to lm_info_base *.
9993         * nto-tdep.c (struct lm_info): Remove.
9994         (lm_addr): Adjust.
9995         * solib-aix.c (struct lm_info): Rename to ...
9996         (struct lm_info_aix): ... this.  Extend lm_info_base.
9997         (lm_info_p): Rename to ...
9998         (lm_info_aix_p): ... this, and adjust.
9999         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10000         solib_aix_parse_libraries, library_list_start_library,
10001         solib_aix_free_library_list, solib_aix_parse_libraries,
10002         solib_aix_get_library_list,
10003         solib_aix_relocate_section_addresses, solib_aix_free_so,
10004         solib_aix_get_section_offsets,
10005         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10006         Adjust.
10007         (struct solib_aix_inferior_data) <library_list>: Adjust.
10008         * solib-darwin.c (struct lm_info): Rename to ...
10009         (struct lm_info_darwin): ... this.  Extend lm_info_base.
10010         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10011         * solib-dsbt.c (struct lm_info): Rename to ...
10012         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
10013         (struct dsbt_info) <main_executable_lm_info): Adjust.
10014         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10015         dsbt_relocate_section_addresses): Adjust.
10016         * solib-frv.c (struct lm_info): Rename to ...
10017         (struct lm_info_frv): ... this.  Extend lm_info_base.
10018         (main_executable_lm_info): Adjust.
10019         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10020         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10021         find_canonical_descriptor_in_load_object,
10022         frv_fdpic_find_canonical_descriptor): Adjust.
10023         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10024         to lm_info_svr4.
10025         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10026         svr4_clear_so, svr4_copy_library_list,
10027         library_list_start_library, svr4_default_sos, svr4_read_so_list,
10028         svr4_current_sos, svr4_fetch_objfile_link_map,
10029         solist_update_incremental): Adjust.
10030         * solib-svr4.h (struct lm_info_svr4): Move here from
10031         solib-svr4.c.
10032         * solib-target.c (struct lm_info): Rename to ...
10033         (struct lm_info_target): ... this.  Extend lm_info_base.
10034         (lm_info_p): Rename to ...
10035         (lm_info_target_p): ... this.
10036         (solib_target_parse_libraries, library_list_start_segment,
10037         library_list_start_section, library_list_start_library,
10038         library_list_end_library, solib_target_free_library_list,
10039         solib_target_current_sos, solib_target_free_so,
10040         solib_target_relocate_section_addresses): Adjust.
10041         * windows-nat.c (struct lm_info): Rename to ...
10042         (struct lm_info_windows): ... this.  Extend lm_info_base.
10043         (windows_make_so, handle_load_dll, handle_unload_dll,
10044         windows_xfer_shared_libraries): Adjust.
10045
10046 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10047
10048         * solib-darwin.c (struct darwin_so_list): Remove.
10049         (darwin_current_sos): Allocate an so_list object instead of a
10050         darwin_so_list, separately allocate an lm_info object.
10051         (darwin_free_so): Free lm_info.
10052
10053 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
10054
10055         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10056         with fprintf_filtered.
10057
10058 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10059
10060         * regcache.c (regcache::regcache): New function.
10061         (regcache::~regcache): New function.
10062         (regcache_xmalloc_1): Remove.
10063         (regcache_xmalloc): Call new regcache.
10064         (regcache_xfree): Call delete regcache.
10065         (get_thread_arch_aspace_regcache): Call new regcache.
10066
10067 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10068
10069         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10070         lwp instead of ptid_get_lwp.
10071
10072 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10073
10074         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10075         lwp_info instead of getting from inferior_ptid.
10076
10077 2017-04-27  Keith Seitz  <keiths@redhat.com>
10078
10079         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10080         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10081         (CV_CONVERSION_BADNESS): Define.
10082         (rank_one_type): Remove overly restrictive rvalue reference
10083         rank checks.
10084         Add cv-qualifier checks and subranks for type equality.
10085         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10086         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10087         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10088
10089 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
10090
10091         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10092         count when creating the object.
10093
10094 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
10095             Ulrich Weigand  <uweigand@de.ibm.com>
10096
10097         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10098         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10099         is used in AIX.
10100         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10101         (process_xcoff_symbol): Likewise.
10102         (scan_xcoff_symtab): Likewise.
10103
10104 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10105
10106         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10107         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10108         (ia64_access_reg): Use get_frame_register_unsigned.
10109         (ia64_access_rse_reg): Likewise.
10110         (ia64_libunwind_frame_prev_register): Likewise.
10111
10112 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
10113
10114         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10115         * gdbarch.c: Regenerated.
10116         * gdbarch.h: Regenerated.
10117         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10118         visibility external.
10119         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10120         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10121         (enum cfa_how_kind): Move to ...
10122         (struct dwarf2_frame_state_reg_info): Likewise.
10123         (struct dwarf2_frame_state): Likewise.
10124         * dwarf2-frame.h: ... here.
10125         (dwarf2_frame_state_alloc_regs): New declaration.
10126         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10127         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10128
10129 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10130
10131         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10132         regcache_raw_read_unsigned.
10133         (xtensa_pseudo_register_write): Likewise.
10134
10135 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10136
10137         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
10138         (nds32_pseudo_register_write): Likewise.
10139
10140 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10141
10142         * regcache.c (struct regcache) <readonly_p>: Change its type
10143         to bool.
10144         (regcache_xmalloc_1): Update parameter type and callers update.
10145
10146 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10147
10148         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
10149         set_gdbarch_wchar_bit.
10150         * arm-tdep.c (arm_gdbarch_init): Likewise.
10151
10152 2017-04-25  Pedro Alves  <palves@redhat.com>
10153
10154         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
10155         (BothAreRelocatable, memcopy, memmove): Don't define.
10156         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
10157         macros.
10158
10159 2017-04-25  Pedro Alves  <palves@redhat.com>
10160
10161         * common/common-defs.h: Include "common/poison.h".
10162         * common/function-view.h: (Not, Or, Requires): Move to traits.h
10163         and adjust.
10164         * common/poison.h: New file.
10165         * common/traits.h: Include <type_traits>.
10166         (Not, Or, Requires): New, moved from common/function-view.h.
10167
10168 2017-04-25  Pedro Alves  <palves@redhat.com>
10169
10170         * breakpoint.h (struct breakpoint): In-class initialize all
10171         fields.  Make boolean fields "bool".
10172         * breakpoint.c (init_raw_breakpoint_without_location): Remove
10173         memset call and initializations no longer necessary.
10174
10175 2017-04-25  Pedro Alves  <palves@redhat.com>
10176
10177         * btrace.c (pt_btrace_insn_flags): Change parameter type to
10178         reference.
10179         (pt_btrace_insn): New function.
10180         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
10181
10182 2017-04-25  Pedro Alves  <palves@redhat.com>
10183
10184         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
10185         "base" field and inherit from "bp_location" instead.  Add
10186         non-default ctor.
10187         (allocate_location_exception): Use new non-default ctor.
10188         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
10189         (init_bp_location): Convert to ...
10190         (bp_location::bp_location): ... this new ctor, and remove memset
10191         call.
10192         (base_breakpoint_allocate_location): Use the new non-default ctor.
10193         * breakpoint.h (bp_location): Now a class.  Declare default and
10194         non-default ctors.  In-class initialize all members.
10195         (init_bp_location): Remove declaration.
10196
10197 2017-04-25  Pedro Alves  <palves@redhat.com>
10198
10199         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
10200         assignment operator.
10201
10202 2017-04-24  Yao Qi  <yao.qi@linaro.org>
10203
10204         * doublest.c (convert_doublest_to_floatformat): Call
10205         floatformat_totalsize_bytes.
10206
10207 2017-04-22  Tom Tromey  <tom@tromey.com>
10208
10209         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
10210         ui_out_emit_list.
10211         * stack.c (print_frame): Use ui_out_emit_list.
10212         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10213         ui_out_emit_list.
10214         * mi/mi-main.c (print_one_inferior)
10215         (mi_cmd_data_list_register_names)
10216         (mi_cmd_data_list_register_values, mi_cmd_list_features)
10217         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
10218         ui_out_emit_list.
10219         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
10220         (mi_output_solib_attribs): Use ui_out_emit_list,
10221         ui_out_emit_tuple.
10222         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
10223         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
10224         (mi_cmd_stack_list_args, list_args_or_locals): Use
10225         ui_out_emit_list.
10226         * disasm.c (do_assembly_only): Use ui_out_emit_list.
10227         * breakpoint.c (print_solib_event, output_thread_groups): Use
10228         ui_out_emit_list.
10229
10230 2017-04-22  Tom Tromey  <tom@tromey.com>
10231
10232         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
10233         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
10234         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
10235
10236 2017-04-22  Tom Tromey  <tom@tromey.com>
10237
10238         * tracepoint.c (tvariables_info_1)
10239         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
10240
10241 2017-04-22  Tom Tromey  <tom@tromey.com>
10242
10243         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
10244         annotate_arg_emitter.
10245         * breakpoint.c (print_mention_watchpoint)
10246         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
10247         * annotate.h (struct annotate_arg_emitter): New.
10248
10249 2017-04-22  Tom Tromey  <tom@tromey.com>
10250
10251         * record-btrace.c (record_btrace_insn_history)
10252         (record_btrace_insn_history_range, record_btrace_call_history)
10253         (record_btrace_call_history_range): Use ui_out_emit_tuple.
10254         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
10255         ui_out_emit_tuple.
10256         * stack.c (print_frame_info): Use ui_out_emit_tuple.
10257         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
10258         * skip.c (skip_info): Use ui_out_emit_tuple.
10259         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
10260         * progspace.c (print_program_space): Use ui_out_emit_tuple.
10261         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
10262         * osdata.c (info_osdata): Use ui_out_emit_tuple.
10263         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10264         ui_out_emit_tuple.
10265         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
10266         (output_register, mi_cmd_data_read_memory)
10267         (mi_cmd_data_read_memory_bytes, mi_load_progress)
10268         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
10269         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
10270         Use ui_out_emit_tuple.
10271         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
10272         ui_out_emit_tuple.
10273         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10274         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
10275         * linux-thread-db.c (info_auto_load_libthread_db): Use
10276         ui_out_emit_tuple.
10277         * inferior.c (print_inferior): Use ui_out_emit_tuple.
10278         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
10279         * disasm.c (do_mixed_source_and_assembly_deprecated)
10280         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
10281         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
10282         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
10283         * breakpoint.c (print_one_breakpoint_location)
10284         (print_one_breakpoint): Use ui_out_emit_tuple.
10285         * auto-load.c (print_script, info_auto_load_cmd): Use
10286         ui_out_emit_tuple.
10287         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
10288
10289 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
10290
10291         * thread.c (print_thread_info_1): Remove dead code.
10292
10293 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10294
10295         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
10296         GDB_SELF_TEST.
10297         * arm-tdep.c (selftests::arm_record_test): Likewise.
10298
10299 2017-04-21  Yao Qi  <yao.qi@linaro.org>
10300
10301         * regcache.c (regcache_restore): Remove argument 2.  Replace
10302         argument 3 with regcache.  Get register status from
10303         src->register_status and get register contents from
10304         register_buffer (src, regnum).
10305         (regcache_cpy): Update.
10306
10307 2017-04-19  Pedro Alves  <palves@redhat.com>
10308
10309         * gdbthread.h (thread): Add missing closing parenthesis in
10310         comment.
10311
10312 2017-04-19  Pedro Alves  <palves@redhat.com>
10313
10314         * common/refcounted-object.h: New file.
10315         * gdbthread.h: Include "common/refcounted-object.h".
10316         (thread_info): Inherit from refcounted_object and add comments.
10317         (thread_info::incref, thread_info::decref)
10318         (thread_info::m_refcount): Delete.
10319         (thread_info::deletable): Use the refcounted_object::refcount()
10320         method.
10321         * inferior.c (current_inferior_): Add comment.
10322         (set_current_inferior): Increment/decrement refcounts.
10323         (prune_inferiors, remove_inferior_command): Skip inferiors marked
10324         not-deletable instead of comparing with the current inferior.
10325         (initialize_inferiors): Increment the initial inferior's refcount.
10326         * inferior.h (struct inferior): Forward declare.
10327         Include "common/refcounted-object.h".
10328         (current_inferior, set_current_inferior): Move declaration to
10329         before struct inferior's definition, and fix comment.
10330         (inferior): Inherit from refcounted_object.  Add comments.
10331         * thread.c (switch_to_thread_no_regs): Reference the thread's
10332         inferior pointer directly instead of doing a ptid lookup.
10333         (switch_to_no_thread): New function.
10334         (switch_to_thread(thread_info *)): New function, factored out
10335         from ...
10336         (switch_to_thread(ptid_t)): ... this.
10337         (restore_current_thread): Delete.
10338         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
10339         fields, and add 'inf' field.
10340         (do_restore_current_thread_cleanup): Check whether old->inf is
10341         alive instead of looking up an inferior by ptid.  Use
10342         switch_to_thread and switch_to_no_thread.
10343         (restore_current_thread_cleanup_dtor): Use old->inf directly
10344         instead of lookup up an inferior by id.  Decref the inferior.
10345         Don't restore 'removable'.
10346         (make_cleanup_restore_current_thread): Same the inferior pointer
10347         in old, instead of the inferior number.  Incref the inferior.
10348         Don't save/clear 'removable'.
10349
10350 2017-04-19  Pedro Alves  <palves@redhat.com>
10351
10352         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10353         unittests/scoped_restore-selftests.c.
10354         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
10355         * common/scoped_restore.h (scoped_restore_base): Make "class".
10356         (scoped_restore_base::release): New public method.
10357         (scoped_restore_base::scoped_restore_base): New protected ctor.
10358         (scoped_restore_base::m_saved_var): New protected field.
10359         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
10360         scoped_restore_base base class instead of m_saved_var directly.
10361         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
10362         (scoped_restore_tmpl::scoped_restore_tmpl(const
10363         scoped_restore_tmpl<T>&)): Likewise.
10364         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
10365         method.
10366         (scoped_restore_tmpl::saved_var): New method.
10367         (scoped_restore_tmpl::m_saved_var): Delete.
10368         * inferior.h (inferior::detaching): Now a bool.
10369         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
10370         cleanup.
10371         * unittests/scoped_restore-selftests.c: New file.
10372
10373 2017-04-19  Pedro Alves  <palves@redhat.com>
10374
10375         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
10376         Re-sort in alphabetic order.
10377
10378 2017-04-18  Pedro Alves  <palves@redhat.com>
10379
10380         * xml-support.c (obstack_xml_printf): Delete.
10381         * xml-support.h (obstack_xml_printf): Delete.
10382
10383 2017-04-18  Pedro Alves  <palves@redhat.com>
10384
10385         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
10386         vdebug, verror, body_text, start_element, end_element, name,
10387         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
10388         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
10389         is_xinclude>: Make private and add m_ prefix.
10390         (gdb_xml_parser::body_text): New method, based on ...
10391         (gdb_xml_body_text): ... this.  Adjust.
10392         (gdb_xml_parser::vdebug): New method, based on ...
10393         (gdb_xml_debug): ... this.  Adjust.
10394         (gdb_xml_parser::verror): New method, based on ...
10395         (gdb_xml_error): ... this.  Adjust.
10396         (gdb_xml_parser::start_element): New method, based on ...
10397         (gdb_xml_start_element): ... this.  Adjust.
10398         (gdb_xml_start_element_wrapper): Defer to
10399         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
10400         (gdb_xml_parser::end_element): New method, based on ...
10401         (gdb_xml_end_element_wrapper): ... this.  Adjust.
10402         (gdb_xml_parser::~gdb_xml_parser): Adjust.
10403         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
10404         (gdb_xml_parser::use_dtd): New method, based on ...
10405         (gdb_xml_use_dtd): ... this.  Adjust.
10406         (gdb_xml_parser::parse): New method, based on ...
10407         (gdb_xml_parse): ... this.  Adjust.
10408         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
10409         (xinclude_start_include): Adjust to call the parser's name method.
10410         (xml_xinclude_default, xml_xinclude_start_doctype)
10411         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
10412         method.
10413         (xml_process_xincludes): Adjust to call parser methods.
10414         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
10415         declarations.
10416
10417 2017-04-18  Pedro Alves  <palves@redhat.com>
10418
10419         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
10420         gdb::optional<std::string>.
10421         * xml-support.c: Include <string>.
10422         (scope_level::scope_level(scope_level &&))
10423         (scope_level::~scope_level): Delete.
10424         (scope_level::body): Now a std::string.
10425         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
10426         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
10427         parameter.
10428         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
10429         (xinclude_parsing_data::output): Now a std::string reference.
10430         (xinclude_start_include): Adjust.
10431         (xml_xinclude_default): Adjust.
10432         (xml_process_xincludes): Add 'output' parameter, and return bool.
10433         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
10434         and return bool.
10435         * xml-tdesc.c: Include <unordered_map> and <string>.
10436         (tdesc_xml_cache): Delete.
10437         (tdesc_xml_cache_s): Delete.
10438         (xml_cache): Now an std::unordered_map.
10439         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
10440         (target_fetch_description_xml): Change return type to
10441         gdb::optional<std::string>, and adjust.
10442         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
10443         (target_fetch_description_xml): Change return type to
10444         gdb::optional<std::string>.
10445
10446 2017-04-18  Pedro Alves  <palves@redhat.com>
10447
10448         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10449         unittests/optional-selftests.c.
10450         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
10451         * unittests/optional-selftests.c: New file.
10452         * unittests/optional/assignment/1.cc: New file.
10453         * unittests/optional/assignment/2.cc: New file.
10454         * unittests/optional/assignment/3.cc: New file.
10455         * unittests/optional/assignment/4.cc: New file.
10456         * unittests/optional/assignment/5.cc: New file.
10457         * unittests/optional/assignment/6.cc: New file.
10458         * unittests/optional/assignment/7.cc: New file.
10459         * unittests/optional/cons/copy.cc: New file.
10460         * unittests/optional/cons/default.cc: New file.
10461         * unittests/optional/cons/move.cc: New file.
10462         * unittests/optional/cons/value.cc: New file.
10463         * unittests/optional/in_place.cc: New file.
10464         * unittests/optional/observers/1.cc: New file.
10465         * unittests/optional/observers/2.cc: New file.
10466
10467 2017-04-18  Pedro Alves  <palves@redhat.com>
10468
10469         * common/gdb_optional.h: Include common/traits.h.
10470         (in_place_t): New type.
10471         (in_place): New constexpr variable.
10472         (optional::optional): Remove member initialization of
10473         m_instantiated.
10474         (optional::optional(in_place_t...)): New constructor.
10475         (optional::~optional): Use reset.
10476         (optional::optional(const optional&)): New.
10477         (optional::optional(const optional&&)): New.
10478         (optional::optional(T &)): New.
10479         (optional::optional(T &&)): New.
10480         (operator::operator=(const optional &)): New.
10481         (operator::operator=(optional &&)): New.
10482         (operator::operator= (const T &))
10483         (operator::operator= (T &&))
10484         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
10485         (operator::reset): New.
10486         (operator::m_instantiated):: Add in-class initializer.
10487         * common/traits.h: Include <type_traits>.
10488         (struct And): New types.
10489
10490 2017-04-18  Pedro Alves  <palves@redhat.com>
10491
10492         * xml-support.c: Include <vector>.
10493         (scope_level::scope_level(const gdb_xml_element *))
10494         (scope_level::scope_level(scope_level&&)): New.
10495         (scope_level::~scope_level): New.
10496         (scope_level_s): Delete.
10497         (gdb_xml_parser::scopes): Now a std::vector.
10498         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
10499         Use std::vector.
10500         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
10501         scope cleanup code.
10502         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
10503         of the scopes member.  Use std::vector::emplace_back.
10504
10505 2017-04-18  Pedro Alves  <palves@redhat.com>
10506
10507         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
10508         a bool.
10509         (gdb_xml_end_element): Change type of first parameter.
10510         (gdb_xml_cleanup): Rename to ...
10511         (gdb_xml_parser::~gdb_xml_parser): ... this.
10512         (gdb_xml_create_parser_and_cleanup): Delete with ...
10513         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
10514         to this new ctor.
10515         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
10516         using gdb_xml_create_parser_and_cleanup.
10517         (xinclude_parsing_data): Add ctor/dtor.
10518         (xml_xinclude_cleanup): Delete.
10519         (xml_process_xincludes): Create a local xinclude_parsing_data
10520         instead of heap-allocating one.  Create a local gdb_xml_parser
10521         instead of heap-allocating one with
10522         gdb_xml_create_parser_and_cleanup.
10523
10524 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
10525
10526         PR threads/20743
10527         * fbsd-nat.c (resume_one_thread_cb): Remove.
10528         (resume_all_threads_cb): Remove.
10529         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
10530         iterate_over_threads.
10531
10532 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10533
10534         * NEWS: Create a new section for the next release branch.
10535         Rename the section of the current branch, now that it has
10536         been cut.
10537
10538 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10539
10540         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
10541         * version.in: Bump version to 8.0.50.DATE-git.
10542
10543 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
10544
10545         PR gdb/21385
10546         * windows-nat.c (windows_create_inferior): Declare 'allargs'
10547         independently of the host, and fix build breakage on Cygwin.
10548
10549 2017-04-13  Pedro Alves  <palves@redhat.com>
10550
10551         * inferior.c (free_inferior): Convert to ...
10552         (inferior::~inferior): ... this dtor.
10553         (inferior::inferior): New ctor, factored out from ...
10554         (add_inferior_silent): ... here.  Allocate the inferior with a new
10555         expression.
10556         (delete_inferior): Call delete instead of free_inferior.
10557         * inferior.h (gdb_environ, continuation): Forward declare.
10558         (inferior): Now a class.  Add in-class initialization to all
10559         members.  Make boolean fields bool, except 'detaching'.
10560         (inferior::inferior): New explicit ctor.
10561         (inferior::~inferior): New.
10562
10563 2017-04-13  Pedro Alves  <palves@redhat.com>
10564
10565         * inferior.c (init_inferior_list): Delete.
10566         * inferior.h (init_inferior_list): Delete.
10567
10568 2017-04-13  Pedro Alves  <palves@redhat.com>
10569
10570         PR threads/13217
10571         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
10572         (top level): Call it twice, with different thread sets.
10573
10574 2017-04-13  Pedro Alves  <palves@redhat.com>
10575
10576         * thread.c: Include <algorithm>.
10577         (thread_array_cleanup): Delete.
10578         (scoped_inc_dec_ref): New class.
10579         (live_threads_count): New function.
10580         (set_thread_refcount): Delete.
10581         (tp_array_compar_ascending): Now a bool.
10582         (tp_array_compar): Convert to a std::sort comparison function.
10583         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
10584         and live_threads_count.
10585
10586 2017-04-13  Pedro Alves  <palves@redhat.com>
10587
10588         * infrun.c (follow_fork_inferior): Also switch the current
10589         inferior.
10590
10591 2017-04-13  Pedro Alves  <palves@redhat.com>
10592
10593         * breakpoint.c (watch_command_1): Save watchpoint-frame info
10594         before calling create_internal_breakpoint.
10595
10596 2017-04-13  Pedro Alves  <palves@redhat.com>
10597
10598         * fork-child.c (execv_argv): New class.
10599         (breakup_args): Refactored as ...
10600         (execv_argv::init_for_no_shell): .. this method of execv_argv.
10601         Copy arguments to storage and replace separators with NULL
10602         terminators in place.
10603         (escape_bang_in_quoted_argument): Adjust to return bool.
10604         (execv_argv::execv_argv): New ctor.
10605         (execv_argv::init_for_shell): New method, factored out from
10606         fork_inferior.  Don't strdup strings into the vector.
10607         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
10608         Remove free_vector_argv call.
10609
10610 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10611
10612         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10613         tdep->rx_psw_type.
10614
10615 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10616
10617         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10618         * rx-tdep.c (rx_gdbarch_init): Likewise.
10619
10620 2017-04-13  Pedro Alves  <palves@redhat.com>
10621
10622         * breakpoint.h (struct breakpoint): Reindent.
10623
10624 2017-04-13  Pedro Alves  <palves@redhat.com>
10625
10626         * breakpoint.c (bp_location): Rename to ...
10627         (bp_locations): ... this.  All references updated.
10628         (bp_location_count): Rename to ...
10629         (bp_locations_count): ... this.  All references updated.
10630         (bp_location_placed_address_before_address_max): Rename to ...
10631         (bp_locations_placed_address_before_address_max): ... this.  All
10632         references updated.
10633         (bp_location_shadow_len_after_address_max): Rename to ...
10634         (bp_locations_shadow_len_after_address_max): ... this.  All
10635         references updated.
10636         (bp_location_compare_addrs): Rename to ...
10637         (bp_locations_compare_addrs): ... this.  All references updated.
10638         (bp_location_compare):Rename to ...
10639         (bp_locations_compare): ... this.  All references updated.
10640         (bp_location_target_extensions_update): Rename to ...
10641         (bp_locations_target_extensions_update): ... this.  All references
10642         updated.
10643
10644 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10645
10646         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10647         * common/common.m4: Check headers 'termios.h', 'termio.h' and
10648         'sgtty.h'.
10649         * common/gdb_termios.h: New file, with parts of "terminal.h".
10650         * inflow.c: Include "gdb_termios.h".
10651         * ser-unix.c: Include "gdb_termios.h".
10652         * terminal.h: Move terminal-related defines to
10653         "common/gdb_termios.h".
10654
10655 2017-04-12  Tom Tromey  <tom@tromey.com>
10656
10657         * probe.c (parse_probes): Update.
10658         * location.h (delete_event_location): Don't declare.
10659         (event_location_deleter::operator()): Update.
10660         * location.c (event_location_deleter::operator()): Rename from
10661         delete_event_location.
10662         * linespec.h (linespec_result) <location>: Change type to
10663         event_location_up.
10664         * linespec.c (canonicalize_linespec, event_location_to_sals)
10665         (decode_objc): Update.
10666         (linespec_result): Don't call delete_event_location.
10667         * breakpoint.c (create_breakpoints_sal)
10668         (bkpt_probe_create_sals_from_location)
10669         (strace_marker_create_sals_from_location): Update.
10670
10671 2017-04-12  Tom Tromey  <tom@tromey.com>
10672
10673         * linespec.h (struct linespec_result): Add constructor and
10674         destructor.
10675         (init_linespec_result, destroy_linespec_result)
10676         (make_cleanup_destroy_linespec_result): Don't declare.
10677         * linespec.c (init_linespec_result): Remove.
10678         (linespec_result::~linespec_result): Rename from
10679         destroy_linespec_result.  Update.
10680         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10681         Remove.
10682         * breakpoint.c (create_breakpoint, break_range_command)
10683         (decode_location_default): Update.
10684         * ax-gdb.c (agent_command_1): Update.
10685
10686 2017-04-12  Tom Tromey  <tom@tromey.com>
10687
10688         * remote.c (remote_download_tracepoint): Update.
10689         * python/py-breakpoint.c (bppy_get_location): Update.
10690         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10691         (gdbscm_breakpoint_location): Update.
10692         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10693         * breakpoint.h (struct breakpoint) <location, location_range_end>:
10694         Change type to event_location_up.
10695         * breakpoint.c (create_overlay_event_breakpoint)
10696         (create_longjmp_master_breakpoint)
10697         (create_std_terminate_master_breakpoint)
10698         (create_exception_master_breakpoint)
10699         (breakpoint_event_location_empty_p, print_breakpoint_location)
10700         (print_one_breakpoint_location, create_thread_event_breakpoint)
10701         (init_breakpoint_sal, create_breakpoint)
10702         (print_recreate_ranged_breakpoint, break_range_command)
10703         (init_ada_exception_breakpoint, say_where): Update.
10704         (base_breakpoint_dtor): Don't call delete_event_location.
10705         (bkpt_print_recreate, tracepoint_print_recreate)
10706         (dprintf_print_recreate, update_static_tracepoint)
10707         (breakpoint_re_set_default): Update.
10708
10709 2017-04-12  Tom Tromey  <tom@tromey.com>
10710
10711         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10712         type of "to_do".  Update.
10713         (compute_stack_depth): Use std::vector.
10714
10715 2017-04-12  Tom Tromey  <tom@tromey.com>
10716
10717         * printcmd.c (find_instruction_backward): Use std::vector.
10718
10719 2017-04-12  Tom Tromey  <tom@tromey.com>
10720
10721         * symfile.c (objfilep): Remove typedef.
10722         (reread_symbols): Use a std::vector.
10723
10724 2017-04-12  Tom Tromey  <tom@tromey.com>
10725
10726         * mi/mi-main.c (exec_direction_forward): Remove.
10727         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10728         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10729         scoped_restore.
10730         * guile/guile.c (guile_repl_command, guile_command)
10731         (gdbscm_execute_gdb_command): Use scoped_restore.
10732         * go-exp.y (go_parse): Use scoped_restore.
10733         * d-exp.y (d_parse): Use scoped_restore.
10734         * cli/cli-decode.c (cmd_func): Use scoped_restore.
10735         * c-exp.y (c_parse): Use scoped_restore.
10736
10737 2017-04-12  Tom Tromey  <tom@tromey.com>
10738
10739         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10740         (mi_parse): Update return type.
10741         (mi_parse_free): Remove.
10742         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10743         (mi_parse::~mi_parse): Rename from mi_parse_free.
10744         (mi_parse_cleanup): Remove.
10745         (mi_parse): Return a unique_ptr.  Use new.
10746         * mi/mi-main.c (mi_execute_command): Update.
10747
10748 2017-04-12  Tom Tromey  <tom@tromey.com>
10749
10750         * location.c (explicit_location_lex_one): Return a
10751         unique_xmalloc_ptr.
10752         (string_to_explicit_location): Update.  Remove cleanups.
10753
10754 2017-04-12  Tom Tromey  <tom@tromey.com>
10755
10756         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10757         (compare_value_and_voffset): Change type.  Update.
10758         (compute_vtable_size): Change type of "offset_vec".
10759         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
10760         (gnuv3_get_typeid): Remove extraneous declaration.
10761
10762 2017-04-12  Tom Tromey  <tom@tromey.com>
10763
10764         * charset.h (wchar_iterator): Fix comment.
10765
10766 2017-04-12  Tom Tromey  <tom@tromey.com>
10767
10768         * charset.c (iconv_wrapper): New class.
10769         (cleanup_iconv): Remove.
10770         (convert_between_encodings): Use it.
10771
10772 2017-04-12  Tom Tromey  <tom@tromey.com>
10773
10774         * symfile.h (increment_reading_symtab): Update type.
10775         * symfile.c (decrement_reading_symtab): Remove.
10776         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10777         * psymtab.c (psymtab_to_symtab): Update.
10778         * dwarf2read.c (dw2_instantiate_symtab): Update.
10779
10780 2017-04-12  Tom Tromey  <tom@tromey.com>
10781
10782         * jit.c (struct jit_reader): Declare separately.  Add constructor
10783         and destructor.  Change type of "handle".
10784         (loaded_jit_reader): Define separately.
10785         (jit_reader_load): Update.  New "new".
10786         (jit_reader_unload_command): Use "delete".
10787         * gdb-dlfcn.h (struct dlclose_deleter): New.
10788         (gdb_dlhandle_up): New typedef.
10789         (gdb_dlopen, gdb_dlsym): Update types.
10790         (gdb_dlclose): Remove.
10791         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10792         (gdb_dlsym): Change type of "handle".
10793         (make_cleanup_dlclose): Remove.
10794         (dlclose_deleter::operator()): Rename from gdb_dlclose.
10795         * compile/compile-c-support.c (load_libcc): Update.
10796
10797 2017-04-12  Tom Tromey  <tom@tromey.com>
10798
10799         * symtab.h (find_pcs_for_symtab_line): Change return type.
10800         * symtab.c (find_pcs_for_symtab_line): Change return type.
10801         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10802         type of "vec".  Update.
10803         (ltpy_get_pcs_for_line): Update.
10804         * linespec.c (decode_digits_ordinary): Update.
10805
10806 2017-04-12  Tom Tromey  <tom@tromey.com>
10807
10808         * tracepoint.c (actions_command): Update.
10809         * python/python.c (python_command, python_interactive_command):
10810         Update.
10811         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10812         * guile/guile.c (guile_command): Update.
10813         * defs.h (read_command_lines, read_command_lines_1): Return
10814         command_line_up.
10815         (command_lines_deleter): New struct.
10816         (command_line_up): New typedef.
10817         * compile/compile.c (compile_code_command)
10818         (compile_print_command): Update.
10819         * cli/cli-script.h (get_command_line, copy_command_lines): Return
10820         command_line_up.
10821         (make_cleanup_free_command_lines): Remove.
10822         * cli/cli-script.c (get_command_line, read_command_lines_1)
10823         (copy_command_lines): Return command_line_up.
10824         (while_command, if_command, read_command_lines, define_command)
10825         (document_command): Update.
10826         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10827         Remove.
10828         * breakpoint.h (breakpoint_set_commands): Change type of
10829         "commands".
10830         * breakpoint.c (breakpoint_set_commands): Change type of
10831         "commands".  Update.
10832         (do_map_commands_command, update_dprintf_command_list)
10833         (create_tracepoint_from_upload): Update.
10834
10835 2017-04-12  Tom Tromey  <tom@tromey.com>
10836
10837         * tracepoint.c (scope_info): Update.
10838         * spu-tdep.c (spu_catch_start): Update.
10839         * python/python.c (gdbpy_decode_line): Update.
10840         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10841         * python/py-breakpoint.c (bppy_init): Update.
10842         * probe.c (parse_probes): Update.
10843         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10844         * location.h (event_location_deleter): New struct.
10845         (event_location_up): New typedef.
10846         (new_linespec_location, new_address_location, new_probe_location)
10847         (new_explicit_location, copy_event_location)
10848         (string_to_event_location, string_to_event_location_basic)
10849         (string_to_explicit_location): Update return type.
10850         (make_cleanup_delete_event_location): Remove.
10851         * location.c (new_linespec_location, new_address_location)
10852         (new_probe_location, new_explicit_location, copy_event_location):
10853         Return event_location_up.
10854         (delete_event_location_cleanup)
10855         (make_cleanup_delete_event_location): Remove.
10856         (string_to_explicit_location, string_to_event_location_basic)
10857         (string_to_event_location): Return event_location_up.
10858         * linespec.c (canonicalize_linespec, event_location_to_sals)
10859         (decode_line_with_current_source)
10860         (decode_line_with_last_displayed, decode_objc): Update.
10861         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10862         * completer.c (location_completer): Update.
10863         * cli/cli-cmds.c (edit_command, list_command): Update.
10864         * breakpoint.c (create_overlay_event_breakpoint)
10865         (create_longjmp_master_breakpoint)
10866         (create_std_terminate_master_breakpoint)
10867         (create_exception_master_breakpoint)
10868         (create_thread_event_breakpoint): Update.
10869         (init_breakpoint_sal): Update.  Remove some dead code.
10870         (create_breakpoint_sal): Change type of "location".  Update.
10871         (create_breakpoints_sal, create_breakpoint, break_command_1)
10872         (dprintf_command, break_range_command, until_break_command)
10873         (init_ada_exception_breakpoint)
10874         (strace_marker_create_sals_from_location)
10875         (update_static_tracepoint, trace_command, ftrace_command)
10876         (strace_command, create_tracepoint_from_upload): Update.
10877         * break-catch-throw.c (re_set_exception_catchpoint): Update.
10878         * ax-gdb.c (agent_command_1): Update.
10879
10880 2017-04-12  Pedro Alves  <palves@redhat.com>
10881
10882         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10883         * configure.tgt: Handle i[34567]86-*-go32* and
10884         i[34567]86-*-msdosdjgpp*.
10885         * i386-tdep.c (i386_svr4_reg_to_regnum):
10886         Make extern.
10887         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10888         i386-go32-tdep.c.
10889         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10890         * i386-go32-tdep.c: New file.
10891         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10892         declarations.
10893
10894 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
10895
10896         * aix-thread.c (pd_status2str): Change return type to const char *.
10897
10898 2017-04-12  Pedro Alves  <palves@redhat.com>
10899
10900         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10901         calls to set_gdbarch_gnu_triplet_regexp.
10902
10903 2017-04-12  Pedro Alves  <palves@redhat.com>
10904
10905         PR gdb/21323
10906         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10907         New enum value.
10908         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10909         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10910         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10911         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10912         * gdbarch.h, gdbarch.c: Regenerate.
10913         * aarch64-tdep.c (aarch64_gdbarch_init): Override
10914         gdbarch_wchar_bit and gdbarch_wchar_signed.
10915         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10916         * arm-tdep.c (arm_gdbarch_init): Likewise.
10917         * avr-tdep.c (avr_gdbarch_init): Likewise.
10918         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10919         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10920         * i386-tdep.c (i386_go32_init_abi): Likewise.
10921         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10922         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10923         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10924         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10925         * sh-tdep.c (sh_gdbarch_init): Likewise.
10926         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10927         * sparc64-tdep.c (sparc64_init_abi): Likewise.
10928         * windows-tdep.c (windows_init_abi): Likewise.
10929         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10930
10931 2017-04-12  Pedro Alves  <palves@redhat.com>
10932
10933         PR c++/21323
10934         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10935         cplus_primitive_type_char32_t>: New enum values.
10936         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10937         and cplus_primitive_type_char32_t.
10938         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10939         32, use the archtecture's built-in type for char16_t and char32_t,
10940         respectively.  Otherwise, fallback to init_integer_type as before,
10941         but make the type unsigned, and issue a complaint.
10942         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10943
10944 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
10945
10946         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10947         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10948
10949 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10950
10951         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10952         'const char *'.
10953
10954 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10955
10956         * common/common-utils.c (free_vector_argv): New function.
10957         * common/common-utils.h: Include <vector>.
10958         (free_vector_argv): New prototype.
10959         * darwin-nat.c (darwin_create_inferior): Rewrite function
10960         prototype in order to constify "exec_file" and accept a
10961         "std::string" for "allargs".
10962         * fork-child.c: Include <vector>.
10963         (breakup_args): Rewrite function, using C++.
10964         (fork_inferior): Rewrite function header, constify "exec_file_arg"
10965         and accept "std::string" for "allargs".  Update the code to
10966         calculate "argv" based on "allargs".  Update calls to "exec_fun"
10967         and "execvp".
10968         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10969         order to constify "exec_file" and accept a "std::string" for
10970         "allargs".
10971         * go32-nat.c (go32_create_inferior): Likewise.
10972         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10973         * infcmd.c (run_command_1): Constify "exec_file".  Use
10974         "std::string" for inferior arguments.
10975         * inferior.h (fork_inferior): Update prototype.
10976         * linux-nat.c (linux_nat_create_inferior): Rewrite function
10977         prototype in order to constify "exec_file" and accept a
10978         "std::string" for "allargs".
10979         * nto-procfs.c (procfs_create_inferior): Likewise.
10980         * procfs.c (procfs_create_inferior): Likewise.
10981         * remote-sim.c (gdbsim_create_inferior): Likewise.
10982         * remote.c (extended_remote_run): Update code to accept
10983         "std::string" as argument.
10984         (extended_remote_create_inferior): Rewrite function prototype in
10985         order to constify "exec_file" and accept a "std::string" for
10986         "allargs".
10987         * rs6000-nat.c (super_create_inferior): Likewise.
10988         (rs6000_create_inferior): Likewise.
10989         * target.h (struct target_ops) <to_create_inferior>: Likewise.
10990         * windows-nat.c (windows_create_inferior): Likewise.
10991
10992 2017-04-11  Pedro Alves  <palves@redhat.com>
10993
10994         * thread.c: Fix whitespace throughout.
10995
10996 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10997
10998         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10999
11000 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
11001
11002         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11003
11004 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
11005
11006         PR gdb/21364
11007         * osdata.c (info_osdata): Check if 'type' is an empty string
11008         instead of NULL.
11009
11010 2017-04-10  Pedro Alves  <palves@redhat.com>
11011
11012         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11013         (ptid_to_global_thread_id, in_thread_list)
11014         (do_captured_list_thread_ids, set_resumed, set_running)
11015         (set_executing, set_stop_requested, finish_thread_state)
11016         (validate_registers_access, can_access_registers_ptid)
11017         (print_thread_info_1, switch_to_thread)
11018         (do_restore_current_thread_cleanup)
11019         (make_cleanup_restore_current_thread, thread_command)
11020         (thread_name_command): Use operator== instead of ptid_equal.
11021
11022 2017-04-10  Pedro Alves  <palves@redhat.com>
11023
11024         * thread.c (struct current_thread_cleanup) <next>: Delete field.
11025         (current_thread_cleanup_chain): Delete.
11026         (restore_current_thread_cleanup_dtor)
11027         (make_cleanup_restore_current_thread): Remove references to
11028         current_thread_cleanup_chain.
11029
11030 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
11031
11032         * msp430-tdep.c (msp430_pseudo_register_read): Never return
11033         REG_UNKNOWN.
11034
11035 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11036
11037         PR gdb/19942
11038         * gdbthread.h (thread_info::deletable): New method.
11039         (thread_info::incref): New method.
11040         (thread_info::decref): New method.
11041         (thread_info::refcount): Move it to private.
11042         * infrun.c (save_stop_context): Call inc_refcount.
11043         (release_stop_context_cleanup): Likewise.
11044         * thread.c (set_thread_exited): New function.
11045         (init_thread_list): Delete "tp" only it is deletable, otherwise
11046         call set_thread_exited.
11047         (delete_thread_1): Call set_thread_exited.
11048         (current_thread_cleanup) <inferior_pid>: Remove.
11049         <thread>: New field.
11050         (restore_current_thread_ptid_changed): Removed.
11051         (do_restore_current_thread_cleanup): Adjust.
11052         (restore_current_thread_cleanup_dtor): Don't call
11053         find_thread_ptid.
11054         (set_thread_refcount): Use dec_refcount.
11055         (make_cleanup_restore_current_thread): Adjust.
11056         (thread_apply_all_command): Call inc_refcount.
11057         (_initialize_thread): Don't call
11058         observer_attach_thread_ptid_changed.
11059
11060 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11061
11062         * thread.c (delete_thread_1): Hoist code on marking thread as
11063         exited.
11064
11065 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11066
11067         * windows-nat.c (windows_detach): Initialize ptid with
11068         minus_one_ptid.
11069
11070 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11071
11072         * unittests/ptid-selftests.c: Fix erroneous assert messages.
11073
11074 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
11075
11076         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11077         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11078         (bfin_pseudo_register_write): Likewise
11079
11080 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
11081
11082         * common/ptid.h (struct ptid): Change to...
11083         (class ptid_t): ... this.
11084         <ptid_t>: New constructors.
11085         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11086         matches>: New methods.
11087         <make_null, make_minus_one>: New static methods.
11088         <pid>: Rename to...
11089         <m_pid>: ...this.
11090         <lwp>: Rename to...
11091         <m_lwp>: ...this.
11092         <tid>: Rename to...
11093         <m_tid>: ...this.
11094         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11095         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11096         as references, move comment to class ptid_t.
11097         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11098         ptid_t static methods.
11099         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11100         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11101         Take ptid arguments as references, implement using ptid_t methods.
11102         * unittests/ptid-selftests.c: New file.
11103         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11104         unittests/ptid-selftests.c.
11105         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11106
11107 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11108
11109         * python/python.c (python_run_simple_file): Cast mode literal to
11110         non-const char pointer as expected by PyFile_FromString.
11111
11112 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
11113
11114         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11115         minus_one_ptid and null_ptid.
11116
11117 2017-04-05  Pedro Alves  <palves@redhat.com>
11118
11119         * warning.m4 (build_warnings): Remove -Wno-write-strings.
11120         * configure: Regenerate.
11121
11122 2017-04-05  Pedro Alves  <palves@redhat.com>
11123
11124         * ada-exp.y (yyerror): Constify.
11125         * ada-lang.c (bound_name, get_selections)
11126         (ada_variant_discrim_type)
11127         (ada_variant_discrim_name, ada_value_struct_elt)
11128         (ada_lookup_struct_elt_type, is_unchecked_variant)
11129         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11130         (catch_ada_exception_command_split)
11131         (catch_ada_assert_command_split, catch_assert_command)
11132         (ada_op_name): Constify.
11133         * ada-lang.h (ada_yyerror, get_selections)
11134         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
11135         * arc-tdep.c (arc_print_frame_cache): Constify.
11136         * arm-tdep.c (arm_skip_stub): Constify.
11137         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
11138         (gen_aggregate_elt_ref): Constify.
11139         * bcache.c (print_bcache_statistics): Constify.
11140         * bcache.h (print_bcache_statistics): Constify.
11141         * break-catch-throw.c (catch_exception_command_1):
11142         * breakpoint.c (struct ep_type_description::description):
11143         Constify.
11144         (add_solib_catchpoint): Constify.
11145         (catch_fork_command_1): Add cast.
11146         (add_catch_command): Constify.
11147         * breakpoint.h (add_catch_command, add_solib_catchpoint):
11148         Constify.
11149         * bsd-uthread.c (bsd_uthread_state): Constify.
11150         * buildsym.c (patch_subfile_names): Constify.
11151         * buildsym.h (next_symbol_text_func, patch_subfile_names):
11152         Constify.
11153         * c-exp.y (yyerror): Constify.
11154         (token::oper): Constify.
11155         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
11156         * c-varobj.c (cplus_describe_child): Constify.
11157         * charset.c (find_charset_names): Add cast.
11158         (find_charset_names): Constify array and add const_cast.
11159         * cli/cli-cmds.c (complete_command, cd_command): Constify.
11160         (edit_command): Constify.
11161         * cli/cli-decode.c (lookup_cmd): Constify.
11162         * cli/cli-dump.c (dump_memory_command, dump_value_command):
11163         Constify.
11164         (struct dump_context): Constify.
11165         (add_dump_command, restore_command): Constify.
11166         * cli/cli-script.c (get_command_line): Constify.
11167         * cli/cli-script.h (get_command_line): Constify.
11168         * cli/cli-utils.c (check_for_argument): Constify.
11169         * cli/cli-utils.h (check_for_argument): Constify.
11170         * coff-pe-read.c (struct read_pe_section_data): Constify.
11171         * command.h (lookup_cmd): Constify.
11172         * common/print-utils.c (decimal2str): Constify.
11173         * completer.c (gdb_print_filename): Constify.
11174         * corefile.c (set_gnutarget): Constify.
11175         * cp-name-parser.y (yyerror): Constify.
11176         * cp-valprint.c (cp_print_class_member): Constify.
11177         * cris-tdep.c (cris_register_name, crisv32_register_name):
11178         Constify.
11179         * d-exp.y (yyerror): Constify.
11180         (struct token::oper): Constify.
11181         * d-lang.h (d_yyerror): Constify.
11182         * dbxread.c (struct header_file_location::name): Constify.
11183         (add_old_header_file, add_new_header_file, last_function_name)
11184         (dbx_next_symbol_text, add_bincl_to_list)
11185         (find_corresponding_bincl_psymtab, set_namestring)
11186         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
11187         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
11188         * defs.h (command_line_input, print_address_symbolic)
11189         (deprecated_readline_begin_hook): Constify.
11190         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
11191         Constify.
11192         * event-top.c (handle_line_of_input): Constify and add cast.
11193         * exceptions.c (catch_errors): Constify.
11194         * exceptions.h (catch_errors): Constify.
11195         * expprint.c (print_subexp_standard, op_string, op_name)
11196         (op_name_standard, dump_raw_expression, dump_raw_expression):
11197         * expression.h (op_name, op_string, dump_raw_expression):
11198         Constify.
11199         * f-exp.y (yyerror): Constify.
11200         (struct token::oper): Constify.
11201         (struct f77_boolean_val::name): Constify.
11202         * f-lang.c (f_word_break_characters): Constify.
11203         * f-lang.h (f_yyerror): Constify.
11204         * fork-child.c (fork_inferior): Add cast.
11205         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
11206         (new_variant): Constify.
11207         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
11208         * gdbarch.c: Regenerate.
11209         * gdbcore.h (set_gnutarget): Constify.
11210         * go-exp.y (yyerror): Constify.
11211         (token::oper): Constify.
11212         * go-lang.h (go_yyerror): Constify.
11213         * go32-nat.c (go32_sysinfo): Constify.
11214         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
11215         * guile/scm-cmd.c (cmdscm_function): Constify.
11216         * guile/scm-param.c (pascm_param_value): Constify.
11217         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
11218         (h8300sx_register_name): Constify.
11219         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
11220         Constify.
11221         * ia64-tdep.c (ia64_register_names): Constify.
11222         * infcmd.c (construct_inferior_arguments): Constify.
11223         (path_command, attach_post_wait): Constify.
11224         * language.c (show_range_command, show_case_command)
11225         (unk_lang_error): Constify.
11226         * language.h (language_defn::la_error)
11227         (language_defn::la_name_of_this): Constify.
11228         * linespec.c (decode_line_2): Constify.
11229         * linux-thread-db.c (thread_db_err_str): Constify.
11230         * lm32-tdep.c (lm32_register_name): Constify.
11231         * m2-exp.y (yyerror): Constify.
11232         * m2-lang.h (m2_yyerror): Constify.
11233         * m32r-tdep.c (m32r_register_names): Constify and make static.
11234         * m68hc11-tdep.c (m68hc11_register_names): Constify.
11235         * m88k-tdep.c (m88k_register_name): Constify.
11236         * macroexp.c (appendmem): Constify.
11237         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
11238         (upgrade_type, parse_external, parse_partial_symbols)
11239         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
11240         (new_symbol): Constify.
11241         * memattr.c (mem_info_command): Constify.
11242         * mep-tdep.c (register_name_from_keyword): Constify.
11243         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
11244         Constify.
11245         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
11246         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
11247         * mi/mi-main.c (captured_mi_execute_command): Constify and add
11248         cast.
11249         (mi_execute_async_cli_command): Constify.
11250         * mips-tdep.c (mips_register_name): Constify.
11251         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
11252         (am33_register_name, am33_2_register_name)
11253         * moxie-tdep.c (moxie_register_names): Constify.
11254         * nat/linux-osdata.c (osdata_type): Constify fields.
11255         * nto-tdep.c (nto_parse_redirection): Constify.
11256         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
11257         (lookup_child_selector): Constify.
11258         (objc_methcall::name): Constify.
11259         * objc-lang.h (lookup_objc_class, lookup_child_selector)
11260         (lookup_struct_typedef): Constify.
11261         * objfiles.c (pc_in_section): Constify.
11262         * objfiles.h (pc_in_section): Constify.
11263         * p-exp.y (struct token::oper): Constify.
11264         (yyerror): Constify.
11265         * p-lang.h (pascal_yyerror): Constify.
11266         * parser-defs.h (op_name_standard): Constify.
11267         (op_print::string): Constify.
11268         (exp_descriptor::op_name): Constify.
11269         * printcmd.c (print_address_symbolic): Constify.
11270         * psymtab.c (print_partial_symbols): Constify.
11271         * python/py-breakpoint.c (stop_func): Constify.
11272         (bppy_get_expression): Constify.
11273         * python/py-cmd.c (cmdpy_completer::name): Constify.
11274         (cmdpy_function): Constify.
11275         * python/py-event.c (evpy_add_attribute)
11276         (gdbpy_initialize_event_generic): Constify.
11277         * python/py-event.h (evpy_add_attribute)
11278         (gdbpy_initialize_event_generic): Constify.
11279         * python/py-evts.c (add_new_registry): Constify.
11280         * python/py-finishbreakpoint.c (outofscope_func): Constify.
11281         * python/py-framefilter.c (get_py_iter_from_func): Constify.
11282         * python/py-inferior.c (get_buffer): Add cast.
11283         * python/py-param.c (parm_constant::name): Constify.
11284         * python/py-unwind.c (fprint_frame_id): Constify.
11285         * python/python.c (gdbpy_parameter_value): Constify.
11286         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
11287         * remote.c (memory_packet_config::name): Constify.
11288         (show_packet_config_cmd, remote_write_bytes)
11289         (remote_buffer_add_string):
11290         * reverse.c (exec_reverse_once): Constify.
11291         * rs6000-tdep.c (variant::name, variant::description): Constify.
11292         * rust-exp.y (rustyyerror): Constify.
11293         * rust-lang.c (rust_op_name): Constify.
11294         * rust-lang.h (rustyyerror): Constify.
11295         * serial.h (serial_ops::name): Constify.
11296         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
11297         (sh_sh3e_register_name, sh_sh2e_register_name)
11298         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
11299         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
11300         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
11301         (sh_sh4al_dsp_register_name): Constify.
11302         * sh64-tdep.c (sh64_register_name): Constify.
11303         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
11304         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
11305         * stabsread.c (patch_block_stabs, read_type_number)
11306         (ref_map::stabs, ref_add, process_reference)
11307         (symbol_reference_defined, define_symbol, define_symbol)
11308         (error_type, read_type, read_member_functions, read_cpp_abbrev)
11309         (read_one_struct_field, read_struct_fields, read_baseclasses)
11310         (read_tilde_fields, read_struct_type, read_array_type)
11311         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
11312         (read_huge_number, read_range_type, read_args, common_block_start)
11313         (find_name_end): Constify.
11314         * stabsread.h (common_block_start, define_symbol)
11315         (process_one_symbol, symbol_reference_defined, ref_add):
11316         * symfile.c (get_section_index, add_symbol_file_command):
11317         * symfile.h (get_section_index): Constify.
11318         * target-descriptions.c (tdesc_type::name): Constify.
11319         (tdesc_free_type): Add cast.
11320         * target.c (find_default_run_target):
11321         (add_deprecated_target_alias, find_default_run_target)
11322         (target_announce_detach): Constify.
11323         (do_option): Constify.
11324         * target.h (add_deprecated_target_alias): Constify.
11325         * thread.c (print_thread_info_1): Constify.
11326         * top.c (deprecated_readline_begin_hook, command_line_input):
11327         Constify.
11328         (init_main): Add casts.
11329         * top.h (handle_line_of_input): Constify.
11330         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
11331         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
11332         (tfind_command): Rename to ...
11333         (tfind_command_1): ... this and constify.
11334         (tfind_command): New function.
11335         (tfind_end_command, tfind_start_command): Adjust.
11336         (encode_source_string): Constify.
11337         * tracepoint.h (encode_source_string): Constify.
11338         * tui/tui-data.c (tui_partial_win_by_name): Constify.
11339         * tui/tui-data.h (tui_partial_win_by_name): Constify.
11340         * tui/tui-source.c (tui_set_source_content_nil): Constify.
11341         * tui/tui-source.h (tui_set_source_content_nil): Constify.
11342         * tui/tui-win.c (parse_scrolling_args): Constify.
11343         * tui/tui-windata.c (tui_erase_data_content): Constify.
11344         * tui/tui-windata.h (tui_erase_data_content): Constify.
11345         * tui/tui-winsource.c (tui_erase_source_content): Constify.
11346         * tui/tui.c (tui_enable): Add cast.
11347         * utils.c (defaulted_query): Constify.
11348         (init_page_info): Add cast.
11349         (puts_debug, subset_compare): Constify.
11350         * utils.h (subset_compare): Constify.
11351         * varobj.c (varobj_format_string): Constify.
11352         * varobj.h (varobj_format_string): Constify.
11353         * vax-tdep.c (vax_register_name): Constify.
11354         * windows-nat.c (windows_detach): Constify.
11355         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
11356         * xml-support.c (gdb_xml_end_element): Constify.
11357         * xml-tdesc.c (tdesc_start_reg): Constify.
11358         * xstormy16-tdep.c (xstormy16_register_name): Constify.
11359         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
11360         * xtensa-tdep.h (xtensa_register_t::name): Constify.
11361
11362 2017-04-05  Pedro Alves  <palves@redhat.com>
11363
11364         * proc-api.c (struct trans): Constify.
11365         (procfs_note): Constify.
11366         * proc-events.c (struct trans, syscall_table):
11367         * proc-flags.c (struct trans): Constify.
11368         * proc-utils.h (procfs_note): Constify.
11369         * proc-why.c (struct trans): Constify.
11370         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
11371         (procfs_detach): Constify.
11372         * sol-thread.c (struct string_map): Constify.
11373         (td_err_string, td_state_string): Constify.
11374
11375 2017-04-05  Pedro Alves  <palves@redhat.com>
11376
11377         * proc-api.c (procfs_filename): Don't initialize
11378         procfs_filename.
11379         (prepare_to_trace): Assume procfs_filename is non-NULL.
11380         (_initialize_proc_api): Give procfs_filename a default value here.
11381
11382 2017-04-05  Pedro Alves  <palves@redhat.com>
11383
11384         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
11385         'cond_string' parameter.
11386         (extract_exception_regexp): Constify 'string' parameter.
11387         (catch_exception_command_1): Constify.
11388         * breakpoint.c (init_catchpoint)
11389         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
11390         parameter.
11391         (ep_parse_optional_if_clause, catch_fork_command_1)
11392         (catch_exec_command_1): Constify.
11393         * breakpoint.h (init_catchpoint): Constify 'cond_string'
11394         parameter.
11395         (ep_parse_optional_if_clause): Constify.
11396         * cli/cli-utils.c (remove_trailing_whitespace)
11397         (check_for_argument): Constify.
11398         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
11399         non-const overload.
11400         (check_for_argument): Likewise.
11401
11402 2017-04-05  Pedro Alves  <palves@redhat.com>
11403
11404         * event-top.c (command_line_handler): Add cast to execute_command
11405         call.
11406         * record-btrace.c (cmd_record_btrace_bts_start)
11407         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
11408         (cmd_record_btrace_start): Add cast to execute_command call.
11409         * record-full.c (record_full_goto_insn):
11410         * record.c (record_start, record_stop): Add cast to
11411         execute_command_to_string calls.
11412         (cmd_record_start): Add cast to execute_command calls.
11413
11414 2017-04-05  Pedro Alves  <palves@redhat.com>
11415
11416         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
11417         static inline function.
11418         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
11419         array and use gdb_PyArg_ParseTupleAndKeywords.
11420         * python/py-cmd.c (cmdpy_init): Likewise.
11421         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
11422         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
11423         (infpy_search_memory): Likewise.
11424         * python/py-objfile.c (objfpy_add_separate_debug_file)
11425         (gdbpy_lookup_objfile): Likewise.
11426         * python/py-symbol.c (gdbpy_lookup_symbol)
11427         (gdbpy_lookup_global_symbol): Likewise.
11428         * python/py-type.c (gdbpy_lookup_type): Likewise.
11429         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
11430         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
11431         Likewise.
11432
11433 2017-04-05  Pedro Alves  <palves@redhat.com>
11434
11435         * python/python-internal.h (gdb_PyGetSetDef): New type.
11436         * python/py-block.c (block_object_getset)
11437         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
11438         * python/py-event.c (event_object_getset)
11439         (finish_breakpoint_object_getset): Likewise.
11440         * python/py-inferior.c (inferior_object_getset): Likewise.
11441         * python/py-infthread.c (thread_object_getset): Likewise.
11442         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
11443         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
11444         * python/py-objfile.c (objfile_getset): Likewise.
11445         * python/py-progspace.c (pspace_getset): Likewise.
11446         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
11447         Likewise.
11448         * python/py-record.c (recpy_record_getset): Likewise.
11449         * python/py-symbol.c (symbol_object_getset): Likewise.
11450         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
11451         Likewise.
11452         * python/py-type.c (type_object_getset, field_object_getset):
11453         Likewise.
11454         * python/py-value.c (value_object_getset): Likewise.
11455
11456 2017-04-05  Pedro Alves  <palves@redhat.com>
11457
11458         * python/python-internal.h (gdb_PyObject_CallMethod)
11459         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
11460         New functions.
11461         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
11462         (PySys_GetObject, PySys_SetPath): New macros.
11463
11464 2017-04-05  Pedro Alves  <palves@redhat.com>
11465
11466         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
11467         info_osdata_command.
11468         * osdata.c (info_osdata_command): Rename to ...
11469         (info_osdata): ... this.  Constify 'type' parameter, and remove
11470         the 'from_tty' parameter.  Accept NULL TYPE.
11471         (info_osdata_command): New function.
11472         * osdata.h (info_osdata_command): Remove declaration.
11473         (info_osdata): New declaration.
11474
11475 2017-04-05  Pedro Alves  <palves@redhat.com>
11476
11477         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
11478         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
11479         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
11480         parameter.
11481         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
11482         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
11483         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
11484         parameter.
11485         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
11486         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
11487         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
11488         (mi_cmd_file_list_exec_source_files)
11489         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
11490         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11491         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
11492         parameter.
11493         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
11494         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
11495         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
11496         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
11497         (mi_cmd_stack_info_frame): Constify 'command' parameter.
11498         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
11499         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
11500         'command' parameter.
11501         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
11502         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
11503         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
11504         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
11505         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
11506         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
11507         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
11508         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
11509         (mi_cmd_var_set_update_range): Constify 'command' parameter.
11510         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
11511         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
11512         parameter.
11513         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
11514         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
11515         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
11516         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
11517         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
11518         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
11519         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
11520         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
11521         (mi_cmd_data_list_changed_registers)
11522         (mi_cmd_data_write_register_values)
11523         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
11524         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
11525         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
11526         (mi_cmd_list_features, mi_cmd_list_target_features)
11527         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
11528         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
11529         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
11530         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
11531         (mi_cmd_trace_frame_collected): Constify 'command'
11532         parameter.
11533         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
11534         'command' parameter.
11535
11536 2017-04-05  Pedro Alves  <palves@redhat.com>
11537
11538         * ada-lang.c (ada_completer_word_break_characters): Now a const
11539         array.
11540         (ada_get_gdb_completer_word_break_characters): Constify.
11541         * completer.c (gdb_completer_command_word_break_characters)
11542         (gdb_completer_file_name_break_characters)
11543         (gdb_completer_quote_characters): Now const arrays.
11544         (get_gdb_completer_quote_characters): Constify.
11545         (set_rl_completer_word_break_characters): New function.
11546         (set_gdb_completion_word_break_characters)
11547         (complete_line_internal): Use it.
11548         * completer.h (get_gdb_completer_quote_characters): Constify.
11549         (set_rl_completer_word_break_characters): Declare.
11550         * f-lang.c (f_word_break_characters): Constify.
11551         * language.c (default_word_break_characters): Constify.
11552         * language.h (language_defn::la_word_break_characters): Constify.
11553         (default_word_break_characters): Constify.
11554         * top.c (init_main): Use set_rl_completer_word_break_characters.
11555
11556 2017-04-05  Pedro Alves  <palves@redhat.com>
11557
11558         * aix-thread.c (aix_thread_pid_to_str)
11559         (aix_thread_extra_thread_info): Constify.
11560         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
11561         * bsd-uthread.c (bsd_uthread_extra_thread_info)
11562         (bsd_uthread_pid_to_str): Constify.
11563         * corelow.c (core_pid_to_str): Constify.
11564         * darwin-nat.c (darwin_pid_to_str): Constify.
11565         * fbsd-nat.c (fbsd_pid_to_str): Constify.
11566         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
11567         Constify.
11568         * gnu-nat.c (gnu_pid_to_str): Constify.
11569         * go32-nat.c (go32_pid_to_str): Constify.
11570         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
11571         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
11572         * inferior.c (inferior_pid_to_str): Constify.
11573         * linux-nat.c (linux_nat_pid_to_str): Constify.
11574         * linux-tdep.c (linux_core_pid_to_str): Constify.
11575         * linux-thread-db.c (thread_db_pid_to_str)
11576         (thread_db_extra_thread_info): Constify.
11577         * nto-tdep.c (nto_extra_thread_info): Constify.
11578         * nto-tdep.h (nto_extra_thread_info): Constify.
11579         * obsd-nat.c (obsd_pid_to_str): Constify.
11580         * procfs.c (procfs_pid_to_str): Constify.
11581         * ravenscar-thread.c (ravenscar_extra_thread_info)
11582         (ravenscar_pid_to_str): Constify.
11583         * remote-sim.c (gdbsim_pid_to_str): Constify.
11584         * remote.c (remote_threads_extra_info, remote_pid_to_str):
11585         Constify.
11586         * sol-thread.c (solaris_pid_to_str): Constify.
11587         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
11588         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
11589         * target.c (default_pid_to_str, target_pid_to_str)
11590         (normal_pid_to_str, default_pid_to_str): Constify.
11591         * target.h (target_ops::to_pid_to_str)
11592         (target_ops::to_extra_thread_info): Constify.
11593         (target_pid_to_str, normal_pid_to_str): Constify.
11594         * windows-nat.c (windows_pid_to_str): Constify.
11595         * gdbarch.sh (core_pid_to_str): Constify.
11596         * target-delegates.c: Regenerate.
11597         * gdbarch.h, gdbarch.c: Regenerate.
11598
11599 2017-04-05  Pedro Alves  <palves@redhat.com>
11600
11601         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
11602         the memory of the temporary warning_pre_print override.
11603         * utils.c (warning_pre_print): Constify.
11604         * utils.h (warning_pre_print): Constify.
11605
11606 2017-04-05  Pedro Alves  <palves@redhat.com>
11607
11608         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
11609         (shell_command): New function.
11610         (make_command): Use std::string.
11611         (init_cli_cmds): Register shell_command instead of shell_escape.
11612
11613 2017-04-05  Pedro Alves  <palves@redhat.com>
11614
11615         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11616         * tracepoint.c (default_collect): Don't initialize.
11617
11618 2017-04-05  Pedro Alves  <palves@redhat.com>
11619
11620         * macroexp.c (macro_buffer::shared): Now a bool.
11621         (init_buffer): Update.
11622         (init_shared_buffer): Constify 'addr' parameter.
11623         (substitute_args, expand, macro_expand, macro_expand_next): Remove
11624         casts.
11625
11626 2017-04-05  Pedro Alves  <palves@redhat.com>
11627
11628         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
11629         * disasm.c (set_disassembler_options): Constify local.
11630         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11631
11632 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
11633
11634         PR gdb/21352
11635         * tracefile.c (tsave_command): Fix argument parsing for '-r'
11636         option.
11637
11638 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11639
11640         * frame.c (frame_unwind_register_unsigned): Call
11641         frame_unwind_register_value.
11642
11643 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11644
11645         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11646         Use gdb_test_multiple, and don't match anchor.
11647
11648 2017-04-05  Pedro Alves  <palves@redhat.com>
11649
11650         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11651         (Write After Approval): Remove Simon Marchi.
11652
11653 2017-04-05  Pedro Alves  <palves@redhat.com>
11654
11655         * common/gdb_optional.h (optional::optional): Make constexpr and
11656         initialize m_dummy.
11657
11658 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11659
11660         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11661         (amd64fbsd_jmp_buf_reg_offset): Remove.
11662         (amd64fbsd_supply_uthread): Remove function.
11663         (amd64fbsd_collect_uthread): Remove function.
11664         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11665         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11666         (x86_64-*-freebsd*): Remove bsd-uthread.o.
11667         (fbsd-nat.c): Update comment.
11668         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11669         (i386fbsd_jmp_buf_reg_offset): Remove.
11670         (i386fbsd_supply_uthread): Remove function.
11671         (i386fbsd_collect_uthread): Remove function.
11672         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11673
11674 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11675
11676         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11677         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11678         * NEWS: Mention that support for FreeBSD/alpha was removed.
11679         * alpha-fbsd-tdep.c: Delete file.
11680         * config/alpha/fbsd.mh: Delete file.
11681         * configure.host: Delete alpha*-*-freebsd* and
11682         alpha*-*-kfreebsd*-gnu.
11683         * configure.tgt: Delete alpha*-*-freebsd* and
11684         alpha*-*-kfreebsd*-gnu.
11685
11686 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11687
11688         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11689         amd64bsd_store_inferior_registers): Use ptid from regcache.
11690
11691 2017-04-04  Pedro Alves  <palves@redhat.com>
11692
11693         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
11694         data fields, make them private and add "m_" prefixes.
11695         (lnp_state_machine::lnp_state_machine): New ctor.
11696         (record_line, check_line_address, handle_set_discriminator)
11697         (handle_set_address, handle_advance_pc, handle_special_opcode)
11698         (handle_advance_line, handle_set_file, handle_negate_stmt)
11699         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11700         (end_sequence, advance_line): New methods.
11701         (m_gdbarch, m_record_lines_p): New fields.
11702         (lnp_reader_state): Delete.
11703         (dwarf_record_line): Rename to ...
11704         (lnp_state_machine::record_line): ... adjust.
11705         (init_lnp_state_machine): Delete.
11706         (lnp_state_machine::lnp_state_machine): New.
11707         (check_line_address): Rename to ...
11708         (lnp_state_machine::check_line_address): This.
11709         (dwarf_decode_lines_1): Remove reference to "reader_state".
11710         Adjust lnp_state_machine having a non-default ctor.  Use bool.
11711         State machine internal state manipulation moved to
11712         lnp_state_machine methods.
11713
11714 2017-04-04  Pedro Alves  <palves@redhat.com>
11715
11716         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11717         unittests/offset-type-selftests.c.
11718         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11719         * common/offset-type.h: New file.
11720         * common/preprocessor.h: New file.
11721         * common/traits.h: New file.
11722         * common/valid-expr.h: New file.
11723         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
11724         sect_offset and cu_offset strong typedefs throughout.
11725         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11726         typedefs throughout.
11727         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
11728         sect_offset and cu_offset strong typedefs throughout.
11729         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11730         typedefs throughout.
11731         * gdbtypes.h: Include "common/offset-type.h".
11732         (cu_offset): Now an offset type (strong typedef) instead of a
11733         struct.
11734         (sect_offset): Likewise.
11735         (union call_site_parameter_u): Rename "param_offset" field to
11736         "param_cu_off".
11737         * unittests/offset-type-selftests.c: New file.
11738
11739 2017-04-04  Pedro Alves  <palves@redhat.com>
11740
11741         * common/underlying.h: New file.
11742         * dwarf2read.c: Include "common/gdb_optional.h" and
11743         "common/underlying.h".
11744         (dir_index, file_name_index): New types.
11745         (file_entry): Use them.
11746         (file_entry::include): Use to_underlying.
11747         (line_header::add_file_name): Use dir_index.
11748         (read_formatted_entries): Use gdb::optional.  Read form before
11749         writting to file_entry.
11750         (dwarf_decode_line_header): Use dir_index.
11751         (lnp_state_machine::current_file): Use to_underlying.
11752         (lnp_state_machine::file): Change type to file_name_index.
11753         (dwarf_record_line): Use to_underlying.
11754         (init_lnp_state_machine): Use file_name_index.
11755         (dwarf_decode_lines_1): Use dir_index and file_name_index.
11756
11757 2017-04-04  Pedro Alves  <palves@redhat.com>
11758
11759         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11760         operator bool, has_value and get methods.
11761
11762 2017-04-04  Pedro Alves  <palves@redhat.com>
11763
11764         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11765         fields.
11766         (line_header): Initialize all data fields.  Change type of
11767         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11768         Change type of include_dirs to std::vector<const char *>.  Remove
11769         num_include_dirs, include_dirs_size.  Change type of file_names to
11770         std::vector<file_entry>.  Remove num_file_names, file_names_size.
11771         (line_header::line_header): New.
11772         (line_header::add_include_dir, line_header::add_file_name): New
11773         methods.
11774         (line_header::include_dir_at): Remove NULL check.
11775         (line_header::file_name_at): Add const overload.
11776         (line_header_up): New unique_ptr typedef.
11777         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
11778         std::vector.  Remove free_line_header call.
11779         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
11780         free_line_header call.
11781         (free_cu_line_header): Delete.
11782         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11783         (setup_type_unit_groups): Use line_header_up instead of cleanups.
11784         Adjust to use std::vector.
11785         (free_line_header): Delete.
11786         (free_line_header_voidp): Use delete.
11787         (add_include_dir): Replace with ...
11788         (line_header::add_include_dir): ... this method.  Use std::vector.
11789         (add_file_name): Replace with ...
11790         (line_header::add_file_name): ... this method.  Use std::vector.
11791         (add_include_dir_stub): Delete.
11792         (read_formatted_entries): Remove memset.
11793         (dwarf_decode_line_header): Return a line_header_up instead of a
11794         raw pointer.  Remove cleanup handling.  Pass lambdas to
11795         read_formatted_entries.  Adjust to use line_header methods.
11796         (dwarf_decode_lines_1): Adjust to use line_header methods.
11797         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11798         use std::vector.
11799
11800 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
11801
11802         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11803         instead of struct ptid.
11804
11805 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
11806
11807         * frame.c (get_frame_register_bytes): Unwind using value.
11808         (put_frame_register_bytes): Likewise.
11809
11810 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
11811
11812         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11813         aggregate-like.
11814
11815 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
11816
11817         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11818
11819 2017-03-29  Yao Qi  <yao.qi@linaro.org>
11820
11821         * gdbthread.h (struct thread_info): Declare constructor and
11822         destructor.  Add some in-class member initializers.
11823         * thread.c (free_thread): Remove.
11824         (init_thread_list): Call delete instead of free_thread.
11825         (new_thread): Call thread_info constructor.
11826         (thread_info::thread_info): New function.
11827         (thread_info::~thread_info): New function.
11828         (delete_thread_1): Call delete instead of free_thread.
11829         (make_cleanup_restore_current_thread): Move tp and frame to
11830         inner block.
11831
11832 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11833
11834         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11835         (arc_skip_prologue): Likewise.
11836         (arc_make_frame_cache): Likewise.
11837         (arc_pv_get_operand): New function.
11838         (arc_is_in_prologue): Likewise.
11839         (arc_analyze_prologue): Likewise.
11840         (arc_print_frame_cache): Likewise.
11841         (MAX_PROLOGUE_LENGTH): New constant.
11842
11843 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11844
11845         * configure.tgt: Add arc-insn.o.
11846         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11847         (dump_arc_instruction_command): New function.
11848         (arc_fprintf_disasm): Likewise.
11849         (arc_disassemble_info): Likewise.
11850         (arc_insn_get_operand_value): Likewise.
11851         (arc_insn_get_operand_value_signed): Likewise.
11852         (arc_insn_get_memory_base_reg): Likewise.
11853         (arc_insn_get_memory_offset): Likewise.
11854         (arc_insn_get_branch_target): Likewise.
11855         (arc_insn_dump): Likewise.
11856         (arc_insn_get_linear_next_pc): Likewise.
11857         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11858         (arc_disassemble_info): Likewise.
11859         (arc_insn_get_branch_target): Likewise.
11860         (arc_insn_get_linear_next_pc): Likewise.
11861         * NEWS: Mention new "maint print arc arc-instruction".
11862
11863 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11864
11865         * arc-tdep (maintenance_print_arc_list): New variable.
11866         (maintenance_print_arc_command): New function.
11867
11868 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11869
11870         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11871         Add "limm" and "reserved".
11872         (arc_cannot_fetch_register, arc_cannot_store_register): Add
11873         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11874         * arc-tdep.h (arc_regnum): Likewise.
11875
11876 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11877
11878         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11879         for THREADPTR register.
11880         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11881         register.
11882         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11883         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11884         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11885
11886 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11887
11888         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11889         registers above gdbarch_num_regs (gdbarch) as privileged in
11890         call0 ABI.
11891
11892 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11893
11894         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11895         for a single specified register or for all registers in
11896         a0_base..a0_base + C0_NREGS range.
11897         (supply_gregset_reg): Call regcache_raw_supply for a single
11898         specified register or for all registers in a0_base..a0_base +
11899         C0_NREGS range.
11900
11901 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11902
11903         * arch/xtensa.h (C0_NREGS): Add definition.
11904         * xtensa-tdep.c (C0_NREGS): Remove definition.
11905
11906 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11907
11908         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11909         Drop xtensa_default_isa initialization.
11910         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11911
11912 2017-03-27  Pedro Alves  <palves@redhat.com>
11913
11914         * dwarf2read.c (file_entry) <dir_index>: Add comment.
11915         (file_entry::include_dir): New method.
11916         (line_header::include_dir_at, line_header::file_name_at): New
11917         methods.
11918         (setup_type_unit_groups, setup_type_unit_groups)
11919         (psymtab_include_file_name): Simplify using the new methods.
11920         (lnp_state_machine) <the_line_header>: New field.
11921         <file>: Add comment.
11922         (lnp_state_machine::current_file): New method.
11923         (dwarf_record_line): Simplify using the new methods.
11924         (init_lnp_state_machine): Initialize the "the_line_header" field.
11925         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11926         Simplify using the new methods.
11927
11928 2017-03-27  Pedro Alves  <palves@redhat.com>
11929
11930         * cp-name-parser.y (make_empty): Delete.
11931         (demangler_special, nested_name, ptr_operator, array_indicator)
11932         (direct_declarator, declarator_1): Use fill_comp instead of
11933         make_empty.
11934
11935 2017-03-27  Pedro Alves  <palves@redhat.com>
11936
11937         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11938         to ATTRIBUTE_PRINTF.
11939         * solib-target.c (library_list_start_list): Print "string" not
11940         "version".
11941         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11942         gdb_xml_error call.
11943
11944 2017-03-27  Pedro Alves  <palves@redhat.com>
11945
11946         * dwarf2read.c (struct file_and_directory): New.
11947         (dwarf2_get_dwz_file): Adjust to use std::string.
11948         (dw2_get_file_names_reader): Adjust to use file_and_directory.
11949         (find_file_and_directory): Adjust to return a file_and_directory
11950         object.
11951         (read_file_scope): Adjust to use file_and_directory.  Remove
11952         make_cleanup/do_cleanups calls.
11953         (open_and_init_dwp_file): Adjust to use std::string.  Remove
11954         make_cleanup/do_cleanups calls.
11955         * python/python.c (do_start_initialization): Adjust to ldirname
11956         returning a std::string.
11957         * utils.c (ldirname): Now returns a std::string.
11958         * utils.h (ldirname): Change return type to std::string.
11959         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11960         returning a std::string.
11961         * xml-tdesc.c (file_read_description_xml): Likewise.
11962
11963 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
11964
11965         * regcache.c (regcache_debug_print_register): New function.
11966         * regcache.h (regcache_debug_print_register): New declaration.
11967         * target.c (debug_print_register): Remove.
11968         (target_fetch_registers): Call regcache_debug_print_register.
11969         (target_store_registers): Likewise.
11970
11971 2017-03-24  Pádraig Brady  <pbrady@fb.com>
11972
11973         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11974         reference beyond the 'lh->include_dirs' array before accessing to
11975         it.
11976         (psymtab_include_file_name): Likewise.
11977         (dwarf_decode_lines_1): Likewise.
11978         (dwarf_decode_lines): Likewise.
11979         (file_file_name): Likewise.
11980
11981 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
11982
11983         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11984         inferior_ptid.
11985         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11986         ps_lsetfpregs): Likewise.
11987         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11988         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11989         ps_lsetfpregs): Likewise.
11990         * target.c (target_fetch_registers, target_store_registers):
11991         Remove asserts.
11992
11993 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
11994
11995         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11996
11997 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11998
11999         * aarch64-tdep.c (aarch64_process_record_test): Declare.
12000         (_initialize_aarch64_tdep): Register it.
12001         (aarch64_record_load_store): Handle PRFM instruction.
12002         (aarch64_process_record_test): New function.
12003
12004 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12005
12006         * aarch64-tdep.c (aarch64_record_load_store): Fix code
12007         indentation.
12008
12009 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12010
12011         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12012
12013 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12014
12015         python/python.c (do_start_initialization): Fix memory leak.
12016
12017 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12018
12019         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12020         using get_ptrace_pid.
12021         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12022         inferior_ptid.
12023         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12024         inferior_ptid instead of pid.
12025
12026 2017-03-22  Yao Qi  <yao.qi@linaro.org>
12027
12028         * aarch64-tdep.c: Wrap locally used classes in anonymous
12029         namespace.
12030         * arm-tdep.c: Likewise.
12031         * linespec.c: Likewise.
12032         * ui-out.c: Likewise.
12033
12034 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
12035
12036         PR gdb/19637
12037         * python/lib/gdb/printer/bound_registers.py: Import sys.
12038
12039 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12040
12041         * windows-nat.c (do_windows_fetch_inferior_registers): Add
12042         windows_thread_info parameter and use it instead of
12043         current_thread.
12044         (windows_fetch_inferior_registers): Don't set current_thread,
12045         pass the thread to do_windows_fetch_inferior_registers.  Use
12046         ptid from regcache instead of inferior_ptid.
12047         (do_windows_store_inferior_registers): Add windows_thread_info
12048         parameter and use it instead of current_thread.
12049         (windows_store_inferior_registers): Don't set current_thread,
12050         pass the thread to do_windows_store_inferior_registers.  Use
12051         ptid from regcache instead of inferior_ptid.
12052
12053 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12054
12055         * ser-mingw.c (ser_windows_raw): Remove reference to
12056         struct serial::current_timeout.
12057
12058 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
12059
12060         PR tdep/20928
12061         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12062         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12063         (sparc64_fsr_type): Fix %fsr decoding.
12064
12065 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
12066
12067         * python/py-record-btrace.c (btpy_insn_data): Change return type
12068         for Python 2.
12069
12070 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12071
12072         * spu-linux-nat.c (spu_fetch_inferior_registers,
12073         spu_store_inferior_registers): Use ptid from regcache, set and
12074         restore inferior_ptid.
12075         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12076         Likewise.
12077
12078 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12079
12080         * i386-linux-nat.c (fetch_register, store_register,
12081         i386_linux_fetch_inferior_registers,
12082         i386_linux_store_inferior_registers): Use ptid from regcache.
12083         * ia64-linux-nat.c (ia64_linux_fetch_register,
12084         ia64_linux_store_register): Likewise.
12085         * inf-ptrace.c (inf_ptrace_fetch_register,
12086         inf_ptrace_store_register): Likewise.
12087         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12088         m32r_linux_store_inferior_registers): Likewise.
12089         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12090         m68kbsd_store_inferior_registers): Likewise.
12091         * m68k-linux-nat.c (fetch_register, store_register,
12092         m68k_linux_fetch_inferior_registers,
12093         m68k_linux_store_inferior_registers): Likewise.
12094         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12095         m88kbsd_store_inferior_registers): Likewise.
12096         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12097         mips_fbsd_store_inferior_registers): Likewise.
12098         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12099         mips64_linux_regsets_store_registers): Likewise.
12100         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12101         mipsnbsd_store_inferior_registers): Likewise.
12102         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12103         mips64obsd_store_inferior_registers): Likewise.
12104         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12105         Likewise.
12106         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12107         ppcfbsd_store_inferior_registers): Likewise.
12108         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12109         ppc_linux_store_inferior_registers): Likewise.
12110         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12111         ppcnbsd_store_inferior_registers): Likewise.
12112         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12113         ppcobsd_store_registers): Likewise.
12114         * procfs.c (procfs_fetch_registers, procfs_store_registers):
12115         Likewise.
12116         * ravenscar-thread.c (ravenscar_fetch_registers,
12117         ravenscar_store_registers, ravenscar_prepare_to_store):
12118         Likewise.
12119         * record-btrace.c (record_btrace_fetch_registers,
12120         record_btrace_store_registers, record_btrace_prepare_to_store):
12121         Likewise.
12122         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12123         Lookup inferior using ptid from regcache, instead of
12124         current_inferior.
12125         * remote.c (remote_fetch_registers, remote_store_registers): Use
12126         ptid from regcache.
12127         * rs6000-nat.c (fetch_register, store_register): Likewise.
12128         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12129         s390_linux_store_inferior_registers): Likewise.
12130         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12131         shnbsd_store_inferior_registers): Likewise.
12132         * sol-thread.c (sol_thread_fetch_registers,
12133         sol_thread_store_registers): Likewise.
12134         * sparc-nat.c (sparc_fetch_inferior_registers,
12135         sparc_store_inferior_registers): Likewise.
12136         * tilegx-linux-nat.c (fetch_inferior_registers,
12137         store_inferior_registers): Likewise.
12138         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
12139         vaxbsd_store_inferior_registers): Likewise.
12140         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
12141         store_xtregs): Likewise.
12142
12143 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12144
12145         PR gdb/14441
12146         * NEWS: Mention support for rvalue references in GDB and python.
12147         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
12148         supports both lvalue and rvalue references.
12149
12150 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12151
12152         PR gdb/14441
12153         * gdbtypes.c (rank_one_type): Implement overloading
12154         resolution rules regarding rvalue references.
12155
12156 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12157
12158         PR gdb/14441
12159         * aarch64-tdep.c (aarch64_type_align)
12160         (aarch64_extract_return_value, aarch64_store_return_value): Change
12161         lvalue reference type checks to general reference type checks.
12162         * amd64-tdep.c (amd64_classify): Likewise.
12163         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
12164         Likewise.
12165         * arm-tdep.c (arm_type_align, arm_extract_return_value)
12166         (arm_store_return_value): Likewise.
12167         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
12168         * c-typeprint.c (c_print_type): Likewise.
12169         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
12170         (cplus_number_of_children, cplus_describe_child): Likewise.
12171         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
12172         * completer.c (expression_completer): Likewise.
12173         * cp-support.c (make_symbol_overload_list_adl_namespace):
12174         Likewise.
12175         * darwin-nat-info.c (info_mach_region_command): Likewise.
12176         * dwarf2loc.c (entry_data_value_coerce_ref)
12177         (value_of_dwarf_reg_entry): Likewise.
12178         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
12179         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
12180         Likewise.
12181         * findvar.c (extract_typed_address, store_typed_address):
12182         Likewise.
12183         * gdbtypes.c (rank_one_type): Likewise.
12184         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
12185         * infcall.c (value_arg_coerce): Likewise.
12186         * language.c (pointer_type): Likewise.
12187         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
12188         Likewise.
12189         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
12190         * mn10300-tdep.c (mn10300_type_align): Likewise.
12191         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
12192         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
12193         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
12194         Likewise.
12195         * printcmd.c (print_formatted, x_command): Likewise.
12196         * python/py-type.c (typy_get_composite, typy_template_argument):
12197         Likewise.
12198         * python/py-value.c (valpy_referenced_value)
12199         (valpy_get_dynamic_type, value_has_field): Likewise.
12200         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
12201         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
12202         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
12203         * spu-tdep.c (spu_scalar_value_p): Likewise.
12204         * symtab.c (lookup_symbol_aux): Likewise.
12205         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
12206         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
12207         Likewise.
12208         * valops.c (value_cast_pointers, value_cast)
12209         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
12210         (value_struct_elt, value_struct_elt_bitpos)
12211         (value_find_oload_method_list, find_overload_match)
12212         (value_rtti_indirect_type): Likewise.
12213         * valprint.c (val_print_scalar_type_p, generic_val_print):
12214         Likewise.
12215         * value.c (value_actual_type, value_as_address, unpack_long)
12216         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
12217         (coerce_ref): Likewise.
12218         * varobj.c (varobj_get_value_type): Likewise.
12219
12220 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12221
12222         PR gdb/14441
12223         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
12224         table of constants.
12225         * python/lib/gdb/command/explore.py: Support exploring values
12226         of rvalue reference types.
12227         * python/lib/gdb/types.py: Implement get_basic_type() for
12228         rvalue reference types.
12229         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
12230         constant.
12231         * python/py-value.c (valpy_getitem): Add an rvalue reference
12232         check.
12233         (valpy_reference_value): Add new parameter "refcode".
12234         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
12235         New wrappers for valpy_reference_value().
12236         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12237         (gdbpy_invoke_xmethod): Likewise.
12238
12239 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12240
12241         PR gdb/14441
12242         * dwarf2read.c (process_die, read_type_die_1): Handle the
12243         DW_TAG_rvalue_reference_type DIE.
12244         (read_tag_reference_type): Add new parameter "refcode".
12245
12246 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12247
12248         PR gdb/14441
12249         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
12250         (c_type_print_modifier, c_type_print_varspec_suffix)
12251         (c_type_print_base): Support printing rvalue reference types.
12252         * c-valprint.c (c_val_print, c_value_print): Support printing
12253         rvalue reference values.
12254
12255 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12256
12257         PR gdb/14441
12258         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
12259         typename.
12260         * cp-support.c (replace_typedefs): Handle
12261         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
12262         * python/py-type.c (typy_lookup_type): Likewise.
12263
12264 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12265
12266         PR gdb/14441
12267         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
12268         * parse.c (insert_type): Change assert statement.
12269         (follow_types): Handle rvalue reference types.
12270         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
12271         constant.
12272
12273 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12274
12275         PR gdb/14441
12276         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
12277         value_ref() interface.
12278         * c-valprint.c (c_value_print): Likewise.
12279         * infcall.c (value_arg_coerce): Likewise.
12280         * python/py-value.c (valpy_reference_value): Likewise.
12281         * valops.c (value_cast, value_reinterpret_cast)
12282         (value_dynamic_cast, typecmp): Likewise.
12283         (value_ref): Parameterize by kind of return value reference type.
12284         * value.h (value_ref): Add new parameter "refcode".
12285
12286 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12287
12288         PR gdb/14441
12289         * dwarf2read.c (read_tag_reference_type): Use
12290         lookup_lvalue_reference_type() instead of lookup_reference_type().
12291         * eval.c (evaluate_subexp_standard): Likewise.
12292         * f-exp.y: Likewise.
12293         * gdbtypes.c (make_reference_type, lookup_reference_type):
12294         Generalize with rvalue reference types.
12295         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
12296         convenience wrappers for lookup_reference_type().
12297         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
12298         reference kind parameter.
12299         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
12300         wrappers for lookup_reference_type().
12301         * guile/scm-type.c (gdbscm_type_reference): Use
12302         lookup_lvalue_reference_type() instead of lookup_reference_type().
12303         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
12304         * parse.c (follow_types): Likewise.
12305         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
12306         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
12307         Likewise.
12308         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12309         (gdbpy_invoke_xmethod): Likewise.
12310         * stabsread.c: Provide extra argument to make_reference_type()
12311         call.
12312         * valops.c (value_ref, value_rtti_indirect_type): Use
12313         lookup_lvalue_reference_type() instead of lookup_reference_type().
12314
12315 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12316
12317         PR gdb/14441
12318         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
12319         (TYPE_IS_REFERENCE): New macro.
12320         (struct type): Add rvalue_reference_type field.
12321         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
12322
12323 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
12324
12325         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
12326         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
12327         New function definition.
12328         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
12329         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
12330         New function declaration.
12331         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
12332         * mi/mi-interp.h: New file.
12333         * solib.c (info_sharedlibrary_command): Replace for loop with
12334         ALL_SO_LIBS macro
12335         * solib.h (update_solib_list): New function declaration.
12336         (so_list_head): Move macro.
12337         * solist.h (ALL_SO_LIBS): New macro.
12338
12339 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
12340
12341         * infcmd.c (post_create_inferior): Remove unused argument in
12342         call to solib_add.
12343         * remote.c (remote_start_remote): Likewise.
12344         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
12345         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
12346         (enable_break): Likewise.
12347         * solib.c (update_solib_list): Remove unused target argument
12348         and its documentation.
12349         (solib_add): Remove unused target argument.  Remove unused
12350         argument in call to update_solib_list.
12351         (info_sharedlibrary_command): Remove unused argument in call
12352         to update_solib_list.
12353         (sharedlibrary_command): Remove unused argument in call to
12354         solib_add.
12355         (handle_solib_event): Likewise.
12356         (reload_shared_libraries): Likewise.
12357         * solib.h (solib_add): Remove unused target argument.
12358
12359 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12360
12361         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
12362         (s390_displaced_step_fixup): Cover relative branches with the
12363         default fixup handling.  This fixes lack of support for some
12364         relative branch instructions.
12365
12366 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12367
12368         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
12369         ptid from regcache.
12370
12371 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12372
12373         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
12374         i386_darwin_store_inferior_registers): Use ptid from regcache.
12375
12376 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12377
12378         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
12379         i386bsd_store_inferior_registers): Use ptid from regcache.
12380
12381 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12382
12383         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
12384         hppaobsd_store_registers): Use ptid from regcache.
12385
12386 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12387
12388         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
12389         hppanbsd_store_registers): Use ptid from regcache.
12390
12391 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12392
12393         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
12394         from regcache.  Use get_ptrace_pid.
12395
12396 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12397
12398         * corelow.c (get_core_register_section): Use ptid from regcache,
12399         update doc.
12400
12401 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12402
12403         * bsd-uthread.c (bsd_uthread_fetch_registers,
12404         bsd_uthread_store_registers): Use ptid from regcache, set and
12405         restore inferior_ptid.
12406
12407 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12408
12409         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
12410         fetch_fp_regs, store_register, store_regs, store_fp_register,
12411         store_fp_regs): Use ptid from regcache.
12412
12413 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12414
12415         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
12416         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
12417         store_vfp_regs): Use ptid from regcache.
12418
12419 2017-03-17  Pedro Alves  <palves@redhat.com>
12420
12421         PR remote/21188
12422         * ser-base.c (ser_base_wait_for): Add comment.
12423         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
12424         version.
12425         * ser-unix.c (hardwire_raw): Remove reference to
12426         scb->current_timeout.
12427         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
12428         (hardwire_ops): Install ser_base_readchar instead of
12429         hardwire_readchar.
12430         * serial.h (struct serial) <current_timeout, timeout_remaining>:
12431         Remove fields.
12432
12433 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
12434
12435         PR gdb/19637
12436         * python/lib/gdb/printer/bound_registers.py: Add support for
12437         Python 3.
12438
12439 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12440
12441         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
12442         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
12443         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
12444         byte_offset to subobj_byte_offset.  Fix the handling of
12445         DWARF_VALUE_STACK on big-endian targets when coming via an
12446         implicit pointer.
12447         (dwarf2_evaluate_loc_desc): Adjust call to
12448         dwarf2_evaluate_loc_desc_full.
12449         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
12450         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
12451
12452 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12453
12454         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
12455         and REVSH instructions.
12456
12457 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12458
12459         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
12460         (arm_record_test): Declare.
12461         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
12462         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
12463         align with the manual.
12464         (thumb_record_misc): Adjust the code order to align with the
12465         manual.
12466         (thumb2_record_decode_insn_handler): Fix instruction matching.
12467         (instruction_reader_thumb): New class.
12468         (arm_record_test): New function.
12469
12470 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12471
12472         * arm-tdep.c (abstract_memory_reader): New class.
12473         (instruction_reader): New class.
12474         (extract_arm_insn): Add argument 'reader'.  Callers updated.
12475         (decode_insn): Likewise.
12476
12477 2017-03-16  Doug Evans  <dje@google.com>
12478
12479         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
12480         member.  Change type of TYPE member to SCM.  All uses updated.
12481         (lsscm_make_lazy_string_smob): Add assert.
12482         (lsscm_make_lazy_string): Flag bad length values.
12483         (lsscm_elt_type): New function.
12484         (gdbscm_lazy_string_to_value): Rewrite to use
12485         lsscm_safe_lazy_string_to_value.
12486         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
12487         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
12488         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
12489         in incoming type.
12490         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12491         * guile/scm-type.c (tyscm_scm_to_type): New function.
12492
12493 2017-03-15  Doug Evans  <dje@google.com>
12494
12495         PR python/17728, python/18439, python/18779
12496         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
12497         member.  Change type of TYPE member to PyObject *.  All uses updated.
12498         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
12499         (gdbpy_create_lazy_string_object): Flag bad length values.
12500         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
12501         Handle typedefs in incoming type.
12502         (stpy_lazy_string_elt_type): New function.
12503         (gdbpy_extract_lazy_string): Call it.
12504         * python/py-value.c (valpy_lazy_string): Flag bad length values.
12505         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
12506         typedefs in incoming type.
12507
12508 2017-03-16  Doug Evans  <dje@google.com>
12509
12510         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12511         * guile/scm-type.c (tyscm_scm_to_type): New function.
12512
12513 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
12514
12515         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
12516         "ULONGEST" for "skip".
12517
12518 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12519
12520         PR gdb/21220
12521         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
12522         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
12523         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
12524         over ptrace peek/poke until end of buffer or error.
12525
12526 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
12527
12528         * parse.c (length_of_subexp): Make static.
12529         * parser-defs.h (length_of_subexp): Remove.
12530
12531 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12532
12533         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
12534         as well.
12535
12536 2017-03-14  Pedro Alves  <palves@redhat.com>
12537
12538         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
12539         (main): Use std::unique_ptr.  Remove calls to
12540         cp_demangled_name_parse_free.
12541
12542 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12543
12544         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
12545         alphabsd_store_inferior_registers): Use regcache->ptid instead
12546         of inferior_ptid.
12547
12548 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12549
12550         * aix-thread.c (aix_thread_fetch_registers,
12551         aix_thread_store_registers): Use regcache->ptid instead of
12552         inferior_ptid.
12553
12554 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12555
12556         * aarch64-linux-nat.c (fetch_gregs_from_thread,
12557         store_gregs_to_thread, fetch_fpregs_from_thread,
12558         store_fpregs_to_thread): Use regcache->ptid instead of
12559         inferior_ptid.
12560
12561 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12562
12563         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
12564         amd64_linux_fetch_inferior_registers): Use regcache->ptid
12565         instead of inferior_ptid.
12566
12567 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12568
12569         * target.c (target_fetch_registers, target_store_registers): Add
12570         assert.
12571
12572 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12573
12574         * regcache.h (regcache_get_ptid): New function.
12575         * regcache.c (regcache_get_ptid): New function.
12576
12577 2017-03-13  Mark Wielaard  <mark@klomp.org>
12578
12579         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
12580
12581 2017-03-10  Keith Seitz  <keiths@redhat.com>
12582
12583         PR c++/8218
12584         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
12585
12586 2017-03-08  Pedro Alves  <palves@redhat.com>
12587
12588         PR gdb/18360
12589         * infrun.c (start_step_over, do_target_resume, resume)
12590         (restart_threads): Assert we're not resuming a thread that is
12591         meant to be stopped.
12592         (infrun_thread_stop_requested_callback): Delete.
12593         (infrun_thread_stop_requested): If the thread is internally
12594         stopped, queue a pending stop event and clear the thread's
12595         inline-frame state.
12596         (handle_stop_requested): New function.
12597         (handle_syscall_event, handle_inferior_event_1): Use
12598         handle_stop_requested.
12599         (handle_stop_requested): New function.
12600         (handle_signal_stop): Set the thread's stop_signal here instead of
12601         at caller.
12602         (finish_step_over): Clear step over info unconditionally.
12603         (handle_signal_stop): If the user had interrupted the event
12604         thread, consider the stop a random signal.
12605         (handle_signal_stop) <signal arrived while stepping over
12606         breakpoint>: Don't restart threads here.
12607         (stop_waiting): Don't clear step-over info here.
12608
12609 2017-03-08  Pedro Alves  <palves@redhat.com>
12610
12611         PR 21206
12612         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12613         goes to argument 2, not 1.
12614
12615 2017-03-08  Pedro Alves  <palves@redhat.com>
12616
12617         PR cli/21218
12618         * top.c (gdb_readline_wrapper): Avoid passing NULL to
12619         display_gdb_prompt.
12620         (command_line_input): Add comment.
12621
12622 2017-03-08  Pedro Alves  <palves@redhat.com>
12623
12624         PR tui/21216
12625         * tui/tui-file.c (tui_file::write): New.
12626         * tui/tui-file.h (tui_file): Override "write".
12627         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
12628         factored out from ...
12629         (tui_puts): ... here.
12630         (tui_putc): Use them.
12631         (tui_write): New function.
12632         * tui/tui-io.h (tui_write): Declare.
12633
12634 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
12635
12636         * Makefile.in (SFILES): Replace "environ.c" with
12637         "common/environ.c".
12638         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12639         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
12640         to...
12641         * common/environ.c: ... here.
12642         * environ.h: Moved to...
12643         * common/environ.h: ... here.
12644
12645 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12646
12647         * gdbarch.sh (pstring_ptr): New static function.
12648         (gdbarch_disassembler_options): Use it.
12649         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12650         not valid_disassembler_option->name.
12651         * gdbarch.c: Regenerate.
12652
12653 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12654
12655         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12656
12657 2017-03-07  Pedro Alves  <palves@redhat.com>
12658
12659         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12660
12661 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12662
12663         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12664         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12665         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
12666         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
12667
12668 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
12669
12670         * xtensa-linux-nat.c (fetch_gregs): Remove const.
12671
12672 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
12673
12674         * remote.c (remote_add_target_side_commands): Use range-based
12675         for loop.
12676
12677 2017-03-03  Yao Qi  <yao.qi@linaro.org>
12678
12679         PR gdb/21165
12680         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12681         value is lazy.
12682         * valprint.c (common_val_print): Likewise.
12683
12684 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
12685
12686         * NEWS: Mention new set/show disassembler-options commands.
12687         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12688         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12689         (prospective_options): New static variable.
12690         (gdb_disassembler::gdb_disassembler): Initialize
12691         m_di.disassembler_options.
12692         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12693         (get_disassembler_options): New function.
12694         (set_disassembler_options): Likewise.
12695         (set_disassembler_options_sfunc): Likewise.
12696         (show_disassembler_options_sfunc): Likewise.
12697         (disassembler_options_completer): Likewise.
12698         (_initialize_disasm): Likewise.
12699         * disasm.h (get_disassembler_options): New prototype.
12700         (set_disassembler_options): Likewise.
12701         * gdbarch.sh (gdbarch_disassembler_options): New variable.
12702         (gdbarch_verify_disassembler_options): Likewise.
12703         * gdbarch.c: Regenerate.
12704         * gdbarch.h: Likewise.
12705         * arm-tdep.c (num_disassembly_options): Delete.
12706         (set_disassembly_style): Likewise.
12707         (arm_disassembler_options): New static variable.
12708         (set_disassembly_style_sfunc): Convert short style name into long
12709         option name.  Call set_disassembler_options.
12710         (show_disassembly_style_sfunc): New function.
12711         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12712         set_gdbarch_verify_disassembler_options.
12713         (_initialize_arm_tdep): Delete regnames variable and update callers.
12714         (arm_disassembler_options): Initialize.
12715         (disasm_options): New variable.
12716         (num_disassembly_options): Rename from this...
12717         (num_disassembly_styles): ...to this.  Compute by scanning through
12718         disasm_options.
12719         (valid_disassembly_styles): Initialize using disasm_options.
12720         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12721         set_arm_regname_option.
12722         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12723         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12724         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12725         set_gdbarch_verify_disassembler_options.
12726         * s390-tdep.c (s390_disassembler_options): New static variable.
12727         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12728         set_gdbarch_verify_disassembler_options.
12729
12730 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12731
12732         * remote.c (remote_add_target_side_condition): Remove "struct"
12733         keyword from range-based for loop.
12734
12735 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12736
12737         * remote.c (remote_add_target_side_condition): Use range-based
12738         for loop.  Update comment.
12739
12740 2017-02-27  Yao Qi  <yao.qi@linaro.org>
12741
12742         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12743
12744 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
12745
12746         * regcache.c (regcache_raw_update): New function.
12747         (regcache_raw_read): Move code to regcache_raw_update.
12748         * regcache.h (regcache_raw_update): New declaration.
12749         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12750
12751 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
12752
12753         * dwarf2read.c (create_debug_type_hash_table): Initialize
12754         header.signature and header.type_offset_in_tu.
12755
12756 2017-02-24  Pedro Alves  <palves@redhat.com>
12757
12758         * symtab.c (make_file_symbol_completion_list_1): Use
12759         add_symtab_completions.
12760
12761 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12762
12763         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12764
12765 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12766
12767         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12768         I386_MAX_REGISTER_SIZE.
12769         (i386_pseudo_register_write): Likewise.
12770         (i386_process_record): Likewise.
12771         * i387-tdep.c (i387_supply_xsave): Likewise.
12772         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12773         (store_register): Likewise.
12774
12775 2017-02-23  Pedro Alves  <palves@redhat.com>
12776
12777         * ada-lang.c: Include "common/function-view.h".
12778         (ada_iterate_over_symbols): Adjust to use function_view as
12779         callback type.
12780         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12781         (ada_make_symbol_completion_list): Use a lambda.
12782         (ada_exc_search_name_matches): Delete.
12783         (name_matches_regex): New.
12784         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12785         * compile/compile-c-support.c: Include "common/function-view.h".
12786         (print_one_macro): Change prototype to accept a ui_file pointer.
12787         (write_macro_definitions): Use a lambda.
12788         * dwarf2read.c: Include "common/function-view.h".
12789         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12790         (dw2_expand_symtabs_matching): Adjust to use function_view as
12791         callback type.
12792         * language.h: Include "common/function-view.h".
12793         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12794         function_view as callback type.
12795         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12796         * linespec.c: Include "common/function-view.h".
12797         (collect_info::add_symbol): New method.
12798         (struct symbol_and_data_callback, iterate_inline_only, struct
12799         symbol_matcher_data, iterate_name_matcher): Delete.
12800         (iterate_over_all_matching_symtabs): Adjust to use function_view
12801         as callback type and lambdas.
12802         (iterate_over_file_blocks): Adjust to use function_view as
12803         callback type.
12804         (decode_compound_collector): Now a class with private fields.
12805         (decode_compound_collector::release_symbols): New method.
12806         (collect_one_symbol): Rename to...
12807         (decode_compound_collector::operator()): ... this and adjust.
12808         (lookup_prefix_sym): decode_compound_collector construction bits
12809         move to decode_compound_collector ctor.  Pass the
12810         decode_compound_collector object directly as callback.  Remove
12811         cleanups and use decode_compound_collector::release_symbols
12812         instead.
12813         (symtab_collector): Now a class with private fields.
12814         (symtab_collector::release_symtabs): New method.
12815         (add_symtabs_to_list): Rename to...
12816         (symtab_collector::operator()): ... this and adjust.
12817         (collect_symtabs_from_filename): symtab_collector construction
12818         bits move to symtab_collector ctor.  Pass the symtab_collector
12819         object directly as callback.  Remove cleanups and use
12820         symtab_collector::release_symtabs instead.
12821         (collect_symbols): Delete.
12822         (add_matching_symbols_to_info): Use lambdas.
12823         * macrocmd.c (print_macro_callback): Delete.
12824         (info_macro_command): Use a lambda.
12825         (info_macros_command): Pass print_macro_definition as callable
12826         directly.
12827         (print_one_macro): Remove 'ignore' parameter.
12828         (macro_list_command): Adjust.
12829         * macrotab.c (macro_for_each_data::fn): Now a function_view.
12830         (macro_for_each_data::user_data): Delete field.
12831         (foreach_macro): Adjust to call the function_view.
12832         (macro_for_each): Adjust to use function_view as callback type.
12833         (foreach_macro_in_scope): Adjust to call the function_view.
12834         (macro_for_each_in_scope): Adjust to use function_view as callback
12835         type.
12836         * macrotab.h: Include "common/function-view.h".
12837         (macro_callback_fn): Declare a prototype instead of a pointer.
12838         Remove "user_data" parameter.
12839         (macro_for_each, macro_for_each_in_scope): Adjust to use
12840         function_view as callback type.
12841         * psymtab.c (partial_map_expand_apply)
12842         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12843         Adjust to use function_view as callback type and to return bool.
12844         (psym_expand_symtabs_matching): Adjust to use function_view as
12845         callback types.
12846         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12847         to use function_view as callback type and to return bool.
12848         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12849         callback types.
12850         * symfile.c (expand_symtabs_matching): Adjust to use function_view
12851         as callback types.
12852         * symfile.h: Include "common/function-view.h".
12853         (expand_symtabs_file_matcher_ftype)
12854         (expand_symtabs_symbol_matcher_ftype)
12855         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12856         return bool.
12857         (quick_symbol_functions::map_symtabs_matching_filename)
12858         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12859         function_view as callback type and return bool.
12860         (expand_symtabs_matching): Adjust to use function_view as callback
12861         type.
12862         (maintenance_expand_name_matcher)
12863         (maintenance_expand_file_matcher): Delete.
12864         (maintenance_expand_symtabs): Use lambdas.
12865         * symtab.c (iterate_over_some_symtabs): Adjust to use
12866         function_view as callback types and return bool.
12867         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
12868         of a cleanup.
12869         (lookup_symtab_callback): Delete.
12870         (lookup_symtab): Use a lambda.
12871         (iterate_over_symbols): Adjust to use function_view as callback
12872         type.
12873         (struct search_symbols_data, search_symbols_file_matches)
12874         (search_symbols_name_matches): Delete.
12875         (search_symbols): Use a pair of lambdas.
12876         (struct add_name_data, add_macro_name, symbol_completion_matcher)
12877         (symtab_expansion_callback): Delete.
12878         (default_make_symbol_completion_list_break_on_1): Use lambdas.
12879         * symtab.h: Include "common/function-view.h".
12880         (iterate_over_some_symtabs): Adjust to use function_view as
12881         callback type and return bool.
12882         (iterate_over_symtabs): Adjust to use function_view as callback
12883         type.
12884         (symbol_found_callback_ftype): Remove 'data' parameter and return
12885         bool.
12886         (iterate_over_symbols): Adjust to use function_view as callback
12887         type.
12888
12889 2017-02-23  Pedro Alves  <palves@redhat.com>
12890
12891         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12892         (%.o) <unittests/%.c>: New pattern.
12893         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12894         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12895         * common/function-view.h: New file.
12896         * unittests/function-view-selftests.c: New file.
12897         * configure: Regenerate.
12898
12899 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
12900
12901         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12902         inferior_ptid.
12903         * go32-nat.c (go32_thread_alive): Likewise.
12904
12905 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12906
12907         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12908         delete.
12909
12910 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12911
12912         * varobj.c (varobj_clear_saved_item): Use delete instead of
12913         xfree.
12914         (update_dynamic_varobj_children): Likewise.
12915
12916 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12917
12918         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12919
12920 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
12921
12922         * common/enum-flags.h (enum_flags::enum_flags): Initialize
12923         m_enum_value to 0 in default constructor.
12924
12925 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
12926
12927         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12928         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12929         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12930         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12931         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12932         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12933         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12934         IS_STORE_CONDITIONAL_INSN.
12935
12936 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12937
12938         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12939
12940 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12941
12942         * NEWS (Changes since GDB 7.12): Add DWARF-5.
12943
12944 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12945
12946         * dwarf2read.c (skip_one_die, read_attribute_value)
12947         (dwarf2_const_value_attr, dump_die_shallow)
12948         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12949         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12950
12951 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12952
12953         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12954         (dwarf_parse_macro_header): Accept DWARF version 5.
12955         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12956
12957 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12958
12959         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12960         DW_AT_GNU_*.
12961         * common/common-exceptions.h (enum errors): Likewise.
12962         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12963         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12964         (dwarf_expr_context::execute_stack_op): Likewise.
12965         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12966         Likewise.
12967         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12968         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12969         (show_entry_values_debug, call_site_to_target_addr)
12970         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12971         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12972         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12973         (value_of_dwarf_block_entry, indirect_pieced_value)
12974         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12975         (disassemble_dwarf_expression): Likewise.
12976         * dwarf2read.c (process_die, inherit_abstract_dies)
12977         (read_call_site_scope): Likewise.
12978         * gdbtypes.h (struct func_type, struct call_site_parameter)
12979         (struct call_site): Likewise.
12980         * stack.c (read_frame_arg): Likewise.
12981         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12982
12983 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12984
12985         * defs.h (read_unsigned_leb128): New declaration.
12986         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12987         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12988         (dwarf2_find_location_expression): Call also
12989         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
12990         * dwarf2loc.h (dwarf2_version): New declaration.
12991         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12992         rnglists.
12993         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12994         .debug_rnglists.
12995         (struct dwop_section_names): Add loclists_dwo.
12996         (dwop_section_names): Add .debug_loclists.dwo.
12997         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12998         (struct dwarf2_per_cu_data): Add dwarf_version.
12999         (struct dwo_sections): Add loclists.
13000         (struct attr_abbrev): Add implicit_const.
13001         (read_indirect_line_string): New declaration.
13002         (read_unsigned_leb128): Delete declaration.
13003         (rcuh_kind): New definition.
13004         (read_and_check_comp_unit_head): Change parameter
13005         is_debug_types_section to section_kind.
13006         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13007         (read_comp_unit_head): Change parameter abfd to section, add parameter
13008         section_kind.  Handle DWARF-5.
13009         (error_check_comp_unit_head): Accept also DWARF version 5.
13010         (read_and_check_comp_unit_head): Change parameter
13011         is_debug_types_section to section_kind.
13012         (read_and_check_type_unit_head): Delete function.
13013         (read_abbrev_offset): Handle DWARF-5.
13014         (create_debug_type_hash_table): Add parameter section_kind.  Process
13015         only DW_UT_type.  Use signature and type_offset_in_tu from struct
13016         comp_unit_head.
13017         (create_debug_types_hash_table): Update create_debug_type_hash_table
13018         caller.
13019         (create_all_type_units): Call create_debug_type_hash_table.
13020         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13021         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13022         caller.
13023         (skip_one_die): Handle DW_FORM_implicit_const.
13024         (dwarf2_rnglists_process): New function.
13025         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13026         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13027         (read_attribute_value): Handle DW_FORM_implicit_const,
13028         DW_FORM_line_strp.
13029         (read_attribute): Handle DW_FORM_implicit_const.
13030         (read_indirect_string_at_offset_from): New function from
13031         read_indirect_string_at_offset.
13032         (read_indirect_string_at_offset): Call
13033         read_indirect_string_at_offset_from.
13034         (read_indirect_line_string_at_offset): New function.
13035         (read_indirect_string): New function comment.
13036         (read_indirect_line_string): New function.
13037         (read_unsigned_leb128): Make it global.
13038         (dwarf2_string_attr): Handle DWARF-5.
13039         (add_include_dir_stub, read_formatted_entries): New functions.
13040         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13041         Handle DWARF-5.
13042         (per_cu_header_read_in): Update read_comp_unit_head caller.
13043         (dwarf2_version): New function.
13044         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13045         rnglists.
13046         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13047         fields.
13048
13049 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13050
13051         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13052
13053 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13054
13055         * dwarf2read.c (dwarf2_ranges_process): New function from
13056         dwarf2_ranges_read.
13057         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13058         dwarf2_ranges_process.
13059
13060 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13061
13062         * dwarf2read.c (create_debug_type_hash_table): New function from
13063         create_debug_types_hash_table.
13064         (create_debug_types_hash_table): Call create_debug_type_hash_table.
13065         (create_all_type_units, open_and_init_dwo_file): Update
13066         create_debug_types_hash_table callers.
13067
13068 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13069
13070         PR gdb/16188
13071         * fork-child.c (trace_start_error): Fix thinko.  va_end should
13072         refer to 'ap', not 'args'.
13073
13074 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13075             Pedro Alves  <palves@redhat.com>
13076
13077         PR gdb/16188
13078         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13079         calls succeeded.
13080         * fork-child.c (trace_start_error): New function.
13081         (trace_start_error_with_name): Likewise.
13082         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13083         * inf-ptrace.c (inf_ptrace_me): Likewise.
13084         * inferior.h (trace_start_error): New prototype.
13085         (trace_start_error_with_name): Likewise.
13086
13087 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
13088
13089         PR gdb/21164
13090         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13091         NULL before using it.
13092         * symmisc.c (maintenance_print_symbols): Likewise.
13093         (maintenance_print_msymbols): Likewise.
13094
13095 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13096
13097         * NEWS: Add record Python bindings entry.
13098
13099 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13100
13101         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13102         py-record-full.o.
13103         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13104         * python/py-record-btrace.c, python/py-record-btrace.h,
13105         python/py-record-full.c, python/py-record-full.h: New file.
13106         * python/py-record.c: Add include for py-record-btrace.h and
13107         py-record-full.h.
13108         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13109         recpy_instruction_history, recpy_function_call_history, recpy_begin,
13110         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13111         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13112         New definition.
13113         (gdbpy_initialize_btrace): New export.
13114         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13115
13116 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13117
13118         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13119         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13120         * python/py-record.c: New file.
13121         * python/python-internal.h (gdbpy_start_recording,
13122         gdbpy_current_recording, gdpy_stop_recording,
13123         gdbpy_initialize_record): New export.
13124         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13125         (python_GdbMethods): Add gdbpy_start_recording,
13126         gdbpy_current_recording and gdbpy_stop_recording.
13127
13128 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13129
13130         * record-btrace.c (record_btrace_record_method): New function.
13131         (init_record_btrace_ops): Initialize to_record_method.
13132         * record-full.c (record_full_record_method): New function.
13133         (init_record_full_ops, init_record_full_core_ops): Add
13134         record_full_record_method.
13135         * record.h (enum record_method): New enum.
13136         * target-debug.h (target_debug_print_enum_record_method: New define.
13137         * target-delegates.c: Regenerate.
13138         * target.c (target_record_method): New function.
13139         * target.h: Include record.h.
13140         (struct target_ops) <to_record_method>: New field.
13141         (target_record_method): New export.
13142
13143 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13144
13145         * record.h (record_start, record_stop): New export.
13146         * record.c (record_start, record_stop): New function.
13147
13148 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13149
13150         * btrace.c (btrace_fetch): Copy function call segments pointer
13151         into a vector.
13152         (btrace_clear): Clear the vector.
13153         (btrace_find_insn_by_number): Use binary search to find the correct
13154         function call segment.
13155         * btrace.h (brace_fun_p): New typedef.
13156         (struct btrace_thread_info) <functions>: New field.
13157
13158 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13159
13160         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
13161         * btrace.c (btrace_decode_error): ... here.  New function.
13162         * btrace.h (btrace_decode_error): New export.
13163
13164 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13165
13166         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
13167         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
13168         btrace_find_insn_by_number): Remove special case for gaps.
13169         * btrace.h (btrace_insn_get_error): New export.
13170         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
13171         * record-btrace.c (btrace_insn_history): Print number for gaps.
13172         (record_btrace_info, record_btrace_goto): Handle gaps.
13173
13174 2017-02-14  Tom Tromey  <tom@tromey.com>
13175
13176         PR python/13598:
13177         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
13178         event.
13179         * python/py-evts.c (gdbpy_initialize_py_events): Add
13180         before_prompt registry.
13181         * python/py-events.h (events_object) <before_prompt>: New field.
13182
13183 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
13184
13185         * btrace.c (ftrace_new_switch): Preserve up link and flags.
13186
13187 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
13188
13189         * symfile (_initialize_symfile): Add usage text to the load command's
13190         help text.
13191
13192 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
13193
13194         * utils.c (defaulted_query): Don't query on secondary UIs.
13195
13196 2017-02-10  Tom Tromey  <tom@tromey.com>
13197
13198         * rust-lang.c (rust_get_disr_info): Remove unused variable.
13199
13200 2017-02-10  Tom Tromey  <tom@tromey.com>
13201
13202         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
13203         "cleanup" local.
13204         * python/py-type.c (typy_legacy_template_argument): Remove
13205         unnecessary "cleanup" local.
13206
13207 2017-02-10  Tom Tromey  <tom@tromey.com>
13208
13209         * python/python.c (do_start_initialization): New function, from
13210         _initialize_python.
13211         (_initialize_python): Call do_start_initialization.
13212         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
13213         goto.
13214
13215 2017-02-10  Tom Tromey  <tom@tromey.com>
13216
13217         * python/py-prettyprint.c (pretty_print_one_value): Use
13218         gdbpy_ref.
13219
13220 2017-02-10  Tom Tromey  <tom@tromey.com>
13221
13222         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
13223         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
13224         gdbpy_ref.
13225         * python/py-type.c (field_new): Use gdbpy_ref.
13226         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
13227         gdbpy_ref.
13228         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
13229         (py_free_pspace): Likewise.
13230         (pspace_to_pspace_object): Likewise.
13231         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
13232         (py_free_objfile): Likewise.
13233         (objfile_to_objfile_object): Likewise.
13234         * python/py-inferior.c (delete_thread_object): Use
13235         gdbpy_ref.
13236         (infpy_read_memory): Likewise.
13237         (py_free_inferior): Likewise.
13238         * python/py-evtregistry.c (create_eventregistry_object): Use
13239         gdbpy_ref.
13240         * python/py-event.c (create_event_object): Use gdbpy_ref.
13241
13242 2017-02-10  Tom Tromey  <tom@tromey.com>
13243
13244         * python/py-ref.h (gdbpy_ref_policy): Now a template.
13245         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
13246         used.
13247         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
13248         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
13249         python/py-exitedevent.c, python/py-finishbreakpoint.c,
13250         python/py-framefilter.c, python/py-function.c,
13251         python/py-inferior.c, python/py-infevents.c,
13252         python/py-linetable.c, python/py-newobjfileevent.c,
13253         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
13254         python/py-signalevent.c, python/py-stopevent.c,
13255         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
13256         python/py-unwind.c, python/py-utils.c, python/py-value.c,
13257         python/py-varobj.c, python/py-xmethods.c, python/python.c,
13258         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
13259
13260 2017-02-10  Tom Tromey  <tom@tromey.com>
13261
13262         * ui-out.h (ui_out_emit_type): New class.
13263         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
13264         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
13265         and ui_out_emit_tuple.
13266         (enumerate_locals): Likewise.
13267         (py_mi_print_variables, py_print_locals, py_print_args): Use
13268         ui_out_emit_list.
13269         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
13270         ui_out_emit_list.
13271         * common/gdb_optional.h: New file.
13272
13273 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
13274
13275         * MAINTAINERS (Write After Approval): Update my e-mail address.
13276
13277 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
13278
13279         PR gdb/21122
13280         * breakpoint.c (_initialize_breakpoint): Update the help description
13281         of the 'commands' command to indicate that it takes a list argument.
13282
13283 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
13284
13285         * interps.c (current_interp_set_logging): Remove "return".
13286
13287 2017-02-09  Gary Benson  <gbenson@redhat.com>
13288
13289         * symtab.c (add_symtab_completions): Prevent NULL pointer
13290         dereference.
13291
13292 2017-02-08  Pedro Alves  <palves@redhat.com>
13293
13294         * interps.c (interp::interp): Remove reference to quiet_p.
13295         (interp_set): Make static.  Remove dead "Switching to" output
13296         code.
13297         (interp_quiet_p, interp_set_quiet): Delete.
13298         (interpreter_exec_cmd): Don't set the interpreter quiet.
13299         * interps.h (interp_quiet_p): Make static.
13300         (class interp) <quiet_p>: Remove field
13301
13302 2017-02-08  Jerome Guitton  <guitton@adacore.com>
13303
13304         * cli/cli-decode.c (find_command_name_length): Make it extern.
13305         * cli/cli-decode.h (find_command_name_length): Declare.
13306         * cli/cli-script.c (command_name_equals, line_first_arg):
13307         New functions.
13308         (process_next_line): Use cli-decode to parse command names.
13309         (build_command_line): Make args a constant pointer.
13310
13311 2017-02-08  Jerome Guitton  <guitton@adacore.com>
13312
13313         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
13314         Remove case-insensitive search.
13315
13316 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13317
13318         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
13319         at the end of the line.  Avoids an ARI warning.
13320
13321 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
13322
13323         * NEWS: Mention support for record/replay of Intel 64 rdrand and
13324         rdseed instructions.
13325         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
13326
13327 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
13328
13329         PR tdep/20936
13330         Provide and use sparc32 and sparc64 target description XML files.
13331         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
13332         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
13333         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
13334         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
13335         * features/sparc/sparc32-solaris.xml: New file.
13336         * features/sparc/sparc64-solaris.xml: New file.
13337         * features/sparc/sparc32-solaris.c: Generated.
13338         * features/sparc/sparc64-solaris.c: Generated.
13339         * sparc-tdep.h: Account for differences in target descriptions.
13340         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
13341         (sparc32_register_type): Use target provided registers.
13342         (validate_tdesc_registers): New function.
13343         (sparc32_gdbarch_init): Use tdesc_has_registers.
13344         Set pseudoregister functions.
13345         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
13346         (sparc64_register_type): Use target provided registers.
13347         (sparc64_init_abi): Set pseudoregister functions.
13348
13349 2017-02-03  Tom Tromey  <tom@tromey.com>
13350
13351         PR rust/21097:
13352         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
13353         with a single member.
13354
13355 2017-02-03  Pedro Alves  <palves@redhat.com>
13356
13357         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
13358         (cli_interp_base::~cli_interp_base): New.
13359         (cli_interp): New struct.
13360         (as_cli_interp): Cast the interp itself to cli_interp.
13361         (cli_interpreter_pre_command_loop): Rename to ...
13362         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
13363         parameter.
13364         (cli_interpreter_init): Rename to ...
13365         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
13366         boolean.  Make extern.
13367         (cli_interpreter_resume): Rename to ...
13368         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
13369         extern.
13370         (cli_interpreter_suspend): Rename to ...
13371         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
13372         extern.
13373         (cli_interpreter_exec): Rename to ...
13374         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
13375         extern.
13376         (cli_interpreter_supports_command_editing): Rename to ...
13377         (cli_interp_base::supports_command_editing): ... this.  Remove
13378         'interp' parameter.  Make extern.
13379         (cli_ui_out): Rename to ...
13380         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
13381         Make extern.
13382         (cli_set_logging): Rename to ...
13383         (cli_interp_base::set_logging): ... this.  Remove 'interp'
13384         parameter.  Make extern.
13385         (cli_interp_procs): Delete.
13386         (cli_interp_factory): Adjust to use "new".
13387         * cli/cli-interp.h: Include "interps.h".
13388         (struct cli_interp_base): New struct.
13389         * interps.c (struct interp): Delete.  Fields moved to interps.h.
13390         (interp_new): Delete.
13391         (interp::interp, interp::~interp): New.
13392         (interp_set): Use bool, and return void.  Assume the interpreter
13393         has suspend, init and resume methods, and that the all return
13394         void.
13395         (set_top_level_interpreter): interp_set returns void.
13396         (interp_ui_out): Adapt.
13397         (current_interp_set_logging): Adapt.
13398         (interp_data): Delete.
13399         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
13400         (interp_exec): Adapt.
13401         (top_level_interpreter_data): Delete.
13402         * interps.h (interp_init_ftype, interp_resume_ftype)
13403         (interp_suspend_ftype, interp_exec_ftype)
13404         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
13405         (class interp): New.
13406         (interp_new): Delete.
13407         (interp_set): Now returns void.  Use bool.
13408         (interp_data, top_level_interpreter_data): Delete.
13409         * mi/mi-common.h: Include interps.h.
13410         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
13411         init, resume, suspect, exec, interp_ui_out, set_logging and
13412         pre_command_loop methods.
13413         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
13414         (mi_interpreter_init): Rename to ...
13415         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
13416         bool, return void and make extern.  Adjust.
13417         (mi_interpreter_resume): ... Rename to ...
13418         (mi_interp::resume): ... this.  Remove the 'data' parameter,
13419         return void and make extern.  Adjust.
13420         (mi_interpreter_suspend): ... Rename to ...
13421         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
13422         return void and make extern.  Adjust.
13423         (mi_interpreter_exec): ... Rename to ...
13424         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
13425         extern.  Adjust.
13426         (mi_interpreter_pre_command_loop): ... Rename to ...
13427         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
13428         parameter and make extern.
13429         (mi_on_normal_stop_1): Adjust.
13430         (mi_ui_out): Rename to ...
13431         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
13432         parameter and make extern.  Adjust.
13433         (mi_set_logging): Rename to ...
13434         (mi_interp::set_logging): ... this.  Remove the 'interp'
13435         parameter and make extern.  Adjust.
13436         (mi_interp_procs): Delete.
13437         (mi_interp_factory): Adjust to use 'new'.
13438         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
13439         (mi_print_exception, mi_execute_command, mi_load_progress):
13440         Adjust.
13441         * tui/tui-interp.c (tui_interp): New class.
13442         (as_tui_interp): Return a tui_interp pointer.
13443         (tui_on_normal_stop, tui_on_signal_received)
13444         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
13445         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
13446         to use interp::interp_ui_out.
13447         (tui_init): Rename to ...
13448         (tui_interp::init): ... this.  Remove the 'self' parameter, use
13449         bool, return void and make extern.  Adjust.
13450         (tui_resume): Rename to ...
13451         (tui_interp::resume): ... this.  Remove the 'data' parameter,
13452         return void and make extern.  Adjust.
13453         (tui_suspend): Rename to ...
13454         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
13455         return void and make extern.  Adjust.
13456         (tui_ui_out): Rename to ...
13457         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
13458         parameter, and make extern.  Adjust.
13459         (tui_exec): Rename to ...
13460         (tui_interp::exec): ... this.  Remove the 'data' parameter and
13461         make extern.
13462         (tui_interp_procs): Delete.
13463         (tui_interp_factory): Use "new".
13464
13465 2017-02-02  Tom Tromey  <tom@tromey.com>
13466
13467         * rust-exp.y (ends_raw_string, space_then_number)
13468         (rust_identifier_start_p): Return bool.
13469         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
13470         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
13471         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
13472         (rust_chartype_p): Return bool.
13473         (val_print_struct, rust_print_struct_def, rust_print_type):
13474         Update.
13475         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
13476         Return bool.
13477
13478 2017-02-02  Tom Tromey  <tom@tromey.com>
13479
13480         * rust-lang.c: Reindent.
13481
13482 2017-02-02  Tom Tromey  <tom@tromey.com>
13483
13484         * rust-lang.h (rust_crate_for_block): Update.
13485         * rust-lang.c (rust_crate_for_block): Return std::string.
13486         (rust_get_disr_info): Use std:;string, not
13487         gdb::unique_xmalloc_ptr.
13488         * rust-exp.y (crate_name): Update.
13489
13490 2017-02-02  Pedro Alves  <palves@redhat.com>
13491
13492         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
13493         field out of gdb_disassembler_test and make it static.
13494
13495 2017-02-02  Pedro Alves  <palves@redhat.com>
13496
13497         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
13498         mi1_interp and mi_interp fields.
13499
13500 2017-02-02  Pedro Alves  <palves@redhat.com>
13501
13502         * cli/cli-interp.c (struct saved_output_files, saved_output):
13503         Moved from cli/cli-logging.c.
13504         (cli_set_logging): New function.
13505         (cli_interp_procs): Install cli_set_logging.
13506         * cli/cli-interp.h (make_logging_output, cli_set_logging):
13507         Declare.
13508         * cli/cli-logging.c (struct saved_output_files, saved_output):
13509         Moved to cli/cli-interp.c.
13510         (pop_output_files): Don't save outputs here.
13511         (make_logging_output): New function.
13512         (handle_redirections): Don't build tee nor save previous outputs
13513         here.
13514         * interps.c (current_interp_set_logging): Change prototype.
13515         Assume there's always a set_logging_proc method installed.
13516         * interps.h (interp_set_logging_ftype): Change prototype.
13517         (current_interp_set_logging): Change prototype and adjust comment.
13518         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
13519         use make_logging_output.
13520         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
13521 2017-02-02  Pedro Alves  <palves@redhat.com>
13522
13523         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
13524         from ...
13525         (set_logging_overwrite): ... here.
13526         (logging_no_redirect_file): Delete.
13527         (set_logging_redirect): Don't handle redirection on the fly.
13528         Instead warn that "logging off" / "logging on" is necessary.
13529         (pop_output_files): Delete references to logging_no_redirect_file.
13530         (show_logging_command): Always speak in terms of what will happen
13531         once logging is reenabled.
13532
13533 2017-02-02  Pedro Alves  <palves@redhat.com>
13534
13535         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
13536
13537 2017-02-02  Pedro Alves  <palves@redhat.com>
13538
13539         * disasm.c (gdb_pretty_print_insn): Rename to ...
13540         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
13541         Remove gdbarch parameter.  Adapt to clear the object's buffers
13542         instead of allocating new buffers, and to print using the object's
13543         gdb_disassembler instead of calling gdb_print_insn.
13544         (dump_insns): Use gdb_pretty_print_disassembler.
13545         * disasm.h (gdb_pretty_print_insn): Delete declaration.
13546         (gdb_pretty_print_disassembler): New class.
13547         * record-btrace.c (btrace_insn_history): Use
13548         gdb_pretty_print_disassembler.
13549
13550 2017-02-02  Pedro Alves  <palves@redhat.com>
13551
13552         * ada-lang.c (type_as_string): Use string_file.
13553         * ada-valprint.c (ada_print_floating): Use string_file.
13554         * ada-varobj.c (ada_varobj_scalar_image)
13555         (ada_varobj_get_value_image): Use string_file.
13556         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
13557         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
13558         * breakpoint.c (update_inserted_breakpoint_locations)
13559         (insert_breakpoint_locations, reattach_breakpoints)
13560         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
13561         (print_it_watchpoint): Use string_file.
13562         (save_breakpoints): Use stdio_file.
13563         * c-exp.y (oper): Use string_file.
13564         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
13565         tee_file.
13566         (pop_output_files): Use delete.
13567         (handle_redirections): Use stdio_file and tee_file.
13568         * cli/cli-setshow.c (do_show_command): Use string_file.
13569         * compile/compile-c-support.c (c_compute_program): Use
13570         string_file.
13571         * compile/compile-c-symbols.c (generate_vla_size): Take a
13572         'string_file &' instead of a 'ui_file *'.
13573         (generate_c_for_for_one_variable): Take a 'string_file &' instead
13574         of a 'ui_file *'.  Use string_file.
13575         (generate_c_for_variable_locations): Take a 'string_file &'
13576         instead of a 'ui_file *'.
13577         * compile/compile-internal.h (generate_c_for_for_one_variable):
13578         Take a 'string_file &' instead of a 'ui_file *'.
13579         * compile/compile-loc2c.c (push, pushf, unary, binary)
13580         (print_label, pushf_register_address, pushf_register)
13581         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
13582         'ui_file *'.  Adjust.
13583         * compile/compile.c (compile_to_object): Use string_file.
13584         * compile/compile.h (compile_dwarf_expr_to_c)
13585         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
13586         'ui_file *'.
13587         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
13588         (replace_typedefs_qualified_name): Use string_file and
13589         obstack_copy0.
13590         * disasm.c (gdb_pretty_print_insn): Use string_file.
13591         (gdb_disassembly): Adjust reference the null_stream global.
13592         (do_ui_file_delete): Delete.
13593         (gdb_insn_length): Use null_stream.
13594         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
13595         * dwarf2loc.c (dwarf2_compile_property_to_c)
13596         (locexpr_generate_c_location, loclist_generate_c_location): Take a
13597         'string_file &' instead of a 'ui_file *'.
13598         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
13599         * dwarf2read.c (do_ui_file_peek_last): Delete.
13600         (dwarf2_compute_name): Use string_file.
13601         * event-top.c (gdb_setup_readline): Use stdio_file.
13602         * gdbarch.sh (verify_gdbarch): Use string_file.
13603         * gdbtypes.c (safe_parse_type): Use null_stream.
13604         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
13605         string_file.
13606         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
13607         'string_file *' instead of a 'ui_file *'.
13608         (gdbscm_arch_disassemble): Use string_file.
13609         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
13610         * guile/scm-ports.c (class ioscm_file_port): Now a class that
13611         inherits from ui_file.
13612         (ioscm_file_port_delete, ioscm_file_port_rewind)
13613         (ioscm_file_port_put): Delete.
13614         (ioscm_file_port_write): Rename to ...
13615         (ioscm_file_port::write): ... this.  Remove file_port_magic
13616         checks.
13617         (ioscm_file_port_new): Delete.
13618         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13619         ui_file_up.
13620         * guile/scm-type.c (tyscm_type_name): Use string_file.
13621         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
13622         Use string_file.
13623         * infcmd.c (print_return_value_1): Use string_file.
13624         * infrun.c (print_target_wait_results): Use string_file.
13625         * language.c (add_language): Use string_file.
13626         * location.c (explicit_to_string_internal): Use string_file.
13627         * main.c (captured_main_1): Use null_file.
13628         * maint.c (maintenance_print_architecture): Use stdio_file.
13629         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13630         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13631         event_channel>: Change type to mi_console_file pointer.
13632         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13633         (mi_console_file_delete): Delete.
13634         (struct mi_console_file): Delete.
13635         (mi_console_file_magic): Delete.
13636         (mi_console_file_new): Delete.
13637         (mi_console_file::mi_console_file): New.
13638         (mi_console_file_delete): Delete.
13639         (mi_console_file_fputs): Delete.
13640         (mi_console_file::write): New.
13641         (mi_console_raw_packet): Delete.
13642         (mi_console_file::flush): New.
13643         (mi_console_file_flush): Delete.
13644         (mi_console_set_raw): Rename to ...
13645         (mi_console_file::set_raw): ... this.
13646         * mi/mi-console.h (class mi_console_file): New class.
13647         (mi_console_file_new, mi_console_set_raw): Delete.
13648         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13649         (mi_set_logging): Use delete and tee_file.  Adjust.
13650         * mi/mi-main.c (output_register): Use string_file.
13651         (mi_cmd_data_evaluate_expression): Use string_file.
13652         (mi_cmd_data_read_memory): Use string_file.
13653         (mi_cmd_execute, print_variable_or_computed): Use string_file.
13654         * mi/mi-out.c (mi_ui_out::main_stream): New.
13655         (mi_ui_out::rewind): Use main_stream and
13656         string_file.
13657         (mi_ui_out::put): Use main_stream and string_file.
13658         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13659         Allocate a 'string_file' instead.
13660         (mi_out_new): Don't allocate a mem_fileopen stream here.
13661         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13662         (mi_ui_out::main_stream): Declare method.
13663         * printcmd.c (eval_command): Use string_file.
13664         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13665         * python/py-arch.c (archpy_disassemble): Use string_file.
13666         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13667         * python/py-frame.c (frapy_str): Use string_file.
13668         * python/py-framefilter.c (py_print_type, py_print_single_arg):
13669         Use string_file.
13670         * python/py-type.c (typy_str): Use string_file.
13671         * python/py-unwind.c (unwind_infopy_str): Use string_file.
13672         * python/py-value.c (valpy_str): Use string_file.
13673         * record-btrace.c (btrace_insn_history): Use string_file.
13674         * regcache.c (regcache_print): Use stdio_file.
13675         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13676         * remote.c (escape_buffer): Use string_file.
13677         * rust-lang.c (rust_get_disr_info): Use string_file.
13678         * serial.c (serial_open_ops_1): Use stdio_file.
13679         (do_serial_close): Use delete.
13680         * stack.c (print_frame_arg): Use string_file.
13681         (print_frame_args): Remove local mem_fileopen stream, not used.
13682         (print_frame): Use string_file.
13683         * symmisc.c (maintenance_print_symbols): Use stdio_file.
13684         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13685         Take a 'string_file *' instead of a 'ui_file *'.
13686         * top.c (new_ui): Use stdio_file and stderr_file.
13687         (free_ui): Use delete.
13688         (execute_command_to_string): Use string_file.
13689         (quit_confirm): Use string_file.
13690         * tracepoint.c (collection_list::append_exp): Use string_file.
13691         * tui/tui-disasm.c (tui_disassemble): Use string_file.
13692         * tui/tui-file.c: Don't include "ui-file.h".
13693         (enum streamtype, struct tui_stream): Delete.
13694         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13695         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13696         (tui_file::tui_file): New method.
13697         (tui_file_fputs): Delete.
13698         (tui_file_get_strbuf): Delete.
13699         (tui_file::puts): New method.
13700         (tui_file_adjust_strbuf): Delete.
13701         (tui_file_flush): Delete.
13702         (tui_file::flush): New method.
13703         * tui/tui-file.h: Tweak intro comment.
13704         Include ui-file.h.
13705         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13706         (tui_file_adjust_strbuf): Delete declarations.
13707         (class tui_file): New class.
13708         * tui/tui-io.c (tui_initialize_io): Use tui_file.
13709         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13710         (tui_register_format): Use string_stream.
13711         * tui/tui-stack.c (tui_make_status_line): Use string_file.
13712         (tui_get_function_from_frame): Use string_file.
13713         * typeprint.c (type_to_string): Use string_file.
13714         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13715         (null_stream): New global.
13716         (ui_file_delete): Delete.
13717         (ui_file::ui_file): New.
13718         (null_file_isatty): Delete.
13719         (ui_file::~ui_file): New.
13720         (null_file_rewind): Delete.
13721         (ui_file::printf): New.
13722         (null_file_put): Delete.
13723         (null_file_flush): Delete.
13724         (ui_file::putstr): New.
13725         (null_file_write): Delete.
13726         (ui_file::putstrn): New.
13727         (null_file_read): Delete.
13728         (ui_file::putc): New.
13729         (null_file_fputs): Delete.
13730         (null_file_write_async_safe): Delete.
13731         (ui_file::vprintf): New.
13732         (null_file_delete): Delete.
13733         (null_file::write): New.
13734         (null_file_fseek): Delete.
13735         (null_file::puts): New.
13736         (ui_file_data): Delete.
13737         (null_file::write_async_safe): New.
13738         (gdb_flush, ui_file_isatty): Adjust.
13739         (ui_file_put, ui_file_rewind): Delete.
13740         (ui_file_write): Adjust.
13741         (ui_file_write_for_put): Delete.
13742         (ui_file_write_async_safe, ui_file_read): Adjust.
13743         (ui_file_fseek): Delete.
13744         (fputs_unfiltered): Adjust.
13745         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13746         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13747         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13748         (set_ui_file_data): Delete.
13749         (string_file::~string_file, string_file::write)
13750         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13751         (do_ui_file_as_string, ui_file_as_string): Delete.
13752         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13753         (struct mem_file): Delete.
13754         (mem_file_new): Delete.
13755         (stdio_file::stdio_file): New.
13756         (mem_file_delete): Delete.
13757         (stdio_file::stdio_file): New.
13758         (mem_fileopen): Delete.
13759         (stdio_file::~stdio_file): New.
13760         (mem_file_rewind): Delete.
13761         (stdio_file::set_stream): New.
13762         (mem_file_put): Delete.
13763         (stdio_file::open): New.
13764         (mem_file_write): Delete.
13765         (stdio_file_magic, struct stdio_file): Delete.
13766         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13767         (stdio_file::flush): New.
13768         (stdio_file_read): Rename to ...
13769         (stdio_file::read): ... this.  Adjust.
13770         (stdio_file_write): Rename to ...
13771         (stdio_file::write): ... this.  Adjust.
13772         (stdio_file_write_async_safe): Rename to ...
13773         (stdio_file::write_async_safe) ... this.  Adjust.
13774         (stdio_file_fputs): Rename to ...
13775         (stdio_file::puts) ... this.  Adjust.
13776         (stdio_file_isatty): Delete.
13777         (stdio_file_fseek): Delete.
13778         (stdio_file::isatty): New.
13779         (stderr_file_write): Rename to ...
13780         (stderr_file::write) ... this.  Adjust.
13781         (stderr_file_fputs): Rename to ...
13782         (stderr_file::puts) ... this.  Adjust.
13783         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13784         (stderr_file::stderr_file): New.
13785         (tee_file_magic): Delete.
13786         (struct tee_file): Delete.
13787         (tee_file::tee_file): New.
13788         (tee_file_new): Delete.
13789         (tee_file::~tee_file): New.
13790         (tee_file_delete): Delete.
13791         (tee_file_flush): Rename to ...
13792         (tee_file::flush): ... this.  Adjust.
13793         (tee_file_write): Rename to ...
13794         (tee_file::write): ... this.  Adjust.
13795         (tee_file::write_async_safe): New.
13796         (tee_file_fputs): Rename to ...
13797         (tee_file::puts): ... this.  Adjust.
13798         (tee_file_isatty): Rename to ...
13799         (tee_file::isatty): ... this.  Adjust.
13800         * ui-file.h (struct obstack, struct ui_file): Don't
13801         forward-declare.
13802         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13803         (ui_file_write_ftype)
13804         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13805         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13806         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13807         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13808         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13809         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13810         (set_ui_file_fseek): Delete.
13811         (ui_file_data, ui_file_delete, ui_file_rewind)
13812         (struct ui_file): New.
13813         (ui_file_up): New.
13814         (class null_file): New.
13815         (null_stream): Declare.
13816         (ui_file_write_for_put, ui_file_put): Delete.
13817         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13818         Delete.
13819         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13820         (gdb_fopen, tee_file_new): Delete.
13821         (struct string_file): New.
13822         (struct stdio_file): New.
13823         (stdio_file_up): New.
13824         (struct stderr_file): New.
13825         (class tee_file): New.
13826         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13827         of a 'ui_file *'.  Adjust.
13828         * ui-out.h (class ui_out) <field_stream>: Likewise.
13829         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13830         (null_stream): Delete.
13831         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13832         Adjust.
13833         * utils.h (struct ui_file): Delete forward declaration..
13834         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13835         (error_stream): Take a 'string_file &' instead of a
13836         'ui_file *'.
13837         * varobj.c (varobj_value_get_print_value): Use string_file.
13838         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13839         * gdbarch.c: Regenerate.
13840
13841 2017-02-02  Pedro Alves  <palves@redhat.com>
13842
13843         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13844         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
13845         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
13846         Adjust to call gdb_print_insn instead of
13847         gdb_disassembler::print_insn.
13848         (dump_insns, do_mixed_source_and_assembly_deprecated)
13849         (do_mixed_source_and_assembly, do_assembly_only): Add back a
13850         'gdbarch' parameter.  Remove gdb_disassembler parameter.
13851         (gdb_disassembly): Don't allocate a gdb_disassembler here.
13852         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13853         declaration.
13854         (gdb_pretty_print_insn): Re-add declaration.
13855         * record-btrace.c (btrace_insn_history): Don't allocate a
13856         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
13857
13858 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
13859
13860         * disasm.h (gdb_disassembly): Remove file_string parameter.
13861         * disasm.c (gdb_disassembly): Likewise.
13862         * cli/cli-cmds.c (print_disassembly): Adapt.
13863         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13864         * stack.c (do_gdb_disassembly): Likewise.
13865
13866 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13867
13868         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13869         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13870         targets.  And if the implicit value is longer than needed, extract
13871         the first bytes instead of the "least significant" ones.
13872
13873 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13874
13875         * btrace.c (btrace_enable): Do not call btrace_add_pc for
13876         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13877         (btrace_fetch): Assert can_access_registers_ptid.
13878         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13879         validate_registers_access.
13880
13881 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13882
13883         * gdbthread.h (can_access_registers_ptid): New.
13884         * thread.c (can_access_registers_ptid): New.
13885
13886 2017-02-01  Pedro Alves  <palves@redhat.com>
13887
13888         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13889
13890 2017-01-31  Pedro Alves  <palves@redhat.com>
13891
13892         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13893         Fix typos.
13894
13895 2017-01-31  Pedro Alves  <palves@redhat.com>
13896
13897         * stack.c (print_frame_args): Remove local mem_fileopen stream,
13898         not used.
13899
13900 2017-01-31  Pedro Alves  <palves@redhat.com>
13901
13902         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13903
13904 2017-01-31  Pedro Alves  <palves@redhat.com>
13905
13906         * common/scoped_restore.h
13907         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13908         change the value's parameter type to T2.
13909         (make_scoped_restore): Likewise.
13910
13911 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13912             Richard Henderson  <rth@redhat.com>
13913
13914         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13915         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13916         GS_BASE for older kernels.
13917         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13918         GS_BASE for older kernels.
13919         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13920         and GS_BASE to the offset table.
13921         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13922         system register group.
13923         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13924         for older kernels.
13925         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13926         amd64 ABI.
13927         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13928         AMD64_GSBASE_REGNUM.
13929         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13930         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13931         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13932         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13933         i386/64bit-segments.xml in those rules.
13934         * features/i386/64bit-segments.xml: New file.
13935         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13936         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13937         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13938         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13939         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13940         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13941         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13942         * features/i386/amd64-avx-linux.c: Regenerated.
13943         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13944         * features/i386/amd64-avx-mpx.c: Regenerated.
13945         * features/i386/amd64-avx512-linux.c: Regenerated.
13946         * features/i386/amd64-linux.c: Regenerated.
13947         * features/i386/amd64-mpx-linux.c: Regenerated.
13948         * features/i386/i386-avx-mpx-linux.c: Regenerated.
13949         * features/i386/i386-avx-mpx.c: Regenerated.
13950         * features/i386/x32-avx-linux.c: Regenerated.
13951         * features/i386/x32-avx512-linux.c: Regenerated.
13952         * regformats/i386/amd64-avx-linux.dat: Regenerated.
13953         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13954         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13955         * regformats/i386/amd64-linux.dat: Regenerated.
13956         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13957         * regformats/i386/x32-avx-linux.dat: Regenerated.
13958         * regformats/i386/x32-avx512-linux.dat: Regenerated.
13959         * regformats/i386/x32-linux.dat: Regenerated.
13960
13961 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13962
13963         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13964         Set to AMD64_NUM_REGS.
13965
13966 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13967
13968         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13969         that checks validity of a register number.
13970
13971 2017-01-27  Kees Cook  <keescook@google.com>
13972
13973         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13974         fetch_fpregs if target has fpa registers.
13975         (arm_linux_store_inferior_registers): Call store_fpregs if target
13976         has fpa registers.
13977
13978 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13979
13980         * cris-tdep.c (cris_gdbarch_init): Remove check for
13981         info.byte_order and force it to BFD_ENDIAN_LITTLE.
13982
13983 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
13984
13985         * corelow.c (get_core_register_section): Check for regset
13986         existence before checking for REGSET_VARIABLE_SIZE.
13987
13988 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13989             Pedro Alves  <palves@redhat.com>
13990
13991         PR gdb/20939
13992         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13993         call memory_error, save memaddr instead.
13994         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13995         negative, cal memory_error.
13996         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13997
13998 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13999
14000         * disasm-selftests.c (memory_error_test): New function.
14001         (_initialize_disasm_selftests): Register memory_error_test.
14002
14003 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14004
14005         * Makefile.in (SFILES): Add disasm-selftests.c and
14006         selftest-arch.c.
14007         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14008         * disasm-selftests.c: New file.
14009         * selftest-arch.c: New file.
14010         * selftest-arch.h: New file.
14011
14012 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14013
14014         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14015         to bfd_arch_mep.  Don't return 0 if section is not
14016         found.  Call print_insn_mep.
14017
14018 2017-01-26  Pedro Alves  <palves@redhat.com>
14019             Yao Qi  <yao.qi@linaro.org>
14020
14021         * arm-tdep.c: Include "disasm.h".
14022         (gdb_print_insn_arm): Update code to get gdbarch.
14023         * disasm.c (dis_asm_read_memory): Change it to
14024         gdb_disassembler::dis_asm_read_memory.
14025         (dis_asm_memory_error): Likewise.
14026         (dis_asm_print_address): Likewise.
14027         (gdb_pretty_print_insn): Change it to
14028         gdb_disassembler::pretty_print_insn.
14029         (dump_insns): Add one argument gdb_disassemlber.  All
14030         callers updated.
14031         (do_mixed_source_and_assembly_deprecated): Likewise.
14032         (do_mixed_source_and_assembly): Likewise.
14033         (do_assembly_only): Likewise.
14034         (gdb_disassembler::gdb_disassembler): New.
14035         (gdb_disassembler::print_insn): New.
14036         * disasm.h (class gdb_disassembler): New.
14037         (gdb_pretty_print_insn): Remove declaration.
14038         (gdb_disassemble_info): Likewise.
14039         * guile/scm-disasm.c (class gdbscm_disassembler): New.
14040         (gdbscm_disasm_read_memory_worker): Update.
14041         (gdbscm_disasm_read_memory): Update.
14042         (gdbscm_disasm_memory_error): Remove.
14043         (gdbscm_disasm_print_address): Remove.
14044         (gdbscm_disassembler::gdbscm_disassembler): New.
14045         (gdbscm_print_insn_from_port): Update.
14046         * mips-tdep.c: Include disasm.h.
14047         (gdb_print_insn_mips): Update code to get gdbarch.
14048         * record-btrace.c (btrace_insn_history): Update.
14049         * spu-tdep.c: Include disasm.h.
14050         (struct spu_dis_asm_data): Remove.
14051         (struct spu_dis_asm_info): New.
14052         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14053         SPU id.
14054         (gdb_print_insn_spu): Cast disassemble_info to
14055         spu_dis_asm_info.
14056
14057 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14058
14059         * disasm.c (do_ui_file_delete): Delete.
14060         (gdb_insn_length): Move code creating stream to ...
14061         * utils.c (null_stream): ... here.  New function.
14062         * utils.h (null_stream): Declare.
14063
14064 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
14065
14066         * python/py-inferior.c (find_thread_object): Return directly
14067         from the loop.  Remove "found" variable.
14068
14069 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
14070
14071         GDB 7.12.1 released.
14072
14073 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14074
14075         * python/py-function.c (fnpy_call): Reorder declarations to have
14076         the gdbpy_enter object declared first.
14077         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14078
14079 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14080
14081         PR python/21068
14082         * python/python-internal.h (PyMem_RawMalloc): Define for
14083         Python < 3.4.
14084         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14085         PyMem_RawMalloc instead of PyMem_Malloc.
14086
14087 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
14088             Luis Machado  <lgustavo@codesourcery.com>
14089
14090         * NEWS (New commands): Mention flash-erase.
14091         (New MI commands): Mention target-flash-erase.
14092         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14093         command.
14094         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14095         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14096         * target.c (flash_erase_command): New function.
14097         (initialize_targets): Add new flash-erase command.
14098         * target.h (flash_erase_command): New declaration.
14099
14100 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
14101
14102         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14103         HAVE_SYS_PROCFS_H is defined.
14104
14105 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14106
14107         * remote.c (struct cached_reg): Change data into a pointer.
14108         * (stop_reply_dtr): Free data pointers before deleting vector.
14109         (process_stop_reply): Likewise.
14110         (remote_parse_stop_reply): Allocate space for data
14111
14112 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14113
14114         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14115         MAX_REGISTER_SIZE.
14116         (amd64_pseudo_register_read_value): Likewise.
14117         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14118         (store_register_using_P): Likewise.
14119         * regcache.c (regcache_xfer_part): Likewise.
14120
14121 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
14122
14123         Split real and pseudo registers.
14124         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14125         (sparc32_pseudo_regnum): New enum.
14126         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14127         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14128         (SPARC32_CP0_REGISTERS): New macro.
14129         (sparc32_pseudo_register_name): New function.
14130         (sparc32_register_name): Use sparc32_pseudo_register_name.
14131         (sparc32_pseudo_register_type): New function.
14132         (sparc32_register_type): Use sparc32_pseudo_register_type.
14133         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14134         pseudo register numbers.
14135         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
14136         (SPARC64_CP0_REGISTERS): New macro.
14137         (sparc64_pseudo_register_name): New function.
14138         (sparc64_register_name): Use sparc64_pseudo_register_name.
14139         (sparc64_pseudo_register_type): New function.
14140         (sparc64_register_type): Use sparc64_pseudo_register_type.
14141         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
14142         pseudo register numbers.
14143         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
14144         sparc64_store_arguments): Handle pseudo register numbers.
14145
14146 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14147
14148         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
14149         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
14150         output.
14151         (getpkt_or_notif_sane_1): Likewise.
14152
14153 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14154
14155         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
14156         of CC.  Pass "-x c++-header" instead of "-x c".
14157
14158 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14159
14160         * remote.c (remote_can_async_p): Update comment.
14161
14162 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14163
14164         * linux-nat.c (linux_nat_can_async_p): Update comment.
14165
14166 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14167
14168         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
14169
14170 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
14171
14172         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
14173
14174 2017-01-10  Tom Tromey  <tom@tromey.com>
14175
14176         * python/py-type.c (typy_legacy_template_argument): Update.
14177         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
14178         ~demangle_parse_info): Declare new members.
14179         (cp_demangled_name_to_comp): Return unique_ptr.
14180         (cp_demangled_name_parse_free)
14181         (make_cleanup_cp_demangled_name_parse_free)
14182         (cp_new_demangle_parse_info): Remove.
14183         * cp-support.c (do_demangled_name_parse_free_cleanup)
14184         (make_cleanup_cp_demangled_name_parse_free): Remove.
14185         (inspect_type, cp_canonicalize_string_full)
14186         (cp_canonicalize_string): Update.
14187         (mangled_name_to_comp): Change return type.
14188         (cp_class_name_from_physname, method_name_from_physname)
14189         (cp_func_name, cp_remove_params): Update.
14190         * cp-name-parser.y (demangle_parse_info): New constructor, from
14191         cp_new_demangle_parse_info.
14192         (~demangle_parse_info): New destructor, from
14193         cp_demangled_name_parse_free.
14194         (cp_merge_demangle_parse_infos): Update.
14195         (cp_demangled_name_to_comp): Change return type.
14196
14197 2017-01-10  Tom Tromey  <tom@tromey.com>
14198
14199         * top.c (prevent_dont_repeat): Change return type.
14200         * python/python.c (execute_gdb_command): Use std::string.
14201         Update.
14202         * guile/guile.c (gdbscm_execute_gdb_command): Update.
14203         * command.h (prevent_dont_repeat): Change return type.
14204         * breakpoint.c (bpstat_do_actions_1): Update.
14205
14206 2017-01-10  Tom Tromey  <tom@tromey.com>
14207
14208         * value.h (scoped_value_mark::~scoped_value_mark): Call
14209         free_to_mark.
14210         (scoped_value_mark::free_to_mark): New method.
14211         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
14212         scoped_value_mark.
14213
14214 2017-01-10  Tom Tromey  <tom@tromey.com>
14215
14216         * python/py-value.c (valpy_dereference, valpy_referenced_value)
14217         (valpy_reference_value, valpy_const_value, valpy_get_address)
14218         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
14219         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
14220         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
14221         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
14222         scoped_value_mark.
14223         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
14224         * value.h (scoped_value_mark): New class.
14225
14226 2017-01-10  Tom Tromey  <tom@tromey.com>
14227
14228         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
14229         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
14230         * psymtab.c (discard_psymtabs_upto): Remove.
14231         (make_cleanup_discard_psymtabs): Remove.
14232         (struct psymtab_state): Remove.
14233
14234 2017-01-10  Tom Tromey  <tom@tromey.com>
14235
14236         * record-full.c (record_full_save_cleanups): Remove.
14237         (record_full_save): Use gdb::unlinker.
14238         * gcore.c (do_bfd_delete_cleanup): Remove.
14239         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
14240         cleanups.
14241         * dwarf2read.c (unlink_if_set): Remove.
14242         (write_psymtabs_to_index): Use gdb::unlinker.
14243         * common/gdb_unlinker.h: New file.
14244
14245 2017-01-10  Tom Tromey  <tom@tromey.com>
14246
14247         * windows-tdep.c (windows_xfer_shared_library): Update.
14248         * windows-nat.c (windows_make_so): Update.
14249         * utils.h (make_cleanup_bfd_unref): Remove.
14250         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
14251         * symfile.h (symfile_bfd_open)
14252         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
14253         * symfile.c (read_symbols, symbol_file_add)
14254         (separate_debug_file_exists): Update.
14255         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
14256         (generic_load, reread_symbols): Update.
14257         * symfile-mem.c (symbol_file_add_from_memory): Update.
14258         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
14259         (spu_symbol_file_add_from_memory): Update.
14260         * solist.h (struct target_so_ops) <bfd_open>: Return
14261         gdb_bfd_ref_ptr.
14262         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
14263         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
14264         gdb_bfd_ref_ptr.
14265         (solib_map_sections, reload_shared_libraries_1): Update.
14266         * solib-svr4.c (enable_break): Update.
14267         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
14268         * solib-frv.c (enable_break2): Update.
14269         * solib-dsbt.c (enable_break): Update.
14270         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
14271         gdb_bfd_ref_ptr.
14272         (darwin_solib_get_all_image_info_addr_at_init): Update.
14273         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
14274         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
14275         * record-full.c (record_full_save): Update.
14276         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
14277         * procfs.c (insert_dbx_link_bpt_in_file): Update.
14278         * minidebug.c (find_separate_debug_file_in_section): Return
14279         gdb_bfd_ref_ptr.
14280         * machoread.c (macho_add_oso_symfile): Change abfd to
14281         gdb_bfd_ref_ptr.
14282         (macho_symfile_read_all_oso): Update.
14283         (macho_check_dsym): Return gdb_bfd_ref_ptr.
14284         (macho_symfile_read): Update.
14285         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
14286         (jit_bfd_try_read_symtab): Update.
14287         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14288         (gdb_bfd_openw, gdb_bfd_openr_iovec)
14289         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14290         gdb_bfd_ref_ptr.
14291         (gdb_bfd_ref_policy): New struct.
14292         (gdb_bfd_ref_ptr): New typedef.
14293         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14294         (gdb_bfd_openw, gdb_bfd_openr_iovec)
14295         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14296         gdb_bfd_ref_ptr.
14297         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14298         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14299         (gcore_command): Update.
14300         * exec.c (exec_file_attach): Update.
14301         * elfread.c (elf_symfile_read): Update.
14302         * dwarf2read.c (dwarf2_get_dwz_file): Update.
14303         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
14304         (open_and_init_dwo_file): Update.
14305         (open_dwp_file): Return gdb_bfd_ref_ptr.
14306         (open_and_init_dwp_file): Update.
14307         * corelow.c (core_open): Update.
14308         * compile/compile-object-load.c (compile_object_load): Update.
14309         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
14310         * coffread.c (coff_symfile_read): Update.
14311         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
14312         gdb_bfd_ref_ptr.  Rename.
14313         (dump_bfd_file, restore_command): Update.
14314         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14315         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14316         (find_separate_debug_file_by_buildid): Update.
14317
14318 2017-01-10  Tom Tromey  <tom@tromey.com>
14319
14320         * common/gdb_ref_ptr.h: New file.
14321         * python/py-ref.h (struct gdbpy_ref_policy): New.
14322         (gdbpy_ref): Now a typedef.
14323
14324 2017-01-10  Tom Tromey  <tom@tromey.com>
14325
14326         * utils.h (make_cleanup_htab_delete): Don't declare.
14327         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
14328         Remove.
14329         * linespec.c (decode_compound_collector): Add constructor,
14330         destructor.
14331         (lookup_prefix_sym): Remove cleanup.
14332         (symtab_collector): Add constructor, destructor.
14333         (collect_symtabs_from_filename): Remove cleanup.
14334         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
14335         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
14336         Use htab_up.
14337         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
14338         * dwarf2read.c (dw2_expand_symtabs_matching)
14339         (dw2_map_symbol_filenames, dwarf_decode_macros)
14340         (write_psymtabs_to_index): Use htab_up.
14341         * dwarf2loc.c (func_verify_no_selftailcall)
14342         (call_site_find_chain_1, func_verify_no_selftailcall)
14343         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
14344         std::vector, gdb::unique_xmalloc_ptr.
14345         (call_sitep): Remove typedef.
14346         (dwarf2_locexpr_baton_eval): Remove unused variable.
14347
14348 2017-01-10  Tom Tromey  <tom@tromey.com>
14349
14350         * python/python-internal.h (make_cleanup_py_decref)
14351         (make_cleanup_py_xdecref): Don't declare.
14352         * python/py-utils.c (py_decref, make_cleanup_py_decref)
14353         (py_xdecref, make_cleanup_py_xdecref): Remove.
14354
14355 2017-01-10  Tom Tromey  <tom@tromey.com>
14356
14357         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
14358         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
14359
14360 2017-01-10  Tom Tromey  <tom@tromey.com>
14361
14362         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
14363
14364 2017-01-10  Tom Tromey  <tom@tromey.com>
14365
14366         * python/py-utils.c (unicode_to_encoded_string)
14367         (python_string_to_target_string)
14368         (python_string_to_target_python_string)
14369         (python_string_to_host_string, gdbpy_obj_to_string)
14370         (get_addr_from_python): Use gdbpy_ref.
14371
14372 2017-01-10  Tom Tromey  <tom@tromey.com>
14373
14374         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
14375         gdbpy_ref.
14376
14377 2017-01-10  Tom Tromey  <tom@tromey.com>
14378
14379         * python/python.c (eval_python_command, gdbpy_decode_line)
14380         (gdbpy_run_events, gdbpy_start_type_printers)
14381         (gdbpy_apply_type_printers): Use gdbpy_ref.
14382
14383 2017-01-10  Tom Tromey  <tom@tromey.com>
14384
14385         * python/py-param.c (get_doc_string, compute_enum_values): Use
14386         gdbpy_ref.
14387
14388 2017-01-10  Tom Tromey  <tom@tromey.com>
14389
14390         * python/py-inferior.c (find_thread_object, build_inferior_list):
14391         Use gdbpy_ref.
14392
14393 2017-01-10  Tom Tromey  <tom@tromey.com>
14394
14395         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14396
14397 2017-01-10  Tom Tromey  <tom@tromey.com>
14398
14399         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
14400         gdbpy_ref.
14401
14402 2017-01-10  Tom Tromey  <tom@tromey.com>
14403
14404         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
14405         extra incref.
14406         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
14407         Use gdbpy_ref.
14408
14409 2017-01-10  Tom Tromey  <tom@tromey.com>
14410
14411         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14412         gdbpy_ref.
14413
14414 2017-01-10  Tom Tromey  <tom@tromey.com>
14415
14416         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
14417         decref results of PyArg_ParseTupleAndKeywords.
14418
14419 2017-01-10  Tom Tromey  <tom@tromey.com>
14420
14421         * python/python.c (python_run_simple_file): Use
14422         unique_xmalloc_ptr, gdbpy_ref.
14423
14424 2017-01-10  Tom Tromey  <tom@tromey.com>
14425
14426         * python/py-prettyprint.c (print_stack_unless_memory_error)
14427         (print_string_repr, print_children): Use gdbpy_ref.
14428         (dummy_python_frame): New class.
14429         (dummy_python_frame::dummy_python_frame): Rename from
14430         push_dummy_python_frame.
14431         (py_restore_tstate): Remove.
14432
14433 2017-01-10  Tom Tromey  <tom@tromey.com>
14434
14435         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14436
14437 2017-01-10  Tom Tromey  <tom@tromey.com>
14438
14439         * python/python.c (ensure_python_env, restore_python_env):
14440         Remove.
14441         * python/python-internal.h (ensure_python_env): Don't declare.
14442         * varobj.h (varobj_ensure_python_env): Don't declare.
14443         * varobj.c (varobj_ensure_python_env): Remove.
14444
14445 2017-01-10  Tom Tromey  <tom@tromey.com>
14446
14447         * varobj.c (varobj_value_get_print_value): Use
14448         gdbpy_enter_varobj.
14449
14450 2017-01-10  Tom Tromey  <tom@tromey.com>
14451
14452         * python/py-prettyprint.c (print_string_repr, print_children):
14453         Update.
14454         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
14455         of "encoding".
14456         * varobj.c (varobj_value_get_print_value): Update.
14457         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
14458
14459 2017-01-10  Tom Tromey  <tom@tromey.com>
14460
14461         * varobj.c (varobj_get_display_hint)
14462         (dynamic_varobj_has_child_method, install_new_value_visualizer)
14463         (varobj_set_visualizer, free_variable): Use
14464         gdbpy_enter_varobj.
14465
14466 2017-01-10  Tom Tromey  <tom@tromey.com>
14467
14468         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
14469         (do_finish_initialization): New function.  Use gdbpy_ref.
14470         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
14471         do_finish_initialization.
14472
14473 2017-01-10  Tom Tromey  <tom@tromey.com>
14474
14475         * python/py-param.c (get_set_value, get_show_value): Use
14476         gdbpy_enter, gdbpy_ref.
14477
14478 2017-01-10  Tom Tromey  <tom@tromey.com>
14479
14480         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
14481
14482 2017-01-10  Tom Tromey  <tom@tromey.com>
14483
14484         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
14485
14486 2017-01-10  Tom Tromey  <tom@tromey.com>
14487
14488         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
14489         Use gdbpy_enter_varobj.
14490
14491 2017-01-10  Tom Tromey  <tom@tromey.com>
14492
14493         * varobj.c (gdbpy_enter_varobj): New constructor.
14494         * python/python-internal.h (gdbpy_enter_varobj): New class.
14495         * python/py-varobj.c (py_varobj_get_iterator): Use
14496         gdbpy_enter_varobj.
14497
14498 2017-01-10  Tom Tromey  <tom@tromey.com>
14499
14500         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
14501         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14502         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
14503         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
14504         unique_xmalloc_ptr.
14505         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
14506
14507 2017-01-10  Tom Tromey  <tom@tromey.com>
14508
14509         * python/py-xmethods.c (invoke_match_method): Use
14510         gdbpy_ref.
14511
14512 2017-01-10  Tom Tromey  <tom@tromey.com>
14513
14514         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
14515         gdbpy_enter, gdbpy_ref.
14516
14517 2017-01-10  Tom Tromey  <tom@tromey.com>
14518
14519         * python/python.c (python_interactive_command): Use gdbpy_enter.
14520
14521 2017-01-10  Tom Tromey  <tom@tromey.com>
14522
14523         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
14524         gdbpy_ref.
14525
14526 2017-01-10  Tom Tromey  <tom@tromey.com>
14527
14528         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
14529         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14530
14531 2017-01-10  Tom Tromey  <tom@tromey.com>
14532
14533         * utils.h (htab_deleter): New struct.
14534         (htab_up): New typedef.
14535         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
14536         gdbpy_enter, gdbpy_ref, htab_up.
14537
14538 2017-01-10  Tom Tromey  <tom@tromey.com>
14539
14540         * python/py-unwind.c (pending_frame_invalidate): Remove.
14541         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
14542
14543 2017-01-10  Tom Tromey  <tom@tromey.com>
14544
14545         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
14546         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
14547
14548 2017-01-10  Tom Tromey  <tom@tromey.com>
14549
14550         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
14551
14552 2017-01-10  Tom Tromey  <tom@tromey.com>
14553
14554         * python/python.c (gdbpy_eval_from_control_command)
14555         (gdbpy_source_script, gdbpy_run_events)
14556         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
14557         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
14558         gdbpy_enter.
14559
14560 2017-01-10  Tom Tromey  <tom@tromey.com>
14561
14562         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
14563
14564 2017-01-10  Tom Tromey  <tom@tromey.com>
14565
14566         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
14567
14568 2017-01-10  Tom Tromey  <tom@tromey.com>
14569
14570         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
14571         (python_on_inferior_call_pre, python_on_inferior_call_post)
14572         (python_on_memory_change, python_on_register_change)
14573         (python_inferior_exit, python_new_objfile, add_thread_object)
14574         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
14575
14576 2017-01-10  Tom Tromey  <tom@tromey.com>
14577
14578         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
14579         (bpfinishpy_handle_exit): Use gdbpy_enter.
14580
14581 2017-01-10  Tom Tromey  <tom@tromey.com>
14582
14583         * python/py-cmd.c (cmdpy_destroyer)
14584         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
14585         gdbpy_enter.
14586
14587 2017-01-10  Tom Tromey  <tom@tromey.com>
14588
14589         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14590         gdbpy_enter.
14591         (gdbpy_breakpoint_has_cond): Likewise.
14592
14593 2017-01-10  Tom Tromey  <tom@tromey.com>
14594
14595         * python/python.c (gdbpy_enter): New constructor.
14596         (~gdbpy_enter): New destructor.
14597         (restore_python_env, ensure_python_env): Rewrite.
14598         * python/python-internal.h (gdbpy_enter): New class.
14599
14600 2017-01-10  Tom Tromey  <tom@tromey.com>
14601
14602         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
14603
14604 2017-01-10  Tom Tromey  <tom@tromey.com>
14605
14606         * python/py-value.c (value_has_field, get_field_flag)
14607         (get_field_type, valpy_getitem, convert_value_from_python): Use
14608         gdbpy_ref.
14609
14610 2017-01-10  Tom Tromey  <tom@tromey.com>
14611
14612         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14613         gdbpy_ref.
14614
14615 2017-01-10  Tom Tromey  <tom@tromey.com>
14616
14617         * python/py-prettyprint.c (search_pp_list)
14618         (find_pretty_printer_from_objfiles)
14619         (find_pretty_printer_from_progspace)
14620         (find_pretty_printer_from_gdb, find_pretty_printer)
14621         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
14622         gdbpy_ref.
14623
14624 2017-01-10  Tom Tromey  <tom@tromey.com>
14625
14626         * python/py-param.c (call_doc_function): Use gdbpy_ref.
14627
14628 2017-01-10  Tom Tromey  <tom@tromey.com>
14629
14630         * python/py-linetable.c (build_line_table_tuple_from_pcs)
14631         (ltpy_get_all_source_lines): Use gdbpy_ref.
14632
14633 2017-01-10  Tom Tromey  <tom@tromey.com>
14634
14635         * python/py-framefilter.c (extract_sym, extract_value)
14636         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14637         gdbpy_ref.
14638
14639 2017-01-10  Tom Tromey  <tom@tromey.com>
14640
14641         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14642
14643 2017-01-10  Tom Tromey  <tom@tromey.com>
14644
14645         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14646
14647 2017-01-10  Tom Tromey  <tom@tromey.com>
14648
14649         * python/py-function.c (convert_values_to_python, fnpy_init): Use
14650         gdbpy_ref.
14651
14652 2017-01-10  Tom Tromey  <tom@tromey.com>
14653
14654         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14655
14656 2017-01-10  Tom Tromey  <tom@tromey.com>
14657
14658         * python/py-type.c (convert_field, make_fielditem, typy_fields)
14659         (typy_range): Use gdbpy_ref.
14660
14661 2017-01-10  Tom Tromey  <tom@tromey.com>
14662
14663         * python/py-threadevent.c (create_thread_event_object): Use
14664         gdbpy_ref.
14665         * python/py-stopevent.c (create_stop_event_object): Simplify.
14666         (emit_stop_event): Use gdbpy_ref.
14667         * python/py-signalevent.c (create_signal_event_object): Use
14668         gdbpy_ref.
14669         * python/py-newobjfileevent.c (create_new_objfile_event_object)
14670         (emit_new_objfile_event, create_clear_objfiles_event_object)
14671         (emit_clear_objfiles_event): Use gdbpy_ref.
14672         * python/py-infevents.c (create_inferior_call_event_object)
14673         (create_register_changed_event_object)
14674         (create_memory_changed_event_object, emit_inferior_call_event)
14675         (emit_memory_changed_event, emit_register_changed_event): Use
14676         gdbpy_ref.
14677         * python/py-exitedevent.c (create_exited_event_object)
14678         (emit_exited_event): Use gdbpy_ref.
14679         * python/py-event.h (evpy_emit_event): Remove
14680         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14681         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14682         * python/py-continueevent.c (emit_continue_event): Use
14683         gdbpy_ref.
14684         * python/py-breakpoint.c (gdbpy_breakpoint_created)
14685         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14686         gdbpy_ref.
14687         * python/py-bpevent.c (create_breakpoint_event_object): Use
14688         gdbpy_ref.
14689
14690 2017-01-10  Tom Tromey  <tom@tromey.com>
14691
14692         * python/py-ref.h: New file.
14693
14694 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14695
14696         * cli-out.c (cli_ui_out::do_redirect): Change return type to
14697         void.
14698         * cli-out.h (cli_ui_out::do_redirect): Likewise.
14699         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14700         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14701         * ui-out.c (ui_out::redirect): Likewise.
14702         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14703         * cli/cli-logging.c (set_logging_redirect): Update call site of
14704         ui_out::redirect.
14705         (handle_redirections): Likewise.
14706         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14707         * top.c (execute_command_to_string): Likewise.
14708         * utils.c (do_ui_out_redirect_pop): Likewise.
14709
14710 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14711
14712         * stack.c (_initialize_stack): Update "frame" command help message.
14713
14714 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
14715
14716         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14717
14718 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14719
14720         * x86-linux-nat.h: Include gdb_proc_service.h.
14721
14722 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14723
14724         * ser-base.h: Include serial.h.
14725
14726 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14727
14728         * ppc-linux-tdep.h: Include ppc-tdep.h.
14729
14730 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14731
14732         * nat/amd64-linux-siginfo.h: Include signal.h.
14733
14734 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14735
14736         * nat/aarch64-linux-hw-point.h: Include break-common.h.
14737
14738 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14739
14740         * mi/mi-parse.h: Include mi-cmds.h.
14741
14742 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14743
14744         * inf-loop.c: Don't include "target.h".
14745         * inf-loop.h: Include it here.
14746
14747 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14748
14749         * dfp.h: Include "dboulest.h" and "expression.h".
14750
14751 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14752
14753         * ax-gdb.h: Include "ax.h".
14754
14755 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14756
14757         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14758         with nat/gdb_ptrace.h.
14759
14760 2017-01-05  Yao Qi  <yao.qi@linaro.org>
14761
14762         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14763         new line.
14764         (mips64_fbsd_sigframe_init): Likewise.
14765
14766 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14767
14768         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14769         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14770
14771 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14772
14773         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14774         * NEWS: Mention new FreeBSD/mips native configuration.
14775         * config/mips/fbsd.mh: New file.
14776         * configure.host: Add mips*-*-freebsd*.
14777         * mips-fbsd-nat.c: New file.
14778
14779 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14780
14781         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14782         (ALLDEPFILES): Add mips-fbsd-tdep.c.
14783         * NEWS: Mention new FreeBSD/mips target.
14784         * configure.tgt: Add mips*-*-freebsd*.
14785         * mips-fbsd-tdep.c: New file.
14786         * mips-fbsd-tdep.h: New file.
14787
14788 2017-01-04  Yao Qi  <yao.qi@linaro.org>
14789
14790         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14791         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14792
14793 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14794
14795         Update copyright year range in all GDB files.
14796
14797 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14798
14799         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14800
14801 For older changes see ChangeLog-2016.
14802 \f
14803 Local Variables:
14804 mode: change-log
14805 left-margin: 8
14806 fill-column: 74
14807 version-control: never
14808 coding: utf-8
14809 End: