Constify add_abbrev_prefix_cmd
[external/binutils.git] / gdb / ChangeLog
1 2017-11-07  Tom Tromey  <tom@tromey.com>
2
3         * breakpoint.c (stop_command): Constify.
4         * cli/cli-decode.c (struct cmd_list_element): Constify.
5         * command.h (add_abbrev_prefix_cmd): Constify.
6
7 2017-11-07  Pedro Alves  <palves@redhat.com>
8
9         * breakpoint.c (extract_bp_kind): New enum.
10         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
11         factored out from ...
12         (extract_bp_number_and_location): ... here.
13         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
14
15 2017-11-07  Pedro Alves  <palves@redhat.com>
16
17         * breakpoint.c (extract_bp_number_and_location): Change return
18         type to void.  Throw error instead of warning.
19         (enable_disable_command): Adjust.
20
21 2017-11-07  Xavier Roirand  <roirand@adacore.com>
22             Pedro Alves  <palves@redhat.com>
23
24         * breakpoint.c (map_breakpoint_number_range): New, factored out
25         from ...
26         (map_breakpoint_numbers): ... here.
27         (find_location_by_number): Change parameters from string to
28         breakpoint number and location.
29         (extract_bp_number_and_location): New function.
30         (enable_disable_bp_num_loc)
31         (enable_disable_breakpoint_location_range)
32         (enable_disable_command): New functions, factored out ...
33         (enable_command, disable_command): ... these functions, and
34         adjusted to support ranges.
35         * NEWS: Document enable/disable breakpoint location range feature.
36
37 2017-11-06  Luis Machado  <luis.machado@linaro.org>
38
39         * MAINTAINERS (Write After Approval): Update my e-mail address.
40
41 2017-11-06  Pedro Alves  <palves@redhat.com>
42
43         * gnu-nat.c (gnu_terminal_init): Delete.
44         (gnu_target): Don't install gnu_terminal_init.
45         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
46         (child_terminal_init): ... this function.
47
48 2017-11-06  Pedro Alves  <palves@redhat.com>
49
50         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
51         sgtty.h.
52         * config.in, configure: Regenerate.
53
54 2017-11-06  Pedro Alves  <palves@redhat.com>
55
56         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
57         (async_init_signals): Adjust.
58         (handle_stop_sig): Rename to ...
59         (handle_sigtstp): ... this.
60         (async_stop_sig): Rename to ...
61         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
62         SIGTSTP path.
63         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
64         instead of STOP_SIGNAL thoughout.
65         (handle_stop_sig): Rename to ...
66         (handle_sigtstp): ... this.
67         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
68
69 2017-11-06  Pedro Alves  <palves@redhat.com>
70
71         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
72         longer set flags twice in row.
73
74 2017-11-06  Pedro Alves  <palves@redhat.com>
75
76         * Makefile.in (SER_HARDWIRE): Update comment.
77         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
78         * common/gdb_termios.h: Delete file.
79         * common/job-control.c: Include termios.h and unistd.h instead of
80         gdb_termios.h.
81         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
82         check.
83         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
84         Remove sgtty code.
85         * configure.ac: No longer check for termio.h and sgtty.h.
86         * configure: Regenerate.
87         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
88         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
89         Replace PROCESS_GROUP_TYPE references with pid_t references
90         throughout.
91         (gdb_getpgrp): Delete.
92         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
93         (child_terminal_inferior): Remove comment.  Remove sgtty code.
94         (child_terminal_ours_1): Use tcgetpgrp directly instead of
95         gdb_getpgrp.  Use serial_set_tty_state instead aof
96         serial_noflush_set_tty_state.  Remove sgtty code.
97         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
98         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
99         (inferior_process_group): Now returns pid_t.
100         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
101         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
102         * ser-event.c (serial_event_ops): Update.
103         * ser-go32.c (dos_noflush_set_tty_state): Delete.
104         (dos_ops): Update.
105         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
106         * ser-pipe.c (pipe_ops): Update.
107         * ser-tcp.c (tcp_ops): Update.
108         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
109         HAVE_TERMIOS checks.
110         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
111         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
112         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
113         assume termios.
114         (hardwire_noflush_set_tty_state): Delete.
115         (hardwire_print_tty_state, hardwire_drain_output)
116         (hardwire_flush_output, hardwire_flush_input)
117         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
118         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
119         code, and assume termios.
120         (hardwire_ops): Update.
121         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
122         * serial.c (serial_noflush_set_tty_state): Delete.
123         * serial.h (serial_noflush_set_tty_state): Delete.
124         (serial_ops::noflush_set_tty_state): Delete.
125
126 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
127
128         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
129         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
130         (COMMON_OBS): Remove doublest.o and dfp.o.
131         Do not build target-float.c (instead of doublest.c)
132         with -Wformat-nonliteral.
133
134         * doublest.c: Remove file.
135         * doublest.h: Remove file.
136         * dfp.c: Remove file.
137         * dfp.h: Remove file.
138
139         * target-float.c: Do not include "doublest.h" and "dfp.h".
140         (DOUBLEST): Move here from doublest.h.
141         (enum float_kind): Likewise.
142         (FLOATFORMAT_CHAR_BIT): Likewise.
143         (FLOATFORMAT_LARGEST_BYTES): Likewise.
144         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
145         (floatformat_precision): Likewise.
146         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
147         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
148         Likewise.
149         (host_float_format, host_double_format, host_long_double_format):
150         Likewise.
151         (floatformat_to_string, floatformat_from_string): Likewise.
152         (floatformat_to_doublest): Likewise.  Also, inline the original
153         convert_floatformat_to_doublest.
154         (floatformat_from_doublest): Likewise.  Also, inline the original
155         convert_floatformat_from_doublest.
156
157         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
158         (MAX_DECIMAL_STRING): Move here from dfp.c.
159         (match_endianness): Likewise.
160         (set_decnumber_context, decimal_check_errors): Likewise.
161         (decimal_from_number, decimal_to_number): Likewise.
162         (decimal_to_string, decimal_from_string): Likewise.  Make static.
163         (decimal_from_longest, decimal_from_ulongest): Likewise.
164         (decimal_to_longest): Likewise.
165         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
166         (decimal_convert): Likewise.
167
168 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
169
170         * doublest.c: Do not include "gdbtypes.h".
171         (extract_typed_floating): Remove.
172         (store_typed_floating): Remove.
173         (convert_typed_floating): Remove.
174         * doublest.h (struct type): Remove.
175         (DOUBLEST_PRINT_FORMAT): Remove.
176         (DOUBLEST_SCAN_FORMAT): Remove.
177         (extract_typed_floating): Remove.
178         (store_typed_floating): Remove.
179         (convert_typed_floating): Remove.
180
181         * dfp.c (decimal_from_doublest): Remove.
182         (decimal_to_doublest): Remove.
183         * dfp.h: Do not include "doublest.h".
184         (decimal_from_doublest): Remove.
185         (decimal_to_doublest): Remove.
186
187         * value.c: Do not include "doublest.h" and "dfp.h".
188         (value_as_double): Remove.
189         (unpack_double): Remove.
190         (value_from_double): Remove.
191         (value_from_decfloat): Remove.
192         * value.h: Do not include "doublest.h".
193         (value_as_double): Remove.
194         (unpack_double): Remove.
195         (value_from_double): Remove.
196         (value_from_decfloat): Remove.
197
198 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
199
200         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
201         (i386_extract_return_value): Use target_float_convert.
202         (i386_store_return_value): Likewise.
203         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
204         (i387_value_to_register): Likewise.
205         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
206         (ia64_register_to_value): Use target_float_convert.
207         (ia64_value_to_register): Likewise.
208         (ia64_extract_return_value): Likewise.
209         (ia64_store_return_value): Likewise.
210         (ia64_push_dummy_call): Likewise.
211         * m68k-tdep.c: Include "target-float.h".
212         (m68k_register_to_value): Use target_float_convert.
213         (m68k_value_to_register): Likewise.
214         (m68k_svr4_extract_return_value): Likewise.
215         (m68k_svr4_store_return_value): Likewise.
216         * ppc-sysv-tdep.c: Include "target-float.h".
217         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
218         (do_ppc_sysv_return_value): Likewise.
219         (ppc64_sysv_abi_push_freg): Likewise.
220         (ppc64_sysv_abi_return_value_base): Likewise.
221         * rs6000-aix-tdep.c: Include "target-float.h".
222         (rs6000_push_dummy_call): Use target_float_convert.
223         (rs6000_return_value): Likewise.
224         * rs6000-lynx178-tdep.c: Include "target-float.h".
225         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
226         (rs6000_lynx178_return_value): Likewise.
227         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
228         (rs6000_register_to_value): Use target_float_convert.
229         (rs6000_value_to_register): Likewise.
230         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
231         (arm_extract_return_value): Use target_float_convert.
232         (arm_store_return_value): Likewise.
233         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
234         (sh_register_convert_to_virtual): Use target_float_convert.
235         (sh_register_convert_to_raw): Likewise.
236         * sh64-tdep.c: Include "target-float.h".
237         (sh64_extract_return_value): Use target_float_convert.
238         (sh64_register_convert_to_virtual): Likewise.
239         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
240
241 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
242
243         * target-float.c (floatformat_to_host_double): New function.
244         (floatformat_from_host_double): Likewise.
245         (target_float_to_host_double): Likewise.
246         (target_float_from_host_double): Likewise.
247         * target-float.h (target_float_to_host_double): Add prototype.
248         (target_float_from_host_double): Likewise.
249
250         * guile/scm-value.c: Include "target-float.h".
251         (gdbscm_value_to_real): Use target_float_to_host_double.
252         Handle integer source values via value_as_long.
253         * guile/scm-math.c: Include "target-float.h".  Do not include
254         "doublest.h", "dfp.h", and "expression.h".
255         (vlscm_convert_typed_number): Use target_float_from_host_double.
256         (vlscm_convert_number): Likewise.
257
258         * python/py-value.c (valpy_float): Use target_float_to_host_double.
259         (convert_value_from_python): Use target_float_from_host_double.
260
261 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
262
263         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
264         (cast_from_fixed): Likewise.
265         (ada_scaling_type): New function.
266         (ada_delta): Return value instead of DOUBLEST.  Perform target
267         arithmetic instead of host arithmetic.
268         (scaling_factor): Rename to ...
269         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
270         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
271         (ada_fixed_to_float): Remove.
272         (ada_float_to_fixed): Remove.
273         * ada-lang.h (ada_fixed_to_float): Remove.
274         (ada_float_to_fixed): Remove.
275         (ada_delta): Return value instead of DOUBLEST.
276         (ada_scaling_factor): Add prototype.
277
278         * ada-typeprint.c: Include "target-float.h".
279         (print_fixed_point_type): Perform target arithmetic instead of
280         host arithmetic.
281         * ada-valprint.c: Include "target-float.h".
282         (ada_val_print_num): Perform target arithmetic instead of
283         host arithmetic for fixed-point types.
284
285 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
286
287         * target-float.c: Include <math.h>.
288         (floatformat_binop): New function.
289         (floatformat_compare): Likewise.
290         (target_float_binop): Likewise.
291         (target_float_compare): Likewise.
292         * target-float.h: Include "expression.h".
293         (target_float_binop): Add prototype.
294         (target_float_compare): Likewise.
295
296         * valarith.c: Do not include "doublest.h" and "dfp.h".
297         Include "common/byte-vector.h".
298         (value_args_as_decimal): Remove, replace by ...
299         (value_args_as_target_float): ... this function.  Handle both
300         binary and decimal target floating-point formats.
301         (scalar_binop): Handle both binary and decimal FP using
302         value_args_as_target_float and target_float_binop.
303         (value_equal): Handle both binary and decimal FP using
304         value_args_as_target_float and target_float_compare.
305         (value_less): Likewise.
306         (value_pos): Handle all scalar types as simple copy.
307         (value_neg): Handle all scalar types via BINOP_SUB from 0.
308         * dfp.c (decimal_binop): Throw error instead of internal_error
309         when called with an unsupported operation code.
310
311 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
312
313         * target-float.c (target_float_to_string): New function.
314         (target_float_from_string): New function.
315         * target-float.h (target_float_to_string): Add prototype.
316         (target_float_from_string): Add prototype.
317
318         * valprint.c: Include "target-float.h".  Do not include
319         "doublest.h" and "dfp.h".
320         (print_floating): Use target_float_to_string.
321         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
322         (printf_floating): Use target_float_to_string.
323         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
324         (print_i387_value): Use target_float_to_string.
325         * mips-tdep.c: Include "target-float.h".
326         (mips_print_fp_register): Use target_float_to_string.
327         * sh64-tdep.c: Include "target-float.h".
328         (sh64_do_fp_register): Use target_float_to_string.
329
330         * parse.c: Include "target-float.h".  Do not include
331         "doublest.h" and "dfp.h".
332         (parse_float): Use target_float_from_string.
333         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
334         (define_symbol): Use target_float_from_string.
335         * gdbarch-selftests.c: Include "target-float.h".
336         (register_to_value_test): Use target_float_from_string.
337
338 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
339
340         * Makefile.c (SFILES): Add target-float.c.
341         (HFILES_NO_SRCDIR): Add target-float.h.
342         (COMMON_OBS): Add target-float.o.
343         * target-float.h: New file.
344         * target-float.c: New file.
345
346         * doublest.c (floatformat_classify): Fix detection of float_zero.
347
348         * gdbtypes.c (is_floating_type): New function.
349         * gdbtypes.h (is_floating_type): Add prototype.
350
351         * value.c: Do not include "floatformat.h".
352         (unpack_double): Use target_float_is_valid.
353         (is_floating_value): New function.
354         * value.h (is_floating_value): Add prototype-
355
356         * valarith.c: Include "target-float.h".
357         (value_logical_not): Use target_float_is_zero.
358
359         * python/py-value.c: Include "target-float.h".
360         (valpy_nonzero): Use target_float_is_zero.
361
362 2017-11-04  Tom Tromey  <tom@tromey.com>
363
364         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
365
366 2017-11-04  Tom Tromey  <tom@tromey.com>
367
368         * breakpoint.c (set_momentary_breakpoint): Return
369         breakpoint_up.
370         (until_break_command): Update.
371         (new_until_break_fsm): Change argument types to
372         breakpoint_up.
373         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
374         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
375         Remove.
376         * infcmd.c (finish_forward): Update.
377         * breakpoint.h (set_momentary_breakpoint)
378         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
379         (make_cleanup_delete_breakpoint): Remove.
380         (struct breakpoint_deleter): New.
381         (breakpoint_up): New typedef.
382         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
383         (insert_exception_resume_breakpoint): Update.
384         (insert_exception_resume_from_probe): Update.
385         (insert_longjmp_resume_breakpoint): Update.
386         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
387         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
388         * infcall.c (call_function_by_hand_dummy): Update
389
390 2017-11-04  Tom Tromey  <tom@tromey.com>
391
392         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
393
394 2017-11-04  Tom Tromey  <tom@tromey.com>
395
396         * linux-tdep.c (linux_core_info_proc_mappings): Use
397         gdb::def_vector.
398         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
399         "size" argument.
400         (linux_corefile_thread): Update.
401         (linux_make_corefile_notes): Remove unused variable.
402
403 2017-11-04  Tom Tromey  <tom@tromey.com>
404
405         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
406         gdb::byte_vector.
407
408 2017-11-04  Tom Tromey  <tom@tromey.com>
409
410         * objfiles.c (do_free_objfile_cleanup): Remove.
411         * compile/compile-object-load.c (compile_object_load): Update.
412         * objfiles.h (make_cleanup_free_objfile): Remove.
413
414 2017-11-04  Tom Tromey  <tom@tromey.com>
415
416         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
417         (adi_read_versions): Change "tags" to "gdb_byte *".
418         (adi_print_versions): Likewise.
419
420 2017-11-04  Tom Tromey  <tom@tromey.com>
421
422         * breakpoint.c
423         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
424         from start_rbreak_breakpoints.
425         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
426         * breakpoint.h (class scoped_rbreak_breakpoints): New.
427         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
428         * symtab.c (do_end_rbreak_breakpoints): Remove.
429         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
430
431 2017-11-04  Tom Tromey  <tom@tromey.com>
432
433         * cp-namespace.c (reset_directive_searched): Remove.
434         (cp_lookup_symbol_via_imports): Use scoped_restore.
435         * cp-support.c (reset_directive_searched): Remove.
436         (make_symbol_overload_list_using): Use scoped_restore.
437         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
438         (reset_directive_searched): Remove.
439
440 2017-11-04  Tom Tromey  <tom@tromey.com>
441
442         * symfile.c (find_separate_debug_file_by_debuglink): Use
443         unique_xmalloc_ptr.
444
445 2017-11-04  Tom Tromey  <tom@tromey.com>
446
447         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
448         type of "info".
449         (compute_stack_depth): Likewise.
450         (do_compile_dwarf_expr_to_c): Use std::vector.
451
452 2017-11-04  Tom Tromey  <tom@tromey.com>
453
454         * compile/compile-object-load.c (link_callbacks_einfo): Use
455         std::string.
456
457 2017-11-04  Tom Tromey  <tom@tromey.com>
458
459         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
460         Use scoped_free_pendings.
461         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
462         scoped_free_pendings.
463         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
464         (xcoff_initial_scan): Likewise.
465         * buildsym.c (reset_symtab_globals): Update comment.
466         (scoped_free_pendings): Rename from really_free_pendings.
467         (prepare_for_building): Update comment.
468         (buildsym_init): Likewise.
469         * buildsym.h (class scoped_free_pendings): New class.
470         (really_free_pendings): Don't declare.
471
472 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
473
474         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
475         output when converting a zero value to a special byteorder format.
476
477 2017-11-02  Yao Qi  <yao.qi@linaro.org>
478
479         * frame.c (do_frame_register_read): Remove aspace.
480         * jit.c (jit_frame_sniffer): Likwise.
481         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
482         * regcache.c (regcache::regcache): Pass nullptr.
483         (regcache_print): Caller updated.
484         * regcache.h (regcache::regcache): Remove one constructor
485         parameter aspace.
486
487 2017-11-02  Yao Qi  <yao.qi@linaro.org>
488
489         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
490
491 2017-11-02  Yao Qi  <yao.qi@linaro.org>
492
493         * breakpoint.c (insert_single_step_breakpoints): Update.
494         * frame.c (struct frame_info) <aspace>: Add const.
495         (frame_save_as_regcache): Add const.
496         (get_frame_address_space): Return const address_space *.
497         * frame.h (get_frame_address_space): Update declaration.
498         * infrun.c (struct step_over_info) <aspace>: Add const.
499         (set_step_over_info): Make aspace const.
500         (displaced_step_prepare_throw): Change variable const.
501         (resume): Likewise.
502         (proceed): Likewise.
503         (adjust_pc_after_break): Likewise.
504         (save_waitstatus): Likewise.
505         (handle_signal_stop): Likewise.
506         (keep_going_pass_signal): Likewise.
507         * jit.c (jit_frame_sniffer): Add const.
508         * mips-tdep.c (mips_single_step_through_delay): Likewise.
509         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
510         * record-full.c (record_full_wait_1): Likewise.
511         * regcache.c (regcache::regcache): Change parameter to const.
512         * regcache.h (regcache::regcache): Likewise.
513         (regcache::aspace): Return const address_space *.
514         (regcache) <m_aspace>: Add const.
515
516 2017-11-02  Yao Qi  <yao.qi@linaro.org>
517
518         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
519         * frame.c (create_sentinel_frame): Likewise.
520         * infrun.c (displaced_step_prepare_throw): Likewise.
521         (resume): Likewise.
522         (thread_still_needs_step_over_bp): Likewise.
523         (proceed): Likewise.
524         (do_target_wait): Likewise.
525         (adjust_pc_after_break): Likewise.
526         (handle_syscall_event): Likewise.
527         (save_waitstatus): Likewise.
528         (handle_inferior_event_1): Likewise.
529         (handle_signal_stop): Likewise.
530         (keep_going_pass_signal): Likewise.
531         * linux-nat.c (status_callback): Likewise.
532         (save_stop_reason): Likewise.
533         (resume_stopped_resumed_lwps): Likewise.
534         * record-full.c (record_full_exec_insn): Likewise.
535         (record_full_wait_1): Likewise.
536         * regcache.c (get_regcache_aspace): Remove.
537         * regcache.h (get_regcache_aspace): Remove.
538
539 2017-11-02  Yao Qi  <yao.qi@linaro.org>
540
541         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
542         (init_regcache_descr): Use gdbarch_num_regs.
543         (regcache::regcache): Likewise.
544         (regcache::get_register_status): Likewise.
545         (regcache::assert_raw_regnum): Likewise.
546         (regcache::cooked_read): Likewise.
547         (regcache::cooked_read_value): Likewise.
548         (regcache::cooked_write): Likewise.
549         (regcache::dump): Likewise.
550         (regcache::num_raw_registers): New method.
551         * regcache.h (class regcache) <num_raw_registers>: New.
552
553 2017-11-02  Yao Qi  <yao.qi@linaro.org>
554
555         * regcache.c (regcache::assert_regnum): New method.
556         (regcache::invalidate): Call assert_regnum.
557         (regcache::raw_update): Likewise.
558         (regcache::raw_write): Likewise.
559         (regcache::raw_read_part): Likewise.
560         (regcache::raw_write_part): Likewise.
561         (regcache::raw_supply): Likewise.
562         (regcache::raw_supply_integer): Likewise.
563         (regcache::raw_supply_zeroed): Likewise.
564         (regcache::raw_collect): Likewise.
565         (regcache::raw_collect_integer): Likewise.
566         * regcache.h (regcache::assert_regnum): Declare.
567
568 2017-11-02  Yao Qi  <yao.qi@linaro.org>
569
570         * regcache.c (regcache::dump): Remove code.
571
572 2017-11-02  Yao Qi  <yao.qi@linaro.org>
573
574         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
575         Remove.
576         <sizeof_cooked_register_status>: Remove.
577         (init_regcache_descr): Update.
578         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
579         (regcache::save): Likewise.
580         (regcache::dump): Likewise.
581
582 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
583
584         * ft32-tdep.c (ft32_fetch_instruction): New function.
585         (ft32_analyze_prologue): Use ft32_fetch_instruction().
586
587 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
588
589         * cli/cli-script.c (execute_control_command): Rename to ...
590         (execute_control_command_1): ... this.
591         (execute_control_command): New function.
592
593 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
594
595         * tracepoint.c (tfind_command): Remove const_cast.
596
597 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
598
599         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
600
601 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
602
603         * common/common-utils.h (in_inclusive_range): New function.
604         * arm-tdep.c (arm_record_extension_space): Use
605         in_inclusive_range.
606         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
607         * cris-tdep.c (cris_spec_reg_applicable): Use
608         in_inclusive_range.
609
610 2017-10-30  Pedro Alves  <palves@redhat.com>
611             Simon Marchi <simon.marchi@ericsson.com>
612
613         * remote.c (remote_set_syscall_catchpoint): Build a std::string
614         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
615
616 2017-10-30  Pedro Alves  <palves@redhat.com>
617
618         * common/common-utils.c (string_appendf, string_vappendf): New
619         functions.
620         * common/common-utils.h (string_appendf, string_vappendf): New
621         declarations.
622         * unittests/common-utils-selftests.c (string_appendf_func)
623         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
624         (string_vappendf_tests): New functions.
625         (_initialize_common_utils_selftests): Register "string_appendf" and
626         "string_vappendf tests".
627
628 2017-10-30  Pedro Alves  <palves@redhat.com>
629
630         * unittests/common-utils-selftests.c (format_func): New typedef.
631         (string_printf_tests, string_vprintf_tests): Tests factored out
632         and merged to ...
633         (test_format_func): ... this new function.
634         (string_printf_tests, string_vprintf_tests): Reimplement on top of
635         test_format_func.
636
637 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
638
639         * darwin-nat.c: Remove include of gdb.h.
640
641 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
642
643         * xtensa-xtregs.c: Fix formatting issues.
644
645 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
646
647         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
648
649 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
650
651         PR python/21213
652         * python/py-infthread.c (thpy_get_inferior): Increment reference
653         of inferior before returning it.
654
655 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
656
657         * unittests/common-utils-selftests.c (format): Add
658         ATTRIBUTE_PRINTF.
659
660 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
661
662         * xml-syscall.c (struct syscall_desc): Add constructor.
663         <name>: Change type to std::string.
664         (syscall_desc_up): New typedef.
665         (syscall_desc_p): Remove typeder.
666         (DEF_VEC_P(syscall_desc_p)): Remove.
667         (struct syscall_group_desc): Add constructor.
668         <name>: Change type to std::string.
669         <syscalls>: Change type to std::vector.
670         (syscall_group_desc_up): New typedef.
671         (syscall_group_desc_p): Remove typedef.
672         (DEF_VEC_P(syscall_group_desc_p)): Remove.
673         (struct syscalls_info) <syscalls>: Change type to std::vector of
674         unique_ptr.
675         <groups>: Likewise.
676         <my_gdb_datadir>: Change type to std::string.
677         (syscalls_info_up): New typedef.
678         (allocate_syscalls_info): Remove.
679         (syscalls_info_free_syscalls_desc): Remove.
680         (syscalls_info_free_syscall_group_desc): Remove.
681         (free_syscalls_info): Remove.
682         (make_cleanup_free_syscalls_info): Remove.
683         (syscall_group_create_syscall_group_desc): Adjust.
684         (syscall_group_add_syscall): Adjust.
685         (syscall_create_syscall_desc): Adjust.
686         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
687         (init_syscalls_info): Adjust.
688         (syscall_group_get_group_by_name): Adjust.
689         (xml_get_syscall_number): Adjust.
690         (xml_get_syscall_name): Adjust.
691         (xml_list_of_syscalls): Adjust.
692         (xml_list_syscalls_by_group): Adjust.
693         (xml_list_of_groups): Adjust.
694
695 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
696
697         * probe.h: Don't include gdb_vecs.h.
698         (DEF_VEC_P (probe_p)): Remove.
699         (find_probes_in_objfile): Return an std::vector.
700         * probe.c (find_probes_in_objfile): Likewise.
701         * breakpoint.c (breakpoint_objfile_data)
702         <longjmp_probes>: Change type to std::vector.
703         <exception_probes>: Likewise.
704         (free_breakpoint_probes): Don't manually free vectors.
705         (create_longjmp_master_breakpoint): Adjust.
706         (create_exception_master_breakpoint): Adjust.
707         * solib-svr4.c (svr4_create_probe_breakpoints): Change
708         parameter type, adjust.
709         (svr4_create_solib_event_breakpoints): Adjust.
710
711 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
712
713         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
714         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
715         with new.
716         (free_breakpoint_probes): Rename to ...
717         (free_breakpoint_objfile_data): ... this, and call delete on
718         bp_objfile_data..
719
720 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
721
722         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
723         (loaded_script_ptr): Remove typedef.
724         (DEF_VEC_P (loaded_script_ptr)): Remove.
725         (struct collect_matching_scripts_data): Add constructor.
726         <scripts_p>: Change type to (pointer to) std::vector.
727         (collect_matching_scripts_data): Adjust.
728         (sort_scripts_by_name): Make suitable for std::sort.
729         (print_scripts): Don't sort vector, adjust to std::vector.
730         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
731
732 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
733
734         * symfile.c (filename_language): Make struct, not typedef.  Add
735         constructor.
736         <ext>: Change type to std::string.
737         (DEF_VEC_O (filename_language)): Remove.
738         (filename_language_table): Change type to std::vector.
739         (add_filename_language): Adjust.
740         (set_ext_lang_command): Adjust.
741         (info_ext_lang_command): Adjust.
742         (deduce_language_from_filename): Adjust.
743         (class scoped_restore_filename_language_table): Remove.
744         (test_filename_language): Use scoped_restore.
745         (test_set_ext_lang_command): Use scoped_restore, adjust to
746         std::vector change.
747
748 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
749
750         * symfile.c: Include selftest.h.
751         (class scoped_restore_filename_language_table): New.
752         (test_filename_language): New test.
753         (test_set_ext_lang_command): New test.
754         (_initialize_symfile): Register tests.
755
756 2017-10-27  Keith Seitz  <keiths@redhat.com>
757
758         * breakpoint.c (print_breakpoint_location): Use the symbol saved
759         in the bp_location, falling back to find_pc_sect_function when
760         needed.
761         (add_location_to_breakpoint): Save sal->symbol.
762         * breakpoint.h (struct bp_location) <symbol>: New field.
763         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
764         * symtab.h (struct symtab_and_line) <symbol>: New field.
765
766 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
767
768         PR gdb/13669
769         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
770         to rewind obstack.
771
772 2017-10-26  Pedro Alves  <palves@redhat.com>
773
774         * remote.c (remote_async_terminal_ours_p): Delete.
775         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
776         Remove references to 'remote_async_terminal_ours_p'.
777
778 2017-10-26  Yao Qi  <yao.qi@linaro.org>
779
780         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
781
782 2017-10-26  Yao Qi  <yao.qi@linaro.org>
783
784         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
785         aspace const.
786         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
787         Likewise.
788         * breakpoint.c (bpstat_check_location): Remove cast.
789         (breakpoint_hit_catch_fork): Make aspce const.
790         (breakpoint_hit_catch_solib): Likewise.
791         (breakpoint_hit_catch_exec): Likewise.
792         (breakpoint_hit_ranged_breakpoint): Likewise.
793         (breakpoint_hit_watchpoint): Likewise.
794         (base_breakpoint_breakpoint_hit): Likewise.
795         (bkpt_breakpoint_hit): Likewise.
796         (dprintf_breakpoint_hit): Likewise.
797         (tracepoint_breakpoint_hit): Likewise.
798         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
799
800 2017-10-26  Yao Qi  <yao.qi@linaro.org>
801
802         * breakpoint.c (breakpoint_location_address_match): Change
803         "struct address_space *" to "const address_space".
804         (breakpoint_location_address_range_overlap): Likewise.
805         (breakpoint_here_p): Likewise.
806         (breakpoint_in_range_p): Likewise.
807         (moribund_breakpoint_here_p): Likewise.
808         (bp_location_inserted_here_p): Likewise.
809         (software_breakpoint_inserted_here_p): Likewise.
810         (hardware_breakpoint_inserted_here_p): Likewise.
811         (hardware_watchpoint_inserted_in_range): Likewise.
812         (bpstat_check_location): Likewise.
813         (bpstat_stop_status): Likewise.
814         (breakpoint_address_match): Likewise.
815         (breakpoint_address_match_range): Likewise.
816         (breakpoint_location_address_match): Likewise.
817         (breakpoint_location_address_range_overlap): Likewise.
818         (insert_single_step_breakpoint): Likewise.
819         (breakpoint_has_location_inserted_here): Likewise.
820         (single_step_breakpoint_inserted_here_p): Likewise.
821         (pc_at_non_inline_function): Likewise.
822         * breakpoint.h (bpstat_stop_status): Update declaration.
823         (breakpoint_here_p): Likewise.
824         (breakpoint_in_range_p): Likewise.
825         (moribund_breakpoint_here_p): Likewise.
826         (breakpoint_inserted_here_p): Likewise.
827         (software_breakpoint_inserted_here_p): Likewise.
828         (hardware_breakpoint_inserted_here_p): Likewise.
829         (breakpoint_has_location_inserted_here): Likewise.
830         (single_step_breakpoint_inserted_here_p): Likewise.
831         (hardware_watchpoint_inserted_in_range): Likewise.
832         (breakpoint_address_match): Likewise.
833         (insert_single_step_breakpoint): Likewise.
834         (pc_at_non_inline_function): Likewise.
835         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
836         * record.c (record_check_stopped_by_breakpoint): Likewise.
837         * record.h (record_check_stopped_by_breakpoint): Likewise.
838         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
839
840 2017-10-25  Yao Qi  <yao.qi@linaro.org>
841
842         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
843         regcache->arch () instead get_regcache_arch.
844         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
845         Likewise.
846         (aarch64_fbsd_store_inferior_registers): Likewise.
847         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
848         (store_gregs_to_thread): Likewise.
849         (fetch_fpregs_from_thread): Likewise.
850         (store_fpregs_to_thread): Likewise.
851         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
852         (aarch64_store_return_value): Likewise.
853         (aarch64_software_single_step): Likewise.
854         * aix-thread.c (aix_thread_wait): Likewise.
855         (supply_reg32): Likewise.
856         (supply_sprs64): Likewise.
857         (supply_sprs32): Likewise.
858         (fill_gprs64): Likewise.
859         (fill_gprs32): Likewise.
860         (fill_sprs64): Likewise.
861         (fill_sprs32): Likewise.
862         (store_regs_user_thread): Likewise.
863         (store_regs_kernel_thread): Likewise.
864         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
865         (alphabsd_store_inferior_registers): Likewise.
866         * alpha-tdep.c (alpha_extract_return_value): Likewise.
867         (alpha_store_return_value): Likewise.
868         (alpha_deal_with_atomic_sequence): Likewise.
869         (alpha_next_pc): Likewise.
870         (alpha_software_single_step): Likewise.
871         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
872         (amd64bsd_store_inferior_registers): Likewise.
873         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
874         Likewise.
875         (amd64_linux_store_inferior_registers): Likewise.
876         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
877         (amd64_collect_native_gregset): Likewise.
878         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
879         (amd64obsd_collect_uthread): Likewise.
880         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
881         (amd64_collect_fpregset): Likewise.
882         (amd64_supply_fxsave): Likewise.
883         (amd64_supply_xsave): Likewise.
884         (amd64_collect_fxsave): Likewise.
885         (amd64_collect_xsave): Likewise.
886         * arc-tdep.c (arc_write_pc): Likewise.
887         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
888         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
889         (arm_fbsd_store_inferior_registers): Likewise.
890         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
891         (store_vfp_regs): Likewise.
892         (arm_linux_fetch_inferior_registers): Likewise.
893         (arm_linux_store_inferior_registers): Likewise.
894         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
895         (arm_linux_sigreturn_next_pc): Likewise.
896         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
897         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
898         (fetch_register): Likewise.
899         (store_register): Likewise.
900         * arm-tdep.c (arm_is_thumb): Likewise.
901         (displaced_in_arm_mode): Likewise.
902         (bx_write_pc): Likewise.
903         (arm_get_next_pcs_addr_bits_remove): Likewise.
904         (arm_software_single_step): Likewise.
905         (arm_extract_return_value): Likewise.
906         (arm_store_return_value): Likewise.
907         (arm_write_pc): Likewise.
908         * bfin-tdep.c (bfin_extract_return_value): Likewise.
909         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
910         (bsd_uthread_store_registers): Likewise.
911         * core-regset.c (fetch_core_registers): Likewise.
912         * corelow.c (get_core_registers): Likewise.
913         * cris-tdep.c (cris_store_return_value): Likewise.
914         (cris_extract_return_value): Likewise.
915         (find_step_target): Likewise.
916         (find_step_target): Likewise.
917         (cris_software_single_step): Likewise.
918         * ctf.c (ctf_fetch_registers): Likewise.
919         * darwin-nat.c (cancel_breakpoint): Likewise.
920         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
921         * frv-tdep.c (frv_extract_return_value): Likewise.
922         * ft32-tdep.c (ft32_store_return_value): Likewise.
923         (ft32_extract_return_value): Likewise.
924         * go32-nat.c (fetch_register): Likewise.
925         (go32_fetch_registers): Likewise.
926         (go32_store_registers): Likewise.
927         (store_register): Likewise.
928         * h8300-tdep.c (h8300_extract_return_value): Likewise.
929         (h8300_store_return_value): Likewise.
930         * hppa-linux-nat.c (fetch_register): Likewise.
931         (store_register): Likewise.
932         (hppa_linux_fetch_inferior_registers): Likewise.
933         (hppa_linux_store_inferior_registers): Likewise.
934         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
935         (i386_darwin_store_inferior_registers): Likewise.
936         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
937         (gnu_store_registers): Likewise.
938         * i386-linux-nat.c (fetch_register): Likewise.
939         (store_register): Likewise.
940         (supply_gregset): Likewise.
941         (fill_gregset): Likewise.
942         (i386_linux_fetch_inferior_registers): Likewise.
943         (i386_linux_store_inferior_registers): Likewise.
944         (i386_linux_resume): Likewise.
945         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
946         Likewise.
947         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
948         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
949         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
950         (i386obsd_collect_uthread): Likewise.
951         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
952         (i386_supply_gregset): Likewise.
953         (i386_collect_gregset): Likewise.
954         (i386_supply_fpregset): Likewise.
955         (i386_collect_fpregset): Likewise.
956         (i386_mpx_bd_base): Likewise.
957         * i386-v4-nat.c (supply_fpregset): Likewise.
958         (fill_fpregset): Likewise.
959         * i387-tdep.c (i387_supply_fsave): Likewise.
960         (i387_collect_fsave): Likewise.
961         (i387_supply_fxsave): Likewise.
962         (i387_collect_fxsave): Likewise.
963         (i387_supply_xsave): Likewise.
964         (i387_collect_xsave): Likewise.
965         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
966         (ia64_linux_store_registers): Likewise.
967         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
968         (ia64_extract_return_value): Likewise.
969         (ia64_store_return_value): Likewise.
970         (find_func_descr): Likewise.
971         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
972         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
973         (inf_ptrace_store_registers): Likewise.
974         * infrun.c (use_displaced_stepping): Likewise.
975         (displaced_step_prepare_throw): Likewise.
976         (resume): Likewise.
977         (proceed): Likewise.
978         (do_target_wait): Likewise.
979         (adjust_pc_after_break): Likewise.
980         (handle_inferior_event_1): Likewise.
981         (handle_signal_stop): Likewise.
982         (save_infcall_suspend_state): Likewise.
983         (restore_infcall_suspend_state): Likewise.
984         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
985         * jit.c (jit_frame_prev_register): Likewise.
986         * linux-nat.c (save_stop_reason): Likewise.
987         (linux_nat_wait_1): Likewise.
988         (resume_stopped_resumed_lwps): Likewise.
989         * linux-record.c (record_linux_sockaddr): Likewise.
990         (record_linux_msghdr): Likewise.
991         (record_linux_system_call): Likewise.
992         * linux-tdep.c (linux_collect_thread_registers): Likewise.
993         * lm32-tdep.c (lm32_extract_return_value): Likewise.
994         (lm32_store_return_value): Likewise.
995         * m32c-tdep.c (m32c_read_flg): Likewise.
996         (m32c_pseudo_register_read): Likewise.
997         (m32c_pseudo_register_write): Likewise.
998         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
999         (m32r_linux_collect_gregset): Likewise.
1000         * m32r-tdep.c (m32r_store_return_value): Likewise.
1001         (m32r_extract_return_value): Likewise.
1002         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
1003         (m68kbsd_collect_fpregset): Likewise.
1004         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
1005         * m68k-linux-nat.c (fetch_register): Likewise.
1006         (old_fetch_inferior_registers): Likewise.
1007         (old_store_inferior_registers): Likewise.
1008         (store_regs): Likewise.
1009         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
1010         (m68k_svr4_store_return_value): Likewise.
1011         * m88k-tdep.c (m88k_store_arguments): Likewise.
1012         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
1013         (mi_cmd_data_write_register_values): Likewise.
1014         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
1015         (mips_fbsd_store_inferior_registers): Likewise.
1016         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
1017         (mips_fbsd_supply_gregs): Likewise.
1018         (mips_fbsd_collect_fpregs): Likewise.
1019         (mips_fbsd_collect_gregs): Likewise.
1020         (mips_fbsd_supply_fpregset): Likewise.
1021         (mips_fbsd_collect_fpregset): Likewise.
1022         (mips_fbsd_supply_gregset): Likewise.
1023         (mips_fbsd_collect_gregset): Likewise.
1024         * mips-linux-nat.c (supply_gregset): Likewise.
1025         (fill_gregset): Likewise.
1026         (supply_fpregset): Likewise.
1027         (fill_fpregset): Likewise.
1028         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
1029         (mips_fill_gregset): Likewise.
1030         (mips_supply_fpregset): Likewise.
1031         (mips_fill_fpregset): Likewise.
1032         (mips64_supply_gregset): Likewise.
1033         (micromips_linux_sigframe_validate): Likewise.
1034         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
1035         (mipsnbsd_fetch_inferior_registers): Likewise.
1036         (mipsnbsd_store_inferior_registers): Likewise.
1037         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1038         (mipsnbsd_supply_gregset): Likewise.
1039         (mipsnbsd_iterate_over_regset_sections): Likewise.
1040         (mipsnbsd_supply_reg): Likewise.
1041         (mipsnbsd_supply_fpreg): Likewise.
1042         * mips-tdep.c (mips_in_frame_stub): Likewise.
1043         (mips_dummy_id): Likewise.
1044         (is_octeon_bbit_op): Likewise.
1045         (micromips_bc1_pc): Likewise.
1046         (extended_mips16_next_pc): Likewise.
1047         (mips16_next_pc): Likewise.
1048         (deal_with_atomic_sequence): Likewise.
1049         * moxie-tdep.c (moxie_process_readu): Likewise.
1050         * nios2-tdep.c (nios2_get_next_pc): Likewise.
1051         * nto-procfs.c (procfs_store_registers): Likewise.
1052         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1053         (ppcfbsd_store_inferior_registers): Likewise.
1054         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1055         (fetch_altivec_register): Likewise.
1056         (get_spe_registers): Likewise.
1057         (fetch_spe_register): Likewise.
1058         (fetch_altivec_registers): Likewise.
1059         (fetch_all_gp_regs): Likewise.
1060         (fetch_all_fp_regs): Likewise.
1061         (store_vsx_register): Likewise.
1062         (store_altivec_register): Likewise.
1063         (set_spe_registers): Likewise.
1064         (store_spe_register): Likewise.
1065         (store_altivec_registers): Likewise.
1066         (store_all_gp_regs): Likewise.
1067         (store_all_fp_regs): Likewise.
1068         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1069         (ppc_linux_collect_gregset): Likewise.
1070         (ppc_canonicalize_syscall): Likewise.
1071         (ppc_linux_record_signal): Likewise.
1072         (ppu2spu_prev_register): Likewise.
1073         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1074         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1075         (ppcobsd_store_registers): Likewise.
1076         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1077         Likewise.
1078         (ppc_ravenscar_generic_store_registers): Likewise.
1079         * procfs.c (procfs_fetch_registers): Likewise.
1080         (procfs_store_registers): Likewise.
1081         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1082         (ravenscar_store_registers): Likewise.
1083         (ravenscar_prepare_to_store): Likewise.
1084         * record-btrace.c (record_btrace_fetch_registers): Likewise.
1085         * record-full.c (record_full_wait_1): Likewise.
1086         (record_full_registers_change): Likewise.
1087         (record_full_store_registers): Likewise.
1088         (record_full_core_fetch_registers): Likewise.
1089         (record_full_save): Likewise.
1090         (record_full_goto_insn): Likewise.
1091         * regcache.c (regcache_register_size): Likewise.
1092         (get_regcache_arch): Remove.
1093         (regcache_read_pc): Likewise.
1094         * regcache.h (get_regcache_arch): Remove.
1095         * remote-sim.c (gdbsim_fetch_register): Likewise.
1096         (gdbsim_store_register): Likewise.
1097         * remote.c (fetch_register_using_p): Likewise.
1098         (send_g_packet): Likewise.
1099         (remote_prepare_to_store): Likewise.
1100         (store_registers_using_G): Likewise.
1101         * reverse.c (save_bookmark_command): Likewise.
1102         (goto_bookmark_command): Likewise.
1103         * rs6000-aix-tdep.c (branch_dest): Likewise.
1104         * rs6000-nat.c (rs6000_ptrace64): Likewise.
1105         (fetch_register): Likewise.
1106         * rs6000-tdep.c (ppc_supply_reg): Likewise.
1107         (ppc_collect_reg): Likewise.
1108         (ppc_collect_gregset): Likewise.
1109         (ppc_collect_fpregset): Likewise.
1110         (ppc_collect_vsxregset): Likewise.
1111         (ppc_collect_vrregset): Likewise.
1112         (ppc_displaced_step_hw_singlestep): Likewise.
1113         (rs6000_pseudo_register_read): Likewise.
1114         (rs6000_pseudo_register_write): Likewise.
1115         * s390-linux-nat.c (supply_gregset): Likewise.
1116         (fill_gregset): Likewise.
1117         (s390_linux_fetch_inferior_registers): Likewise.
1118         * s390-linux-tdep.c (s390_write_pc): Likewise.
1119         (s390_software_single_step): Likewise.
1120         (s390_all_but_pc_registers_record): Likewise.
1121         (s390_linux_syscall_record): Likewise.
1122         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1123         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1124         (shnbsd_store_inferior_registers): Likewise.
1125         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1126         (sh_extract_return_value_fpu): Likewise.
1127         (sh_store_return_value_nofpu): Likewise.
1128         (sh_corefile_supply_regset): Likewise.
1129         (sh_corefile_collect_regset): Likewise.
1130         * sh64-tdep.c (sh64_extract_return_value): Likewise.
1131         (sh64_store_return_value): Likewise.
1132         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1133         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1134         (sparc_store_inferior_registers): Likewise.
1135         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1136         (sparc_ravenscar_prepare_to_store): Likewise.
1137         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1138         (sparc_analyze_control_transfer): Likewise.
1139         (sparc_step_trap): Likewise.
1140         (sparc_software_single_step): Likewise.
1141         (sparc32_gdbarch_init): Likewise.
1142         (sparc_supply_rwindow): Likewise.
1143         (sparc_collect_rwindow): Likewise.
1144         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1145         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1146         (sparc64nbsd_collect_gregset): Likewise.
1147         (sparc64nbsd_supply_fpregset): Likewise.
1148         (sparc64nbsd_collect_fpregset): Likewise.
1149         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1150         (sparc64_supply_gregset): Likewise.
1151         (sparc64_collect_gregset): Likewise.
1152         (sparc64_supply_fpregset): Likewise.
1153         (sparc64_collect_fpregset): Likewise.
1154         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
1155         * spu-tdep.c (spu_unwind_sp): Likewise.
1156         (spu2ppu_prev_register): Likewise.
1157         (spu_memory_remove_breakpoint): Likewise.
1158         * stack.c (return_command): Likewise.
1159         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
1160         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
1161         * tracefile.c (trace_save_ctf): Likewise.
1162         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
1163         (do_windows_store_inferior_registers): Likewise.
1164         (windows_resume): Likewise.
1165         * xtensa-linux-nat.c (fill_gregset): Likewise.
1166         (supply_gregset_reg): Likewise.
1167         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
1168         (xtensa_register_read_masked): Likewise.
1169         (xtensa_supply_gregset): Likewise.
1170         (xtensa_extract_return_value): Likewise.
1171         (xtensa_store_return_value): Likewise.
1172
1173 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
1174
1175         * doublest.c (floatformat_from_string): New function.
1176         * doublest.h (floatformat_from_string): Add prototype.
1177
1178         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
1179         (OP_FLOAT): ... this.
1180         * expression.h: Do not include "doublest.h".
1181         (union exp_element): Replace doubleconst and decfloatconst by
1182         new element floatconst.
1183         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
1184         (ada_evaluate_subexp): Likewise.
1185         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
1186         OP_DOUBLE and OP_DECFLOAT.
1187         * expprint.c (print_subexp_standard): Likewise.
1188         (dump_subexp_body_standard): Likewise.
1189         * breakpoint.c (watchpoint_exp_is_const): Likewise.
1190
1191         * parse.c: Include "dfp.h".
1192         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1193         (write_exp_elt_floatcst): New function.
1194         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
1195         and OP_DECFLOAT.
1196         (operator_check_standard): Likewise.
1197         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
1198         Return target format buffer instead of host DOUBLEST.
1199         Use floatformat_from_string and decimal_from_string to parse
1200         either binary or decimal floating-point types.
1201         (parse_c_float): Remove.
1202         * parser-defs.h: Do not include "doublest.h".
1203         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1204         (write_exp_elt_floatcst): Add prototype.
1205         (parse_float): Update prototype.
1206         (parse_c_float): Remove.
1207
1208         * c-exp.y: Do not include "dfp.h".
1209         (typed_val_float): Use byte buffer instead of DOUBLEST.
1210         (typed_val_decfloat): Remove.
1211         (DECFLOAT): Remove.
1212         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1213         (parse_number): Update to new parse_float interface.
1214         Parse suffixes and determine type before calling parse_float.
1215         Handle decimal and binary FP types the same way.
1216
1217         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1218         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
1219         (parse_number): Update to new parse_float interface.
1220         Parse suffixes and determine type before calling parse_float.
1221
1222         * f-exp.y: Replace dval by typed_val_float.
1223         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1224         (parse_number): Use parse_float instead of atof.
1225
1226         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1227         (parse_go_float): Remove.
1228         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1229         (parse_number): Call parse_float instead of parse_go_float.
1230         Parse suffixes and determine type before calling parse_float.
1231
1232         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1233         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1234         (parse_number): Update to new parse_float interface.
1235         Parse suffixes and determine type before calling parse_float.
1236
1237         * m2-exp.y: Replace dval by byte buffer val.
1238         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1239         (parse_number): Call parse_float instead of atof.
1240
1241         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1242         (lex_number): Call parse_float instead of strtod.
1243         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
1244         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
1245         Use write_exp_elt_floatcst.
1246         (unit_testing): Remove static variable.
1247         (rust_type): Do not check unit_testing.
1248         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
1249
1250         * ada-exp.y (type_float, type_double): Remove.
1251         (typed_val_float): Use byte buffer instead of DOUBLEST.
1252         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1253         * ada-lex.l (processReal): Use parse_float instead of sscanf.
1254
1255 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
1256
1257         * aarch64-tdep.h (enum aarch64_regnum): Remove.
1258         * arch/aarch64.h: New file.
1259
1260 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1261
1262         * dfp.h (decimal_from_string): Use const reference for argument.
1263         * dfp.c (decimal_from_string): Likewise.
1264
1265 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1266
1267         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
1268         * sh64-tdep.c (sh64_do_fp_register): Likewise.
1269         * mips-tdep.c (mips_print_fp_register): Likewise.
1270
1271 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1272
1273         * common/format.h (enum argclass): Replace decfloat_arg by
1274         dec32float_arg, dec64float_arg, and dec128float_arg.
1275         * common/format.c (parse_format_string): Update to return
1276         new decimal float argument classes.
1277
1278         * printcmd.c (printf_decfloat): Rename to ...
1279         (printf_floating): ... this.  Add argclass argument, and use it
1280         instead of parsing the format string again.  Add support for
1281         binary floating-point values, using floatformat_to_string.
1282         Convert value to the target format if it doesn't already match.
1283         (ui_printf): Call printf_floating instead of printf_decfloat,
1284         also for double_arg / long_double_arg.  Pass argclass.
1285
1286         * dfp.c (decimal_to_string): Add format string argument.
1287         * dfp.h (decimal_to_string): Likewise.
1288
1289         * doublest.c (floatformat_to_string): Add format string argument.
1290         * doublest.h (floatformat_to_string): Likewise.
1291
1292 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1293
1294         * doublest.c (floatformat_precision): New routine.
1295         (floatformat_to_string): Likewise.
1296         * doublest.c (floatformat_to_string): Add prototype.
1297
1298         * printcmd.c (print_scalar_formatted): Only call print_floating
1299         on floating-point types.
1300         * valprint.c: Do not include "floatformat.h".
1301         (generic_val_print_decfloat): Remove.
1302         (generic_val_print): Call generic_val_print_float for both
1303         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
1304         (print_floating): Use floatformat_to_string.  Handle decimal float.
1305         (print_decimal_floating): Remove, merge into floatformat_to_string.
1306         * value.h (print_decimal_floating): Remove.
1307
1308         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
1309
1310 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1311
1312         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
1313
1314 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1315
1316         * memattr.h: Don't include vec.h.
1317         (struct mem_attrib): Initialize fields.
1318         <unknown>: New static method.
1319         (struct mem_region): Add constructors, operator<, initialize
1320         fields.
1321         * memattr.c: Include algorithm.
1322         (default_mem_attrib, unknown_mem_attrib): Remove.
1323         (user_mem_region_list): New global.
1324         (target_mem_region_list, mem_region_list): Change type to
1325         std::vector<mem_region>.
1326         (mem_use_target): Now a function.
1327         (target_mem_regions_valid): Change type to bool.
1328         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
1329         (require_user_regions): Adjust.
1330         (require_target_regions): Adjust.
1331         (create_mem_region): Adjust.
1332         (lookup_mem_region): Adjust.
1333         (invalidate_target_mem_regions): Adjust.
1334         (mem_clear): Rename to...
1335         (user_mem_clear): ... this, and adjust.
1336         (mem_command): Adjust.
1337         (info_mem_command): Adjust.
1338         (mem_enable, enable_mem_command, mem_disable,
1339         disable_mem_command): Adjust.
1340         (mem_delete): Adjust.
1341         (delete_mem_command): Adjust.
1342         * memory-map.h (parse_memory_map): Return an std::vector.
1343         * memory-map.c (parse_memory_map): Likewise.
1344         (struct memory_map_parsing_data): Add constructor.
1345         <memory_map>: Point to std::vector.
1346         (memory_map_start_memory): Adjust.
1347         (memory_map_end_memory): Adjust.
1348         (memory_map_end_property): Adjust.
1349         (clear_result): Remove.
1350         * remote.c (remote_memory_map): Return an std::vector.
1351         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
1352         Remove.
1353         (target_debug_print_mem_region_vector): New.
1354         * target-delegates.c: Regenerate.
1355         * target.h (mem_region_vector): New typedef.
1356         (to_memory_map): Return mem_region_vector.
1357         (target_memory_map): Return an std::vector.
1358         * target.c (target_memory_map): Return an std::vector.
1359         (flash_erase_command): Adjust.
1360
1361 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1362
1363         * memory-map.c (struct memory_map_parsing_data) <property_name>:
1364         Change type to std::string.
1365         (memory_map_start_property): Adjust.
1366         (memory_map_end_property): Adjust.
1367
1368 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1369
1370         * infrun.h: Include common/byte-vector.h.
1371         (struct displaced_step_closure): New struct.
1372         (struct buf_displaced_step_closure): New struct.
1373         * infrun.c (displaced_step_closure::~displaced_step_closure):
1374         Provide default implementation.
1375         (displaced_step_clear): Deallocate step closure with delete.
1376         * aarch64-tdep.c (displaced_step_closure): Rename to ...
1377         (aarch64_displaced_step_closure): ... this, extend
1378         displaced_step_closure.
1379         (aarch64_displaced_step_data) <dsc>: Change type to
1380         aarch64_displaced_step_closure.
1381         (aarch64_displaced_step_copy_insn): Adjust to type change, use
1382         unique_ptr.
1383         (aarch64_displaced_step_fixup): Add cast for displaced step
1384         closure.
1385         * amd64-tdep.c (displaced_step_closure): Rename to ...
1386         (amd64_displaced_step_closure): ... this, extend
1387         displaced_step_closure.
1388         <insn_buf>: Change type to std::vector<gdb_byte>.
1389         <max_len>: Remove.
1390         (fixup_riprel): Change type of DSC parameter, adjust to type
1391         change of insn_buf.
1392         (fixup_displaced_copy): Change type of DSC parameter.
1393         (amd64_displaced_step_copy_insn): Instantiate
1394         amd64_displaced_step_closure.
1395         (amd64_displaced_step_fixup): Add cast for closure type, adjust
1396         to type change of insn_buf.
1397         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
1398         parameter DSC.
1399         (arm_linux_copy_svc): Likewise.
1400         (cleanup_kernel_helper_return): Likewise.
1401         (arm_catch_kernel_helper_return): Likewise.
1402         (arm_linux_displaced_step_copy_insn): Instantiate
1403         arm_displaced_step_closure.
1404         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
1405         (displaced_read_reg): Change type of parameter DSC.
1406         (branch_write_pc): Likewise.
1407         (load_write_pc): Likewise.
1408         (alu_write_pc): Likewise.
1409         (displaced_write_reg): Likewise.
1410         (arm_copy_unmodified): Likewise.
1411         (thumb_copy_unmodified_32bit): Likewise.
1412         (thumb_copy_unmodified_16bit): Likewise.
1413         (cleanup_preload): Likewise.
1414         (install_preload): Likewise.
1415         (arm_copy_preload): Likewise.
1416         (thumb2_copy_preload): Likewise.
1417         (install_preload_reg): Likewise.
1418         (arm_copy_preload_reg): Likewise.
1419         (cleanup_copro_load_store): Likewise.
1420         (install_copro_load_store): Likewise.
1421         (arm_copy_copro_load_store) Likewise.
1422         (thumb2_copy_copro_load_store): Likewise.
1423         (cleanup_branch): Likewise.
1424         (install_b_bl_blx): Likewise.
1425         (arm_copy_b_bl_blx): Likewise.
1426         (thumb2_copy_b_bl_blx): Likewise.
1427         (thumb_copy_b): Likewise.
1428         (install_bx_blx_reg): Likewise.
1429         (arm_copy_bx_blx_reg): Likewise.
1430         (thumb_copy_bx_blx_reg): Likewise.
1431         (cleanup_alu_imm): Likewise.
1432         (arm_copy_alu_imm): Likewise.
1433         (thumb2_copy_alu_imm): Likewise.
1434         (cleanup_alu_reg): Likewise.
1435         (install_alu_reg): Likewise.
1436         (arm_copy_alu_reg): Likewise.
1437         (thumb_copy_alu_reg): Likewise.
1438         (cleanup_alu_shifted_reg): Likewise.
1439         (install_alu_shifted_reg): Likewise.
1440         (arm_copy_alu_shifted_reg): Likewise.
1441         (cleanup_load): Likewise.
1442         (cleanup_store): Likewise.
1443         (arm_copy_extra_ld_st): Likewise.
1444         (install_load_store): Likewise.
1445         (thumb2_copy_load_literal): Likewise.
1446         (thumb2_copy_load_reg_imm): Likewise.
1447         (arm_copy_ldr_str_ldrb_strb): Likewise.
1448         (cleanup_block_load_all): Likewise.
1449         (cleanup_block_store_pc): Likewise.
1450         (cleanup_block_load_pc): Likewise.
1451         (arm_copy_block_xfer): Likewise.
1452         (thumb2_copy_block_xfer): Likewise.
1453         (cleanup_svc): Likewise.
1454         (install_svc): Likewise.
1455         (arm_copy_svc): Likewise.
1456         (thumb_copy_svc): Likewise.
1457         (arm_copy_undef): Likewise.
1458         (thumb_32bit_copy_undef): Likewise.
1459         (arm_copy_unpred): Likewise.
1460         (arm_decode_misc_memhint_neon): Likewise.
1461         (arm_decode_unconditional): Likewise.
1462         (arm_decode_miscellaneous): Likewise.
1463         (arm_decode_dp_misc): Likewise.
1464         (arm_decode_ld_st_word_ubyte): Likewise.
1465         (arm_decode_media): Likewise.
1466         (arm_decode_b_bl_ldmstm): Likewise.
1467         (arm_decode_ext_reg_ld_st): Likewise.
1468         (thumb2_decode_dp_shift_reg): Likewise.
1469         (thumb2_decode_ext_reg_ld_st): Likewise.
1470         (arm_decode_svc_copro): Likewise.
1471         (thumb2_decode_svc_copro): Likewise.
1472         (install_pc_relative): Likewise.
1473         (thumb_copy_pc_relative_16bit): Likewise.
1474         (thumb_decode_pc_relative_16bit): Likewise.
1475         (thumb_copy_pc_relative_32bit): Likewise.
1476         (thumb_copy_16bit_ldr_literal): Likewise.
1477         (thumb_copy_cbnz_cbz): Likewise.
1478         (thumb2_copy_table_branch): Likewise.
1479         (cleanup_pop_pc_16bit_all): Likewise.
1480         (thumb_copy_pop_pc_16bit): Likewise.
1481         (thumb_process_displaced_16bit_insn): Likewise.
1482         (decode_thumb_32bit_ld_mem_hints): Likewise.
1483         (thumb_process_displaced_32bit_insn): Likewise.
1484         (thumb_process_displaced_insn): Likewise.
1485         (arm_process_displaced_insn): Likewise.
1486         (arm_displaced_init_closure): Likewise.
1487         (arm_displaced_step_fixup): Add cast for closure.
1488         * arm-tdep.h: Include infrun.h.
1489         (displaced_step_closure): Rename to ...
1490         (arm_displaced_step_closure): ... this, extend
1491         displaced_step_closure.
1492         <u::svc::copy_svc_os>: Change type of parameter DSC.
1493         <cleanup>: Likewise.
1494         (arm_process_displaced_insn): Likewise.
1495         (arm_displaced_init_closure): Likewise.
1496         (displaced_read_reg): Likewise.
1497         (displaced_write_reg): Likewise.
1498         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1499         Adjust.
1500         * i386-tdep.h: Include infrun.h.
1501         (i386_displaced_step_closure): New typedef.
1502         * i386-tdep.c (i386_displaced_step_copy_insn): Use
1503         i386_displaced_step_closure.
1504         (i386_displaced_step_fixup): Adjust.
1505         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
1506         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
1507         and unique_ptr.
1508         (ppc_displaced_step_fixup): Adjust.
1509         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
1510         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
1511         and unique_ptr.
1512         (s390_displaced_step_fixup): Adjust.
1513
1514 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1515
1516         * interps.h (interp_resume, interp_suspend, interp_set_temp):
1517         Remove declarations.
1518
1519 2017-10-20  Tom Tromey  <tom@tromey.com>
1520
1521         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
1522         std::vector.
1523         (gdb_bfd_record_inclusion): Update.
1524         (bfdp): Remove typedef.
1525
1526 2017-10-20  Tom Tromey  <tom@tromey.com>
1527
1528         * gdb_bfd.c (gdb_bfd_ref): Use new.
1529         (struct gdb_bfd_data): Add constructor, destructor, and member
1530         initializers.
1531         (gdb_bfd_unref): Use delete.
1532
1533 2017-10-20  Tom Tromey  <tom@tromey.com>
1534
1535         * exec.c (exec_file_attach): Use new_bfd_ref.
1536         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
1537         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1538         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
1539         new_bfd_ref.
1540         * gdb_bfd.h (new_bfd_ref): New function.
1541
1542 2017-10-20  Pedro Alves  <palves@redhat.com>
1543
1544         * main.c (captured_command_loop): Add attribute noinline.
1545
1546 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
1547
1548         * interps.c (struct interp_factory): Add constructor.
1549         (interp_factory_p): Remove typedef.
1550         (DEF_VEC_P(interp_factory_p)): Remove.
1551         (interpreter_factories): Change type to std::vector.
1552         (interp_factory_register): Adjust.
1553         (interp_lookup): Adjust.
1554         (interpreter_completer): Adjust.
1555
1556 2017-10-19  Tom Tromey  <tom@tromey.com>
1557
1558         * break-catch-syscall.c (catch_syscall_completer): Use
1559         std::string, gdb::unique_xmalloc_ptr.
1560
1561 2017-10-19  Tom Tromey  <tom@tromey.com>
1562
1563         * infcall.c (call_function_by_hand_dummy): Use std::string.
1564
1565 2017-10-19  Tom Tromey  <tom@tromey.com>
1566
1567         * mi/mi-main.c (mi_cmd_execute): Update.
1568         * top.h (prepare_execute_command): Return scoped_value_mark.
1569         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
1570         Add move constructor.
1571         * top.c (prepare_execute_command): Return scoped_value_mark.
1572         (execute_command): Update.
1573
1574 2017-10-19  Pedro Alves  <palves@redhat.com>
1575
1576         * xml-support.c (xml_fetch_content_from_file): Check fread's
1577         return.
1578
1579 2017-10-19  Pedro Alves  <palves@redhat.com>
1580
1581         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
1582         async.
1583         (handle_error_fd): New function.
1584         (ser_base_async): Add/delete an event loop file handler for
1585         error_fd.
1586
1587 2017-10-19  Pedro Alves  <palves@redhat.com>
1588
1589         * xml-support.c (xml_fetch_content_from_file): Don't read in
1590         chunks.  Instead use fseek to determine the file's size, and read
1591         it in one go.
1592
1593 2017-11-18  Keith Seitz  <keiths@redhat.com>
1594
1595         * c-exp.y (oper): Canonicalize conversion operators of user-defined
1596         types.
1597         Add whitespace to front of type name.
1598
1599 2017-10-18  Keith Seitz  <keiths@redhat.com>
1600
1601         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
1602         DW_AT_accessibility.
1603
1604 2017-10-18  Yao Qi  <yao.qi@linaro.org>
1605
1606         * features/tic6x-c62x-linux.c: Remove.
1607
1608 2017-10-17  Tom Tromey  <tom@tromey.com>
1609
1610         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
1611         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
1612         (do_mixed_source_and_assembly): Likewise.
1613
1614 2017-10-17  Tom Tromey  <tom@tromey.com>
1615
1616         * regcache.c (regcache::xfer_part): Remove assertion.
1617
1618 2017-10-17  Pedro Alves  <palves@redhat.com>
1619
1620         * xml-support.c (xml_fetch_content_from_file): Call
1621         unique_ptr::release() instead unique_ptr::get() when passing
1622         through xrealloc.
1623
1624 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1625
1626         * regcache.c (regcache::xfer_part): Remove parameters read and
1627         write, add parameter is_raw.  All callers are updated.
1628
1629 2017-10-16  Keith Seitz  <keiths@redhat.com>
1630
1631         * c-typeprint.c (enum access_specifier): Moved here from
1632         c_type_print_base.
1633         (output_access_specifier): New function.
1634         (c_type_print_base): Consider typedefs when assessing
1635         whether access labels are needed.
1636         Use output_access_specifier as needed.
1637         Output access specifier for typedefs, if needed.
1638         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
1639         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
1640         fields.
1641         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
1642         accessor macros.
1643
1644 2017-10-16  Tom Tromey  <tom@tromey.com>
1645
1646         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1647         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1648         * target.c (target_fileio_read_stralloc): Update.
1649         * sparc64-tdep.c (adi_is_addr_mapped): Update.
1650         * target.h (target_fileio_read_stralloc): Return
1651         unique_xmalloc_ptr.
1652
1653 2017-10-16  Tom Tromey  <tom@tromey.com>
1654
1655         * xml-syscall.c (xml_init_syscalls_info): Update.
1656         * xml-support.c (xinclude_start_include): Update.
1657         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1658         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1659         (xml_fetch_content_from_file): Likewise.
1660         * osdata.c (get_osdata): Update.
1661         * target.h (target_read_stralloc, target_get_osdata): Return
1662         unique_xmalloc_ptr.
1663         * solib-aix.c (solib_aix_get_library_list): Update.
1664         * solib-target.c (solib_target_current_sos): Update.
1665         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1666         * xml-tdesc.c (fetch_available_features_from_target): Update.
1667         (target_fetch_description_xml): Update.
1668         (file_read_description_xml): Update.
1669         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1670         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1671         (remote_pid_to_exec_file): Update.
1672         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1673         (target_get_osdata): Likewise.
1674
1675 2017-10-16  Tom Tromey  <tom@tromey.com>
1676
1677         * remote.c (remote_register_number_and_offset): Use std::vector.
1678         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1679         (putpkt_binary): Use gdb::def_vector.
1680         (compare_sections_command): Use gdb::byte_vector.
1681
1682 2017-10-16  Tom Tromey  <tom@tromey.com>
1683
1684         * ppc-linux-nat.c (hwdebug_insert_point): Use
1685         gdb::unique_xmalloc_ptr, XDUP.
1686
1687 2017-10-16  Tom Tromey  <tom@tromey.com>
1688
1689         * probe.c (parse_probes): Use std::string.
1690         (info_probes_for_ops, enable_probes_command)
1691         (disable_probes_command): Remove cleanups.
1692
1693 2017-10-16  Tom Tromey  <tom@tromey.com>
1694
1695         * buildsym.c (block_compar): Remove.
1696         (end_symtab_get_static_block): Use std::vector.
1697
1698 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
1699
1700         * memrange.h (struct mem_range): Define operator< and operator==.
1701         (mem_range_s): Remove.
1702         (DEF_VEC_O (mem_range_s)): Remove.
1703         (normalize_mem_ranges): Change parameter type to std::vector.
1704         * memrange.c (compare_mem_ranges): Remove.
1705         (normalize_mem_ranges): Change parameter type to std::vector,
1706         adjust to vector change.
1707         * exec.c (section_table_available_memory): Return vector, remove
1708         parameter.
1709         (section_table_read_available_memory): Adjust to std::vector
1710         change.
1711         * remote.c (remote_read_bytes): Adjust to std::vector
1712         change.
1713         * tracepoint.h (traceframe_available_memory): Change parameter
1714         type to std::vector.
1715         * tracepoint.c (traceframe_available_memory): Change parameter
1716         type to std::vector, adjust.
1717         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1718         std::vector change.
1719         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1720         unittests/memrange-selftests.c.
1721         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1722         * gdb/unittests/memrange-selftests.c: New file.
1723
1724 2017-10-16  Pedro Alves  <palves@redhat.com>
1725
1726         * elfread.c (probe_key_free): Rename range-for variable.
1727         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1728         (find_probe_by_pc, collect_probes): Rename range-for variable.
1729
1730 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1731
1732         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1733         * features/tic6x-c62x.c: Remove.
1734         * features/tic6x-c64x-linux.c: Remove.
1735         * features/tic6x-c64x.c: Remove.
1736         * features/tic6x-c64xp-linux.c: Remove.
1737         * features/tic6x-c64xp.c: Remove.
1738         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1739         initialize_tdesc_tic6x_*_linux functions.
1740         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1741         initialize_tdesc_tic6x_* functions.
1742
1743 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1744
1745         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1746         tic6x-c62x.
1747         * regformats/tic6x-c62x.dat: Remove.
1748         * regformats/tic6x-c64x.dat: Remove.
1749         * regformats/tic6x-c64xp.dat: Remove.
1750
1751 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1752
1753         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1754         (the !HAVE_LIBEXPAT version).
1755
1756 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1757
1758         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1759         const.
1760
1761 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1762
1763         * target.h: Include tracepoint.h.
1764         (enum trace_find_type): Move to tracepoint.h.
1765         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1766         * tracepoint.h: Don't include target.h
1767         (enum trace_find_type): Move from target.h.
1768         (parse_traceframe_info): Return a unique ptr.
1769         * tracepoint.c (current_traceframe_info): Change type to unique
1770         ptr.
1771         (free_traceframe_info): Remove.
1772         (clear_traceframe_info): Don't manually free
1773         current_traceframe_info.
1774         (free_result): Remove.
1775         (parse_traceframe_info): Return a unique ptr.
1776         (get_traceframe_info): Adjust to unique ptr.
1777         * ctf.c (ctf_traceframe_info): Return a unique ptr.
1778         * remote.c (remote_traceframe_info): Return a unique ptr.
1779         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1780         ptr.
1781         * target-debug.h (target_debug_print_traceframe_info_up): New
1782         macro.
1783         * target-delegates.c: Regenerate.
1784
1785 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1786
1787         * memrange.h (struct mem_range): Add constructors.
1788         * tracepoint.h (struct traceframe_info) <memory>: Change type to
1789         std::vector<mem_range>.
1790         * tracepoint.c (free_traceframe_info): Don't manually free
1791         vector.
1792         (traceframe_info_start_memory): Adjust to vector change.
1793         (traceframe_available_memory): Likewise.
1794         * tracefile-tfile.c (build_traceframe_info): Likewise.
1795         * ctf.c (ctf_traceframe_info): Likewise.
1796
1797 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1798
1799         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1800         std::vector<int>.
1801         * tracepoint.c (free_traceframe_info): Deallocate with delete.
1802         (traceframe_info_start_tvar): Adjust to vector change.
1803         (parse_traceframe_info): Allocate with new.
1804         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1805         vector change.
1806         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1807         change.
1808         tfile_traceframe_info): Allocate with new.
1809         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1810         change.
1811
1812 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1813
1814         * tracepoint.c (traceframe_info): Rename to...
1815         (current_traceframe_info): ...this.
1816         (clear_traceframe_info): Adjust.
1817         (get_traceframe_info): Adjust.
1818
1819 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1820
1821         * nat/linux-osdata.c: Include algorithm.
1822         (compare_processes): Remove.
1823         (struct pid_pgid_entry): New struct.
1824         (linux_xfer_osdata_processgroups): Use std::vector instead of
1825         XNEWVEC.
1826
1827 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1828
1829         * objfiles.h: Don't include symfile.h.
1830         (struct partial_symbol): Remove forward-declaration.
1831         (struct objfile) <global_psymbols, static_psymbols>: Change type
1832         to std::vector<partial_symbol *>.
1833         * objfiles.c (objfile::objfile): Don't memset those fields.
1834         (objfile::~objfile): Don't free those fields.
1835         * psympriv.h (struct psymbol_allocation_list): Remove
1836         forward-declaration.
1837         (add_psymbol_to_list): Change psymbol_allocation_list parameter
1838         to std::vector.
1839         (start_psymtab_common): Change parameters to std::vector.
1840         * psymtab.c: Include algorithm.
1841         (require_partial_symbols): Call shrink_to_fit.
1842         (find_pc_sect_psymbol): Adjust to vector change.
1843         (match_partial_symbol): Likewise.
1844         (lookup_partial_symbol): Likewise.
1845         (psym_relocate): Likewise.
1846         (dump_psymtab): Likewise.
1847         (recursively_search_psymtabs): Likewise.
1848         (compare_psymbols): Remove.
1849         (sort_pst_symbols): Adjust to vector change.
1850         (start_psymtab_common): Likewise.
1851         (end_psymtab_common): Likewise.
1852         (psymbol_bcache_full): De-constify return value.
1853         (add_psymbol_to_bcache): Likewise.
1854         (extend_psymbol_list): Remove.
1855         (append_psymbol_to_list): Adjust to vector change.
1856         (add_psymbol_to_list): Likewise.
1857         (init_psymbol_list): Likewise.
1858         (maintenance_info_psymtabs): Likewise.
1859         (maintenance_check_psymtabs): Likewise.
1860         * symfile.h (struct psymbol_allocation_list): Remove.
1861         * symfile.c (reread_symbols): Adjust to vector change.
1862         * dbxread.c (start_psymtab): Change type of parameters.
1863         (dbx_symfile_read): Adjust to vector change.
1864         (read_dbx_symtab): Likewise.
1865         (start_psymtab): Change type of parameters.
1866         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1867         (create_partial_symtab): Likewise.
1868         (add_partial_symbol): Likewise.
1869         (write_one_signatured_type): Likewise.
1870         (recursively_write_psymbols): Likewise.
1871         * mdebugread.c (parse_partial_symbols): Likewise.
1872         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1873         (scan_xcoff_symtab): Adjust to vector change.
1874         (xcoff_initial_scan): Likewise.
1875
1876 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
1877
1878         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1879
1880 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1881
1882         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1883         Remove s390x-*-expedite, add s390x-expedite.
1884
1885 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1886
1887         * features/s390-gs-linux64.c: Regenerated.
1888         * features/s390x-gs-linux64.c: Regenerated.
1889
1890 2017-10-13  Tom Tromey  <tom@tromey.com>
1891
1892         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1893         * solib.c (update_solib_list, reload_shared_libraries_1): Use
1894         delete.
1895         * symfile.c (symbol_file_add_with_addrs): Use new.
1896         (symbol_file_add_separate): Update comment.
1897         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1898         * jit.c (jit_object_close_impl): Use new.
1899         (jit_unregister_code): Use delete.
1900         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1901         (~objfile): Rename from free_objfile.
1902         (free_objfile_separate_debug, do_free_objfile_cleanup)
1903         (free_all_objfiles, objfile_purge_solibs): Use delete.
1904         * objfiles.h (struct objfile): Add constructor and destructor.
1905         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
1906         (allocate_objfile, free_objfile): Don't declare.
1907         (struct objstats): Add initializers.
1908
1909 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1910
1911         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1912         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1913         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1914         * gdbarch.h: Regenerate.
1915         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1916         Adjust comment.
1917         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1918         (i386_displaced_step_fixup): Adjust comment.
1919         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1920
1921 2017-10-12  Tom Tromey  <tom@tromey.com>
1922
1923         * prologue-value.h (pv_area::store_would_trash): Return bool.
1924         (pv_area::find_reg): Likewise.
1925         * prologue-value.c (pv_area::store_would_trash): Return bool.
1926         (pv_area::find_reg): Likewise.
1927
1928 2017-10-12  Tom Tromey  <tom@tromey.com>
1929
1930         * s390-linux-tdep.c (s390_store, s390_load)
1931         (s390_check_for_saved, s390_analyze_prologue): Update.
1932         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1933         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1934         * prologue-value.h (class pv_area): Move from prologue-value.c.
1935         Change names of members.  Add constructor, destructor, member
1936         functions.
1937         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1938         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1939         (pv_area_fetch, pv_area_scan): Don't declare.
1940         * prologue-value.c (struct pv_area::area_entry): Now member of
1941         pv_area.
1942         (struct pv_area): Move to prologue-value.h.
1943         (pv_area::pv_area): Rename from make_pv_area.
1944         (pv_area::~pv_area): Rename from free_pv_area.
1945         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1946         (clear_entries, find_entry, overlaps, store_would_trash, store)
1947         (fetch, find_reg, scan): Now member of pv_area.
1948         Remove "area" argument.  Update.
1949         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1950         Update.
1951         * mn10300-tdep.c (push_reg, check_for_saved)
1952         (mn10300_analyze_prologue): Update.
1953         * mep-tdep.c (is_arg_spill, check_for_saved)
1954         (mep_analyze_prologue): Update.
1955         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1956         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1957         (m32c_is_struct_return, m32c_analyze_prologue): Update.
1958         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1959         Update.
1960         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1961         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1962
1963 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1964
1965         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1966         * linux-nat.c (linux_nat_delete_thread): New variable.
1967         (lwp_free): Invoke linux_nat_delete_thread if set.
1968         (linux_nat_set_delete_thread): New function.
1969         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1970         thread delete callback.
1971         * arm-linux-nat.c (arm_linux_delete_thread): New function.
1972         (_initialize_arm_linux_nat): Assign thread delete callback.
1973         * s390-linux-nat.c (s390_delete_thread): New function.
1974         (_initialize_s390_nat): Assign thread delete callback.
1975         * x86-linux-nat.c (x86_linux_add_target): Likewise.
1976         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1977         function.
1978         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1979         declaration.
1980         * nat/x86-linux.c (x86_linux_delete_thread): New function.
1981         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1982
1983 2017-10-09  Tom Tromey  <tom@tromey.com>
1984
1985         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1986         std::string.
1987         * tui/tui-layout.c (enum tui_status): Use std::string.
1988
1989 2017-10-11  Tom Tromey  <tom@tromey.com>
1990
1991         * gdbthread.h (thread_command): Constify.
1992         * inferior.h (detach_command): Constify.
1993         * top.h (set_history, show_history): Constify.
1994         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1995         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1996         * bsd-kvm.c (bsd_kvm_cmd): Constify.
1997         * printcmd.c (set_command): Constify.
1998         (non_const_set_command): New function.
1999         * dcache.c (set_dcache_command, show_dcache_command): Constify.
2000         * breakpoint.c (enable_command, disable_command, delete_command)
2001         (catch_command, tcatch_command, set_breakpoint_cmd)
2002         (show_breakpoint_cmd): Constify.
2003         * macrocmd.c (macro_command): Constify.
2004         * infcmd.c (unset_command, kill_command, detach_command)
2005         (info_proc_cmd): Constify.
2006         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
2007         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
2008         (info_auto_load_cmd): Constify.
2009         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
2010         (unset_tdesc_cmd): Constify.
2011         * ada-lang.c (set_ada_command, show_ada_command)
2012         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
2013         * guile/guile.c (set_guile_command, show_guile_command)
2014         (info_guile_command): Constify.
2015         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
2016         Constify.
2017         * skip.c (skip_command): Constify.
2018         * compile/compile.c (_initialize_compile): Constify.
2019         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
2020         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
2021         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
2022         (maint_btrace_pt_show_cmd): Constify.
2023         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
2024         Constify.
2025         * python/python.c (user_show_python, user_set_python): Constify.
2026         * mips-tdep.c (set_mips_command, show_mips_command)
2027         (set_mipsfpu_command): Constify.
2028         * record-btrace.c (cmd_record_btrace_start)
2029         (cmd_set_record_btrace, cmd_show_record_btrace)
2030         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
2031         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
2032         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
2033         Constify.
2034         * symfile.c (overlay_command): Constify.
2035         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2036         * cli/cli-logging.c (set_logging_command, show_logging_command):
2037         Constify.
2038         * cli/cli-dump.c (dump_command, append_command)
2039         (srec_dump_command, ihex_dump_command, verilog_dump_command)
2040         (tekhex_dump_command, binary_dump_command)
2041         (binary_append_command): Constify.
2042         * cli/cli-decode.c (struct cmd_list_element): Change type of
2043         "fun".
2044         * cli/cli-cmds.c (info_command, show_command, set_debug)
2045         (show_debug): Constify.
2046         (show_command): Add non-const overload.
2047         * top.c (set_history, show_history): Constify.
2048         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2049         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2050         * target.c (target_command): Constify.
2051         * sparc64-tdep.c (info_adi_command): Constify.
2052         * record-full.c (cmd_record_full_start): Constify.
2053         (set_record_full_command): Constify.  Fix typo.
2054         (show_record_full_command): Constify.
2055         * thread.c (thread_command, thread_apply_command): Constify.
2056         * memattr.c (dummy_cmd): Constify.
2057         * value.c (function_command): Constify.
2058         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2059         * probe.c (info_probes_command): Constify.
2060         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2061         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2062         (show_thread_cmd, set_thread_default_cmd)
2063         (show_thread_default_cmd): Constify.
2064         (check_empty): Constify.
2065         * tracepoint.c (tfind_command): Constify.
2066         * cp-support.c (maint_cplus_command): Constify.
2067         * windows-tdep.c (info_w32_command): Constify.
2068         * record.c (cmd_record_start, set_record_command)
2069         (show_record_command, info_record_command, cmd_record_goto):
2070         Constify.
2071         * ravenscar-thread.c (set_ravenscar_command)
2072         (show_ravenscar_command): Constify.
2073         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2074         Constify.
2075         (add_internal_problem_command): Remove casts.
2076         * arc-tdep.c (maintenance_print_arc_command): Constify.
2077         * valprint.c (set_print, show_print, set_print_raw)
2078         (show_print_raw): Constify.
2079         * maint.c (maintenance_command, maintenance_info_command)
2080         (maintenance_print_command, maintenance_set_cmd)
2081         (maintenance_show_cmd, set_per_command_cmd)
2082         (show_per_command_cmd, maintenance_check_command): Constify.
2083         * language.c (set_check, show_check): Constify.
2084         * typeprint.c (show_print_type, set_print_type): Constify.
2085         * go32-nat.c (go32_info_dos_command): Constify.
2086
2087 2017-10-11  Tom Tromey  <tom@tromey.com>
2088
2089         * breakpoint.c (prepare_re_set_context): Remove.
2090         (breakpoint_re_set_one): Update.  Don't use cleanups.
2091         (breakpoint_re_set): Use scoped_restore, std::string, and
2092         scoped_restore_current_language.
2093
2094 2017-10-11  Tom Tromey  <tom@tromey.com>
2095
2096         * breakpoint.c (commands_command_1): Use std::string.
2097         (cleanup_executing_breakpoints): Remove.
2098         (bpstat_do_actions_1): Use scoped_restore.
2099         (bpstat_check_watchpoint): Use std::string.
2100         (decode_static_tracepoint_spec): Likewise.
2101         (break_range_command): Likewise.
2102         (watch_command_1): Likewise.
2103         (compare_breakpoints): Change argument types.
2104         (clear_command): Use std::vector.
2105         (cleanup_executing_breakpoints): Remove.
2106         (update_global_location_list): Use unique_xmalloc_ptr.
2107         (strace_command): Remove unused declaration.
2108
2109 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2110
2111         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2112         * NEWS: Mention new FreeBSD/arm native configuration.
2113         * configure.host: Add arm*-*-freebsd*.
2114         * configure.nat: Likewise.
2115         * arm-fbsd-nat.c: New file.
2116
2117 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2118
2119         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2120         (ALLDEPFILES): Add arm-fbsd-tdep.c.
2121         * NEWS: Mention new FreeBSD/arm target.
2122         * configure.tgt: Add arm*-*-freebsd*.
2123         * arm-fbsd-tdep.c: New file.
2124         * arm-fbsd-tdep.h: New file.
2125
2126 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2127
2128         * linux-tdep.c (linux_make_corefile_notes): Remove call to
2129         `gdbarch_elfcore_write_linux_prpsinfo'.
2130         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2131         method.
2132         (elf_internal_linux_prpsinfo): Remove declaration.
2133         * gdbarch.h: Regenerate.
2134         * gdbarch.c: Regenerate.
2135
2136 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2137
2138         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2139         `set_gdbarch_elfcore_write_linux_prpsinfo'.
2140
2141 2017-10-11  Pedro Alves  <palves@redhat.com>
2142
2143         * breakpoint.c (reattach_breakpoints): Delete.
2144         * breakpoint.h (reattach_breakpoints): Delete.
2145
2146 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
2147
2148         * symfile.c (registered_sym_fns): Make struct, not typedef.
2149         (DEF_VEC_O (registered_sym_fns)): Remove.
2150         (symtab_fns): Change type to std::vector.
2151         (add_symtab_fns): Adjust.
2152         (find_sym_fns): Adjust.
2153
2154 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
2155
2156         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
2157         * arc-tdep.h (arc_arch_is_em): New function.
2158         (arc_arch_is_hs): Likewise.
2159
2160 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
2161
2162         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
2163         parentheses in the declaration.
2164         (macro_lookup_inclusion): Likewise.
2165         (macro_lookup_definition): Likewise.
2166         * p-lang.h (pascal_builtin_types): Likewise.
2167         * tui/tui-data.c (tui_win_list): Likewise.
2168         * tui/tui-data.h (tui_win_list): Likewise.
2169         * utils.h (make_cleanup_free_section_addr_info): Likewise.
2170
2171 2017-10-11  Mark Rages  <markrages@gmail.com>
2172
2173         * target-memory.c (block_boundaries): Fix for block address not
2174         aligned on block size.
2175
2176 2017-10-10  Pedro Alves <palves@redhat.com>
2177             Tom Tromey  <tom@tromey.com>
2178
2179         * breakpoint.c (struct captured_breakpoint_query_args)
2180         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
2181         (print_breakpoint): New.
2182         * breakpoint.h (print_breakpoint): Declare.
2183         * common/common-exceptions.h (enum return_reason): Remove
2184         references to catch_exceptions.
2185         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
2186         Delete.
2187         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
2188         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
2189         * gdb.h: Delete.
2190         * gdbthread.h (thread_select): Declare.
2191         * mi/mi-cmd-break.c: Don't include gdb.h.
2192         (breakpoint_notify): Use print_breakpoint.
2193         * mi/mi-cmd-catch.c: Don't include gdb.h.
2194         * mi/mi-interp.c: Don't include gdb.h.
2195         (mi_print_breakpoint_for_event): New.
2196         (mi_breakpoint_created, mi_breakpoint_modified): Use
2197         mi_print_breakpoint_for_event.
2198         * mi/mi-main.c: Don't include gdb.h.
2199         (mi_cmd_thread_select): Parse the global thread ID here.  Use
2200         thread_select instead of gdb_thread_select.
2201         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
2202         of using gdb_list_thread_ids.
2203         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
2204         FILEIO_ENOSYS here.
2205         (remote_fileio_request): Use TRY/CATCH instead of
2206         catch_exceptions.
2207         * symfile-mem.c (struct symbol_file_add_from_memory_args)
2208         (symbol_file_add_from_memory_wrapper): Delete.
2209         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
2210         * thread.c: Don't include gdb.h.
2211         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
2212         (thread_alive): Use thread_select.
2213         (do_captured_thread_select): Delete, parts salvaged as ...
2214         (thread_select): ... this new function.
2215         (gdb_thread_select): Delete.
2216
2217 2017-10-10  Pedro Alves  <palves@redhat.com>
2218             Tom Tromey  <tom@tromey.com>
2219
2220         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
2221         and reverse logic.
2222         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
2223         No longer macros.  Instead ...
2224         (enum wp_check_result): They're now values of this new
2225         enumeration.
2226         (watchpoint_check): Change return type to wp_check_result and
2227         parameter type to bpstat.
2228         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
2229         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
2230         catch_errors.  Reverse logic of watchpoint_check call.
2231         (breakpoint_re_set_one): Now returns void and takes a breakpoint
2232         pointer as parameter.
2233         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
2234         * common/common-exceptions.c (throw_exception_sjlj): Update
2235         comments to avoid mentioning catch_errors.
2236         * exceptions.c (catch_errors): Delete.
2237         * exceptions.h: Update comments to avoid mentioning catch_errors.
2238         (catch_errors_ftype, catch_errors): Delete.
2239         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
2240         (hook_stop_stub): Delete.
2241         (restore_selected_frame): Change return type to void, and
2242         parameter type to const frame_id &.
2243         (restore_infcall_control_state): Use TRY/CATCH instead of
2244         catch_errors.
2245         * main.c (captured_command_loop): Return void and remove
2246         parameter.  Remove references to catch_errors.
2247         (captured_main): Use TRY/CATCH instead of catch_errors.
2248         * objc-lang.c (objc_submethod_helper_data)
2249         (find_objc_msgcall_submethod_helper): Delete.
2250         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
2251         catch_errors.
2252         * record-full.c (record_full_message): Return void.
2253         (record_full_message_args, record_full_message_wrapper): Delete.
2254         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
2255         instead of catch_errors.
2256         * solib-aix.c (solib_aix_open_symbol_file_object): Change
2257         parameter type to int.
2258         * solib-darwin.c (open_symbol_file_object): Ditto.
2259         * solib-dsbt.c (open_symbol_file_object): Ditto.
2260         * solib-frv.c (open_symbol_file_object): Ditto.
2261         * solib-svr4.c (open_symbol_file_object): Ditto.
2262         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
2263         * solib.c (update_solib_list): Use TRY/CATCH instead of
2264         catch_errors.
2265         * solist.h (struct target_so_ops) <open_symbol_file_object>:
2266         Change type.
2267         * symmisc.c (struct print_symbol_args): Remove.
2268         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
2269         (print_symbol): Change type.
2270         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
2271         and remove parameters.
2272         (catch_errors): New.
2273         (get_windows_debug_event): Adjust.
2274
2275 2017-10-09  Tom Tromey  <tom@tromey.com>
2276
2277         * mi/mi-main.c (free_splay_tree): Remove.
2278         (list_available_thread_groups): Use splay_tree_up.
2279         * common/gdb_splay_tree.h: New file.
2280
2281 2017-10-09  Tom Tromey  <tom@tromey.com>
2282
2283         * mi/mi-main.c (do_nothing): Remove.
2284         (list_available_thread_groups): Update.
2285
2286 2017-10-09  Pedro Alves  <palves@redhat.com>
2287
2288         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
2289         reading registers when switching context.
2290
2291 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
2292
2293         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
2294         (fbsd_convert_siginfo): Likewise.
2295         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
2296
2297 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
2298
2299         * configure.ac (try_guile_versions): Remove guile-2.2.
2300         * configure: Regenerate.
2301
2302 2017-10-09  Tom Tromey  <tom@tromey.com>
2303
2304         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
2305         (COMPILE.pre): Use $(CXX).
2306
2307 2017-10-09  Pedro Alves  <palves@redhat.com>
2308
2309         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
2310         Use bool.
2311         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2312         * cp-support.h (cp_remove_params): Now returns a
2313         gdb::unique_xmalloc_ptr.
2314         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
2315         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
2316         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
2317         returning a gdb::unique_xmalloc_ptr.
2318         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2319         * stack.c (find_frame_funname): Adjust to cp_remove_params
2320         returning a gdb::unique_xmalloc_ptr.
2321
2322 2017-10-08  Tom Tromey  <tom@tromey.com>
2323
2324         * dwarf2read.c (dwarf2_get_dwz_file): Use
2325         gdb::unique_xmalloc_ptr.
2326         (find_slot_in_mapped_hash): Likewise.
2327         (dwarf2_physname): Likewise.
2328         (create_dwo_unit_in_dwp_v1): Use std::string.
2329         (create_dwo_unit_in_dwp_v2): Likewise.
2330         (lookup_dwo_cutu): Likewise.
2331         (inherit_abstract_dies): Use std::vector.
2332         (read_array_type): Likewise.
2333         (dwarf_decode_macros): Remove unused declaration.
2334         (unsigned_int_compar): Remove.
2335         (dwarf2_build_psymtabs_hard): Use scoped_restore.
2336         (psymtabs_addrmap_cleanup): Remove.
2337
2338 2017-10-08  Tom Tromey  <tom@tromey.com>
2339
2340         * frame-unwind.c (frame_unwind_try_unwinder): Update.
2341         * frame.h (frame_cleanup_after_sniffer): Declare.
2342         (frame_prepare_for_sniffer): Return void.
2343         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
2344         type of argument.
2345         (frame_prepare_for_sniffer): Return void.
2346
2347 2017-10-08  Tom Tromey  <tom@tromey.com>
2348
2349         * utils.h (make_cleanup_value_free): Remove.
2350         * utils.c (do_value_free, struct cleanup): Remove.
2351         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
2352         Use gdb_value_up.
2353         * value.h (struct value_deleter): New.
2354         (gdb_value_up): New typedef.
2355
2356 2017-10-08  Tom Tromey  <tom@tromey.com>
2357
2358         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
2359         (make_cleanup_free_search_symbols): Remove.
2360         (search_symbols): Return std::vector.
2361         (symbol_search::compare_search_syms): Now member of
2362         symbol_search.  Change arguments.
2363         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
2364         (symtab_symbol_info, rbreak_command): Update.
2365         * symtab.h (struct symbol_search) <next>: Remove.
2366         Add constructors.
2367         (symbol_search::operator<): New function.
2368         (symbol_search::operator==): New function.
2369         (search_symbols): Remove std::vector.
2370         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
2371         (symbol_search::compare_search_syms): Declare.
2372
2373 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2374
2375         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
2376         arch/aarch64-insn.o.
2377         Remove one rule.
2378         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
2379
2380 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2381
2382         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
2383         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
2384         arch/arm-linux.o respectively.
2385         * configure.tgt: Likewise.
2386
2387 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2388
2389         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
2390         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
2391
2392 2017-10-06  Pedro Alves  <palves@redhat.com>
2393
2394         * windows-nat.c: Include <algorithm>.
2395
2396 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2397
2398         * configure.tgt (i386_tobjs): New variable.
2399         (amd64_tobjs): New variable.
2400         Set $cpu_obs and $os_obs.
2401
2402 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2403
2404         * Makefile.in (CONFIG_SRC_SUBDIR): New.
2405         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
2406         (clean): Remove object files and dependency files.
2407         (distclean): Remove the directory.
2408         * configure.ac: Invoke AC_CONFIG_COMMANDS.
2409         * configure: Re-generated.
2410         * configure.tgt: Replace amd64.o with arch/amd64.o.
2411
2412 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
2413
2414         PR build/22188
2415         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
2416         and SETEND.
2417
2418 2017-10-05  Pedro Alves  <palves@redhat.com>
2419
2420         * linux-nat.c (linux_child_follow_fork): When following the parent
2421         and detaching the child, consult the parent thread's architecture
2422         instead of the child's.
2423
2424 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2425
2426         * ax.h: Do not include "doublest.h".
2427         (union agent_val): Remove.
2428
2429 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2430
2431         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
2432         (decimal_to_string): Return std::string object.
2433         (decimal_from_string): Accept std::string object.  Return bool.
2434         (decimal_from_integral, decimal_from_doublest): Remove.
2435         (decimal_from_longest): Add prototype.
2436         (decimal_from_ulongest): Likewise.
2437         (decimal_to_longest): Likewise.
2438         (decimal_from_doublest): Likewise.
2439         * dfp.c: Do not include "gdbtypes.h" or "value.h".
2440         (MAX_DECIMAL_STRING): Move here.
2441         (decimal_to_string): Return std::string object.
2442         (decimal_from_string): Accept std::string object.  Return bool.
2443         (decimal_from_integral): Remove, replace by ...
2444         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
2445         (decimal_to_longest): New function.
2446         (decimal_from_floating): Remove, replace by ...
2447         (decimal_from_doublest): ... this new function.
2448         (decimal_to_doublest): Update to new decimal_to_string interface.
2449
2450         * value.c (unpack_long): Use decimal_to_longest.
2451         * valops.c (value_cast): Use decimal_from_doublest instead of
2452         decimal_from_floating.  Use decimal_from_[u]longest isntead of
2453         decimal_from_integral.
2454         * valarith.c (value_args_as_decimal): Likewise.
2455         * valprint.c (print_decimal_floating): Update to new
2456         decimal_to_string interface.
2457         * printcmd.c (printf_decfloat): Likewise.
2458         * c-exp.y (parse_number): Update to new decimal_from_string interface.
2459
2460 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2461
2462         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
2463         * gdbtypes.c: Include "floatformat.h".
2464         * value.c: Likewise.
2465         * m68k-tdep.c: Likewise.
2466
2467         * findvar.c: Do not include "floatformat.h".
2468         * amd64-darwin-tdep.c: Likewise.
2469         * arm-linux-tdep.c: Likewise.
2470         * i386-darwin-tdep.c: Likewise.
2471         * i387-tdep.c: Likewise.
2472         * m68k-linux-tdep.c: Likewise.
2473         * mep-tdep.c: Likewise.
2474         * mips-tdep.c: Likewise.
2475         * nios2-tdep.c: Likewise.
2476         * s390-linux-tdep.c: Likewise.
2477         * sparc-obsd-tdep.c: Likewise.
2478         * sparc-tdep.c: Likewise.
2479         * sparc64-tdep.c: Likewise.
2480         * spu-tdep.c: Likewise.
2481         * tic6x-tdep.c: Likewise.
2482         * tilegx-tdep.c: Likewise.
2483         * vax-tdep.c: Likewise.
2484         * xstormy16-tdep.c: Likewise.
2485         * xtensa-tdep.c: Likewise.
2486
2487         * top.c: Do not include "doublest.h".
2488         * aarch64-tdep.c: Likewise.
2489         * alpha-tdep.c: Likewise.
2490         * arm-linux-tdep.c: Likewise.
2491         * m68k-linux-tdep.c: Likewise.
2492         * tilegx-tdep.c: Likewise.
2493         * xstormy16-tdep.c: Likewise.
2494
2495 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2496
2497         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
2498         (mipsn32_fbsd_sigframe): Define.
2499         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
2500         for FreeBSD/mipsn32.
2501
2502 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2503
2504         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
2505         AT_HWCAP.
2506
2507 2017-10-05  Tristan Gingold  <tgingold@free.fr>
2508
2509         * MAINTAINERS (Misc): Update my email address.
2510
2511 2017-10-04  Pedro Alves  <palves@redhat.com>
2512
2513         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
2514         it instead of target_gdbarch.
2515         (get_remote_state, get_remote_packet_size): Adjust
2516         get_remote_arch_state calls, passing down target_gdbarch
2517         explicitly.
2518         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
2519         'gdbarch' and use it instead of target_gdbarch.
2520         (get_memory_packet_size): Adjust get_remote_arch_state calls,
2521         passing down target_gdbarch explicitly.
2522         (struct stop_reply) <arch>: New field.
2523         (remote_parse_stop_reply): Use the stopped thread's architecture,
2524         not the current inferior's.  Save the architecture in the
2525         stop_reply.
2526         (process_stop_reply): Use the stop reply's architecture.
2527         (process_g_packet, remote_fetch_registers)
2528         (remote_prepare_to_store, store_registers_using_G)
2529         (remote_store_registers): Adjust get_remote_arch_state calls,
2530         using the regcache's architecture.
2531         (remote_get_trace_status): Adjust get_remote_arch_state calls,
2532         passing down target_gdbarch explicitly.
2533         * spu-multiarch.c (spu_thread_architecture): Defer to the target
2534         beneath instead of calling target_gdbarch.
2535         * target.c (default_thread_architecture): Use the specified
2536         inferior's architecture, instead of the current inferior's
2537         architecture (via target_gdbarch).
2538
2539 2017-10-04  Pedro Alves  <palves@redhat.com>
2540
2541         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
2542         case.
2543         (regcache_print): Handle !target_has_registers here instead.
2544
2545 2017-10-04  Pedro Alves  <palves@redhat.com>
2546
2547         * frame.c (create_test_frame): Delete.
2548         * frame.h (create_test_frame): Delete.
2549         * gdbarch-selftests.c: Include gdbthread.h and target.h.
2550         (class regcache_test): Delete.
2551         (test_target_has_registers, test_target_has_stack)
2552         (test_target_has_memory, test_target_prepare_to_store)
2553         (test_target_store_registers): New functions.
2554         (test_target_ops): New class.
2555         (register_to_value_test): Error out if there's already a
2556         process_stratum (or higher) target pushed.  Create a fuller mock
2557         environment, with mock target_ops, inferior, address space, thread
2558         and inferior_ptid.
2559         * progspace.c (struct address_space): Move to ...
2560         * progspace.h (struct address_space): ... here.
2561         * regcache.h (regcache::~regcache, regcache::raw_write)
2562         [GDB_SELF_TEST]: No longer virtual.
2563
2564 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2565
2566         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
2567
2568 2017-10-04  Pedro Alves  <palves@redhat.com>
2569
2570         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
2571         out of 'between TRY and CATCH'.
2572
2573 2017-10-04  Pedro Alves  <palves@redhat.com>
2574
2575         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
2576         * common/common-exceptions.h (TRY): Open an outermost scope.
2577         Expand intro comment.
2578         (CATCH): Reindent.
2579         (END_CATCH): Close the outermost scope.
2580         * completer.c (complete_line_internal): Add missing END_CATCH.
2581
2582 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2583
2584         * NEWS (Changes since GDB 8.0): Add entry about new
2585         'set-cwd-on-gdbserver' feature.
2586         (New remote packets): Add entry for QSetWorkingDir.
2587         * common/common-inferior.h (set_inferior_cwd): New prototype.
2588         * infcmd.c (set_inferior_cwd): Remove "static".
2589         (show_cwd_command): Expand text to include remote debugging.
2590         * remote.c: Add PACKET_QSetWorkingDir.
2591         (remote_protocol_features) <QSetWorkingDir>: New entry for
2592         PACKET_QSetWorkingDir.
2593         (extended_remote_set_inferior_cwd): New function.
2594         (extended_remote_create_inferior): Call
2595         "extended_remote_set_inferior_cwd".
2596         (_initialize_remote): Call "add_packet_config_cmd" for
2597         QSetWorkingDir.
2598
2599 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2600
2601         * NEWS (New commands): Mention "set/show cwd".
2602         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
2603         "cd" command's help text.
2604         * common/common-inferior.h (get_inferior_cwd): New prototype.
2605         * infcmd.c (inferior_cwd_scratch): New global variable.
2606         (set_inferior_cwd): New function.
2607         (get_inferior_cwd): Likewise.
2608         (set_cwd_command): Likewise.
2609         (show_cwd_command): Likewise.
2610         (_initialize_infcmd): Add "set/show cwd" commands.
2611         * inferior.h (class inferior) <cwd>: New field.
2612         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
2613         (fork_inferior): Change inferior's cwd before its execution.
2614         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
2615         to CreateProcess.
2616
2617 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2618
2619         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
2620         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
2621         (COMMON_OBS): Add gdb_tilde_expand.o.
2622         * common/gdb_tilde_expand.c: New file.
2623         * common/gdb_tilde_expand.h: Likewise.
2624
2625 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
2626
2627         * gdbarch.sh (objfile): Remove duplicate declaration.
2628         * gdbarch.h: Regenerate.
2629
2630 2017-10-03  Tom Tromey  <tom@tromey.com>
2631
2632         * utils.c (internal_vproblem): Use string_vprintf.
2633
2634 2017-10-03  Tom Tromey  <tom@tromey.com>
2635
2636         * printcmd.c (info_symbol_command): Use std::string.
2637
2638 2017-10-03  Tom Tromey  <tom@tromey.com>
2639
2640         * top.c (gdb_safe_append_history): Use std::string.
2641
2642 2017-10-03  Tom Tromey  <tom@tromey.com>
2643
2644         * event-top.c (stdin_event_handler): Update.
2645         * main.c (captured_main_1): Update.
2646         * top.h (make_delete_ui_cleanup): Remove.
2647         (struct ui): Add constructor and destructor.
2648         (new_ui, delete_ui): Remove.
2649         * top.c (make_delete_ui_cleanup): Remove.
2650         (new_ui_command): Use std::unique_ptr.
2651         (delete_ui_cleanup): Remove.
2652         (ui::ui): Rename from new_ui.  Update.
2653         (free_ui): Remove.
2654         (ui::~ui): Rename from delete_ui.  Update.
2655
2656 2017-10-03  Tom Tromey  <tom@tromey.com>
2657
2658         * symfile.c (load_progress): Use gdb::byte_vector.
2659
2660 2017-10-03  Tom Tromey  <tom@tromey.com>
2661
2662         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2663         declaration.
2664         * printcmd.c (x_command): Remove unused declaration.
2665         * symfile.c (symbol_file_command): Remove unused declaration.
2666
2667 2017-10-03  Tom Tromey  <tom@tromey.com>
2668
2669         * utils.c (internal_vproblem): Use std::string.
2670         (defaulted_query): Likewise.
2671
2672 2017-10-03  Tom Tromey  <tom@tromey.com>
2673
2674         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2675         * top.c (execute_command_to_string): Update.
2676         * utils.c (make_cleanup_restore_page_info): Remove.
2677         (do_restore_page_info_cleanup): Remove.
2678         (set_batch_flag_and_restore_page_info):
2679         New.
2680         (make_cleanup_restore_page_info): Remove.
2681         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2682         (~set_batch_flag_and_restore_page_info): New
2683         (make_cleanup_restore_uinteger): Remove.
2684         (make_cleanup_restore_integer): Remove.
2685         (struct restore_integer_closure): Remove.
2686         (restore_integer): Remove.
2687         * utils.h (struct set_batch_flag_and_restore_page_info): New
2688         class.
2689         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2690         (make_cleanup_restore_page_info): Remove.
2691         (make_cleanup_restore_uinteger) Remove.
2692         (make_cleanup_restore_integer) Remove.
2693
2694 2017-10-03  Tom Tromey  <tom@tromey.com>
2695
2696         * record-full.h (record_full_gdb_operation_disable_set): Return
2697         scoped_restore_tmpl<int>.
2698         * infrun.c (adjust_pc_after_break): Update.
2699         (handle_signal_stop): Update.
2700         * record-full.c (record_full_gdb_operation_disable_set): Return
2701         scoped_restore_tmpl<int>.
2702         (record_full_wait_1, record_full_insert_breakpoint)
2703         (record_full_remove_breakpoint, record_full_save)
2704         (record_full_goto_insn): Update.
2705
2706 2017-10-02  Tom Tromey  <tom@tromey.com>
2707
2708         PR rust/22236:
2709         * rust-lang.c (rust_val_print_str): New function.
2710         (val_print_struct): Call it.
2711         (rust_subscript): Preserve name of slice type.
2712
2713 2017-10-02  Tom Tromey  <tom@tromey.com>
2714
2715         * rust-lang.c (rust_subscript): Handle slices in
2716         EVAL_AVOID_SIDE_EFFECTS case.
2717
2718 2017-10-02  Tom Tromey  <tom@tromey.com>
2719
2720         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2721
2722 2017-10-02  Tom Tromey  <tom@tromey.com>
2723
2724         * rust-lang.h (rust_slice_type): Add "extern".
2725
2726 2017-10-02  Tom Tromey  <tom@tromey.com>
2727             Pedro Alves  <palves@redhat.com>
2728
2729         * ada-lang.h (ada_exc_info::operator<): Make const.
2730         (ada_exc_info::operator==): Make const.
2731         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2732         Make const.
2733
2734 2017-09-29  Tom Tromey  <tom@tromey.com>
2735
2736         * target.c (read_whatever_is_readable): Change type of "result".
2737         Update.
2738         (free_memory_read_result_vector): Remove.
2739         (read_memory_robust): Change return type.  Update.
2740         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
2741         bin2hex, std::string.
2742         * target.h (memory_read_result_s): Remove typedef.
2743         (free_memory_read_result_vector): Remove.
2744         (read_memory_robust): Return std::vector.
2745
2746 2017-09-29  Tom Tromey  <tom@tromey.com>
2747
2748         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2749
2750 2017-09-29  Tom Tromey  <tom@tromey.com>
2751
2752         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2753         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
2754         operator< and operator==.
2755         (ada_exceptions_list): Return a std::vector.
2756         * ada-lang.c (ada_exc_info::operator<): Rename from
2757         compare_ada_exception_info.
2758         (ada_exc_info::operator==): New.
2759         (sort_remove_dups_ada_exceptions_list): Change type of
2760         "exceptions".
2761         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2762         (ada_add_global_exceptions): Likewise.
2763         (ada_exceptions_list_1): Return a std::vector.
2764         (ada_exceptions_list): Likewise.
2765
2766 2017-09-29  Tom Tromey  <tom@tromey.com>
2767
2768         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2769         'std::set *'.
2770         (print_one_inferior): Update.
2771         (free_vector_of_ints): Remove.
2772         (list_available_thread_groups): Change "ids" to std::set.
2773         (mi_cmd_list_thread_groups): Update.
2774         (struct collect_cores_data) <core>: Now a std::set.
2775         (collect_cores): Update.
2776         (unique): Remove.
2777         (print_one_inferior): Update.
2778
2779 2017-09-29  Tom Tromey  <tom@tromey.com>
2780
2781         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2782         (mi_execute_async_cli_command): Likewise.
2783         (mi_cmd_trace_frame_collected): Use field_fmt.
2784
2785 2017-09-29  Tom Tromey  <tom@tromey.com>
2786
2787         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2788         gdb::byte_vector.
2789
2790 2017-09-29  Tom Tromey  <tom@tromey.com>
2791
2792         * mi/mi-parse.c (mi_parse): Remove unused declaration.
2793
2794 2017-09-29  Tom Tromey  <tom@tromey.com>
2795
2796         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2797
2798 2017-09-29  Tom Tromey  <tom@tromey.com>
2799
2800         * varobj.h (varobj_gen_name): Return std::string.
2801         * varobj.c (varobj_gen_name): Return std::string.
2802         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2803         (mi_cmd_var_delete): Don't copy "name".
2804
2805 2017-09-29  Tom Tromey  <tom@tromey.com>
2806
2807         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2808         (mi_cmd_break_insert_1): Update.
2809
2810 2017-09-29  Tom Tromey  <tom@tromey.com>
2811
2812         * target.h (make_scoped_defer_target_commit_resume): Update.
2813         * target.c (make_scoped_defer_target_commit_resume): Rename from
2814         make_cleanup_defer_target_commit_resume.  Return a
2815         scoped_restore.
2816         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2817
2818 2017-09-29  Tom Tromey  <tom@tromey.com>
2819
2820         * main.c (captured_main_1): Remove unused declaration.
2821         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2822
2823 2017-09-29  Tom Tromey  <tom@tromey.com>
2824
2825         * symtab.c (search_symbols): Remove unused outer cleanup.
2826         (make_source_files_completion_list): Remove unused declaration.
2827
2828 2017-09-29  Tom Tromey  <tom@tromey.com>
2829
2830         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2831
2832 2017-09-29  Tom Tromey  <tom@tromey.com>
2833
2834         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2835         gdb::byte_vector.
2836
2837 2017-09-29  Tom Tromey  <tom@tromey.com>
2838
2839         * complaints.c (vcomplaint): Use std::string.
2840
2841 2017-09-29  Tom Tromey  <tom@tromey.com>
2842
2843         * tracepoint.c (trace_variable_command): Use std::string.
2844         (encode_actions_1): Remove unused declarations.
2845         (create_tsv_from_upload): Use std::string.
2846
2847 2017-09-29  Tom Tromey  <tom@tromey.com>
2848
2849         * cp-support.c (gdb_demangle): Use std::string.
2850
2851 2017-09-29  Tom Tromey  <tom@tromey.com>
2852
2853         * stack.c (parse_frame_specification): Use std::string
2854         (info_frame_command): Use gdb::unique_xmalloc_ptr.
2855
2856 2017-09-29  Tom Tromey  <tom@tromey.com>
2857
2858         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2859
2860 2017-09-29  Tom Tromey  <tom@tromey.com>
2861
2862         * utils.c (vfprintf_maybe_filtered): Use std::string.
2863         (vfprintf_unfiltered): Likewise.
2864
2865 2017-09-29  Tom Tromey  <tom@tromey.com>
2866
2867         * event-top.c (top_level_prompt): Return std::string.
2868         (display_gdb_prompt): Update.
2869
2870 2017-09-29  Tom Tromey  <tom@tromey.com>
2871
2872         * unittests/common-utils-selftests.c (format): New function.
2873         (string_vprintf_tests): New function.
2874         (_initialize_common_utils_selftests): Register new tests.
2875         * common/common-utils.c (string_vprintf): New function.
2876         * common/common-utils.h (string_vprintf): Declare.
2877
2878 2017-09-29  Pedro Alves  <palves@redhat.com>
2879
2880         * common/rsp-low.c (unpack_varlen_hex): Constify.
2881         * common/rsp-low.h (unpack_varlen_hex): Constify.
2882         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2883         Constify.
2884         * remote.c (remote_set_permissions, read_ptid)
2885         (remote_current_thread, remote_get_threads_with_qthreadinfo)
2886         (remote_static_tracepoint_marker_at)
2887         (remote_static_tracepoint_markers_by_strid)
2888         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2889         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2890         (parse_tracepoint_definition, parse_tsv_definition)
2891         (parse_static_tracepoint_marker_definition): Constify.
2892         * tracepoint.h (parse_static_tracepoint_marker_definition)
2893         (parse_trace_status, parse_tracepoint_status)
2894         (parse_tracepoint_definition, parse_tsv_definition): Constify.
2895
2896 2017-09-29  Pedro Alves  <palves@redhat.com>
2897
2898         * remote.c (target_buf, target_buf_size): Delete.
2899         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2900         Use the connection's packet buffer instead.
2901         All callers adjusted.
2902         (_initialize_remote): Remove references to target_buf and
2903         target_buf_size.
2904
2905 2017-09-28  Pedro Alves  <palves@redhat.com>
2906
2907         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2908         unittests/common-utils-selftests.c.
2909         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2910         (COMMON_OBS): Remove utils-selftests.o.
2911         * utils-selftests.c: Move to ...
2912         * unittests/common-utils-selftests.c: ... here and rename self
2913         test to "string_printf".
2914
2915 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2916
2917         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2918         having NULL cus or tus.
2919
2920 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2921
2922         * arm-tdep.c: (convert_from_extended): Remove.
2923         (convert_to_extended): Likewise.
2924         (arm_extract_return_value): Use convert_typed_floating.
2925         (arm_store_return_value): Likewise.
2926
2927         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2928         * sh-tdep.c: Do not include "floatformat.h".
2929         (sh_littlebyte_bigword_type): New function.
2930         (sh_register_convert_to_virtual): Use convert_typed_floating.
2931         (sh_register_convert_to_raw): Likewise.
2932         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2933         (sh64_littlebyte_bigword_type): New function.
2934         (sh64_extract_return_value): Use convert_typed_floating.
2935         (sh64_register_convert_to_virtual): Likewise.
2936         (sh64_register_convert_to_raw): Likewise.
2937
2938 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2939
2940         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2941         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2942
2943         * gdbtypes.h (union type_specific): Make field floatformat hold
2944         just a single struct floatformat, not an array.
2945         (floatformat_from_type): Move here.
2946         * gdbtypes.c (floatformat_from_type): Move here.  Update to
2947         changed TYPE_FLOATFORMAT definition.
2948         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2949         (recursive_dump_type): Likewise.
2950         (init_float_type): Install correct floatformat for byte order.
2951         (arch_float_type): Likewise.
2952
2953 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2954
2955         * gdbtypes.c (init_type): Change incoming argument from
2956         length-in-bytes to length-in-bits.  Assert length is a
2957         multiple of TARGET_CHAR_BITS.
2958         (arch_type, arch_flags_type): Likewise.
2959         (init_integer_type): Update call to init_type.
2960         (init_character_type): Likewise.
2961         (init_boolean_type): Likewise.
2962         (init_float_type): Likewise.
2963         (init_decfloat_type): Likewise.
2964         (init_complex_type): Likewise.
2965         (init_pointer_type): Likewise.
2966         (objfile_type): Likewise.
2967         (arch_integer_type): Update call to arch_type.
2968         (arch_character_type): Likewise.
2969         (arch_boolean_type): Likewise.
2970         (arch_float_type): Likewise.
2971         (arch_decfloat_type): Likewise.
2972         (arch_complex_type): Likewise.
2973         (arch_pointer_type): Likewise.
2974         (gdbtypes_post_init): Likewise.
2975
2976         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2977         (read_base_type): Likewise.
2978         * mdebugread.c (basic_type): Likewise.
2979         * stabsread.c (dbx_init_float_type): Likewise.
2980         (rs6000_builtin_type): Likewise.
2981         (read_range_type): Likewise.  Also, fix call to init_integer_type
2982         with erroneous length argument.
2983
2984         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2985         * d-lang.c (build_d_types): Likewise.
2986         * f-lang.c (build_fortran_types): Likewise.
2987         * go-lang.c (build_go_types): Likewise.
2988         * opencl-lang.c (build_opencl_types): Likewise.
2989         * jit.c (finalize_symtab): Likewise.
2990         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2991         (build_std_type_info_type): Likewise.
2992         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
2993         update call to arch_flags_type.
2994
2995         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2996         arch_type.
2997         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2998         * windows-tdep.c (windows_get_tlb_type): Likewise.
2999
3000         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
3001         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
3002         * m32c-tdep.c (make_types): Likewise.
3003         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
3004         (rl78_psw_type): Update call to arch_flags_type.
3005         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
3006         * rx-tdep.c (rx_psw_type): Likewise.
3007         (rx_fpsw_type): Likewise.
3008         * sparc-tdep.c (sparc_psr_type): Likewise.
3009         (sparc_fsr_type): Likewise.
3010         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
3011         (sparc64_ccr_type): Likewise.
3012         (sparc64_fsr_type): Likewise.
3013         (sparc64_fprs_type): Likewise.
3014
3015 2017-09-27  Tom Tromey  <tom@tromey.com>
3016
3017         * findcmd.c (find_command): Constify.
3018
3019 2017-09-27  Tom Tromey  <tom@tromey.com>
3020
3021         * ada-tasks.c (task_command_1, task_command): Constify.
3022
3023 2017-09-27  Tom Tromey  <tom@tromey.com>
3024
3025         * symtab.c (maintenance_print_symbol_cache)
3026         (maintenance_flush_symbol_cache)
3027         (maintenance_print_symbol_cache_statistics): Constify.
3028
3029 2017-09-27  Tom Tromey  <tom@tromey.com>
3030
3031         * inferior.c (detach_inferior_command, kill_inferior_command)
3032         (inferior_command): Constify.
3033
3034 2017-09-27  Tom Tromey  <tom@tromey.com>
3035
3036         * regcache.c (regcache_print, maintenance_print_registers)
3037         (maintenance_print_raw_registers)
3038         (maintenance_print_cooked_registers)
3039         (maintenance_print_register_groups)
3040         (maintenance_print_remote_registers): Constify.
3041
3042 2017-09-27  Tom Tromey  <tom@tromey.com>
3043
3044         * printcmd.c (map_display_numbers, undisplay_command)
3045         (enable_disable_display_command, enable_display_command)
3046         (disable_display_command): Constify.
3047
3048 2017-09-27  Tom Tromey  <tom@tromey.com>
3049
3050         * breakpoint.h (delete_command): Don't declare.
3051         * breakpoint.c (delete_command, enable_once_command)
3052         (enable_count_command, enable_delete_command, breakpoint_1)
3053         (maintenance_info_breakpoints, stopin_command, stopat_command)
3054         (delete_command, delete_trace_command, save_breakpoints)
3055         (save_breakpoints_command, save_tracepoints_command): Constify.
3056
3057 2017-09-27  Tom Tromey  <tom@tromey.com>
3058
3059         * macrocmd.c (macro_expand_command, macro_expand_once_command)
3060         (skip_ws, extract_identifier, macro_define_command)
3061         (macro_undef_command, macro_list_command): Constify.
3062
3063 2017-09-27  Tom Tromey  <tom@tromey.com>
3064
3065         * infcmd.c (environment_info, set_environment_command)
3066         (unset_environment_command, path_info, info_proc_cmd_1)
3067         (info_proc_cmd_mappings, info_proc_cmd_stat)
3068         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3069         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3070
3071 2017-09-27  Tom Tromey  <tom@tromey.com>
3072
3073         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3074         Constify.
3075
3076 2017-09-27  Tom Tromey  <tom@tromey.com>
3077
3078         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3079
3080 2017-09-27  Tom Tromey  <tom@tromey.com>
3081
3082         * demangle.c (demangle_command): Constify.
3083
3084 2017-09-27  Tom Tromey  <tom@tromey.com>
3085
3086         * progspace.c (maintenance_info_program_spaces_command):
3087         Constify.
3088
3089 2017-09-27  Tom Tromey  <tom@tromey.com>
3090
3091         * compile/compile.c (check_raw_argument, compile_file_command)
3092         (compile_code_command, compile_print_command): Constify.
3093
3094 2017-09-27  Tom Tromey  <tom@tromey.com>
3095
3096         * reggroups.c (maintenance_print_reggroups): Constify.
3097
3098 2017-09-27  Tom Tromey  <tom@tromey.com>
3099
3100         * dwarf2read.c (save_gdb_index_command): Constify.
3101
3102 2017-09-27  Tom Tromey  <tom@tromey.com>
3103
3104         * stap-probe.c (info_probes_stap_command): Constify.
3105
3106 2017-09-27  Tom Tromey  <tom@tromey.com>
3107
3108         * fork-child.c (unset_exec_wrapper_command): Constify.
3109
3110 2017-09-27  Tom Tromey  <tom@tromey.com>
3111
3112         * btrace.c (get_uint, get_context_size, no_chunk)
3113         (maint_btrace_packet_history_cmd)
3114         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3115         (maint_info_btrace_cmd): Constify.
3116
3117 2017-09-27  Tom Tromey  <tom@tromey.com>
3118
3119         * reverse.c (delete_bookmark_command): Constify.
3120
3121 2017-09-27  Tom Tromey  <tom@tromey.com>
3122
3123         * remote.c (set_memory_packet_size)
3124         (set_memory_write_packet_size, show_memory_write_packet_size)
3125         (set_memory_read_packet_size, show_memory_read_packet_size)
3126         (compare_sections_command, packet_command, remote_put_command)
3127         (remote_get_command, remote_delete_command): Constify.
3128
3129 2017-09-27  Tom Tromey  <tom@tromey.com>
3130
3131         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3132         (set_mipsfpu_double_command, set_mipsfpu_none_command)
3133         (set_mipsfpu_auto_command): Constify.
3134
3135 2017-09-27  Tom Tromey  <tom@tromey.com>
3136
3137         * cli/cli-cmds.h (cd_command): Constify.
3138         * cli/cli-cmds.c (cd_command): Constify.
3139
3140 2017-09-27  Tom Tromey  <tom@tromey.com>
3141
3142         * thread.c (thread_name_command, thread_find_command): Constify.
3143
3144 2017-09-27  Tom Tromey  <tom@tromey.com>
3145
3146         * probe.c (enable_probes_command, disable_probes_command):
3147         Constify.
3148
3149 2017-09-27  Tom Tromey  <tom@tromey.com>
3150
3151         * symfile.c (symbol_file_command): Constify.
3152         * gdbcore.h (deprecated_file_changed_hook): Constify.
3153         * exec.c (deprecated_file_changed_hook, exec_file_command)
3154         (file_command): Constify.
3155         * defs.h (symbol_file_command): Constify.
3156
3157 2017-09-27  Tom Tromey  <tom@tromey.com>
3158
3159         * remote-fileio.c (set_system_call_allowed)
3160         (show_system_call_allowed): Constify.
3161
3162 2017-09-27  Tom Tromey  <tom@tromey.com>
3163
3164         * tracepoint.c (delete_trace_variable_command)
3165         (tfind_end_command, tfind_start_command, tfind_pc_command)
3166         (tfind_tracepoint_command, tfind_line_command)
3167         (tfind_range_command, tfind_outside_command): Constify.
3168
3169 2017-09-27  Tom Tromey  <tom@tromey.com>
3170
3171         * ax-gdb.c (maint_agent_printf_command, agent_command)
3172         (agent_eval_command): Constify.
3173
3174 2017-09-27  Tom Tromey  <tom@tromey.com>
3175
3176         * tracepoint.c (info_scope_command): Constify.
3177         * python/python.c (gdbpy_decode_line): Constify.
3178         * python/py-breakpoint.c (bppy_init): Constify.
3179         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
3180         * location.h: (new_linespec_location)
3181         (string_to_event_location_basic, string_to_event_location):
3182         Constify.
3183         * location.c (new_linespec_location)
3184         (string_to_event_location_basic, string_to_event_location):
3185         Constify.
3186         * linespec.h (decode_line_with_current_source)
3187         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
3188         * linespec.c (linespec_lex_to_end)
3189         (decode_line_with_current_source)
3190         (decode_line_with_last_displayed): Constify.
3191         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
3192         Constify.
3193         * cli/cli-cmds.c (edit_command, list_command): Constify.
3194         * breakpoint.h (until_break_command, watch_command_wrapper)
3195         (awatch_command_wrapper, rwatch_command_wrapper)
3196         (init_ada_exception_breakpoint): Constify.
3197         * breakpoint.c (break_command_1, dprintf_command)
3198         (break_range_command, watch_command_wrapper)
3199         (rwatch_command_wrapper, awatch_command_wrapper)
3200         (until_break_command, init_ada_exception_breakpoint)
3201         (strace_marker_create_sals_from_location, trace_command)
3202         (ftrace_command, strace_command, struct tracepoint): Constify.
3203         * ax-gdb.c (agent_command_1): Constify.
3204         * ada-lang.c (ada_exception_sal): Constify.
3205
3206 2017-09-27  Tom Tromey  <tom@tromey.com>
3207
3208         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
3209         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
3210         (get_context_size, no_chunk, get_insn_history_modifiers)
3211         (cmd_record_insn_history, get_call_history_modifiers)
3212         (cmd_record_call_history): Constify.
3213
3214 2017-09-27  Tom Tromey  <tom@tromey.com>
3215
3216         * source.c (show_substitute_path_command)
3217         (unset_substitute_path_command, set_substitute_path_command):
3218         Constify.
3219
3220 2017-09-27  Tom Tromey  <tom@tromey.com>
3221
3222         * typeprint.c (maintenance_print_type): Constify.
3223         * maint.c (maintenance_dump_me, maintenance_demangle)
3224         (maintenance_time_display, maintenance_info_sections)
3225         (maintenance_print_statistics, maintenance_deprecate)
3226         (maintenance_undeprecate): Constify.
3227         (maintenance_do_deprecate): Constify.  Use std::string.
3228         (maintenance_selftest): Constify.
3229         * gdbtypes.h (maintenance_print_type): Constify.
3230
3231 2017-09-27  Tom Tromey  <tom@tromey.com>
3232
3233         * hppa-tdep.c (unwind_command): Constify.
3234
3235 2017-09-27  Tom Tromey  <tom@tromey.com>
3236
3237         * target-descriptions.c (unset_tdesc_filename_cmd)
3238         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
3239         Constify.
3240
3241 2017-09-27  Tom Tromey  <tom@tromey.com>
3242
3243         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
3244
3245 2017-09-27  Tom Tromey  <tom@tromey.com>
3246
3247         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
3248
3249 2017-09-27  Tom Tromey  <tom@tromey.com>
3250
3251         * tui/tui-regs.c (tui_reg_command): Constify.
3252
3253 2017-09-27  Tom Tromey  <tom@tromey.com>
3254
3255         * skip.c (skip_file_command, skip_function_command)
3256         (skip_enable_command, skip_disable_command, skip_delete_command):
3257         Constify.
3258
3259 2017-09-27  Tom Tromey  <tom@tromey.com>
3260
3261         * record-btrace.c (cmd_record_btrace_bts_start)
3262         (cmd_record_btrace_pt_start): Constify.
3263
3264 2017-09-27  Tom Tromey  <tom@tromey.com>
3265
3266         * symmisc.c (maintenance_print_symbols)
3267         (maintenance_print_msymbols, maintenance_print_objfiles)
3268         (maintenance_info_symtabs, maintenance_check_symtabs)
3269         (maintenance_expand_symtabs, maintenance_info_line_tables):
3270         Constify.
3271
3272 2017-09-27  Tom Tromey  <tom@tromey.com>
3273
3274         * top.c (new_ui_command): Constify.
3275
3276 2017-09-27  Tom Tromey  <tom@tromey.com>
3277
3278         * symfile.c (add_symbol_file_command)
3279         (remove_symbol_file_command, list_overlays_command)
3280         (map_overlay_command, unmap_overlay_command)
3281         (overlay_auto_command, overlay_manual_command)
3282         (overlay_off_command, overlay_load_command): Constify.
3283
3284 2017-09-27  Tom Tromey  <tom@tromey.com>
3285
3286         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
3287         (info_spu_mailbox_command, info_spu_dma_command)
3288         (info_spu_proxydma_command): Constify.
3289
3290 2017-09-27  Tom Tromey  <tom@tromey.com>
3291
3292         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
3293
3294 2017-09-27  Tom Tromey  <tom@tromey.com>
3295
3296         * cli/cli-script.c (user_defined_command): Constify.
3297
3298 2017-09-27  Tom Tromey  <tom@tromey.com>
3299
3300         * cli/cli-dump.c (dump_memory_command, dump_value_command)
3301         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
3302         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
3303         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
3304         (dump_binary_value, append_binary_memory, append_binary_value):
3305         Constify.
3306         (struct dump_context) <func>: Constify.
3307         (add_dump_command): Update.
3308
3309 2017-09-27  Tom Tromey  <tom@tromey.com>
3310
3311         * cli/cli-cmds.c (show_version, show_configuration)
3312         (source_command, show_user): Constify.
3313
3314 2017-09-27  Tom Tromey  <tom@tromey.com>
3315
3316         * target.c (maintenance_print_target_stack): Constify.
3317
3318 2017-09-27  Tom Tromey  <tom@tromey.com>
3319
3320         * interps.c (interpreter_exec_cmd): Constify.
3321
3322 2017-09-27  Tom Tromey  <tom@tromey.com>
3323
3324         * record-full.c (cmd_record_full_restore): Constify.
3325
3326 2017-09-27  Tom Tromey  <tom@tromey.com>
3327
3328         * memattr.c (enable_mem_command, disable_mem_command)
3329         (delete_mem_command): Constify.
3330
3331 2017-09-27  Tom Tromey  <tom@tromey.com>
3332
3333         * value.c (show_convenience): Constify.
3334
3335 2017-09-27  Tom Tromey  <tom@tromey.com>
3336
3337         * gdbcore.h (core_file_command): Update.
3338         * corefile.c (core_file_command): Constify.
3339
3340 2017-09-27  Tom Tromey  <tom@tromey.com>
3341
3342         * user-regs.c (maintenance_print_user_registers): Constify.
3343
3344 2017-09-27  Tom Tromey  <tom@tromey.com>
3345
3346         * cp-namespace.c (maintenance_cplus_namespace): Constify.
3347
3348 2017-09-27  Tom Tromey  <tom@tromey.com>
3349
3350         * cp-support.c (first_component_command): Constify.
3351
3352 2017-09-27  Tom Tromey  <tom@tromey.com>
3353
3354         * psymtab.c (maintenance_print_psymbols)
3355         (maintenance_info_psymtabs, maintenance_check_psymtabs):
3356         Constify.
3357
3358 2017-09-27  Tom Tromey  <tom@tromey.com>
3359
3360         * windows-tdep.c (display_tib): Constify.
3361
3362 2017-09-27  Tom Tromey  <tom@tromey.com>
3363
3364         * linux-fork.c (delete_checkpoint_command)
3365         (detach_checkpoint_command): Constify.
3366
3367 2017-09-27  Tom Tromey  <tom@tromey.com>
3368
3369         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
3370
3371 2017-09-27  Tom Tromey  <tom@tromey.com>
3372
3373         * arc-tdep.c (dump_arc_instruction_command): Constify.
3374
3375 2017-09-27  Tom Tromey  <tom@tromey.com>
3376
3377         * valprint.c (set_radix, show_radix): Constify.
3378
3379 2017-09-27  Tom Tromey  <tom@tromey.com>
3380
3381         * dtrace-probe.c (info_probes_dtrace_command): Constify.
3382
3383 2017-09-27  Tom Tromey  <tom@tromey.com>
3384
3385         * command.h (not_just_help_class_command): Update.
3386         * cli/cli-decode.h (not_just_help_class_command): Update.
3387         * cli/cli-decode.c (not_just_help_class_command): Constify.
3388
3389 2017-09-27  Tom Tromey  <tom@tromey.com>
3390
3391         * gdb_bfd.c (maintenance_info_bfds): Constify.
3392
3393 2017-09-27  Tom Tromey  <tom@tromey.com>
3394
3395         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
3396         overloads.
3397         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
3398         (do_const_cfunc): New function.
3399         (cmd_cfunc_eq): New overload.
3400         (cli_user_command_p): Check do_const_cfunc.
3401         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
3402         const_cfunc.
3403         * command.h (add_cmd): Add const overload and no-function
3404         overload.
3405         (set_cmd_cfunc): Add const overload.
3406         (cmd_const_cfunc_ftype): Declare.
3407         (cmd_cfunc_eq): Add const overload.
3408         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
3409         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
3410         overload.
3411
3412 2017-09-27  Tom Tromey  <tom@tromey.com>
3413
3414         * macroexp.c (get_next_token_for_substitution): New function.
3415         (substitute_args): Call it.  Check for __VA_OPT__.
3416
3417 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3418             Pedro Alves <palves@redhat.com>
3419
3420         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
3421         producer_is_icc_lt_14.
3422         (producer_is_icc_lt_14): New function.
3423         (check_producer): Add code for checking version of ICC.
3424         (producer_is_icc): Move to producer.c.
3425         (read_structure_type): Restrict ICC workaround to ICC<14.
3426         * producer.c: Include selftest.h.
3427         (producer_is_icc, producer_parsing_tests, _initialize_producer):
3428         New functions.
3429         * producer.h (producer_is_icc): New declaration.
3430
3431 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3432
3433         * Makefile.in (SFILES): Add producer.c.
3434         (COMMON_OBS): Add producer.o
3435         * amd64-tdep.c (producer.h): Add new include.
3436         * dwarf2read.c (producer.h): Add new include.
3437         * producer.c: New file.
3438         * producer.h: New file.
3439         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
3440         producer.c.
3441         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
3442         producer.h.
3443
3444 2017-09-26  Matthias Klose  <doko@ubuntu.com>
3445
3446         * configure.ac: Search ncursesw before ncurses.
3447         Check ncursesw/ncurses.h before ncurses/ncurses.h.
3448         * gdb_curses.h: Include <ncursesw/ncurses.h>
3449         * config.in, configure: Regenerate.
3450
3451 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3452
3453         PR gdb/22185
3454         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
3455         obsolete.
3456         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
3457         Remove i386sol2 support.
3458         * configure.nat <i386sol2>: Remove.
3459         <sol2-64>: Fold into ...
3460         <sol2>: ... this.
3461         Move common settings to default section.
3462         Add sol-thread.o.
3463         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
3464         x86_64-*-solaris2.1[0-9]*>: Rename to ...
3465         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
3466         <i[34567]86-*-solaris*>: Remove.
3467         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
3468
3469         * configure.ac: Remove wctype in libw check.
3470         (_MSE_INT_H): Don't define on Solaris 7-9.
3471         <solaris*>: Remove libthread_db.so.1 check.
3472         * configure: Regenerate.
3473         * config.in: Regenerate.
3474
3475         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
3476         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
3477         (gdb_ps_size_t): Remove.
3478         Use base types in users.
3479         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
3480
3481         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
3482
3483 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3484
3485         PR build/22206
3486         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
3487         (adi_is_addr_mapped): Likewise.
3488         (PSR_ICC): Don't redefine.
3489         (PSR_IMPL): Likewise.
3490
3491 2017-09-25  Tom Tromey  <tom@tromey.com>
3492
3493         * regcache.c (regcache::dump): Use string_printf.
3494
3495 2017-09-25  Tom Tromey  <tom@tromey.com>
3496
3497         * regcache.c (class regcache_invalidator): New.
3498         (struct register_to_invalidate): Remove.
3499         (make_cleanup_regcache_invalidate): Remove.
3500         (regcache::raw_write): Use regcache_invalidator.
3501
3502 2017-09-25  Tom Tromey  <tom@tromey.com>
3503
3504         * spu-tdep.c (spu2ppu_sniffer): Update.
3505         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
3506         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
3507         Remove.
3508         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
3509         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
3510         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
3511         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
3512         (frame_pop): Update.
3513
3514 2017-09-25  Tom Tromey  <tom@tromey.com>
3515
3516         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
3517         * regcache.h (regcache_xfree): Don't declare.
3518         * regcache.c (regcache_xfree): Remove.
3519         (do_regcache_xfree): Use delete.
3520         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
3521         * linux-fork.c (free_fork): Use delete.
3522         (fork_save_infrun_state): Likewise.
3523         * jit.c (jit_dealloc_cache): Use delete.
3524         * infrun.c (discard_infcall_suspend_state): Use delete.
3525
3526 2017-09-25  Tom Tromey  <tom@tromey.com>
3527
3528         * regcache.h (regcache_xmalloc): Don't declare.
3529         (regcache_raw_set_cached_value): Update comment.
3530         * regcache.c (regcache_xmalloc): Remove.
3531         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
3532         * jit.c (jit_frame_sniffer): Use new.
3533         * frame.c (frame_save_as_regcache): Use new.
3534
3535 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3536
3537         * NEWS: Advertise support for guarded-storage registers on IBM z.
3538
3539 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3540
3541         * s390-linux-nat.c (have_regset_gs): New static variable.
3542         (s390_linux_fetch_inferior_registers): Handle guarded-storage
3543         control block and guarded-storage broadcast control regsets.
3544         (s390_read_description): Detect whether the target has
3545         guarded-storage support, return appropriate tdesc.
3546         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
3547         (features/s390x-gs-linux64.c): Likewise.
3548         (struct gdbarch_tdep) <have_gs>: New field.
3549         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
3550         (s390_gsbc_regset): New variables.
3551         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
3552         and s390_gsbc_regset, if applicable.
3553         (s390_core_read_description): Check whether core file was from a
3554         target with guarded-storage support; include appropriate regsets.
3555         (s390_gdbarch_init): Add registers for guarded-storage support.
3556         (_initialize_s390_tdep): Initialize new target descriptions that
3557         include registers for guarded-storage support.
3558         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
3559         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
3560         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
3561         (S390_NUM_REGS): Adjust macro definition.
3562         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
3563         (tdesc_s390x_gs_linux64): New declarations.
3564
3565 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3566
3567         * features/s390-gs-linux64.xml: New file.
3568         * features/s390-gs.xml: New file.
3569         * features/s390-gsbc.xml: New file.
3570         * features/s390x-gs-linux64.xml: New file.
3571         * features/Makefile (WHICH): Add s390-gs-linux64 and
3572         s390x-gs-linux64.
3573         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
3574         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
3575         * features/s390-gs-linux64.c: New generated file.
3576         * features/s390x-gs-linux64.c: New file.
3577         * regformats/s390-gs-linux64.dat: New file.
3578         * regformats/s390x-gs-linux64.dat: New file.
3579
3580 2017-09-23  Tom Tromey  <tom@tromey.com>
3581
3582         * defs.h (make_cleanup_override_quit_handler): Don't declare.
3583
3584 2017-09-22  Tom Tromey  <tom@tromey.com>
3585
3586         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
3587         type to scoped_restore_tmpl.
3588         <scoped_input_handler>: Initialize m_quit_handler directly.
3589
3590 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3591
3592         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
3593         (cd_command): Likewise.  Free "current_directory" before
3594         assigning to it.
3595         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
3596         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
3597         * top.c (gdb_dirbuf): Remove global declaration.
3598         * top.h (gdb_dirbuf): Likewise.
3599
3600 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3601
3602         * gnulib/aclocal.m4: Regenerate.
3603         * gnulib/config.in: Regenerate.
3604         * gnulib/configure: Regenerate.
3605         * gnulib/import/Makefile.am: Regenerate.
3606         * gnulib/import/Makefile.in: Regenerate.
3607         * gnulib/import/assure.h: New file.
3608         * gnulib/import/at-func.c: Likewise
3609         * gnulib/import/chdir-long.c: New file.
3610         * gnulib/import/chdir-long.h: New file.
3611         * gnulib/import/cloexec.c: New file.
3612         * gnulib/import/cloexec.h: New file.
3613         * gnulib/import/close.c: New file.
3614         * gnulib/import/closedir.c: New file.
3615         * gnulib/import/dirent-private.h: New file.
3616         * gnulib/import/dup-safer.c: New file.
3617         * gnulib/import/dup.c: New file.
3618         * gnulib/import/dup2.c: New file.
3619         * gnulib/import/error.c: New file.
3620         * gnulib/import/error.h: New file.
3621         * gnulib/import/exitfail.c: New file.
3622         * gnulib/import/exitfail.h: New file.
3623         * gnulib/import/fchdir.c: New file.
3624         * gnulib/import/fcntl.c: New file.
3625         * gnulib/import/fcntl.in.h: New file.
3626         * gnulib/import/fd-hook.c: New file.
3627         * gnulib/import/fd-hook.h: New file.
3628         * gnulib/import/fd-safer.c: New file.
3629         * gnulib/import/fdopendir.c: New file.
3630         * gnulib/import/filename.h: New file.
3631         * gnulib/import/filenamecat-lgpl.c: New file.
3632         * gnulib/import/filenamecat.h: New file.
3633         * gnulib/import/fstat.c: New file.
3634         * gnulib/import/fstatat.c: New file.
3635         * gnulib/import/getcwd-lgpl.c: New file.
3636         * gnulib/import/getcwd.c: New file.
3637         * gnulib/import/getdtablesize.c: New file.
3638         * gnulib/import/getlogin_r.c: New file.
3639         * gnulib/import/getprogname.c: New file.
3640         * gnulib/import/getprogname.h: New file.
3641         * gnulib/import/gettext.h: New file.
3642         * gnulib/import/glob-libc.h: New file.
3643         * gnulib/import/glob.c: New file.
3644         * gnulib/import/glob.in.h: New file.
3645         * gnulib/import/intprops.h: New file.
3646         * gnulib/import/m4/chdir-long.m4: New file.
3647         * gnulib/import/m4/close.m4: New file.
3648         * gnulib/import/m4/closedir.m4: New file.
3649         * gnulib/import/m4/d-ino.m4: New file.
3650         * gnulib/import/m4/d-type.m4: New file.
3651         * gnulib/import/m4/dup.m4: New file.
3652         * gnulib/import/m4/dup2.m4: New file.
3653         * gnulib/import/m4/error.m4: New file.
3654         * gnulib/import/m4/fchdir.m4: New file.
3655         * gnulib/import/m4/fcntl.m4: New file.
3656         * gnulib/import/m4/fcntl_h.m4: New file.
3657         * gnulib/import/m4/fdopendir.m4: New file.
3658         * gnulib/import/m4/filenamecat.m4: New file.
3659         * gnulib/import/m4/fstat.m4: New file.
3660         * gnulib/import/m4/fstatat.m4: New file.
3661         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3662         * gnulib/import/m4/getcwd-path-max.m4: New file.
3663         * gnulib/import/m4/getcwd.m4: New file.
3664         * gnulib/import/m4/getdtablesize.m4: New file.
3665         * gnulib/import/m4/getlogin_r.m4: New file.
3666         * gnulib/import/m4/getprogname.m4: New file.
3667         * gnulib/import/m4/glob.m4: New file.
3668         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3669         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3670         * gnulib/import/m4/mempcpy.m4: New file.
3671         * gnulib/import/m4/memrchr.m4: New file.
3672         * gnulib/import/m4/mode_t.m4: New file.
3673         * gnulib/import/m4/msvc-inval.m4: New file.
3674         * gnulib/import/m4/msvc-nothrow.m4: New file.
3675         * gnulib/import/m4/open.m4: New file.
3676         * gnulib/import/m4/openat.m4: New file.
3677         * gnulib/import/m4/opendir.m4: New file.
3678         * gnulib/import/m4/readdir.m4: New file.
3679         * gnulib/import/m4/realloc.m4: New file.
3680         * gnulib/import/m4/rewinddir.m4: New file.
3681         * gnulib/import/m4/save-cwd.m4: New file.
3682         * gnulib/import/m4/strdup.m4: New file.
3683         * gnulib/import/m4/strerror.m4: New file.
3684         * gnulib/import/m4/unistd-safer.m4: New file.
3685         * gnulib/import/mempcpy.c: New file.
3686         * gnulib/import/memrchr.c: New file.
3687         * gnulib/import/msvc-inval.c: New file.
3688         * gnulib/import/msvc-inval.h: New file.
3689         * gnulib/import/msvc-nothrow.c: New file.
3690         * gnulib/import/msvc-nothrow.h: New file.
3691         * gnulib/import/open.c: New file.
3692         * gnulib/import/openat-die.c: New file.
3693         * gnulib/import/openat-priv.h: New file.
3694         * gnulib/import/openat-proc.c: New file.
3695         * gnulib/import/openat.c: New file.
3696         * gnulib/import/openat.h: New file.
3697         * gnulib/import/opendir.c: New file.
3698         * gnulib/import/pipe-safer.c: New file.
3699         * gnulib/import/readdir.c: New file.
3700         * gnulib/import/realloc.c: New file.
3701         * gnulib/import/rewinddir.c: New file.
3702         * gnulib/import/save-cwd.c: New file.
3703         * gnulib/import/save-cwd.h: New file.
3704         * gnulib/import/strdup.c: New file.
3705         * gnulib/import/strerror-override.c: New file.
3706         * gnulib/import/strerror-override.h: New file.
3707         * gnulib/import/strerror.c: New file.
3708         * gnulib/import/unistd--.h: New file.
3709         * gnulib/import/unistd-safer.h: New file.
3710         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3711         "getcwd" and "glob".
3712         * ser-tcp.c: Undefine "close" before redefining it.
3713
3714 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3715
3716         * guile/scm-value.c (gdbscm_value_address): Initialize address,
3717         get rid of res_val.
3718
3719 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3720
3721         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3722         <sol2,sparc>: Likewise.
3723         <sol2-64,i386>: Likewise.
3724
3725         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3726         -Wdeprecated-declarations on *-*-solaris*.
3727         * configure: Regenerate.
3728
3729         * procfs.c: Include "nat/inferior.h".
3730         (procfs_info_proc): Fix typo.
3731
3732 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3733
3734         * remote.c (vector): Include.
3735         (struct private_thread_info): Add field, thread_handle.
3736         (free_private_thread_info): Deallocate storage associated with
3737         thread handle.
3738         (get_private_info_thread): Initialize `thread_handle' field.
3739         (struct thread_item): Add field, thread_handle.
3740         (clear_threads_listing_context): Deallocate storage associated
3741         with thread handle.
3742         (start_thread): Add support for "handle" attribute.
3743         (thread_attributes): Add "handle".
3744         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3745         field.
3746         (remote_update_thread_list): Update thread_handle.
3747         (remote_thread_handle_to_thread_info): New function.
3748         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3749
3750 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3751
3752         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3753         function.
3754         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3755         * python/python-internal.h (thread_object_type): Declare.
3756
3757 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3758
3759         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3760         (target_thread_handle_to_thread_info): Declare.
3761         * target.c (target_thread_handle_to_thread_info): New function.
3762         * target-delegates.c: Regenerate.
3763         * gdbthread.h (find_thread_by_handle): Declare.
3764         * thread.c (find_thread_by_handle): New function.
3765         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3766         function.
3767         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3768
3769 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3770
3771         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3772
3773 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3774
3775         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3776
3777 2017-09-21  Yao Qi  <yao.qi@linaro.org>
3778
3779         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3780         to gdb_target_obs.
3781
3782 2017-09-20  Tom Tromey  <tom@tromey.com>
3783
3784         * breakpoint.c (struct counted_command_line): Remove.
3785         (breakpoint_commands): Update.
3786         (alloc_counted_command_line, incref_counted_command_line)
3787         (decref_counted_command_line, do_cleanup_counted_command_line)
3788         (make_cleanup_decref_counted_command_line): Remove.
3789         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3790         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3791         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3792         (save_breakpoints): Update.
3793         * breakpoint.h (counted_command_line): Now a typedef to
3794         shared_ptr.
3795         (struct breakpoint) <commands>: Now a counted_command_line.
3796         (struct bpstats) <command>: Likewise.
3797
3798 2017-09-20  Tom Tromey  <tom@tromey.com>
3799
3800         * breakpoint.c (struct commands_info, do_map_commands_command):
3801         Remove.
3802         (commands_command_1): Update.
3803         (iterate_over_related_breakpoints): Take a function_view.
3804         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3805         (delete_command): Update.
3806         (map_breakpoint_numbers): Take a function_view.
3807         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3808         (disable_command): Update.
3809         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3810         (enable_command): Update.
3811         (struct disp_data, do_enable_breakpoint_disp)
3812         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3813         (do_map_enable_delete_breakpoint): Remove.
3814         (enable_once_command, enable_count_command, enable_delete_command)
3815         (delete_trace_variable_command): Update.
3816
3817 2017-09-20  Tom Tromey  <tom@tromey.com>
3818
3819         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
3820         (bpstat_clear): Use delete.
3821         (bpstats): New constructors.
3822         (bpstat_copy, bpstat_stop_status): Use new.
3823         (dprintf_after_condition_true): Update.
3824         * breakpoint.h (bpstats::bpstats): Add constructors.
3825         (bpstats::~bpstats): Add destructor.
3826
3827 2017-09-20  Pedro Alves  <palves@redhat.com>
3828
3829         * eval.c (make_params): Delete, refactored as ...
3830         (class fake_method): ... this new type's ctor.
3831         (fake_method::~fake_method): New.
3832         (evaluate_subexp_standard): Use 'fake_method'.
3833
3834 2017-09-20  Tom Tromey  <tom@tromey.com>
3835
3836         * windows-nat.c (get_windows_debug_event, windows_wait)
3837         (do_initial_windows_stuff, windows_attach): Update.
3838         * utils.c (vwarning, internal_vproblem): Update.
3839         (ui_unregister_input_event_handler_cleanup)
3840         (prepare_to_handle_input): Remove.
3841         (class scoped_input_handler): New.
3842         (defaulted_query, prompt_for_continue): Update.
3843         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3844         Update.
3845         * top.c (undo_terminal_modifications_before_exit): Update.
3846         * target/target.h (target_terminal_init, target_terminal_inferior)
3847         (target_terminal_ours): Don't declare.
3848         (class target_terminal): New.
3849         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3850         (target_terminal_ours_for_output)
3851         (make_cleanup_restore_target_terminal): Don't declare.
3852         (target_terminal_info): Remove.
3853         * target.c (enum terminal_state, terminal_state): Remove.
3854         (target_terminal::terminal_state): Define.
3855         (target_terminal::init): Rename from target_terminal_init.
3856         (target_terminal::inferior): Rename from
3857         target_terminal_inferior.
3858         (target_terminal::ours): Rename from target_terminal_ours.
3859         (target_terminal::ours_for_output): Rename from
3860         target_terminal_ours_for_output.
3861         (target_terminal::info): New method.
3862         (cleanup_restore_target_terminal)
3863         (make_cleanup_restore_target_terminal): Remove.
3864         * solib.c (handle_solib_event): Update.
3865         * remote.c (remote_serial_quit_handler): Update.
3866         (remote_terminal_inferior, remote_wait_as): Update.
3867         * record-full.c (record_full_wait_1): Update.
3868         * nto-procfs.c (procfs_create_inferior): Update.
3869         * nat/fork-inferior.c (startup_inferior): Update.
3870         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3871         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3872         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3873         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3874         (mi_breakpoint_created, mi_breakpoint_deleted)
3875         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3876         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3877         (mi_user_selected_context_changed, report_initial_inferior):
3878         Update.
3879         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3880         (linux_nat_terminal_inferior): Update.
3881         * infrun.c (follow_fork_inferior)
3882         (handle_vfork_child_exec_or_exit, do_target_resume)
3883         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3884         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3885         Update.
3886         * inflow.c (child_terminal_init, info_terminal_command): Update.
3887         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3888         (attach_command): Update.
3889         * infcall.c (call_thread_fsm_should_stop): Update.
3890         * gnu-nat.c (gnu_attach): Update.
3891         * extension.c (struct active_ext_lang_state)
3892         (restore_active_ext_lang): Update.
3893         * exceptions.c (print_flush): Update.
3894         * event-top.c (async_enable_stdin, default_quit_handler): Update.
3895         (struct quit_handler_cleanup_data, restore_quit_handler)
3896         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3897         Remove.
3898         * cp-support.c (gdb_demangle): Update.
3899         * breakpoint.c (update_inserted_breakpoint_locations)
3900         (insert_breakpoint_locations, handle_jit_event)
3901         (disable_breakpoints_in_unloaded_shlib): Update.
3902         * annotate.c (annotate_breakpoints_invalid)
3903         (annotate_frames_invalid): Update.
3904
3905 2017-09-20  Tom Tromey  <tom@tromey.com>
3906
3907         * main.c (catch_command_errors): Rename from
3908         catch_command_errors_const.
3909         (captured_main_1): Update.
3910
3911 2017-09-20  Pedro Alves  <palves@redhat.com>
3912
3913         * cli/cli-cmds.c (list_command): Use print_sal_location.
3914         (print_sal_location): New function.
3915         (ambiguous_line_spec): Use print_sal_location.
3916         * linespec.c (symbol_to_sal): Record the symbol in the sal.
3917         * symtab.c (find_function_start_sal): Likewise.
3918         * symtab.h (symtab_and_line::symbol): New field.
3919
3920 2017-09-20  Pedro Alves  <palves@redhat.com>
3921
3922         * linespec.c (minsym_found): Handle non-text minsyms.
3923         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3924
3925 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3926
3927         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3928         backslash.
3929
3930 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3931
3932         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3933         vmovups instead vmovaps.
3934         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3935
3936 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
3937
3938         * NEWS (Changes since GDB 8.0): Add starti.
3939         * infcmd.c (enum run_break): New.
3940         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3941         case.
3942         (run_command): Use enum run_how.
3943         (start_command): Likewise.
3944         (starti_command): New function.
3945         (RUN_ARGS_HELP): New macro.
3946         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3947         commands.  Add starti command.
3948
3949 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3950
3951         * Makefile.in (monitor.o): Remove the rule.
3952
3953 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3954
3955         * annotate.h (struct annotate_arg_emitter): Use
3956         DISABLE_COPY_AND_ASSIGN.
3957         * common/refcounted-object.h (refcounted_object): Likewise.
3958         * completer.h (struct completion_result): Likewise.
3959         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3960         * filename-seen-cache.h (filename_seen_cache): Likewise.
3961         * gdbcore.h (thread_section_name): Likewise.
3962         * gdb_regex.h (compiled_regex): Likewise.
3963         * gdbthread.h (scoped_restore_current_thread): Likewise.
3964         * inferior.h (scoped_restore_current_inferior): Likewise.
3965         * jit.c (jit_reader): Likewise.
3966         * linespec.h (struct linespec_result): Likewise.
3967         * mi/mi-parse.h (struct mi_parse): Likewise.
3968         * nat/fork-inferior.c (execv_argv): Likewise.
3969         * progspace.h (scoped_restore_current_program_space): Likewise.
3970         * python/python-internal.h (class gdbpy_enter): Likewise.
3971         * regcache.h (regcache): Likewise.
3972         * target-descriptions.c (struct tdesc_reg): Likewise.
3973         (struct tdesc_type): Likewise.
3974         (struct tdesc_feature): Likewise.
3975         * ui-out.h (ui_out_emit_type): Likewise.
3976
3977 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3978
3979         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3980         label abort_expression.
3981
3982 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3983
3984         * common/buffer.c (buffer_xml_printf): Adjust.
3985         * common/xml-utils.c (xml_escape_text): Change return type to
3986         std::string, update code accordingly.
3987         * common/xml-utils.h (xml_escape_text): Change return type to
3988         std::string.
3989         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3990         * windows-tdep.c (windows_xfer_shared_library): Adjust.
3991         * unittests/xml-utils-selftests.c (test_xml_escape_text):
3992         Adjust.
3993
3994 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3995
3996         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3997         (SUBDIR_UNITTESTS_OBS): Add new object file.
3998         * unittests/xml-utils-selftests.c: New file.
3999
4000 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4001
4002         * common/selftest.h (selftest): New struct/interface.
4003         (register_test): Add name parameter, add new overload.
4004         (run_tests): Add filter parameter.
4005         (for_each_selftest_ftype): New typedef.
4006         (for_each_selftest): New declaration.
4007         * common/selftest.c (tests): Change type to
4008         map<string, unique_ptr<selftest>>.
4009         (simple_selftest): New struct.
4010         (register_test): New function.
4011         (register_test): Add name parameter and use it.
4012         (run_tests): Add filter parameter and use it.  Add prints.
4013         Adjust to vector -> map change.
4014         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
4015         registering selftests.
4016         * arm-tdep.c (_initialize_arm_tdep): Likewise.
4017         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
4018         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
4019         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
4020         * findvar.c (_initialize_findvar): Likewise.
4021         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
4022         * maint.c (maintenance_selftest): Update call to run_tests.
4023         (maintenance_info_selftests): New function.
4024         (_initialize_maint_cmds): Register "maintenance info selftests"
4025         command.  Update "maintenance selftest" doc.
4026         * regcache.c (_initialize_regcache): Add names when registering
4027         selftests.
4028         * rust-exp.y (_initialize_rust_exp): Likewise.
4029         * selftest-arch.c (gdbarch_selftest): New struct.
4030         (gdbarch_tests): Remove.
4031         (register_test_foreach_arch): Add name parameter.  Call
4032         register_test.
4033         (tests_with_arch): Remove, move most content to
4034         gdbarch_selftest::operator().
4035         (_initialize_selftests_foreach_arch): Remove.
4036         * selftest-arch.h (register_test_foreach_arch): Add name
4037         parameter.
4038         (run_tests_with_arch): New declaration.
4039         * utils-selftests.c (_initialize_utils_selftests): Add names
4040         when registering selftests.
4041         * utils.c (_initialize_utils): Likewise.
4042         * unittests/array-view-selftests.c
4043         (_initialize_array_view_selftests): Likewise.
4044         * unittests/environ-selftests.c (_initialize_environ_selftests):
4045         Likewise.
4046         * unittests/function-view-selftests.c
4047         (_initialize_function_view_selftests): Likewise.
4048         * unittests/offset-type-selftests.c
4049         (_initialize_offset_type_selftests): Likewise.
4050         * unittests/optional-selftests.c
4051         (_initialize_optional_selftests): Likewise.
4052         * unittests/scoped_restore-selftests.c
4053         (_initialize_scoped_restore_selftests): Likewise.
4054         * NEWS: Document "maintenance selftest" and "maint info
4055         selftests".
4056
4057 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4058
4059         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4060         scoped_restore.
4061
4062 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4063
4064         * mi/mi-main.c (mi_load_progress): Make uiout variable
4065         a unique_ptr.
4066
4067 2017-09-15  Pedro Alves  <palves@redhat.com>
4068
4069         * compile/compile-c-types.c (convert_enum, convert_int)
4070         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4071
4072 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
4073
4074         * dwarf2read.c (copy_string): Remove.
4075         (parse_macro_definition): Replace copy_string with savestring.
4076
4077 2017-09-15  Yao Qi  <yao.qi@linaro.org>
4078
4079         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4080         gdb_target_obs.
4081         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4082         Likewise.
4083         (i[34567]86-*-linux*): Likewise.
4084
4085 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4086
4087         * dwarf2expr.h (dwarf_stack_value): Add constructor.
4088         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4089         <stack>: Change type to std::vector.
4090         <stack_len, stack_allocated>: Remove.
4091         <grow_stack>: Remove.
4092         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4093         (dwarf_expr_context::~dwarf_expr_context): Remove.
4094         (dwarf_expr_context::grow_stack): Remove.
4095         (dwarf_expr_context::push): Adjust.
4096         (dwarf_expr_context::pop): Adjust.
4097         (dwarf_expr_context::fetch): Adjust.
4098         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4099         (dwarf_expr_context::stack_empty_p): Adjust.
4100         (dwarf_expr_context::execute_stack_op): Adjust.
4101
4102 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4103
4104         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4105         return type to bool.
4106         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4107
4108 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4109
4110         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4111         Change type to bool.
4112         (dwarf_stack_value) <in_stack_memory>: Likewise.
4113         (dwarf_expr_context) <push_address>: Change parameter type to
4114         bool.
4115         <fetch_in_stack_memory>: Change return type to bool.
4116         <push>: Change parameter type to bool.
4117         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4118         to bool.
4119         (dwarf_expr_context::push_address): Likewise.
4120         (dwarf_expr_context::fetch_in_stack_memory): Change return type
4121         to bool.
4122         (dwarf_expr_context::execute_stack_op): Adjust.
4123         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4124
4125 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4126
4127         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4128         (struct dwarf_expr_context) <n_pieces>: Remove.
4129         <pieces>: Change type to std::vector.
4130         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4131         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4132         pieces.
4133         (dwarf_expr_context::add_piece): Adjust.
4134         * dwarf2loc.c (struct piece_closure): Initialize fields.
4135         <n_pieces>: Remove.
4136         <pieces>: Change type to std::vector.
4137         (allocate_piece_closure): Adjust, change parameter to
4138         std::vector rvalue and std::move it to piece_closure.
4139         (rw_pieced_value): Adjust.
4140         (check_pieced_synthetic_pointer): Adjust.
4141         (indirect_synthetic_pointer): Adjust.
4142         (coerce_pieced_ref): Adjust.
4143         (free_pieced_value_closure):  Adjust.  Use delete to free
4144         piece_closure.
4145         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
4146         to allocate_piece_closure.
4147         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4148
4149 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4150
4151         * probe.h (probe_ops_cp): Remove typedef.
4152         (DEF_VEC_P (probe_ops_cp)): Remove.
4153         (all_probe_ops): Change type to std::vector.
4154         * probe.c (info_probes_for_ops): Adjust to vector change.
4155         (probe_linespec_to_ops): Likewise.
4156         (all_probe_ops): Change type to std::vector.
4157         (_initialize_probe): Adjust to vector change.
4158         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
4159         * elfread.c (elf_get_probes): Likewise.
4160         * stap-probe.c (_initialize_stap_probe): Likewise.
4161
4162 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4163
4164         * probe.h (struct bound_probe): Define constructors.
4165         * probe.c (bound_probe_s): Remove typedef.
4166         (DEF_VEC_O (bound_probe_s)): Remove VEC.
4167         (collect_probes): Change return type to std::vector, remove
4168         cleanup.
4169         (compare_probes): Return bool, change parameter type.  Change
4170         semantic to "less than".
4171         (gen_ui_out_table_header_info): Change parameter to std::vector
4172         and update.
4173         (exists_probe_with_pops): Likewise.
4174         (info_probes_for_ops): Update to std::vector change.
4175         (enable_probes_command): Likewise.
4176         (disable_probes_command): Likewise.
4177
4178 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4179
4180         * probe.h (struct probe_ops) <get_probes>: Change parameter from
4181         vec to std::vector.
4182         * probe.c (parse_probes_in_pspace): Update.
4183         (find_probes_in_objfile): Update.
4184         (find_probe_by_pc): Update.
4185         (collect_probes): Update.
4186         (probe_any_get_probes): Update.
4187         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
4188         return type to reference to std::vector.
4189         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
4190         std::vector and update.
4191         (dtrace_process_dof): Likewise.
4192         (dtrace_get_probes): Likewise.
4193         * elfread.c (elf_get_probes): Change return type to std::vector,
4194         store an std::vector in bfd_data.
4195         (probe_key_free): Update to std::vector.
4196         * stap-probe.c (handle_stap_probe): Change parameter to
4197         std::vector and update.
4198         (stap_get_probes): Likewise.
4199         * symfile-debug.c (debug_sym_get_probes): Change return type to
4200         std::vector and update.
4201
4202 2017-09-11  Tom Tromey  <tom@tromey.com>
4203
4204         * breakpoint.c (program_breakpoint_here_p): Update.
4205         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
4206         from make_show_memory_breakpoints_cleanup.  Return a
4207         scoped_restore_tmpl<int>.
4208         (restore_show_memory_breakpoints): Remove.
4209         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
4210         * mem-break.c (memory_validate_breakpoint): Update.
4211         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
4212         (ia64_memory_remove_breakpoint): Update.
4213         (ia64_breakpoint_from_pc): Update.
4214         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
4215         from make_show_memory_breakpoints_cleanup.
4216
4217 2017-09-11  Tom Tromey  <tom@tromey.com>
4218
4219         * d-namespace.c (d_lookup_symbol): Use std::string.
4220         (find_symbol_in_baseclass): Likewise.
4221
4222 2017-09-11  Tom Tromey  <tom@tromey.com>
4223
4224         * ctf.c (ctf_start): Use std::string.
4225
4226 2017-09-11  Tom Tromey  <tom@tromey.com>
4227
4228         * ada-lang.c (is_known_support_routine): Update.
4229         (ada_unhandled_exception_name_addr_from_raise): Update.
4230         * guile/scm-frame.c (gdbscm_frame_name): Update.
4231         * python/py-frame.c (frapy_name): Update.
4232         (frapy_function): Update.
4233         * stack.h (find_frame_funname): Update.
4234         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
4235         (print_frame): Update.
4236
4237 2017-09-11  Tom Tromey  <tom@tromey.com>
4238
4239         * findcmd.c (put_bits): Take a gdb::byte_vector.
4240         (parse_find_args): Return gdb::byte_vector.  "args" now const.
4241         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
4242         cleanups.
4243         (find_command): Update.
4244
4245 2017-09-11  Tom Tromey  <tom@tromey.com>
4246
4247         * cli/cli-script.c (class scoped_restore_hook_in): New.
4248         (clear_hook_in_cleanup): Remove.
4249         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
4250         scoped_restore_hook_in.
4251
4252 2017-09-11  Tom Tromey  <tom@tromey.com>
4253
4254         * cli/cli-script.c (restore_interp): Remove.
4255         (read_command_lines): Use scoped_restore_interp.
4256         * interps.c (scoped_restore_interp::set_temp): Rename from
4257         interp_set_temp.
4258         * interps.h (class scoped_restore_interp): New.
4259         (interp_set_temp): Remove.
4260
4261 2017-09-11  Tom Tromey  <tom@tromey.com>
4262
4263         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4264         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
4265         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
4266         scoped_restore.
4267         (mi_cmd_break_insert_1): Update.
4268         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
4269         scoped_restore.
4270
4271 2017-09-11  Tom Tromey  <tom@tromey.com>
4272
4273         * demangle.c (demangle_command): Update.
4274         * breakpoint.c (disable_command): Update.
4275         (enable_command): Update.
4276         (find_location_by_number): Make "number" const.  Use
4277         get_number_trailer.
4278         * cli/cli-utils.c (extract_arg): Return std::string.
4279         * probe.c (parse_probe_linespec): Update.  Change types.
4280         (collect_probes): Take string arguments.
4281         (parse_probe_linespec): Likewise.
4282         (info_probes_for_ops): Update.
4283         (enable_probes_command): Update.
4284         (disable_probes_command): Update.
4285         * break-catch-sig.c (catch_signal_split_args): Update.
4286         * mi/mi-parse.c (mi_parse): Update.
4287
4288 2017-09-11  Tom Tromey  <tom@tromey.com>
4289
4290         * language.h (language_enum): Make argument const.
4291         * language.c (language_enum): Make argument const.
4292
4293 2017-09-11  Tom Tromey  <tom@tromey.com>
4294
4295         * common/common-utils.h (skip_to_space): Remove macro, redeclare
4296         as function.
4297         (skip_to_space): Rename from skip_to_space_const.
4298         * common/common-utils.c (skip_to_space): New function.
4299         (skip_to_space): Rename from skip_to_space_const.
4300         * cli/cli-utils.h (get_number): Rename from get_number_const.
4301         (extract_arg): Rename from extract_arg_const.
4302         * cli/cli-utils.c (get_number): Rename from get_number_const.
4303         (extract_arg): Rename from extract_arg_const.
4304         (number_or_range_parser::get_number): Use ::get_number.
4305         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
4306         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
4307         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
4308         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
4309         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
4310         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
4311         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
4312         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
4313
4314 2017-09-11  Tom Tromey  <tom@tromey.com>
4315
4316         * python/python.c (do_start_initialization): Use
4317         py-event-types.def to initialize types.
4318         Define all object type structures.
4319         * python/python-internal.h: Don't declare event initialization
4320         functions.
4321         * python/py-threadevent.c (thread_event_object_type): Don't
4322         define.
4323         * python/py-stopevent.c (stop_event_object_type): Don't define.
4324         * python/py-signalevent.c (signal_event_object_type): Don't
4325         declare or define.
4326         * python/py-newobjfileevent.c (new_objfile_event_object_type)
4327         (clear_objfiles_event_object_type): Don't declare or define.
4328         * python/py-infevents.c (inferior_call_pre_event_object_type)
4329         (inferior_call_post_event_object_type)
4330         (register_changed_event_object_type)
4331         (memory_changed_event_object_type): Don't declare or define.
4332         * python/py-inferior.c (new_thread_event_object_type)
4333         (new_inferior_event_object_type)
4334         (inferior_deleted_event_object_type): Don't declare or define.
4335         * python/py-exitedevent.c (exited_event_object_type): Don't
4336         declare or define.
4337         * python/py-evts.c (gdbpy_initialize_py_events): Use
4338         py-all-events.def.
4339         * python/py-events.h (thread_event_object_type): Don't declare.
4340         (events_object): Use py-all-events.def.
4341         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
4342         py-event-types.def.
4343         * python/py-event-types.def: New file.
4344         * python/py-continueevent.c (create_continue_event_object): Don't
4345         declare or define.
4346         * python/py-bpevent.c (breakpoint_event_object_type): Don't
4347         declare or define.
4348         * python/py-all-events.def: New file.
4349
4350 2017-09-11  Tom Tromey  <tom@tromey.com>
4351
4352         * python/py-threadevent.c (create_thread_event_object): Return
4353         gdbpy_ref.
4354         * python/py-stopevent.h (create_stop_event_object)
4355         (create_breakpoint_event_object, create_signal_event_object):
4356         Update.
4357         * python/py-stopevent.c (create_stop_event_object): Return
4358         gdbpy_ref.
4359         (emit_stop_event): Update.
4360         * python/py-signalevent.c (create_signal_event_object): Return
4361         gdbpy_ref.
4362         * python/py-infevents.c (create_inferior_call_event_object):
4363         Update.
4364         * python/py-event.h (create_event_object)
4365         (create_thread_event_object): Update.
4366         * python/py-event.c (create_event_object): Return gdbpy_ref.
4367         * python/py-continueevent.c: Return gdbpy_ref.
4368         * python/py-bpevent.c (create_breakpoint_event_object): Return
4369         gdbpy_ref.
4370
4371 2017-09-11  Tom Tromey  <tom@tromey.com>
4372
4373         PR python/15622:
4374         * NEWS: Add entry.
4375         * python/python.c (do_start_initialization): Initialize new event
4376         types.
4377         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
4378         (gdbpy_initialize_inferior_deleted_event)
4379         (gdbpy_initialize_new_thread_event): Declare.
4380         * python/py-threadevent.c (create_thread_event_object): Add option
4381         "thread" parameter.
4382         * python/py-inferior.c (new_thread_event_object_type)
4383         (new_inferior_event_object_type)
4384         (inferior_deleted_event_object_type): Declare.
4385         (python_new_inferior, python_inferior_deleted): New functions.
4386         (add_thread_object): Emit new_thread event.
4387         (gdbpy_initialize_inferior): Attach new functions to corresponding
4388         observers.
4389         (new_thread, new_inferior, inferior_deleted): Define new event
4390         types.
4391         * python/py-evts.c (gdbpy_initialize_py_events): Add new
4392         registries.
4393         * python/py-events.h (events_object) <new_inferior,
4394         inferior_deleted, new_thread>: New fields.
4395         * python/py-event.h (create_thread_event_breakpoint): Add optional
4396         "thread" parameter.
4397
4398 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4399
4400         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
4401         check current_ui instead.
4402         (internal_vproblem): Likewise.
4403
4404 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
4405
4406         * thread.c (print_thread_info_1): Remove unnecessary calls to
4407         uiout->is_mi_like_p.
4408
4409 2017-09-09  Tom Tromey  <tom@tromey.com>
4410
4411         * namespace.h (add_using_directive): Update.
4412         * namespace.c (add_using_directive): Change type of excludes to
4413         std::vector.
4414         * dwarf2read.c (read_import_statement): Use std::vector.
4415         (read_namespace): Update.
4416         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4417
4418 2017-09-09  Tom Tromey  <tom@tromey.com>
4419
4420         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
4421
4422 2017-09-09  Tom Tromey  <tom@tromey.com>
4423
4424         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
4425
4426 2017-09-09  Tom Tromey  <tom@tromey.com>
4427
4428         * stack.c (func_command): Use gdb::def_vector.
4429
4430 2017-09-09  Tom Tromey  <tom@tromey.com>
4431
4432         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
4433         ui_out_emit_list, ui_out_emit_tuple.
4434         (mi_cmd_var_update): Likewise.
4435
4436 2017-09-09  Tom Tromey  <tom@tromey.com>
4437
4438         * mi/mi-interp.c (mi_user_selected_context_changed): Use
4439         ui_out_redirect_pop.
4440         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
4441         ui_out_redirect_pop.
4442         * utils.c (do_ui_out_redirect_pop)
4443         (make_cleanup_ui_out_redirect_pop): Remove.
4444         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
4445         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
4446         * ui-out.h (ui_out_redirect_pop): New class.
4447
4448 2017-09-09  Tom Tromey  <tom@tromey.com>
4449
4450         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
4451         (list_available_thread_groups, mi_cmd_list_thread_groups)
4452         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
4453         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
4454         Likewise.
4455
4456 2017-09-09  Tom Tromey  <tom@tromey.com>
4457
4458         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
4459         ui_out_emit_tuple.
4460
4461 2017-09-09  Tom Tromey  <tom@tromey.com>
4462
4463         * target.c (flash_erase_command): Use ui_out_emit_tuple.
4464         * stack.c (print_frame): Use ui_out_emit_tuple.
4465         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
4466         (info_spu_mailbox_command, info_spu_dma_command)
4467         (info_spu_proxydma_command): Likewise.
4468         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
4469         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
4470         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
4471         ui_out_emit_tuple.
4472         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
4473
4474 2017-09-09  Tom Tromey  <tom@tromey.com>
4475
4476         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
4477         (class ui_out_emit_table): Update comment.
4478         * ui-out.c (do_cleanup_table_end)
4479         (make_cleanup_ui_out_table_begin_end): Remove.
4480         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
4481         (info_spu_dma_cmdlist): Likewise.
4482         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
4483         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
4484         ui_out_emit_table.
4485
4486 2017-09-09  Tom Tromey  <tom@tromey.com>
4487
4488         * thread.c (print_thread_info_1): Use ui_out_emit_table,
4489         ui_out_emit_list, gdb::optional.
4490
4491 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
4492
4493         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
4494         prototype.
4495         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
4496         prototype.
4497         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
4498         prototype.
4499         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
4500         * ada-exp.y: Remove _initialize_ada_exp prototype.
4501         * ada-lang.c: Remove _initialize_ada_language prototype.
4502         * ada-tasks.c: Remove _initialize_tasks prototype.
4503         * addrmap.c: Remove _initialize_addrmap prototype.
4504         * agent.c: Remove _initialize_agent prototype.
4505         * aix-thread.c: Remove _initialize_aix_thread prototype.
4506         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
4507         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
4508         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
4509         prototype.
4510         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
4511         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
4512         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
4513         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
4514         prototype.
4515         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
4516         prototype.
4517         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
4518         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
4519         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
4520         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
4521         prototype.
4522         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
4523         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
4524         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
4525         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
4526         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4527         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
4528         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
4529         prototype.
4530         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
4531         prototype.
4532         * annotate.c: Remove _initialize_annotate prototype.
4533         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
4534         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
4535         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
4536         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
4537         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
4538         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
4539         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
4540         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
4541         prototype.
4542         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
4543         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
4544         * auto-load.c: Remove _initialize_auto_load prototype.
4545         * auxv.c: Remove _initialize_auxv prototype.
4546         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
4547         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
4548         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
4549         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
4550         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
4551         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
4552         prototype.
4553         * break-catch-throw.c: Remove _initialize_break_catch_throw
4554         prototype.
4555         * breakpoint.c: Remove _initialize_breakpoint prototype.
4556         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
4557         * btrace.c: Remove _initialize_btrace prototype.
4558         * charset.c: Remove _initialize_charset prototype.
4559         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
4560         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
4561         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
4562         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
4563         * cli/cli-script.c: Remove _initialize_cli_script prototype.
4564         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
4565         * coffread.c: Remove _initialize_coffread prototype.
4566         * compile/compile.c: Remove _initialize_compile prototype.
4567         * complaints.c: Remove _initialize_complaints prototype.
4568         * completer.c: Remove _initialize_completer prototype.
4569         * copying.awk: Remove _initialize_copying prototype.
4570         * copying.c: Regenerate.
4571         * core-regset.c: Remove _initialize_core_regset prototype.
4572         * corefile.c: Remove _initialize_core prototype.
4573         * corelow.c: Remove _initialize_corelow prototype.
4574         * cp-abi.c: Remove _initialize_cp_abi prototype.
4575         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
4576         * cp-support.c: Remove _initialize_cp_support prototype.
4577         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
4578         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
4579         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
4580         * ctf.c: Remove _initialize_ctf prototype.
4581         * d-lang.c: Remove _initialize_d_language prototype.
4582         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
4583         prototype.
4584         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
4585         * dbxread.c: Remove _initialize_dbxread prototype.
4586         * dcache.c: Remove _initialize_dcache prototype.
4587         * demangle.c: Remove _initialize_demangler prototype.
4588         * disasm-selftests.c: Remove _initialize_disasm_selftests
4589         prototype.
4590         * disasm.c: Remove _initialize_disasm prototype.
4591         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
4592         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
4593         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
4594         prototype.
4595         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
4596         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
4597         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
4598         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
4599         * elfread.c: Remove _initialize_elfread prototype.
4600         * exec.c: Remove _initialize_exec prototype.
4601         * extension.c: Remove _initialize_extension prototype.
4602         * f-lang.c: Remove _initialize_f_language prototype.
4603         * f-valprint.c: Remove _initialize_f_valprint prototype.
4604         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
4605         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
4606         * filesystem.c: Remove _initialize_filesystem prototype.
4607         * findcmd.c: Remove _initialize_mem_search prototype.
4608         * fork-child.c: Remove _initialize_fork_child prototype.
4609         * frame-base.c: Remove _initialize_frame_base prototype.
4610         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
4611         * frame.c: Remove _initialize_frame prototype.
4612         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
4613         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
4614         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
4615         * gcore.c: Remove _initialize_gcore prototype.
4616         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
4617         * gdbarch.c: Regenerate.
4618         * gdbarch.sh: Remove _initialize_gdbarch prototype.
4619         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
4620         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
4621         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
4622         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
4623         * go-lang.c: Remove _initialize_go_language prototype.
4624         * go32-nat.c: Remove _initialize_go32_nat prototype.
4625         * guile/guile.c: Remove _initialize_guile prototype.
4626         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4627         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4628         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4629         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4630         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4631         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4632         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4633         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4634         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
4635         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
4636         prototype.
4637         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
4638         prototype.
4639         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
4640         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
4641         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
4642         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
4643         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4644         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4645         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4646         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4647         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4648         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4649         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4650         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4651         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4652         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4653         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4654         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4655         prototype.
4656         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4657         prototype.
4658         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4659         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4660         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4661         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4662         * infcall.c: Remove _initialize_infcall prototype.
4663         * infcmd.c: Remove _initialize_infcmd prototype.
4664         * inferior.c: Remove _initialize_inferiors prototype.
4665         * inflow.c: Remove _initialize_inflow prototype.
4666         * infrun.c: Remove _initialize_infrun prototype.
4667         * interps.c: Remove _initialize_interpreter prototype.
4668         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4669         * jit.c: Remove _initialize_jit prototype.
4670         * language.c: Remove _initialize_language prototype.
4671         * linux-fork.c: Remove _initialize_linux_fork prototype.
4672         * linux-nat.c: Remove _initialize_linux_nat prototype.
4673         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4674         * linux-thread-db.c: Remove _initialize_thread_db prototype.
4675         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4676         * m2-lang.c: Remove _initialize_m2_language prototype.
4677         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4678         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4679         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4680         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4681         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4682         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4683         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4684         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4685         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4686         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4687         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4688         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4689         * machoread.c: Remove _initialize_machoread prototype.
4690         * macrocmd.c: Remove _initialize_macrocmd prototype.
4691         * macroscope.c: Remove _initialize_macroscope prototype.
4692         * maint.c: Remove _initialize_maint_cmds prototype.
4693         * mdebugread.c: Remove _initialize_mdebugread prototype.
4694         * memattr.c: Remove _initialize_mem prototype.
4695         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4696         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4697         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4698         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4699         * mi/mi-main.c: Remove _initialize_mi_main prototype.
4700         * microblaze-linux-tdep.c: Remove
4701         _initialize_microblaze_linux_tdep prototype.
4702         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4703         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4704         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4705         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4706         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4707         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4708         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4709         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4710         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4711         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4712         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4713         prototype.
4714         * mipsread.c: Remove _initialize_mipsread prototype.
4715         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4716         prototype.
4717         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4718         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4719         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4720         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4721         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4722         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4723         prototype.
4724         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4725         * nto-procfs.c: Remove _initialize_procfs prototype.
4726         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4727         * objc-lang.c: Remove _initialize_objc_language prototype.
4728         * objfiles.c: Remove _initialize_objfiles prototype.
4729         * observer.c: Remove observer_test_first_notification_function,
4730         observer_test_second_notification_function,
4731         observer_test_third_notification_function, and
4732         _initialize_observer prototypes.
4733         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4734         * osabi.c: Remove _initialize_gdb_osabi prototype.
4735         * osdata.c: Remove _initialize_osdata prototype.
4736         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4737         * parse.c: Remove _initialize_parse prototype.
4738         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4739         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4740         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4741         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4742         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4743         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4744         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4745         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4746         * printcmd.c: Remove _initialize_printcmd prototype.
4747         * probe.c: Remove _initialize_probe prototype.
4748         * proc-api.c: Remove _initialize_proc_api prototype.
4749         * proc-events.c: Remove _initialize_proc_events prototype.
4750         * proc-service.c: Remove _initialize_proc_service prototype.
4751         * procfs.c: Remove _initialize_procfs prototype.
4752         * psymtab.c: Remove _initialize_psymtab prototype.
4753         * python/python.c: Remove _initialize_python prototype.
4754         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4755         * record-btrace.c: Remove _initialize_record_btrace prototype.
4756         * record-full.c: Remove _initialize_record_full prototype.
4757         * record.c: Remove _initialize_record prototype.
4758         * regcache.c: Remove _initialize_regcache prototype.
4759         * reggroups.c: Remove _initialize_reggroup prototype.
4760         * remote-notif.c: Remove _initialize_notif prototype.
4761         * remote-sim.c: Remove _initialize_remote_sim prototype.
4762         * remote.c: Remove _initialize_remote prototype.
4763         * reverse.c: Remove _initialize_reverse prototype.
4764         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4765         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4766         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4767         prototype.
4768         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4769         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4770         * rust-exp.y: Remove _initialize_rust_exp prototype.
4771         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4772         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4773         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4774         * score-tdep.c: Remove _initialize_score_tdep prototype.
4775         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4776         prototype.
4777         * ser-go32.c: Remove _initialize_ser_dos prototype.
4778         * ser-mingw.c: Remove _initialize_ser_windows prototype.
4779         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4780         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4781         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4782         * serial.c: Remove _initialize_serial prototype.
4783         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4784         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4785         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4786         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4787         * skip.c: Remove _initialize_step_skip prototype.
4788         * sol-thread.c: Remove _initialize_sol_thread prototype.
4789         * solib-aix.c: Remove _initialize_solib_aix prototype.
4790         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4791         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4792         * solib-frv.c: Remove _initialize_frv_solib prototype.
4793         * solib-spu.c: Remove _initialize_spu_solib prototype.
4794         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4795         * solib-target.c: Remove _initialize_solib_target prototype.
4796         * solib.c: Remove _initialize_solib prototype.
4797         * source.c: Remove _initialize_source prototype.
4798         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4799         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4800         prototype.
4801         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4802         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4803         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4804         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4805         prototype.
4806         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4807         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4808         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4809         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4810         prototype.
4811         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4812         prototype.
4813         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4814         prototype.
4815         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4816         prototype.
4817         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4818         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4819         prototype.
4820         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4821         prototype.
4822         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4823         prototype.
4824         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4825         prototype.
4826         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4827         prototype.
4828         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4829         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4830         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4831         * stabsread.c: Remove _initialize_stabsread prototype.
4832         * stack.c: Remove _initialize_stack prototype.
4833         * stap-probe.c: Remove _initialize_stap_probe prototype.
4834         * std-regs.c: Remove _initialize_frame_reg prototype.
4835         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4836         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4837         * symfile.c: Remove _initialize_symfile prototype.
4838         * symmisc.c: Remove _initialize_symmisc prototype.
4839         * symtab.c: Remove _initialize_symtab prototype.
4840         * target-dcache.c: Remove _initialize_target_dcache prototype.
4841         * target-descriptions.c: Remove _initialize_target_descriptions
4842         prototype.
4843         * thread.c: Remove _initialize_thread prototype.
4844         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4845         prototype.
4846         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4847         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4848         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4849         prototype.
4850         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4851         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4852         * tracefile.c: Remove _initialize_tracefile prototype.
4853         * tracepoint.c: Remove _initialize_tracepoint prototype.
4854         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4855         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4856         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4857         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4858         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4859         * tui/tui-win.c: Remove _initialize_tui_win prototype.
4860         * tui/tui.c: Remove _initialize_tui prototype.
4861         * typeprint.c: Remove _initialize_typeprint prototype.
4862         * user-regs.c: Remove _initialize_user_regs prototype.
4863         * utils.c: Remove _initialize_utils prototype.
4864         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4865         * valarith.c: Remove _initialize_valarith prototype.
4866         * valops.c: Remove _initialize_valops prototype.
4867         * valprint.c: Remove _initialize_valprint prototype.
4868         * value.c: Remove _initialize_values prototype.
4869         * varobj.c: Remove _initialize_varobj prototype.
4870         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4871         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4872         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4873         * windows-nat.c: Remove _initialize_windows_nat,
4874         _initialize_check_for_gdb_ini, and _initialize_loadable
4875         prototypes.
4876         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4877         * xcoffread.c: Remove _initialize_xcoffread prototype.
4878         * xml-support.c: Remove _initialize_xml_support prototype.
4879         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4880         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4881         prototype.
4882         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4883         prototype.
4884         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4885
4886 2017-09-08  Keith Seitz  <keiths@redhat.com>
4887
4888         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4889         field.
4890
4891 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
4892
4893         * f-valprint.c (f_val_print): Remove check for one byte
4894         sized integers. Remove printing of character type.
4895
4896 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
4897             Christoph Weinmann  <christoph.t.weinmann@intel.com>
4898             Bernhard Heckel  <bernhard.heckel@intel.com>
4899
4900         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4901         to maintain proper indentation when printing pointers/refs.
4902
4903 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4904
4905         GDB 8.0.1 released.
4906
4907 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4908
4909         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4910
4911 2017-09-05  Tom Tromey  <tom@tromey.com>
4912
4913         * parse.c (funcall_chain): Now a std::vector.
4914         (start_arglist, end_arglist): Simplify.
4915         (free_funcalls): Remove.
4916         (parse_exp_in_context_1): Remove cleanup.
4917
4918 2017-09-05  Tom Tromey  <tom@tromey.com>
4919
4920         * go-exp.y (go_parse): Don't create a cleanup.
4921
4922 2017-09-05  Tom Tromey  <tom@tromey.com>
4923
4924         * d-exp.y (PrimaryExpression): Use std::string.
4925         (d_parse): Don't create a cleanup.
4926
4927 2017-09-05  Tom Tromey  <tom@tromey.com>
4928
4929         * utils.c (do_clear_parser_state): Remove.
4930         (make_cleanup_clear_parser_state): Remove.
4931         * p-exp.y (pascal_parse): Use scoped_restore.
4932         * m2-exp.y (m2_parse): Use scoped_restore.
4933         * f-exp.y (f_parse): Use scoped_restore.
4934         * d-exp.y (d_parse): Use scoped_restore.
4935         * c-exp.y (c_parse): Use scoped_restore.
4936         * ada-exp.y (ada_parse): Use scoped_restore.
4937         * utils.h (make_cleanup_clear_parser_state): Remove.
4938
4939 2017-09-06  Keith Seitz  <keiths@redhat.com>
4940
4941         * dwarf2read.c (dw2_linkage_name_attr): New function.
4942         (dw2_linkage_name): New function.
4943         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4944         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4945         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4946
4947 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4948
4949         * config/djgpp/djconfig.sh: Correct shell portability issue.
4950
4951 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4952
4953         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4954
4955 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4956
4957         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4958         * NEWS: Mention new FreeBSD/mips native configuration.
4959         * configure.host: Add aarch64*-*-freebsd*.
4960         * configure.nat: Likewise.
4961         * aarch64-fbsd-nat.c: New file.
4962
4963 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4964
4965         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4966         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4967         * NEWS: Mention new FreeBSD/aarch64 target.
4968         * configure.tgt: Add aarch64*-*-freebsd*.
4969         * aarch64-fbsd-tdep.c: New file.
4970         * aarch64-fbsd-tdep.h: New file.
4971
4972 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4973
4974         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4975
4976 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
4977
4978         * parse.c (find_minsym_type_and_address): Don't relocate addresses
4979         of TLS symbols.
4980
4981 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4982
4983         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4984         call.
4985
4986 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4987
4988         * infrun.c (follow_exec): Call add_thread after
4989         target_find_description.
4990
4991 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4992
4993         * infrun.c (handle_inferior_event_1): When exec'ing, read
4994         stop_pc after follow_exec.
4995
4996 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4997
4998         * remote.c (process_g_packet): Update error message.
4999
5000 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5001
5002         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
5003         targets.
5004
5005 2017-09-05  Pedro Alves  <palves@redhat.com>
5006
5007         * eval.c (eval_call, evaluate_funcall): New functions, factored
5008         out from ...
5009         (evaluate_subexp_standard): ... this.
5010
5011 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5012
5013         * amd64-tdep.c (amd64_target_description): Create target
5014         descriptions.
5015         (_initialize_amd64_tdep): Don't call functions
5016         initialize_tdesc_amd64_*.  Add self tests.
5017         * arch/amd64.c (amd64_create_target_description): Add parameter
5018         is_linux.  Call set_tdesc_osabi if is_linux is true.
5019         * arch/amd64.h (amd64_create_target_description): Update the
5020         declaration.
5021         * arch/i386.c (i386_create_target_description): Add parameter
5022         is_linux.  Call set_tdesc_osabi if is_linux is true.
5023         * arch/i386.h (i386_create_target_description): Update
5024         declaration.
5025         * configure.tgt: Add i386.o to gdb_target_obs.
5026         * features/Makefile (XMLTOC): Remove i386/*.xml.
5027         * features/i386/amd64-avx-avx512.c: Remove.
5028         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
5029         * features/i386/amd64-avx-mpx.c: Remove.
5030         * features/i386/amd64-avx.c: Remove.
5031         * features/i386/amd64-mpx.c: Remove.
5032         * features/i386/amd64.c: Remove.
5033         * features/i386/i386-avx-avx512.c: Remove.
5034         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
5035         * features/i386/i386-avx-mpx.c: Remove.
5036         * features/i386/i386-avx.c: Remove.
5037         * features/i386/i386-mmx.c: Remove.
5038         * features/i386/i386-mpx.c: Remove.
5039         * features/i386/i386.c: Remove.
5040         * i386-tdep.c: Don't include features/i386/i386*.c., include
5041         target-descriptions.h and arch/i386.h.
5042         (i386_target_description): Create target descriptions.
5043         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5044         functions.  Do self tests.
5045
5046 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5047
5048         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5049         * features/i386/amd64-avx-avx512-linux.c: Removed.
5050         * features/i386/amd64-avx-linux.c: Removed.
5051         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5052         * features/i386/amd64-avx-mpx-linux.c: Removed.
5053         * features/i386/amd64-linux.c: Removed.
5054         * features/i386/amd64-mpx-linux.c: Removed.
5055         * features/i386/x32-avx-avx512-linux.c: Removed.
5056         * features/i386/x32-avx-linux.c: Removed.
5057         * features/i386/x32-linux.c: Removed.
5058
5059 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5060
5061         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
5062         features/i386/*.c.
5063         (amd64_linux_read_description): Call
5064         amd64_create_target_description.
5065         * arch/amd64.c: New file.
5066         * arch/amd64.h: New file.
5067         * configure.tgt (x86_64-*-linux*): Append amd64.o.
5068         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5069
5070 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5071
5072         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5073         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
5074         (amd64_linux_read_description): Create target descriptions.
5075         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5076         functions.  Add unit tests.
5077         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5078         x32-core.xml.
5079         * features/i386/64bit-avx.c: Generated.
5080         * features/i386/64bit-avx512.c: Generated.
5081         * features/i386/64bit-core.c: Generated.
5082         * features/i386/64bit-linux.c: Generated.
5083         * features/i386/64bit-mpx.c: Generated.
5084         * features/i386/64bit-pkeys.c: Generated.
5085         * features/i386/64bit-segments.c: Generated.
5086         * features/i386/64bit-sse.c: Generated.
5087         * features/i386/x32-core.c: Generated.
5088         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5089         c files for amd64-linux and x32-linux.
5090
5091 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5092
5093         * amd64-linux-tdep.c (amd64_linux_read_description): New
5094         function.
5095         (amd64_linux_core_read_description): Call
5096         amd64_linux_read_description.
5097         (amd64_linux_init_abi): Likewise.
5098         (amd64_x32_linux_init_abi): Likewise.
5099         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5100         * x86-linux-nat.c (x86_linux_read_description): Call
5101         amd64_linux_read_description.
5102
5103 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5104
5105         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5106         comments.
5107
5108 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5109
5110         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5111         * features/i386/i386-avx-avx512-linux.c: Remove.
5112         * features/i386/i386-avx-linux.c: Remove.
5113         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5114         * features/i386/i386-avx-mpx-linux.c: Remove.
5115         * features/i386/i386-linux.c: Remove.
5116         * features/i386/i386-mmx-linux.c: Remove.
5117         * features/i386/i386-mpx-linux.c: Remove.
5118
5119 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5120
5121         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5122         (SFILES): Add arch/i386.c.
5123         (HFILES_NO_SRCDIR): Add arch/i386.h.
5124         * arch/i386.c: New file.
5125         * arch/i386.h: New file.
5126         * arch/tdesc.h (allocate_target_description): Declare.
5127         (set_tdesc_architecture): Declare.
5128         (set_tdesc_osabi): Declare.
5129         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5130         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5131         include arch/i386.h.
5132         (i386_linux_read_description): Remove code and call
5133         i386_create_target_description.
5134         (set_tdesc_architecture): New function.
5135         (set_tdesc_osabi): New function.
5136         * target-descriptions.h (allocate_target_description): Remove.
5137
5138 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5139
5140         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5141         * target-descriptions.c (tdesc_create_feature): Likewise, and
5142         adjust code.
5143         * features/i386/32bit-avx.c: Re-generated.
5144         * features/i386/32bit-avx512.c: Re-generated.
5145         * features/i386/32bit-core.c: Re-generated.
5146         * features/i386/32bit-linux.c: Re-generated.
5147         * features/i386/32bit-mpx.c: Re-generated.
5148         * features/i386/32bit-pkeys.c: Re-generated.
5149         * features/i386/32bit-sse.c: Re-generated.
5150
5151 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5152
5153         * regformats/regdef.h (struct reg): Override operator == and !=.
5154
5155 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5156
5157         * arch/tdesc.h: New file.
5158         * regformats/regdat.sh: Generate code using tdesc_create_reg.
5159         * target-descriptions.c: Update comments.
5160         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
5161         declarations.
5162         * features/i386/32bit-avx.c: Re-generated.
5163         * features/i386/32bit-avx512.c: Re-generated.
5164         * features/i386/32bit-core.c: Re-generated.
5165         * features/i386/32bit-linux.c: Re-generated.
5166         * features/i386/32bit-mpx.c: Re-generated.
5167         * features/i386/32bit-pkeys.c: Re-generated.
5168         * features/i386/32bit-sse.c: Re-generated.
5169
5170 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5171
5172         * regformats/regdat.sh: Update generated code.
5173
5174 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5175
5176         * regformats/regdat.sh: Adjust code order.
5177
5178 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5179
5180         * expprint.c (dump_subexp_body_standard): Use constant format
5181         string in fprintf_filtered call.
5182
5183 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5184
5185         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
5186         NetBSD/i386.
5187         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
5188
5189 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5190
5191         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
5192
5193 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5194
5195         * bsd-kvm.o: Define _KMEMUSER.
5196         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
5197         * configure: Regenerate.
5198
5199 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5200
5201         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
5202         * i386-fbsd-nat.c: Likewise.
5203
5204 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5205
5206         * unittests/array-view-selftests.c: Add include of <array>.
5207
5208 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5209
5210         * spu-tdep.c (flush_ea_cache): Add missing argument to
5211         call_function_by_hand.
5212
5213 2017-09-04  Pedro Alves  <palves@redhat.com>
5214
5215         * NEWS (Safer support for debugging with no debug info): New.
5216
5217 2017-09-04  Pedro Alves  <palves@redhat.com>
5218
5219         * c-exp.y (function_method, function_method_void): Add current
5220         instance flags to TYPE_INSTANCE.
5221         * dwarf2read.c (check_modifier): New.
5222         (compute_delayed_physnames): Assert that only C++ adds delayed
5223         physnames.  Mark fn_fields as const/volatile depending on
5224         physname.
5225         * eval.c (make_params): New type_instance_flags parameter.  Use
5226         it as the new type's instance flags.
5227         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
5228         flags element and pass it to make_params.
5229         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
5230         instance flags element.
5231         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
5232         * gdbtypes.h: Include "enum-flags.h".
5233         (type_instance_flags): New enum-flags type.
5234         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
5235         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
5236         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
5237         (follow_type_instance_flags): New function.
5238         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
5239         * parser-defs.h (follow_type_instance_flags): Declare.
5240         * valops.c (value_struct_elt_for_reference): const/volatile must
5241         match too.
5242
5243 2017-09-04  Pedro Alves  <palves@redhat.com>
5244
5245         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
5246         function/method scopes; lookup the nested name as a function local
5247         static variable.
5248
5249 2017-09-04  Pedro Alves  <palves@redhat.com>
5250
5251         (%type <voidval>): Add function_method.
5252         * c-exp.y (exp): New production for calls with no arguments.
5253         (function_method, function_method_void_or_typelist): New
5254         productions.
5255         (exp): New production for "method()::static_var".
5256         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
5257         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5258         Handle OP_FUNC_STATIC_VAR.
5259         * parse.c (operator_length_standard):
5260         Handle OP_FUNC_STATIC_VAR.
5261
5262 2017-09-04  Pedro Alves  <palves@redhat.com>
5263
5264         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
5265         handling.
5266         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5267         Ditto.
5268         * parse.c (operator_length_standard, operator_check_standard):
5269         Ditto.
5270         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
5271
5272 2017-09-04  Pedro Alves  <palves@redhat.com>
5273
5274         * ax-gdb.c: Include "typeprint.h".
5275         (gen_expr_for_cast): New function.
5276         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
5277         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
5278         type is unknown.
5279         * dwarf2read.c (new_symbol_full): Fallback to int instead of
5280         nodebug_data_symbol.
5281         * eval.c: Include "typeprint.h".
5282         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
5283         Error out if symbol has unknown type.
5284         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
5285         evaluate_subexp_for_cast.
5286         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
5287         OP_VAR_MSYM_VALUE.
5288         (evaluate_subexp_for_cast): New function.
5289         * gdbtypes.c (init_nodebug_var_type): New function.
5290         (objfile_type): Use it to initialize types of variables with no
5291         debug info.
5292         * typeprint.c (error_unknown_type): New.
5293         * typeprint.h (error_unknown_type): New declaration.
5294         * compile/compile-c-types.c (convert_type_basic): Handle
5295         TYPE_CODE_ERROR; warn and fallback to int for variables with
5296         unknown type.
5297
5298 2017-09-04  Pedro Alves  <palves@redhat.com>
5299
5300         * eval.c (evaluate_var_value): New function, factored out from ...
5301         (evaluate_subexp_standard): ... here.
5302
5303 2017-09-04  Pedro Alves  <palves@redhat.com>
5304
5305         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
5306         Remove useless assignments to 'op'.
5307
5308 2017-09-04  Pedro Alves  <palves@redhat.com>
5309
5310         * eval.c (eval_skip_value): New function.
5311         (evaluate_subexp_standard): Use it.
5312
5313 2017-09-04  Pedro Alves  <palves@redhat.com>
5314
5315         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
5316         function name from symbol/minsym and pass it to
5317         error_call_unknown_return_type.
5318
5319 2017-09-04  Pedro Alves  <palves@redhat.com>
5320
5321         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
5322         * ax-gdb.c (gen_msym_var_ref): New function.
5323         (gen_expr): Handle OP_VAR_MSYM_VALUE.
5324         * eval.c (evaluate_var_msym_value): New function.
5325         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
5326         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
5327         to call_function_by_hand.
5328         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5329         Handle OP_VAR_MSYM_VALUE.
5330         (union exp_element) <msymbol>: New field.
5331         * minsyms.h (struct type): Forward declare.
5332         (find_minsym_type_and_address): Declare.
5333         * parse.c (write_exp_elt_msym): New function.
5334         (write_exp_msymbol): Delete, refactored as ...
5335         (find_minsym_type_and_address): ... this new function.
5336         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
5337         (operator_length_standard, operator_check_standard): Handle
5338         OP_VAR_MSYM_VALUE.
5339         * std-operator.def (OP_VAR_MSYM_VALUE): New.
5340
5341 2017-09-04  Pedro Alves  <palves@redhat.com>
5342
5343         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
5344         TYPE_GNU_IFUNC specially here.  Throw error if return type is
5345         unknown.
5346         * ada-typeprint.c (print_func_type): Handle functions with unknown
5347         return type.
5348         * c-typeprint.c (c_type_print_base): Handle functions and methods
5349         with unknown return type.
5350         * compile/compile-c-symbols.c (convert_symbol_bmsym)
5351         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
5352         * compile/compile-c-types.c: Include "objfiles.h".
5353         (convert_func): For functions with unknown return type, warn and
5354         default to int.
5355         * compile/compile-object-run.c (compile_object_run): Adjust call
5356         to call_function_by_hand_dummy.
5357         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
5358         call_function_by_hand.
5359         * eval.c (evaluate_subexp_standard): Adjust calls to
5360         call_function_by_hand.  Handle functions and methods with unknown
5361         return type.  Pass expect_type to call_function_by_hand.
5362         * f-typeprint.c (f_type_print_base): Handle functions with unknown
5363         return type.
5364         * gcore.c (call_target_sbrk): Adjust call to
5365         call_function_by_hand.
5366         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
5367         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
5368         an integer address type instead of nodebug.
5369         * guile/scm-value.c (gdbscm_value_call): Adjust call to
5370         call_function_by_hand.
5371         * infcall.c (error_call_unknown_return_type): New function.
5372         (call_function_by_hand): New "default_return_type" parameter.
5373         Pass it down.
5374         (call_function_by_hand_dummy): New "default_return_type"
5375         parameter.  Use it instead of defaulting to int.  If there's no
5376         default and the return type is unknown, throw an error.  If
5377         there's a default return type, and the called function has no
5378         debug info, then assume the function is prototyped.
5379         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
5380         New "default_return_type" parameter.
5381         (error_call_unknown_return_type): New declaration.
5382         * linux-fork.c (call_lseek): Cast return type of lseek.
5383         (inferior_call_waitpid, checkpoint_command): Adjust calls to
5384         call_function_by_hand.
5385         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
5386         calls to call_function_by_hand.
5387         * m2-typeprint.c (m2_procedure): Handle functions with unknown
5388         return type.
5389         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5390         (value_nsstring, print_object_command): Adjust calls to
5391         call_function_by_hand.
5392         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
5393         functions with unknown return type.
5394         (pascal_type_print_func_varspec_suffix): New function.
5395         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
5396         TYPE_CODE_METHOD>: Use it.
5397         * python/py-value.c (valpy_call): Adjust call to
5398         call_function_by_hand.
5399         * rust-lang.c (rust_evaluate_funcall): Adjust call to
5400         call_function_by_hand.
5401         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
5402         call_function_by_hand.
5403         * valops.c (value_allocate_space_in_inferior): Adjust call to
5404         call_function_by_hand.
5405         * typeprint.c (type_print_unknown_return_type): New function.
5406         * typeprint.h (type_print_unknown_return_type): New declaration.
5407
5408 2017-09-04  Pedro Alves  <palves@redhat.com>
5409
5410         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
5411         types with more than one parameter as prototyped.
5412
5413 2017-09-04  Pedro Alves  <palves@redhat.com>
5414
5415         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
5416         (disassemble_command): Use gdb_disassembly_flags instead of bare
5417         int.
5418         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
5419         (dump_insns, do_mixed_source_and_assembly_deprecated)
5420         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
5421         Use gdb_disassembly_flags instead of bare int.
5422         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
5423         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
5424         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
5425         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
5426         (enum gdb_disassembly_flag): ... values of this new enumeration.
5427         (gdb_disassembly_flags): Define.
5428         (gdb_disassembly)
5429         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
5430         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
5431         gdb_disassembly_flags instead of bare int.
5432         * record-btrace.c (btrace_insn_history)
5433         (record_btrace_insn_history, record_btrace_insn_history_range)
5434         (record_btrace_insn_history_from): Use gdb_disassembly_flags
5435         instead of bare int.
5436         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
5437         Use gdb_disassembly_flags instead of bare int.
5438         * target-debug.h (target_debug_print_gdb_disassembly_flags):
5439         Define.
5440         * target-delegates.c: Regenerate.
5441         * target.c (target_insn_history, target_insn_history_from)
5442         (target_insn_history_range): Use gdb_disassembly_flags instead of
5443         bare int.
5444         * target.h: Include "disasm.h".
5445         (struct target_ops) <to_insn_history, to_insn_history_from,
5446         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
5447         int.
5448         (target_insn_history, target_insn_history_from)
5449         (target_insn_history_range): Use gdb_disassembly_flags instead of
5450         bare int.
5451
5452 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5453
5454         * cli/cli-script.c (build_command_line): For if/while commands,
5455         check whether args is empty.
5456
5457 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5458
5459         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
5460         (enum command_control_type): Likewise.
5461         (struct command_line): Likewise.
5462         (free_command_lines): Likewise.
5463         (struct command_lines_deleter): Likewise.
5464         (command_line_up): Likewise.
5465         (read_command_lines): Likewise.
5466         (read_command_lines_1): Likewise.
5467         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
5468         (enum command_control_type): Likewise.
5469         (struct command_line): Likewise.
5470         (free_command_lines): Likewise.
5471         (struct command_lines_deleter): Likewise.
5472         (command_line_up): Likewise.
5473         (read_command_lines): Likewise.
5474         (read_command_lines_1): Likewise.
5475         * breakpoint.h: Include cli/cli-script.h.
5476         * extension-priv.h: Likewise.
5477         * gdbcmd.h: Likewise.
5478
5479 2017-09-04  Pedro Alves  <palves@redhat.com>
5480
5481         * ada-lang.c (is_known_support_routine): Move sal declaration to
5482         where it is initialized.
5483         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
5484         (parse_breakpoint_sals, decode_static_tracepoint_spec)
5485         (clear_command, update_static_tracepoint): Remove init_sal
5486         references.  Move declarations closer to initializations.
5487         * cli/cli-cmds.c (list_command): Move sal declarations closer to
5488         initializations.
5489         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
5490         references.  Move sal declarations closer to initializations.
5491         * frame.c (find_frame_sal): Return a symtab_and_line via function
5492         return instead of output parameter.  Remove init_sal references.
5493         * frame.h (find_frame_sal): Return a symtab_and_line via function
5494         return instead of output parameter.
5495         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
5496         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
5497         instead of memset.
5498         (gdbscm_find_pc_line): Remove init_sal reference.
5499         * infcall.c (call_function_by_hand_dummy): Remove init_sal
5500         references.  Move declarations closer to initializations.
5501         * infcmd.c (set_step_frame): Update.  Move declarations closer to
5502         initializations.
5503         (finish_backward): Remove init_sal references.  Move declarations
5504         closer to initializations.
5505         * infrun.c (process_event_stop_test, handle_step_into_function)
5506         (insert_hp_step_resume_breakpoint_at_frame)
5507         (insert_step_resume_breakpoint_at_caller): Likewise.
5508         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
5509         (symbol_to_sal): Likewise.
5510         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
5511         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
5512         to its initialization.
5513         * reverse.c (save_bookmark_command): Use new/delete.  Remove
5514         init_sal references.  Move declarations closer to initializations.
5515         * source.c (get_current_source_symtab_and_line): Remove brace
5516         initialization.
5517         (set_current_source_symtab_and_line): Now takes the sal by const
5518         reference.  Remove brace initialization.
5519         (line_info): Remove init_sal reference.
5520         * source.h (set_current_source_symtab_and_line): Now takes a
5521         symtab_and_line via const reference.
5522         * stack.c (set_current_sal_from_frame): Adjust.
5523         (print_frame_info): Adjust.
5524         (get_last_displayed_sal): Return the sal via function return
5525         instead of via output parameter.  Simplify.
5526         (frame_info): Adjust.
5527         * stack.h (get_last_displayed_sal): Return the sal via function
5528         return instead of via output parameter.
5529         * symtab.c (init_sal): Delete.
5530         (find_pc_sect_line): Remove init_sal references.  Move
5531         declarations closer to initializations.
5532         (find_function_start_sal): Remove init_sal references.  Move
5533         declarations closer to initializations.
5534         * symtab.h (struct symtab_and_line): In-class initialize all
5535         fields.
5536         * tracepoint.c (set_traceframe_context)
5537         (print_one_static_tracepoint_marker): Remove init_sal references.
5538         Move declarations closer to initializations.
5539         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
5540         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
5541         declarations closer to initializations.
5542         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
5543         init_sal references.  Adjust.
5544
5545 2017-09-04  Pedro Alves  <palves@redhat.com>
5546
5547         * ax-gdb.c (agent_command_1): Use range-for.
5548         * break-catch-throw.c (re_set_exception_catchpoint): Update.
5549         * breakpoint.c: Include "common/array-view.h".
5550         (init_breakpoint_sal, create_breakpoint_sal): Change sals
5551         parameter from struct symtabs_and_lines to
5552         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
5553         (breakpoint_sals_to_pc): Change sals parameter from struct
5554         symtabs_and_lines to std::vector reference.
5555         (check_fast_tracepoint_sals): Change sals parameter from struct
5556         symtabs_and_lines to std::array_view.  Use range-for.
5557         (decode_static_tracepoint_spec): Return a std::vector instead of
5558         symtabs_and_lines.  Update.
5559         (create_breakpoint): Update.
5560         (break_range_command, until_break_command, clear_command): Update.
5561         (base_breakpoint_decode_location, bkpt_decode_location)
5562         (bkpt_probe_create_sals_from_location)
5563         (bkpt_probe_decode_location, tracepoint_decode_location)
5564         (tracepoint_probe_decode_location)
5565         (strace_marker_create_sals_from_location): Return a std::vector
5566         instead of symtabs_and_lines.
5567         (strace_marker_create_breakpoints_sal): Update.
5568         (strace_marker_decode_location): Return a std::vector instead of
5569         symtabs_and_lines.  Update.
5570         (update_breakpoint_locations): Change struct symtabs_and_lines
5571         parameters to gdb::array_view.  Adjust.
5572         (location_to_sals): Return a std::vector instead of
5573         symtabs_and_lines.  Update.
5574         (breakpoint_re_set_default): Use std::vector instead of struct
5575         symtabs_and_lines.
5576         (decode_location_default): Return a std::vector instead of
5577         symtabs_and_lines.  Update.
5578         * breakpoint.h: Include "common/array-view.h".
5579         (struct breakpoint_ops) <decode_location>: Now returns a
5580         std::vector instead of returning a symtabs_and_lines via output
5581         parameter.
5582         (update_breakpoint_locations): Change sals parameters to use
5583         gdb::array_view.
5584         * cli/cli-cmds.c (edit_command, list_command): Update to use
5585         std::vector and gdb::array_view.
5586         (ambiguous_line_spec): Adjust to use gdb::array_view and
5587         range-for.
5588         (compare_symtabs): Rename to ...
5589         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
5590         const reference and adjust.
5591         (filter_sals): Rewrite using std::vector and standard algorithms.
5592         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
5593         (jump_command): Update to use std::vector.
5594         * linespec.c (struct linespec_state) <canonical_names>: Update
5595         comment.
5596         (add_sal_to_sals_basic): Delete.
5597         (add_sal_to_sals, filter_results, convert_results_to_lsals)
5598         (decode_line_2, create_sals_line_offset)
5599         (convert_address_location_to_sals, convert_linespec_to_sals)
5600         (convert_explicit_location_to_sals, parse_linespec)
5601         (event_location_to_sals, decode_line_full, decode_line_1)
5602         (decode_line_with_current_source)
5603         (decode_line_with_last_displayed, decode_objc)
5604         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
5605         (linespec_result::~linespec_result): Adjust to use std::vector
5606         instead of symtabs_and_lines.
5607         * linespec.h (linespec_sals::sals): Now a std::vector.
5608         (struct linespec_result): Use std::vector, bool, and in-class
5609         initialization.
5610         (decode_line_1, decode_line_with_current_source)
5611         (decode_line_with_last_displayed): Return std::vector.
5612         * macrocmd.c (info_macros_command): Use std::vector.
5613         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
5614         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
5615         std::vector.
5616         * probe.h (parse_probes): Return a std::vector.
5617         * python/python.c (gdbpy_decode_line): Use std::vector and
5618         gdb::array_view.
5619         * source.c (select_source_symtab, line_info): Use std::vector.
5620         * stack.c (func_command): Use std::vector.
5621         * symtab.h (struct symtabs_and_lines): Delete.
5622         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
5623
5624 2017-09-04  Pedro Alves  <palves@redhat.com>
5625
5626         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5627         unittests/array-view-selftests.c.
5628         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5629         * common/array-view.h: New file.
5630         * unittests/array-view-selftests.c: New file.
5631
5632 2017-09-04  Pedro Alves  <palves@redhat.com>
5633
5634         * cli/cli-cmds.c (edit_command): Pass message to
5635         ambiguous_line_spec.
5636         (list_command): Pass message to ambiguous_line_spec.  Say
5637         "first"/"last" instead of "start" and "end" to be consistent with
5638         the manual.
5639         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
5640         them to print formatted message.
5641
5642 2017-09-04  Pedro Alves  <palves@redhat.com>
5643
5644         * btrace.c (ftrace_add_pt): Pass btrace_insn to
5645         ftrace_update_insns by reference instead of pointer.
5646
5647 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5648
5649         * i386-go32-tdep.c: Include x86-xstate.h.
5650         (i386_go32_init_abi): Call i386_target_description.
5651         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5652         if xcr0 is X86_XSTATE_X87_MASK.
5653         * i386-tdep.h (tdesc_i386): Remove the declaration.
5654         (tdesc_i386_mmx): Likewise.
5655
5656 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5657
5658         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5659         X86_XSTATE_SSE_MASK instead of 0.
5660
5661 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5662
5663         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5664         i386_target_description.
5665         * i386-fbsd-nat.c (i386fbsd_read_description): Call
5666         i386_target_description.
5667         * i386-tdep.c (i386_gdbarch_init): Likewise.
5668
5669 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5670
5671         * amd64-darwin-tdep.c: Include "x86-xstate.h".
5672         (x86_darwin_init_abi_64): Call amd64_target_description.
5673         * amd64-dicos-tdep.c: Likewise.
5674         * amd64-fbsd-nat.c: Likewise.
5675         * amd64-fbsd-tdep.c: Likewise.
5676         * amd64-nbsd-tdep.c: Likewise.
5677         * amd64-obsd-tdep.c: Likewise.
5678         * amd64-sol2-tdep.c: Likewise.
5679         * amd64-windows-tdep.c: Likewise.
5680         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5681
5682 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5683
5684         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5685         (btrace_function) <insn>: Change type to use std::vector.
5686         * btrace.c (ftrace_debug, ftrace_call_num_insn,
5687         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5688         ftrace_update_insns, ftrace_compute_global_level_offset,
5689         btrace_stitch_bts, btrace_clear, btrace_insn_get,
5690         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5691         change to std::vector.
5692         (ftrace_update_insns): Adjust to change to std::vector, change
5693         type of INSN parameter.
5694         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5695         * record-btrace.c (btrace_call_history_insn_range,
5696         btrace_compute_src_line_range,
5697         record_btrace_frame_prev_register): Adjust to change to
5698         std::vector.
5699         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5700         to change to std::vector.
5701
5702 2017-09-03  Tom Tromey  <tom@tromey.com>
5703
5704         * corefile.c (reopen_exec_file): Use std::string.
5705
5706 2017-09-03  Tom Tromey  <tom@tromey.com>
5707
5708         * compile/compile.c (compile_register_name_mangled): Return
5709         std::string.
5710         * compile/compile-loc2c.c (pushf_register_address): Update.
5711         (pushf_register): Update.
5712         * compile/compile-c-types.c (convert_array): Update.
5713         * compile/compile-c-symbols.c (generate_vla_size): Update.
5714         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5715         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5716         (convert_one_symbol): Update.
5717         (generate_c_for_for_one_variable): Update.
5718         * compile/compile-c-support.c (c_get_range_decl_name): Return a
5719         std::string.
5720         (generate_register_struct): Update.
5721         * compile/compile-internal.h (c_get_range_decl_name): Return a
5722         std::string.
5723         (compile_register_name_mangled): Return std::string.
5724
5725 2017-09-03  Tom Tromey  <tom@tromey.com>
5726
5727         * utils.c (perror_string): Return a std::string.
5728         (throw_perror_with_name, perror_warning_with_name): Update.
5729
5730 2017-09-03  Tom Tromey  <tom@tromey.com>
5731
5732         * demangle.c (demangle_command): Use std::string,
5733         unique_xmalloc_ptr.
5734
5735 2017-09-03  Tom Tromey  <tom@tromey.com>
5736
5737         * cli/cli-setshow.c (do_set_command): Use std::string.
5738
5739 2017-09-03  Tom Tromey  <tom@tromey.com>
5740
5741         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5742
5743 2017-09-03  Tom Tromey  <tom@tromey.com>
5744
5745         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5746
5747 2017-09-03  Tom Tromey  <tom@tromey.com>
5748
5749         * mi/mi-cmd-env.c (env_execute_cli_command): Use
5750         gdb::unique_xmalloc_ptr.
5751
5752 2017-09-03  Tom Tromey  <tom@tromey.com>
5753
5754         * thread.c (print_thread_info_1): Use string_printf.
5755         (thread_apply_command, thread_apply_all_command): Use
5756         std::string.
5757
5758 2017-09-03  Tom Tromey  <tom@tromey.com>
5759
5760         * valprint.c (val_print_string): Update.
5761         * gdbcore.h (memory_error_message): Return std::string.
5762         * corefile.c (memory_error_message): Return std::string.
5763         (memory_error): Update.
5764         * breakpoint.c (insert_bp_location): Update.
5765
5766 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
5767
5768         * target/waitstatus.h (target_waitstatus_to_string): Change
5769         return type to std::string.
5770         * target/waitstatus.c (target_waitstatus_to_string): Return
5771         std::string.
5772         * target.h (target_waitstatus_to_string): Remove declaration.
5773         * infrun.c (resume, clear_proceed_status_thread,
5774         print_target_wait_results, do_target_wait, save_waitstatus,
5775         stop_all_threads): Adjust.
5776         * record-btrace.c (record_btrace_wait): Adjust.
5777         * target-debug.h
5778         (target_debug_print_struct_target_waitstatus_p): Adjust.
5779
5780 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
5781
5782         PR gdb/22046
5783         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5784         detection.
5785
5786 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
5787
5788         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5789         for setting/unsetting environment variables on the remote target.
5790         (New remote packets): Add entries for QEnvironmentHexEncoded,
5791         QEnvironmentUnset and QEnvironmentReset.
5792         * common/environ.c (gdb_environ::operator=): Extend method to
5793         handle m_user_set_env_list and m_user_unset_env_list.
5794         (gdb_environ::clear): Likewise.
5795         (match_var_in_string): Change type of first parameter from 'char
5796         *' to 'const char *'.
5797         (gdb_environ::set): Extend method to handle
5798         m_user_set_env_list and m_user_unset_env_list.
5799         (gdb_environ::unset): Likewise.
5800         (gdb_environ::clear_user_set_env): New method.
5801         (gdb_environ::user_set_envp): Likewise.
5802         (gdb_environ::user_unset_envp): Likewise.
5803         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5804         m_user_unset_env_list on move constructor/assignment.
5805         (unset): Add new default parameter 'update_unset_list = true'.
5806         (clear_user_set_env): New method.
5807         (user_set_envp): Likewise.
5808         (user_unset_envp): Likewise.
5809         (m_user_set_env_list): New std::set.
5810         (m_user_unset_env_list): Likewise.
5811         * common/rsp-low.c (hex2str): New function.
5812         (bin2hex): New overload for bin2hex function.
5813         * common/rsp-low.c (hex2str): New prototype.
5814         (str2hex): New overload prototype.
5815         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5816         QEnvironmentUnset and QEnvironmentReset.
5817         (remote_protocol_features): Add QEnvironmentHexEncoded,
5818         QEnvironmentUnset and QEnvironmentReset packets.
5819         (send_environment_packet): New function.
5820         (extended_remote_environment_support): Likewise.
5821         (extended_remote_create_inferior): Call
5822         extended_remote_environment_support.
5823         (_initialize_remote): Add QEnvironmentHexEncoded,
5824         QEnvironmentUnset and QEnvironmentReset packet configs.
5825         * unittests/environ-selftests.c (gdb_selftest_env_var):
5826         New variable.
5827         (test_vector_initialization): New function.
5828         (test_init_from_host_environ): Likewise.
5829         (test_reinit_from_host_environ): Likewise.
5830         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5831         Likewise.
5832         (test_unset_set_empty_vector): Likewise.
5833         (test_vector_clear): Likewise.
5834         (test_std_move): Likewise.
5835         (test_move_constructor):
5836         (test_self_move): Likewise.
5837         (test_set_unset_reset): Likewise.
5838         (run_tests): Rewrite in terms of the functions above.
5839
5840 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
5841
5842         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5843         (adi_available): Use a temp variable of type CORE_ADDR as argument
5844         3 when calling target_auxv_search.
5845         (adi_normalize_address): Use masks and xor operators to calculate
5846         normalized address.
5847         (adi_read_versions, adi_write_versions, adi_print_versions)
5848         (do_examine, do_assign): Use paddress.
5849
5850 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
5851
5852         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5853         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5854         out of loop and add supply of FIR.
5855         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5856         add collect of FIR.
5857
5858 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
5859
5860         PR gdb/21827
5861         * cli/cli-script.c (define_command): Don't convert command name
5862         to lower case.
5863
5864 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
5865
5866         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5867         Update all callers accordingly. Remove all code blocks handling
5868         the case where DISPP is not NULL.
5869
5870 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5871
5872         PR symtab/22003
5873         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5874         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5875         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5876
5877 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5878
5879         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5880         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5881         (read_comp_units_from_section): New parameter abbrev_section, use
5882         read_and_check_comp_unit_head, allocate signatured_type if needed.
5883         (create_all_comp_units): Update read_comp_units_from_section caller.
5884
5885 2017-08-23  Pedro Alves  <palves@redhat.com>
5886
5887         PR remote/21852
5888         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5889         to null_ptid and switch to thread without reading the registers
5890         after adding the inferior.
5891
5892 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5893
5894         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5895         compile-gcc.
5896         * compile/compile.c (compile_gcc, show_compile_gcc): New.
5897         (compile_to_object): Implement compile_gcc.
5898         (_initialize_compile): Install "set compile-gcc".  Initialize
5899         compile_gcc.
5900
5901 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5902
5903         * compile/compile.c (compile_to_object): Conditionally call
5904         set_verbose.  Conditionally call compile or compile_v0.
5905
5906 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
5907
5908         * sparc64-tdep.h: (adi_normalize_address): New export.
5909         * sparc-nat.h: (open_adi_tag_fd): New export.
5910         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5911         * sparc64-linux-tdep.c:
5912         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5913         (sparc64_linux_handle_segmentation_fault): New function.
5914         (sparc64_linux_init_abi): Register
5915         sparc64_linux_handle_segmentation_fault
5916         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5917         (sparc64_addr_bits_remove): New function.
5918         (sparc64_init_abi): Register sparc64_addr_bits_remove.
5919         (MAX_PROC_NAME_SIZE): New macro.
5920         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5921         (sparc64adilist): New variable.
5922         (adi_proc_list): New variable.
5923         (find_adi_info): New function.
5924         (add_adi_info): New function.
5925         (get_adi_info_proc): New function.
5926         (get_adi_info): New function.
5927         (info_adi_command): New function.
5928         (read_maps_entry): New function.
5929         (adi_available): New function.
5930         (adi_normalize_address): New function.
5931         (adi_align_address): New function.
5932         (adi_convert_byte_count): New function.
5933         (adi_tag_fd): New function.
5934         (adi_is_addr_mapped): New function.
5935         (adi_read_versions): New function.
5936         (adi_write_versions): New function.
5937         (adi_print_versions): New function.
5938         (do_examine): New function.
5939         (do_assign): New function.
5940         (adi_examine_command): New function.
5941         (adi_assign_command): New function.
5942         (_initialize_sparc64_adi_tdep): New function.
5943
5944 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
5945
5946         * breakpoint.c (breakpoints_info): Rename to ...
5947         (info_breakpoints_command): ... this.
5948         (watchpoints_info): Rename to ...
5949         (info_watchpoints_command): ... this.
5950         (tracepoints_info): Rename to ...
5951         (info_tracepoints_command): ... this.
5952         (_initialize_breakpoint): Adjust.
5953         * dcache.c (dcache_info): Rename to ...
5954         (info_display_command): ... this.
5955         (_initialize_dcache): Adjust.
5956         * frame.h (args_info): Rename to ...
5957         (info_args_command): ... this.
5958         (locals_info): Rename to ...
5959         (info_locals_command): ... this.
5960         * infcmd.c (nofp_registers_info): Rename to ...
5961         (info_registers_command): ... this.
5962         (float_info): Rename to ...
5963         (info_float_command): ... this.
5964         (program_info): Rename to ...
5965         (info_program_command): ... this.
5966         (all_registers_info): Rename to ...
5967         (info_all_registers_command): ... this.
5968         (vector_info): Rename to ...
5969         (info_vector_command): ... this.
5970         (float_info): Rename to ...
5971         (info_float_command): ... this.
5972         (_initialize_infcmd): Adjust.
5973         * inferior.h (term_info): Rename to ...
5974         (info_terminal_command): ... this.
5975         * inflow.c (term_info): Rename to ...
5976         (info_terminal_command): ... this.
5977         (_initialize_inflow): Adjust.
5978         * infrun.c (signals_info): Rename to ...
5979         (info_signals_command): ... this.
5980         (_initialize_infrun): Adjust.
5981         * objc-lang.c (classes_info): Rename to ...
5982         (info_classes_command): ... this.
5983         (selectors_info): Rename to ...
5984         (info_selectors_command): ... this.
5985         (_initialize_objc_language): Adjust.
5986         * printcmd.c (sym_info): Rename to ...
5987         (info_symbol_command): ... this.
5988         (address_info): Rename to ...
5989         (info_address_command): ... this.
5990         (display_info): Rename to ...
5991         (info_display_command): ... this.
5992         (_initialize_printcmd): Adjust.
5993         * reverse.c (bookmarks_info): Rename to ...
5994         (info_breakpoints_command): ... this.
5995         (_initialize_reverse): Adjust.
5996         * ser-go32.c (dos_info): Rename to ...
5997         (info_serial_command): ... this.
5998         (_initialize_ser_dos): Adjust.
5999         * skip.c (skip_info): Rename to ...
6000         (info_skip_command): ... this.
6001         (_initialize_step_skip): Adjust.
6002         * source.c (line_info): Rename to ...
6003         (info_line_command): ... this.
6004         (source_info): Rename to ...
6005         (info_source_command)
6006         * stack.c (frame_info): Rename to ...
6007         (info_frame_command): ... this.
6008         (locals_info): Rename to ...
6009         (info_locals_command): ... this.
6010         (args_info): Rename to ...
6011         (info_args_command): ... this.
6012         (_initialize_stack): Adjust.
6013         * symtab.c (sources_info): Rename to ...
6014         (info_sources_command): ... this.
6015         (variables_info): Rename to ...
6016         (info_variables_command): ... this.
6017         (functions_info): Rename to ...
6018         (info_functions_command): ... this.
6019         (types_info): Rename to ...
6020         (info_types_command): ... this.
6021         (_initialize_symtab): Adjust.
6022         * target.c (target_info): Rename to ...
6023         (info_target_command): ... this.
6024         (initialize_targets): Adjust.
6025         * tracepoint.c (tvariables_info): Rename to ...
6026         (info_tvariables_command): ... this.
6027         (scope_info): Rename to ...
6028         (info_scope_command): ... this.
6029         (trace_dump_actions): Adjust.
6030         (_initialize_tracepoint): Adjust.
6031
6032 2017-08-22  Tom Tromey  <tom@tromey.com>
6033
6034         * breakpoint.h (install_breakpoint): Update.
6035         * breakpoint.c (add_solib_catchpoint): Update.
6036         (install_breakpoint): Change argument to a std::unique_ptr.
6037         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6038         (create_breakpoint_sal, create_breakpoint): Update.
6039         (watch_command_1, catch_exec_command_1)
6040         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6041         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6042         Return the breakpoint.
6043         (set_raw_breakpoint_without_location, set_raw_breakpoint)
6044         (new_single_step_breakpoint): Update.
6045         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6046         std::unique_ptr.
6047         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6048         std::unique_ptr.
6049         * break-catch-sig.c (create_signal_catchpoint): Use
6050         std::unique_ptr.
6051         * ada-lang.c (create_ada_exception_catchpoint): Use
6052         std::unique_ptr.
6053
6054 2017-08-22  Tom Tromey  <tom@tromey.com>
6055
6056         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6057
6058 2017-08-22  Tom Tromey  <tom@tromey.com>
6059
6060         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6061         (lookup_partial_symbol): Update.
6062
6063 2017-08-22  Tom Tromey  <tom@tromey.com>
6064
6065         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6066         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6067         (find_and_open_source, symtab_to_fullname): Update.
6068         * psymtab.c (psymtab_to_fullname): Update.
6069
6070 2017-08-22  Tom Tromey  <tom@tromey.com>
6071
6072         * exec.c (exec_file_attach): Update.
6073         * linux-thread-db.c (try_thread_db_load): Update.
6074         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6075         * utils.c (gdb_realpath): Change return type.
6076         (gdb_realpath_keepfile): Update.
6077         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6078         (_initialize_utils): Register the new self test.
6079         * source.c (openp): Update.
6080         (find_and_open_source): Update.
6081         * nto-tdep.c (nto_find_and_open_solib): Update.
6082         * main.c (set_gdb_data_directory): Update.
6083         (captured_main_1): Update.
6084         * dwarf2read.c (dwarf2_get_dwz_file): Update
6085         (dw2_map_symbol_filenames): Update.
6086         * auto-load.c (auto_load_safe_path_vec_update): Update.
6087         (filename_is_in_auto_load_safe_path_vec): Change type of
6088         "filename_realp".
6089         (auto_load_objfile_script): Update.
6090         (file_is_auto_load_safe): Update.  Use std::string.
6091         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6092
6093 2017-08-22  Tom Tromey  <tom@tromey.com>
6094
6095         * utils.c (gdb_realpath_keepfile): Return a
6096         gdb::unique_xmalloc_ptr.
6097         * exec.c (exec_file_attach): Update.
6098         * utils.h (gdb_realpath_keepfile): Return a
6099         gdb::unique_xmalloc_ptr.
6100
6101 2017-08-22  Tom Tromey  <tom@tromey.com>
6102
6103         * compile/compile.c (compile_file_command): Use
6104         gdb::unique_xmalloc_ptr, std::string.
6105         * utils.c (gdb_abspath): Change return type.
6106         * source.c (openp): Update.
6107         * objfiles.c (allocate_objfile): Update.
6108         * main.c (set_gdb_data_directory): Update.
6109         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6110
6111 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
6112
6113         * cli-cmds.c (list_commands): List actual code around more than
6114         one location.
6115
6116 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
6117
6118         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6119
6120 2017-08-21  Pedro Alves  <palves@redhat.com>
6121
6122         PR gdb/19487
6123         * c-exp.y (variable production): Handle function aliases.
6124         * minsyms.c (msymbol_is_text): New function.
6125         * minsyms.h (msymbol_is_text): Declare.
6126         * symtab.c (find_function_alias_target): New function.
6127         * symtab.h (find_function_alias_target): Declare.
6128
6129 2017-08-21  Pedro Alves  <palves@redhat.com>
6130
6131         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6132         typedefs.
6133         * typeprint.c (whatis_exp): If handling "whatis", and expression
6134         is OP_TYPE, strip one typedef level.  Otherwise don't strip
6135         typedefs here.
6136         * valops.c (value_cast): Save "to" type before resolving
6137         stubs/typedefs.  Use that type as resulting value's type.
6138
6139 2017-08-18  Tom Tromey  <tom@tromey.com>
6140             Pedro Alves  <palves@redhat.com>
6141
6142         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6143         * sol-thread.c (sol_thread_resume, sol_thread_wait)
6144         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6145         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6146         * proc-service.c (ps_xfer_memory): Use scoped_restore.
6147         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6148         (linux_get_siginfo_data): Add "thread" argument.  Use
6149         scoped_restore.
6150         * linux-nat.c (linux_child_follow_fork)
6151         (check_stopped_by_watchpoint): Use scoped_restore.
6152         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
6153         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
6154         (restore_inferior_ptid, save_inferior_ptid): Remove.
6155         * btrace.c (btrace_fetch): Use scoped_restore.
6156         * bsd-uthread.c (bsd_uthread_fetch_registers)
6157         (bsd_uthread_store_registers): Use scoped_restore.
6158         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
6159         scoped_restore.
6160         * aix-thread.c (aix_thread_resume, aix_thread_wait)
6161         (aix_thread_xfer_partial): Use scoped_restore.
6162         * inferior.h (save_inferior_ptid): Remove.
6163
6164 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6165
6166         PR tdep/21818
6167         * arm-tdep.c (gdb_print_insn_arm): Mark
6168         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
6169
6170 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6171
6172         * NEWS: Mention GDBserver's new option "--selftest".
6173         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
6174         * selftest.c: Move it to common/selftest.c.
6175         * selftest.h: Move it to common/selftest.h.
6176         * selftest-arch.c (reset): New function.
6177         (tests_with_arch): Call reset.
6178
6179 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6180
6181         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
6182         instead of exception_fprintf and printf_filtered.
6183
6184 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6185
6186         * selftest.c (register_self_test): Rename it to
6187         selftests::register_test.
6188         (run_self_tests): selftest::run_tests.
6189         * selftest.h: Update declarations.
6190         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
6191         selftests::register_test_foreach_arch.
6192         * selftest-arch.h: Update declaration.
6193         * aarch64-tdep.c: Update.
6194         * arm-tdep.c: Likewise.
6195         * disasm-selftests.c: Likewise.
6196         * dwarf2loc.c: Likewise.
6197         * dwarf2-frame.c: Likewise.
6198         * findvar.c: Likewise.
6199         * gdbarch-selftests.c: Likewise.
6200         * maint.c (maintenance_selftest): Likewise.
6201         * regcache.c: Likewise.
6202         * rust-exp.y: Likewise.
6203         * selftest-arch.c: Likewise.
6204         * unittests/environ-selftests.c: Likewise.
6205         * unittests/function-view-selftests.c: Likewise.
6206         * unittests/offset-type-selftests.c: Likewise.
6207         * unittests/optional-selftests.c: Likewise.
6208         * unittests/scoped_restore-selftests.c: Likewise.
6209         * utils-selftests.c: Likewise.
6210
6211 2017-08-17  Pedro Alves  <palves@redhat.com>
6212
6213         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
6214         local.
6215
6216 2017-08-17  Pedro Alves  <palves@redhat.com>
6217
6218         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
6219         field.
6220         (reset_die_in_process): Delete, replaced by ...
6221         (process_die_scope): ... this new class.  Make it responsible for
6222         freeing cu->line_header too.
6223         (process_die): Use process_die_scope.
6224         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
6225         cu->line_header_die_owner.  Don't release the line header if it's
6226         owned by the CU.
6227         (setup_type_unit_groups): Make the CU/DIE own the line header.
6228         Don't release the line header here.
6229
6230 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
6231
6232         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
6233
6234 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6235
6236         * NEWS: Mention new shortcuts for nexti and stepi in TUI
6237         Single-Key mode
6238
6239 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6240
6241         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
6242         mode command list.
6243
6244 2017-08-15  Stafford Horne  <shorne@gmail.com>
6245
6246         * MAINTAINERS (Write After Approval): Add Stafford Horne.
6247
6248 2017-08-15  Stafford Horne  <shorne@gmail.com>
6249
6250         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
6251
6252 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
6253
6254         PR gdb/21954
6255         * infcmd.c (unset_environment_command): Use the 'clear' method on
6256         the environment instead of resetting it.
6257
6258 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
6259
6260         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
6261         platforms.
6262
6263 2017-08-14  Tom Tromey  <tom@tromey.com>
6264
6265         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
6266         (print_binary_chars): Likewise.
6267         (BITS_IN_BYTES): Remove.
6268
6269 2017-08-14  Tom Tromey  <tom@tromey.com>
6270
6271         PR gdb/21675
6272         * valprint.c (LOW_ZERO): Change value to 034.
6273         (print_octal_chars): Add static_asserts for octal constants.
6274         * printcmd.c (print_scalar_formatted): Add 'd' case.
6275
6276 2017-08-11  Tom Tromey  <tom@tromey.com>
6277
6278         * symfile.c (add_symbol_file_command): Use std::vector.
6279
6280 2017-08-14  Tom Tromey  <tom@tromey.com>
6281
6282         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
6283         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6284         std::move.
6285         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
6286
6287 2017-08-11  Pedro Alves  <palves@redhat.com>
6288
6289         * infrun.c (process_event_stop_test): Adjust
6290         function_name_is_marked_for_skip call.
6291         * skip.c: Include <list>.
6292         (skiplist_entry): Make it a class with private fields, and
6293         getters/setters.
6294         (skiplist_entry_chain): Delete.
6295         (skiplist_entries): New.
6296         (skiplist_entry_count): Delete.
6297         (highest_skiplist_entry_num): New.
6298         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
6299         (add_skiplist_entry): Delete.
6300         (skiplist_entry::skiplist_entry): New.
6301         (skiplist_entry::add_entry): New.
6302         (skip_file_command, skip_function): Adjust.
6303         (compile_skip_regexp): Delete.
6304         (skip_command): Don't compile regexp here.  Adjust to use
6305         skiplist_entry::add_entry.
6306         (skip_info): Adjust to use range-for and getters.
6307         (skip_enable_command, skip_disable_command): Adjust to use
6308         range-for and setters.
6309         (skip_delete_command): Adjust to use std::list.
6310         (add_skiplist_entry): Delete.
6311         (skip_file_p): Delete, refactored as ...
6312         (skiplist_entry::do_skip_file_p): ... this new method.
6313         (skip_gfile_p): Delete, refactored as ...
6314         (skiplist_entry::do_gskip_file_p): ... this new method.
6315         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
6316         (skiplist_entry::skip_function_p): ... this new method.
6317         (function_name_is_marked_for_skip): Now returns bool, and takes
6318         the function sal by const reference.  Adjust to use range-for and
6319         skiplist_entry methods.
6320         (_initialize_step_skip): Remove references to
6321         skiplist_entry_chain, skiplist_entry_count.
6322         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
6323         takes the function sal by const reference.
6324
6325 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6326
6327         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
6328         (dwarf2_frame_cache): Remove reset_cache_cleanup.
6329         (dwarf2_frame_cache):
6330         * frame-unwind.c (frame_unwind_try_unwinder): Catch
6331         RETURN_MASK_ALL and set *this_case to NULL.
6332         * frame-unwind.h: Update comments.
6333
6334 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6335
6336         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
6337         (dwarf2_frame_state_copy_regs): Remove.
6338         (dwarf2_frame_state_free_regs): Remove.
6339         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
6340         (dwarf2_restore_rule): Call method .alloc_regs instead of
6341         dwarf2_frame_state_alloc_regs.
6342         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
6343         constructor.  Call std::move.
6344         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
6345         (dwarf2_frame_cache): Likewise.
6346
6347         [GDB_SELF_TEST]: Include selftest.h and
6348         selftest-arch.h.
6349         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
6350         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
6351         execute_cfa_program_test.
6352
6353         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
6354         copy ctor, assignment operator, move assignment.
6355         <alloc_regs>: New method.
6356         <swap>: New method.
6357         (struct dwarf2_frame_state): Delete dtor.
6358         (dwarf2_frame_state_alloc_regs): Remove declaration.
6359         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
6360         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
6361
6362 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6363
6364         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
6365         (dwarf2_frame_state::dwarf2_frame_state): New.
6366         (dwarf2_frame_state::~dwarf2_frame_state): New.
6367         (dwarf2_fetch_cfa_info): Update.
6368         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
6369         rather than a pointer.  Update code.
6370         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
6371         dtor.
6372         <data_align, code_align, retaddr_column>: Change them to const.
6373         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
6374         to bool.
6375
6376 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6377
6378         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
6379         <loc.exp>: New field.
6380         * dwarf2-frame.c (execute_cfa_program): Update.
6381         (dwarf2_frame_prev_register): Update.
6382
6383 2017-08-10  Pedro Alves  <palves@redhat.com>
6384
6385         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
6386
6387 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6388
6389         * fbsd-nat.c (struct fbsd_fork_info): Remove.
6390         (fbsd_pending_children): Use std::list.
6391         (fbsd_remember_child): Likewise.
6392         (fbsd_is_child_pending): Likewise.
6393         (fbsd_pending_vfork_done): Use std::forward_list.
6394         (fbsd_add_vfork_done): Likewise.
6395         (fbsd_is_vfork_done_pending): Likewise.
6396         (fbsd_next_vfork_done): Likewise.
6397
6398 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6399
6400         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
6401         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
6402         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
6403         for `mapfilename'.
6404         (fbsd_xfer_partial): Use gdb::byte_vector.
6405         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
6406
6407 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6408
6409         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
6410         "filestuff.h".
6411         (fbsd_find_memory_regions): Fix `mapfile' initialization.
6412
6413 2017-08-09  Tom Tromey  <tom@tromey.com>
6414
6415         * skip.c (skiplist_entry): New constructor.
6416         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
6417         (skiplist_entry::file_is_glob): Now bool.
6418         (skiplist_entry::file, skiplist_entry::function): Now
6419         std::string.
6420         (make_skip_entry): Return a unique_ptr.  Use new.
6421         (free_skiplist_entry, free_skiplist_entry_cleanup)
6422         (make_free_skiplist_entry_cleanup): Remove.
6423         (skip_command, skip_disable_command, add_skiplist_entry)
6424         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
6425         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
6426         (function_name_is_marked_for_skip): Update.
6427         (skip_delete_command): Update.  Use delete.
6428
6429 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
6430
6431         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
6432         (aarch64_linux_core_read_description): New function.
6433         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
6434
6435 2017-08-09  Pedro Alves  <palves@redhat.com>
6436
6437         * cp-name-parser.y (cp_comp_to_string): Return a
6438         gdb::unique_xmalloc_ptr<char>.
6439         * cp-support.c (replace_typedefs_qualified_name)
6440         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
6441         (cp_canonicalize_string_full): Use op= instead of explicit
6442         convertion.
6443         (cp_class_name_from_physname, method_name_from_physname)
6444         (cp_func_name, cp_remove_params): Adjust to use
6445         gdb::unique_xmalloc_ptr<char>.
6446         * cp-support.h (cp_comp_to_string): Return a
6447         gdb::unique_xmalloc_ptr<char>.
6448         * python/py-type.c (typy_lookup_type): Adjust to use
6449         gdb::unique_xmalloc_ptr<char>.
6450
6451 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
6452
6453         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
6454
6455 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
6456             Yao Qi  <yao.qi@linaro.org>
6457
6458         * cp-support.c (cp_canonicalize_string_full): Use
6459         gdb::unique_xmalloc_ptr<char>.
6460         (cp_canonicalize_string): Likewise.
6461
6462 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6463
6464         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
6465         * regformats/i386/amd64-avx-avx512.dat: Remove.
6466         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
6467         * regformats/i386/amd64-avx-mpx.dat:Remove.
6468         * regformats/i386/amd64-avx.dat: Remove.
6469         * regformats/i386/amd64-mpx.dat: Remove.
6470         * regformats/i386/i386-avx-avx512.dat: Remove.
6471         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
6472         * regformats/i386/i386-avx-mpx.dat: Remove.
6473         * regformats/i386/i386-mmx.dat: Remove.
6474         * regformats/i386/i386-mpx.dat: Remove.
6475
6476 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6477
6478         * amd64-tdep.h (tdesc_x32): Remove the declaration.
6479         * amd64-tdep.c: Don't include features/i386/x32*.c.
6480         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
6481         functions.
6482         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
6483         and i386/x32-avx-avx512.
6484         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
6485         and i386/x32.xml.
6486         * features/i386/x32-avx-avx512.c: Removed.
6487         * features/i386/x32-avx-avx512.xml: Removed.
6488         * features/i386/x32-avx.c: Removed.
6489         * features/i386/x32-avx.xml: Removed.
6490         * features/i386/x32.c: Removed.
6491         * features/i386/x32.xml: Removed.
6492         * regformats/i386/x32-avx-avx512.dat: Removed.
6493         * regformats/i386/x32-avx.dat: Removed.
6494         * regformats/i386/x32.dat: Removed.
6495
6496 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6497
6498         PR breakpoints/21886
6499         * mem-break.c (default_memory_insert_breakpoint): Use
6500         `->placed_address' rather than `->reqstd_address' for the
6501         breakpoint location.
6502
6503 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6504
6505         * arch-utils.c (default_print_insn): Remove arch/mach/endian
6506         assertions.
6507
6508 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6509
6510         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
6511         a union of `tdep_info', `tdesc_data' and `id'.
6512         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
6513         rather than `info.tdep_info'.
6514         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
6515         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6516         * i386-tdep.c (i386_gdbarch_init): Likewise.
6517         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
6518         * mips-tdep.c (mips_gdbarch_init): Likewise.
6519         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6520         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6521         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
6522         `info.tdep_info'.
6523         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
6524         `info.tdep_info'.
6525         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6526         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
6527         `info.tdep_info'.
6528         * spu-tdep.c (spu_gdbarch_init): Likewise.
6529         * gdbarch.h: Regenerate.
6530
6531 2017-08-07  Leszek Swirski  <leszeks@google.com>
6532
6533         PR symtab/20899
6534         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
6535
6536 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
6537
6538         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
6539         (gdbsim_open): Rename gdb_argv args object to argv.
6540
6541 2017-08-05  Tom Tromey  <tom@tromey.com>
6542
6543         * compile/compile-object-load.c (compile_object_load): Use
6544         gdb::unique_xmalloc_ptr.
6545         * cli/cli-dump.c (scan_filename): Rename from
6546         scan_filename_with_cleanup.  Change return type.
6547         (scan_expression): Rename from scan_expression_with_cleanup.
6548         Change return type.
6549         (dump_memory_to_file, dump_value_to_file, restore_command):
6550         Use gdb::unique_xmalloc_ptr.  Update.
6551         * cli/cli-cmds.c (find_and_open_script): Use
6552         gdb::unique_xmalloc_ptr.
6553         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
6554         * symmisc.c (maintenance_print_symbols)
6555         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
6556         * symfile.c (symfile_bfd_open, generic_load)
6557         (add_symbol_file_command, remove_symbol_file_command): Use
6558         gdb::unique_xmalloc_ptr.
6559         * source.c (openp): Use gdb::unique_xmalloc_ptr.
6560         * psymtab.c (maintenance_print_psymbols): Use
6561         gdb::unique_xmalloc_ptr.
6562         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
6563         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
6564         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
6565         (reload_shared_libraries_1): Likewise.
6566
6567 2017-08-05  Tom Tromey  <tom@tromey.com>
6568
6569         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
6570         (rust_op_vector, rust_set_vector): New typedefs.
6571         (current_parser): New global.
6572         (work_obstack): Change to pointer type.  Update all users.
6573         (rust_ast, pstate): Remove globals.
6574         (struct rust_parser): New.
6575         (%union) <params, field_inits>: Change type.
6576         (start, tuple_expr, unit_expr, struct_expr_list, literal)
6577         (field_expr, expr_list, maybe_expr_list, type_list): Update.
6578         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
6579         (convert_params_to_types, convert_params_to_expression): Change
6580         type of "params".
6581         (ast_string): Change type of "fields".
6582         (rust_parse): Make a rust_parser.  Remove cleanups.
6583         (rust_lex_tests): Make and install an auto_obstack.
6584
6585 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6586
6587         * configure.srv (ipa_x32_linux_regobj): New.
6588         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
6589         instead of X86_TDESC_AVX512.
6590         (initialize_low_tracepoint): Call
6591         init_registers_x32_avx_avx512_linux.
6592
6593 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6594
6595         * utils.h (gdb_argv): Add namespace std for nullptr_t.
6596
6597 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6598
6599         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
6600
6601 2017-08-03  Tom Tromey  <tom@tromey.com>
6602
6603         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
6604         Remove.
6605         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
6606
6607 2017-08-03  Tom Tromey  <tom@tromey.com>
6608
6609         * python/py-param.c (compute_enum_values): Use gdb_argv.
6610
6611 2017-08-03  Tom Tromey  <tom@tromey.com>
6612
6613         * utils.h (struct gdb_argv_deleter): New.
6614         (gdb_argv): New class.
6615         * utils.c (gdb_argv::reset): New method.
6616         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
6617         * tracefile.c (tsave_command): Use gdb_argv.
6618         * top.c (new_ui_command): Use gdb_argv.
6619         * symmisc.c (maintenance_print_symbols)
6620         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
6621         * symfile.c (symbol_file_command, generic_load)
6622         (remove_symbol_file_command): Use gdb_argv.
6623         * stack.c (backtrace_command): Use gdb_argv.
6624         * source.c (add_path, show_substitute_path_command)
6625         (unset_substitute_path_command, set_substitute_path_command):
6626         Use gdb_argv.
6627         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
6628         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6629         * remote.c (extended_remote_run, remote_put_command)
6630         (remote_get_command, remote_delete_command): Use gdb_argv.
6631         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6632         (gdbsim_open): Use gdb_argv.
6633         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6634         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
6635         * procfs.c (procfs_info_proc): Use gdb_argv.
6636         * interps.c (interpreter_exec_cmd): Use gdb_argv.
6637         * infrun.c (handle_command): Use gdb_argv.
6638         * inferior.c (add_inferior_command, clone_inferior_command):
6639         Use gdb_argv.
6640         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
6641         * exec.c (exec_file_command): Use gdb_argv.
6642         * cli/cli-cmds.c (alias_command): Use gdb_argv.
6643         * compile/compile.c (build_argc_argv): Use gdb_argv.
6644
6645 2017-08-03  Tom Tromey  <tom@tromey.com>
6646
6647         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6648
6649 2017-08-03  Tom Tromey  <tom@tromey.com>
6650
6651         * python/python.c (compute_python_string): Return std::string.
6652         (gdbpy_eval_from_control_command): Update.
6653         (do_start_initialization): Use std::string.
6654         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6655         xstrprintf.
6656         * python/py-breakpoint.c (local_setattro): Use string_printf, not
6657         xstrprintf.
6658
6659 2017-08-03  Tom Tromey  <tom@tromey.com>
6660
6661         * top.h (do_restore_instream_cleanup): Remove.
6662         * top.c (do_restore_instream_cleanup): Remove.
6663         (read_command_file): Use scoped_restore.
6664         * cli/cli-script.c (execute_user_command): Use scoped_restore.
6665
6666 2017-08-03  Tom Tromey  <tom@tromey.com>
6667
6668         * cli/cli-script.c (execute_user_command)
6669         (execute_control_command): Use scoped_restore.
6670
6671 2017-08-03  Tom Tromey  <tom@tromey.com>
6672
6673         * cli/cli-script.c (do_restore_user_call_depth): Remove.
6674         (execute_user_command): Remove user_call_depth; use
6675         user_args_stack's size instead.
6676
6677 2017-08-03  Tom Tromey  <tom@tromey.com>
6678
6679         * top.h (in_user_command): Remove.
6680         * top.c (in_user_command): Remove.
6681         * cli/cli-script.c (do_restore_user_call_depth)
6682         (execute_user_command): Update.
6683
6684 2017-08-03  Tom Tromey  <tom@tromey.com>
6685
6686         * valops.c (search_struct_method): Use gdb::byte_vector.
6687         * valarith.c (value_concat): Use std::vector.
6688         * target.c (memory_xfer_partial): Use gdb::byte_vector.
6689         (simple_search_memory): Likewise.
6690         * printcmd.c (find_string_backward): Use gdb::byte_vector.
6691         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6692         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6693         * elfread.c (elf_rel_plt_read): Use std::string.
6694         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6695         * cli/cli-dump.c (restore_section_callback): Use
6696         gdb::byte_vector.
6697
6698 2017-08-03  Tom Tromey  <tom@tromey.com>
6699
6700         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6701
6702 2017-08-03  Tom Tromey  <tom@tromey.com>
6703
6704         * tui/tui-regs.c (tui_restore_gdbout): Remove.
6705         (tui_register_format): Use scoped_restore.
6706
6707 2017-08-03  Tom Tromey  <tom@tromey.com>
6708
6709         * reverse.c (exec_direction_default): Remove.
6710         (exec_reverse_once): Use scoped_restore.
6711         * remote.c (restore_remote_timeout): Remove.
6712         (remote_flash_erase, remote_flash_write, remote_flash_done)
6713         (readchar, remote_serial_write): Use scoped_restore.
6714         * cli/cli-script.c (struct source_cleanup_lines_args)
6715         (source_cleanup_lines): Remove.
6716         (script_from_file): Use scoped_restore.
6717         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6718         (source_command): Use scoped_restore.
6719
6720 2017-08-03  Tom Tromey  <tom@tromey.com>
6721
6722         * utils.h (make_cleanup_free_so): Remove.
6723         * utils.c (do_free_so, make_cleanup_free_so): Remove.
6724         * solist.h (struct so_deleter): New.
6725         (so_list_up): New typedef.
6726         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6727
6728 2017-08-03  Tom Tromey  <tom@tromey.com>
6729
6730         * utils.h (make_cleanup_restore_current_language): Remove.
6731         * utils.c (do_restore_current_language)
6732         (make_cleanup_restore_current_language): Remove.
6733         * parse.c (parse_exp_in_context_1)
6734         (parse_expression_with_language): Use
6735         scoped_restore_current_language.
6736         * mi/mi-main.c (mi_cmd_execute): Use
6737         scoped_restore_current_language.
6738         * language.h (scoped_restore_current_language): New class.
6739
6740 2017-08-03  Tom Tromey  <tom@tromey.com>
6741
6742         * compile/compile.c (cleanup_unlink_file): Remove.
6743         (compile_to_object): Use gdb::unlinker.
6744         (eval_compile_command): Likewise.
6745
6746 2017-08-03  Tom Tromey  <tom@tromey.com>
6747
6748         * utils.h (make_cleanup_fclose): Remove.
6749         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6750
6751 2017-08-03  Tom Tromey  <tom@tromey.com>
6752
6753         * top.c (open_terminal_stream): Return gdb_file_up.
6754         (new_ui_command): Update.
6755
6756 2017-08-03  Tom Tromey  <tom@tromey.com>
6757
6758         * source.c (print_source_lines_base, forward_search_command)
6759         (reverse_search_command): Use gdb_file_up.
6760
6761 2017-08-03  Tom Tromey  <tom@tromey.com>
6762
6763         * fbsd-nat.c (fbsd_find_memory_regions): Update.
6764
6765 2017-08-03  Tom Tromey  <tom@tromey.com>
6766
6767         * cli/cli-cmds.c (find_and_open_script): Change return type.
6768         Remove "streamp" and "full_path" parameters.
6769         (source_script_with_search): Update.
6770         * auto-load.c (source_script_file): Update.
6771         * cli/cli-cmds.h (find_and_open_script): Change type.
6772         (open_script): New struct.
6773
6774 2017-08-03  Tom Tromey  <tom@tromey.com>
6775
6776         * xml-support.c (xml_fetch_content_from_file): Update.
6777         * ui-file.c (stdio_file::open): Update.
6778         * tracefile-tfile.c (tfile_start): Update.
6779         * remote.c (remote_file_put, remote_file_get): Update.
6780         * nat/linux-procfs.c (linux_proc_get_int)
6781         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6782         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6783         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6784         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6785         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6786         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6787         * linux-nat.c (linux_proc_pending_signals): Update.
6788         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6789         (file_closer): Remove.
6790         * compile/compile.c (compile_to_object): Update.
6791         * common/filestuff.h (struct gdb_file_deleter): New.
6792         (gdb_file_up): New typedef.
6793         (gdb_fopen_cloexec): Change return type.
6794         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6795         * cli/cli-dump.c (fopen_with_cleanup): Remove.
6796         (dump_binary_file, restore_binary_file): Update.
6797         * auto-load.c (auto_load_objfile_script_1): Update.
6798
6799 2017-08-03  Tom Tromey  <tom@tromey.com>
6800
6801         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6802         (info_static_tracepoint_markers_command): Likewise.
6803         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6804         * skip.c (skip_info): Use ui_out_emit_table.
6805         * progspace.c (print_program_space): Use ui_out_emit_table.
6806         * osdata.c (info_osdata): Use ui_out_emit_table.
6807         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6808         ui_out_emit_table.
6809         * linux-thread-db.c (info_auto_load_libthread_db): Use
6810         ui_out_emit_table.
6811         * inferior.c (print_inferior): Use ui_out_emit_table.
6812         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6813         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6814         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6815         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6816         * ui-out.h (class ui_out_emit_table): New.
6817
6818 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
6819
6820         * mips-tdep.c (mips_fpu_type_str): New function.
6821         (mips_dump_tdep): Call it.
6822
6823 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
6824
6825         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6826         `->mips_fpu_type'.
6827
6828 2017-07-31  Xavier Roirand  <roirand@adacore.com>
6829
6830         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6831
6832 2017-07-27  Xavier Roirand  <roirand@adacore.com>
6833
6834         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6835
6836 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6837
6838         * cli/cli-cmds.c (maintenancechecklist): New variable.
6839         * gdbcmd.h (maintenancechecklist): Declare it.
6840         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6841         Call i386_linux_read_description with different masks.
6842         * maint.c (maintenance_check_command): New function.
6843         (_initialize_maint_cmds): Call add_prefix_cmd.
6844         * target-descriptions.c (tdesc_reg): override operator != and ==.
6845         (tdesc_type): Likewise.
6846         (tdesc_feature): Likewise.
6847         (target_desc): Likewise.
6848         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6849         (maintenance_check_xml_descriptions): New function.
6850         (_initialize_target_descriptions) Add command "xml-descriptions".
6851         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6852
6853 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6854
6855         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6856         Include features/i386/32bit-*.c.
6857         (i386_linux_read_description): Generate target description if it
6858         doesn't exist.
6859         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6860         functions.
6861         * features/i386/32bit-linux.c: Re-generated.
6862         * features/i386/32bit-sse.c: Likewise.
6863         * target-descriptions.c (print_c_feature::visit): Print code to
6864         set register number if needed.
6865         (print_c_feature) <m_next_regnum>: New field.
6866
6867 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6868
6869         * features/Makefile (CFILES): Rename with TDESC_CFILES.
6870         (FEATURE_XMLFILES): New.
6871         (FEATURE_CFILES): New.
6872         New rules.
6873         (clean-cfiles): Remove generated c files.
6874         * features/i386/32bit-avx.c: Generated.
6875         * features/i386/32bit-avx512.c: Generated.
6876         * features/i386/32bit-core.c: Generated.
6877         * features/i386/32bit-linux.c: Generated.
6878         * features/i386/32bit-mpx.c: Generated.
6879         * features/i386/32bit-pkeys.c: Generated.
6880         * features/i386/32bit-sse.c: Generated.
6881         * target-descriptions.c: Include algorithm.
6882         (tdesc_element_visitor): Add method visit_end.
6883         (print_c_tdesc): Implement visit_end.
6884         (print_c_tdesc:: m_filename_after_features): Move it to
6885         protected.
6886         (print_c_feature): New class.
6887         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6888         name starts with "i386/32bit-".
6889
6890 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6891
6892         * target-descriptions.c (tdesc_element_visitor): New class.
6893         (tdesc_element): New class.
6894         (tdesc_reg): Inherit from tdesc_element.
6895         (tdesc_reg::accept): New function.
6896         (tdesc_type): Inherit from tdesc_element.
6897         (tdesc_type::accept): New function.
6898         (tdesc_feature): Inherit from tdesc_element.
6899         (tdesc_feature::accept): New function.
6900         (target_desc): Inherit from tdesc_element.
6901         (target_desc::target_desc): New.
6902         (target_desc::~target_desc): New.
6903         (target_desc::accept): New.
6904         (allocate_target_description): Use new.
6905         (free_target_description): Use delete.
6906         (print_c_tdesc): New class.
6907         (maint_print_c_tdesc_cmd): Adjust.
6908
6909         * features/aarch64.c: Re-generated.
6910         * features/arc-arcompact.c: Re-generated.
6911         * features/arc-v2.c: Re-generated.
6912         * features/arm/arm-with-iwmmxt.c: Re-generated.
6913         * features/arm/arm-with-m.c: Re-generated.
6914         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6915         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6916         * features/arm/arm-with-neon.c: Re-generated.
6917         * features/arm/arm-with-vfpv2.c: Re-generated.
6918         * features/arm/arm-with-vfpv3.c: Re-generated.
6919         * features/i386/amd64-avx-avx512.c: Re-generated.
6920         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6921         * features/i386/amd64-avx.c: Re-generated.
6922         * features/i386/amd64-avx-linux.c: Re-generated.
6923         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6924         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6925         * features/i386/amd64-avx-mpx.c: Re-generated.
6926         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6927         * features/i386/amd64.c: Re-generated.
6928         * features/i386/amd64-linux.c: Re-generated.
6929         * features/i386/amd64-mpx.c: Re-generated.
6930         * features/i386/amd64-mpx-linux.c: Re-generated.
6931         * features/i386/i386-avx-avx512.c: Re-generated.
6932         * features/i386/i386-avx-avx512-linux.c: Re-generated.
6933         * features/i386/i386-avx.c: Re-generated.
6934         * features/i386/i386-avx-linux.c: Re-generated.
6935         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6936         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6937         * features/i386/i386-avx-mpx.c: Re-generated.
6938         * features/i386/i386-avx-mpx-linux.c: Re-generated.
6939         * features/i386/i386.c: Re-generated.
6940         * features/i386/i386-linux.c: Re-generated.
6941         * features/i386/i386-mmx.c: Re-generated.
6942         * features/i386/i386-mmx-linux.c: Re-generated.
6943         * features/i386/i386-mpx.c: Re-generated.
6944         * features/i386/i386-mpx-linux.c: Re-generated.
6945         * features/i386/x32-avx-avx512.c: Re-generated.
6946         * features/i386/x32-avx-avx512-linux.c: Re-generated.
6947         * features/i386/x32-avx.c: Re-generated.
6948         * features/i386/x32-avx-linux.c: Re-generated.
6949         * features/i386/x32.c: Re-generated.
6950         * features/i386/x32-linux.c: Re-generated.
6951         * features/microblaze.c: Re-generated.
6952         * features/microblaze-with-stack-protect.c: Re-generated.
6953         * features/mips64-dsp-linux.c: Re-generated.
6954         * features/mips64-linux.c: Re-generated.
6955         * features/mips-dsp-linux.c: Re-generated.
6956         * features/mips-linux.c: Re-generated.
6957         * features/nds32.c: Re-generated.
6958         * features/nios2.c: Re-generated.
6959         * features/nios2-linux.c: Re-generated.
6960         * features/rs6000/powerpc-32.c: Re-generated.
6961         * features/rs6000/powerpc-32l.c: Re-generated.
6962         * features/rs6000/powerpc-403.c: Re-generated.
6963         * features/rs6000/powerpc-403gc.c : Re-generated.
6964         * features/rs6000/powerpc-405.c: Re-generated.
6965         * features/rs6000/powerpc-505.c: Re-generated.
6966         * features/rs6000/powerpc-601.c: Re-generated.
6967         * features/rs6000/powerpc-602.c: Re-generated.
6968         * features/rs6000/powerpc-603.c: Re-generated.
6969         * features/rs6000/powerpc-604.c: Re-generated.
6970         * features/rs6000/powerpc-64.c: Re-generated.
6971         * features/rs6000/powerpc-64l.c: Re-generated.
6972         * features/rs6000/powerpc-7400.c: Re-generated.
6973         * features/rs6000/powerpc-750.c: Re-generated.
6974         * features/rs6000/powerpc-860.c: Re-generated.
6975         * features/rs6000/powerpc-altivec32.c: Re-generated.
6976         * features/rs6000/powerpc-altivec32l.c: Re-generated.
6977         * features/rs6000/powerpc-altivec64.c: Re-generated.
6978         * features/rs6000/powerpc-altivec64l.c: Re-generated.
6979         * features/rs6000/powerpc-cell32l.c: Re-generated.
6980         * features/rs6000/powerpc-cell64l.c: Re-generated.
6981         * features/rs6000/powerpc-e500.c: Re-generated.
6982         * features/rs6000/powerpc-e500l.c: Re-generated.
6983         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6984         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6985         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6986         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6987         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6988         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6989         * features/rs6000/powerpc-vsx32.c: Re-generated.
6990         * features/rs6000/powerpc-vsx32l.c: Re-generated.
6991         * features/rs6000/powerpc-vsx64.c: Re-generated.
6992         * features/rs6000/powerpc-vsx64l.c: Re-generated.
6993         * features/rs6000/rs6000.c: Re-generated.
6994         * features/s390-linux32.c: Re-generated.
6995         * features/s390-linux32v1.c: Re-generated.
6996         * features/s390-linux32v2.c: Re-generated.
6997         * features/s390-linux64.c: Re-generated.
6998         * features/s390-linux64v1.c: Re-generated.
6999         * features/s390-linux64v2.c: Re-generated.
7000         * features/s390-te-linux64.c: Re-generated.
7001         * features/s390-tevx-linux64.c: Re-generated.
7002         * features/s390-vx-linux64.c: Re-generated.
7003         * features/s390x-linux64.c: Re-generated.
7004         * features/s390x-linux64v1.c: Re-generated.
7005         * features/s390x-linux64v2.c: Re-generated.
7006         * features/s390x-te-linux64.c: Re-generated.
7007         * features/s390x-tevx-linux64.c: Re-generated.
7008         * features/s390x-vx-linux64.c: Re-generated.
7009         * features/sparc/sparc32-solaris.c: Re-generated.
7010         * features/sparc/sparc64-solaris.c: Re-generated.
7011         * features/tic6x-c62x.c: Re-generated.
7012         * features/tic6x-c62x-linux.c: Re-generated.
7013         * features/tic6x-c64x.c: Re-generated.
7014         * features/tic6x-c64x-linux.c: Re-generated.
7015         * features/tic6x-c64xp.c: Re-generated.
7016         * features/tic6x-c64xp-linux.c: Re-generated.
7017
7018 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7019
7020         * i386-linux-tdep.c (i386_linux_read_description): New function.
7021         (i386_linux_core_read_description): Call
7022         i386_linux_read_description.
7023         * i386-linux-tdep.h (i386_linux_read_description): Declare.
7024         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
7025         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
7026         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
7027         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
7028         * x86-linux-nat.c (x86_linux_read_description): Call
7029         i386_linux_read_description.
7030
7031 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7032
7033         * NEWS: Mention it.
7034         * features/Makefile (%.c: %.xml): Pass the xml file name to
7035         command "maint print c-tdesc".
7036         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7037         name from 'arg'.
7038
7039 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7040
7041         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
7042         in-class initialization.
7043         (tdesc_create_feature): Call new instead of XCNEW.
7044         (free_target_description): Ue delete.
7045
7046 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
7047
7048         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7049
7050 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7051
7052         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7053         constant.
7054         (amd64_x32_init_abi): Likewise.
7055         * amd64-tdep.h (amd64_init_abi): Update declaration.
7056         (amd64_x32_init_abi): Likewise.
7057
7058 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7059
7060         PR tdep/21717
7061         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7062         condition for FPSCR.
7063         (arm_linux_store_inferior_registers): Likewise.
7064
7065 2017-07-22  Tom Tromey  <tom@tromey.com>
7066
7067         * break-catch-syscall.c (struct catch_syscall_inferior_data)
7068         <syscalls_counts>: Now a std::vector.
7069         (get_catch_syscall_inferior_data): Use "new".
7070         (catch_syscall_inferior_data_cleanup): Use "delete".
7071         (insert_catch_syscall, remove_catch_syscall)
7072         (clear_syscall_counts): Update.
7073
7074 2017-07-22  Tom Tromey  <tom@tromey.com>
7075
7076         * break-catch-syscall.c (syscall_catchpoint)
7077         <syscalls_to_be_caught>: Now a std::vector<int>
7078         (~syscall_catchpoint): Remove.
7079         (insert_catch_syscall, remove_catch_syscall)
7080         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7081         (print_mention_catch_syscall, print_recreate_catch_syscall):
7082         Update.
7083         (create_syscall_event_catchpoint): Change type of "filter"
7084         parameter.
7085         (catch_syscall_split_args): Return a std::vector.
7086         (catch_syscall_command_1, catching_syscall_number_1): Update.
7087
7088 2017-07-22  Tom Tromey  <tom@tromey.com>
7089
7090         * break-catch-throw.c (struct exception_catchpoint)
7091         <exception_rx>: Now a std::string.
7092         (~exception_catchpoint): Remove.
7093         (print_one_detail_exception_catchpoint): Update.
7094         (handle_gnu_v3_exceptions): Change type of except_rx.
7095         (extract_exception_regexp): Return a std::string.
7096         (catch_exception_command_1): Update.
7097
7098 2017-07-22  Tom Tromey  <tom@tromey.com>
7099
7100         * break-catch-sig.c (gdb_signal_type): Remove typedef.
7101         (struct signal_catchpoint) <signals_to_be_caught>: Now a
7102         std::vector.
7103         <catch_all>: Now a bool.
7104         (~signal_catchpoint): Remove.
7105         (signal_catchpoint_insert_location)
7106         (signal_catchpoint_remove_location)
7107         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7108         (signal_catchpoint_print_mention)
7109         (signal_catchpoint_print_recreate)
7110         (signal_catchpoint_explains_signal): Update.
7111         (create_signal_catchpoint): Change type of "filter" and
7112         "catch_all".
7113         (catch_signal_split_args): Return a std::vector.  Change type of
7114         "catch_all".
7115         (catch_signal_command): Update.
7116
7117 2017-07-20  Pedro Alves  <palves@redhat.com>
7118
7119         * ada-lang.c (ada_language_defn): Make extern.
7120         (_initialize_ada_language): Remove add_language call.
7121         * c-lang.c (c_language_defn, cplus_language_defn)
7122         (asm_language_defn, minimal_language_defn): Make extern.
7123         (_initialize_c_language): Delete.
7124         * completer.c (compare_cstrings): Delete, moved to utils.h.
7125         * d-lang.c (d_language_defn): Make extern.
7126         (_initialize_d_language): Remove add_language calls.
7127         * defs.h (enum language): Add comment.
7128         * f-lang.c (f_language_defn): Make extern.
7129         (_initialize_f_language): Remove add_language call.
7130         * go-lang.c (go_language_defn): Make extern.
7131         (_initialize_go_language): Remove add_language call.
7132         * language.c: Include <algorithm>.
7133         (languages): Redefine as const array.
7134         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7135         (set_language_command): Handle "local".  Use for-range loop.
7136         (set_language): Remove loop.
7137         (language_enum): Rewrite.
7138         (language_def, language_str): Remove loops.
7139         (add_language): Delete.
7140         (add_set_language_command): New, based on add_languages.
7141         (skip_language_trampoline): Adjust.
7142         (local_language_defn): Delete.
7143         (language_gdbarch_post_init): Adjust.
7144         (_initialize_language): Remove add_language calls.  Call
7145         add_set_language_command.
7146         * language.h (add_language): Delete.
7147         (auto_language_defn)
7148         (unknown_language_defn, minimal_language_defn, ada_language_defn)
7149         (asm_language_defn, c_language_defn, cplus_language_defn)
7150         (d_language_defn, f_language_defn, go_language_defn)
7151         (m2_language_defn, objc_language_defn, opencl_language_defn)
7152         (pascal_language_defn, rust_language_defn): Declare.
7153         * m2-lang.c (m2_language_defn): Make extern.
7154         (_initialize_m2_language): Remove add_language call.
7155         * objc-lang.c (objc_language_defn): Make extern.
7156         (_initialize_objc_language): Remove add_language call.
7157         * opencl-lang.c (opencl_language_defn): Make extern.
7158         (_initialize_opencl_language): Remove add_language call.
7159         * p-lang.c (pascal_language_defn): Make extern.
7160         (_initialize_pascal_language): Delete.
7161         * rust-lang.c (rust_language_defn): Make extern.
7162         (_initialize_rust_language): Delete.
7163         * utils.h (compare_cstrings): New static inline function.
7164
7165 2017-07-20  Pedro Alves  <palves@redhat.com>
7166
7167         * ada-lang.c (ada_to_fixed_type_1): Adjust.
7168         (get_var_value): Constify parameters.
7169         (get_int_var_value): Change prototype.
7170         (to_fixed_range_type): Adjust.
7171         * ada-lang.h (get_int_var_value): Change prototype.
7172
7173 2017-07-20  Pedro Alves  <palves@redhat.com>
7174
7175         * dwarf2read.c (dw2_lookup_symbol): Use
7176         SYMBOL_MATCHES_SEARCH_NAME.
7177         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
7178
7179 2017-07-20  Pedro Alves  <palves@redhat.com>
7180
7181         * block.c (block_iter_name_step, block_iter_name_first)
7182         (block_iter_name_next): Delete.
7183         (block_lookup_symbol_primary): Adjust to use
7184         dict_iter_match_first/dict_iter_match_next.
7185         * block.h (block_iter_name_first, block_iter_name_next): Delete
7186         declarations.
7187         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
7188         dict_iter_match_first/dict_iter_match_next.
7189
7190 2017-07-20  Pedro Alves  <palves@redhat.com>
7191
7192         * cp-support.c (cp_find_first_component_aux): Add missing case for
7193         end of string.
7194
7195 2017-07-18  David Blaikie  <dblaikie@gmail.com>
7196
7197         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
7198         of dwo_cu's dwo_file.
7199
7200 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7201
7202         * remote.c (store_registers_using_G): Remove one line comment.
7203
7204 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7205
7206         * regcache.c (regcache_cpy): Simplify it.
7207         (regcache::cpy_no_passthrough): Remove it.
7208         * regcache.h (cpy_no_passthrough): Remove it.
7209         (regcache_dup, regcache_cpy): Update comments.
7210
7211 2017-07-18  Pedro Alves  <palves@redhat.com>
7212
7213         * remote-sim.c (sim_command_completer): Adjust to work with a
7214         completion_tracker instead of a VEC.
7215
7216 2017-07-17  Pedro Alves  <palves@redhat.com>
7217
7218         * completer.c (complete_source_filenames): New function.
7219         (complete_address_and_linespec_locations): New function.
7220         (location_completer): Use complete_address_and_linespec_locations.
7221         (completion_tracker::build_completion_result): Honor the tracker's
7222         request to suppress append.
7223         * completer.h (completion_tracker::suppress_append_ws)
7224         (completion_tracker::set_suppress_append_ws): New methods.
7225         (completion_tracker::m_suppress_append_ws): New field.
7226         (complete_source_filenames): New declaration.
7227         * linespec.c (linespec_complete_what): New.
7228         (struct ls_parser) <complete_what, completion_word,
7229         completion_quote_char, completion_quote_end, completion_tracker>:
7230         New fields.
7231         (string_find_incomplete_keyword_at_end): New.
7232         (linespec_lexer_lex_string): Record quote char.  If in completion
7233         mode, don't throw.
7234         (linespec_lexer_consume_token): Advance the completion word point.
7235         (linespec_lexer_peek_token): Save/restore completion info.
7236         (save_stream_and_consume_token): New.
7237         (set_completion_after_number): New.
7238         (linespec_parse_basic): Set what to complete next depending on
7239         token.  Handle function and label completions specially.
7240         (parse_linespec): Disable objc shortcut in completion mode.  Set
7241         what to complete next depending on token type.  Skip keyword if in
7242         completion mode.
7243         (complete_linespec_component, linespec_complete): New.
7244         * linespec.h (linespec_complete): Declare.
7245
7246 2017-07-17  Pedro Alves  <palves@redhat.com>
7247
7248         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
7249         Handle 'operator<' / 'operator<<'.
7250
7251 2017-07-17  Pedro Alves  <palves@redhat.com>
7252
7253         * completer.c (collect_explicit_location_matches): Handle
7254         MATCH_LABEL.
7255         (convert_explicit_location_to_linespec): New, factored out from
7256         ...
7257         (convert_explicit_location_to_sals): ... this.
7258         (complete_label): New.
7259         (linespec_complete_label, find_label_symbols_in_block): New.
7260         (find_label_symbols): Add completion_mode parameter and adjust to
7261         call find_label_symbols_in_block.
7262         * linespec.h (linespec_complete_label): Declare.
7263
7264 2017-07-17  Pedro Alves  <palves@redhat.com>
7265
7266         * ada-lang.c (ada_collect_symbol_completion_matches): Add
7267         complete_symbol_mode parameter.
7268         * cli/cli-cmds.c (complete_command): Get the completion result out
7269         of the handle_brkchars tracker if used a custom word point.
7270         * completer.c: Include "linespec.h".
7271         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
7272         (advance_to_expression_complete_word_point): New.
7273         (completion_tracker::completes_to_completion_word): New.
7274         (complete_files_symbols): Pass down
7275         complete_symbol_mode::EXPRESSION.
7276         (explicit_options, probe_options): New.
7277         (collect_explicit_location_matches): Complete on the
7278         explictit_loc->foo instead of word.  Use
7279         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
7280         keyword and options completions.
7281         (backup_text_ptr): Delete.
7282         (skip_keyword): New.
7283         (complete_explicit_location): Remove 'word' parameter.  Add
7284         language, quoted_arg_start and quoted_arg_end parameters.
7285         Rewrite, parsing left to right.
7286         (location_completer): Rewrite.
7287         (location_completer_handle_brkchars): New function.
7288         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
7289         (enum complete_line_internal_reason): Adjust comments.
7290         (completion_tracker::discard_completions): New.
7291         (completer_handle_brkchars_func_for_completer): Handle
7292         location_completer.
7293         (gdb_custom_word_point_brkchars)
7294         (gdb_org_rl_basic_quote_characters): New.
7295         (gdb_completion_word_break_characters_throw)
7296         (completion_find_completion_word): Handle trackers that use a
7297         custom word point.
7298         (completion_tracker::advance_custom_word_point_by): New.
7299         (completion_tracker::build_completion_result): Don't rely on
7300         readline appending the quote char.
7301         (gdb_rl_attempted_completion_function_throw): Handle trackers that
7302         use a custom word point.
7303         (gdb_rl_attempted_completion_function): Restore
7304         rl_basic_quote_characters.
7305         * completer.h (class completion_tracker): Extend intro comment.
7306         (completion_tracker::set_quote_char)
7307         (completion_tracker::quote_char)
7308         (completion_tracker::set_use_custom_word_point)
7309         (completion_tracker::use_custom_word_point)
7310         (completion_tracker::custom_word_point)
7311         (completion_tracker::set_custom_word_point)
7312         (completion_tracker::advance_custom_word_point_by)
7313         (completion_tracker::completes_to_completion_word)
7314         (completion_tracker::discard_completions): New methods.
7315         (completion_tracker::m_quote_char)
7316         (completion_tracker::m_use_custom_word_point)
7317         (completion_tracker::m_custom_word_point): New fields.
7318         (advance_to_expression_complete_word_point): Declare.
7319         * f-lang.c (f_collect_symbol_completion_matches): Add
7320         complete_symbol_mode parameter.
7321         * language.h (struct language_defn)
7322         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
7323         parameter.
7324         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
7325         (linespec_complete_function): New function.
7326         (linespec_lexer_lex_keyword): Adjust.
7327         * linespec.h (linespec_keywords, linespec_complete_function): New
7328         declarations.
7329         * location.c (find_end_quote): New function.
7330         (explicit_location_lex_one): Add explicit_completion_info
7331         parameter.  Save quoting info.  Don't throw if being called for
7332         completion.  Don't handle Ada operators here.
7333         (is_cp_operator, skip_op_false_positives, first_of)
7334         (explicit_location_lex_one_function): New function.
7335         (string_to_explicit_location): Replace 'dont_throw' parameter with
7336         an explicit_completion_info pointer parameter.  Handle it.  Don't
7337         use explicit_location_lex_one to lex function names.  Use
7338         explicit_location_lex_one_function instead.
7339         * location.h (struct explicit_completion_info): New.
7340         (string_to_explicit_location): Replace 'dont_throw' parameter with
7341         an explicit_completion_info pointer parameter.
7342         * symtab.c (default_collect_symbol_completion_matches_break_on):
7343         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
7344         (default_collect_symbol_completion_matches)
7345         (collect_symbol_completion_matches): Add complete_symbol_mode
7346         parameter.
7347         (collect_symbol_completion_matches_type): Pass down
7348         complete_symbol_mode::EXPRESSION.
7349         (collect_file_symbol_completion_matches): Add complete_symbol_mode
7350         parameter.  Handle LINESPEC mode.
7351         * symtab.h (complete_symbol_mode): New.
7352         (default_collect_symbol_completion_matches_break_on)
7353         (default_collect_symbol_completion_matches)
7354         (collect_symbol_completion_matches)
7355         (collect_file_symbol_completion_matches): Add complete_symbol_mode
7356         parameter.
7357
7358 2017-07-17  Pedro Alves  <palves@redhat.com>
7359
7360         * utils.c (enum class strncmp_iw_mode): New.
7361         (strcmp_iw): Rename to ...
7362         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
7363         parameters.  Handle them.
7364         (strncmp_iw): New.
7365         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
7366         * utils.h (strncmp_iw): Declare.
7367         (strcmp_iw): Move describing comments here.
7368
7369 2017-07-17  Pedro Alves  <palves@redhat.com>
7370
7371         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
7372         CP_OPERATOR_STR.
7373         * c-typeprint.c (is_type_conversion_operator): Use
7374         CP_OPERATOR_STR.
7375         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
7376         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
7377         CP_OPERATOR_LEN.
7378         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
7379         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
7380         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
7381         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
7382         CP_OPERATOR_STR.
7383         * location.c: Include "cp-support.h".
7384         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
7385         CP_OPERATOR_STR.
7386         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
7387         CP_OPERATOR_LEN.
7388
7389 2017-07-17  Pedro Alves  <palves@redhat.com>
7390
7391         * cli/cli-cmds.c (complete_command): Use a completion tracker
7392         along with completion_find_completion_word for handle_brkchars
7393         phase.
7394         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
7395         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
7396         (struct gdb_rl_completion_word_info): New.
7397         (gdb_rl_find_completion_word): New.
7398         (completion_find_completion_word): New.
7399         * completer.h (completion_find_completion_word): Declare.
7400
7401 2017-07-17  Pedro Alves  <palves@redhat.com>
7402
7403         * ada-lang.c (symbol_completion_match): Adjust comments.
7404         (symbol_completion_add): Replace vector parameter with
7405         completion_tracker parameter.  Use it.
7406         (ada_make_symbol_completion_list): Rename to...
7407         (ada_collect_symbol_completion_matches): ... this.  Add
7408         completion_tracker parameter and use it.
7409         (ada_language_defn): Adjust.
7410         * break-catch-syscall.c (catch_syscall_completer): Adjust
7411         prototype and work with completion_tracker instead of VEC.
7412         * breakpoint.c (condition_completer): Adjust prototype and work
7413         with completion_tracker instead of VEC.
7414         * c-lang.c (c_language_defn, cplus_language_defn)
7415         (asm_language_defn, minimal_language_defn): Adjust to renames.
7416         * cli/cli-cmds.c (complete_command): Rework using
7417         completion_tracker.  Catch exceptions when completing.
7418         * cli/cli-decode.c (integer_unlimited_completer)
7419         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
7420         with completion_tracker instead of VEC.
7421         * command.h (struct completion_tracker): Forward declare.
7422         (completer_ftype, completer_handle_brkchars_ftype): Change
7423         types.
7424         (complete_on_cmdlist, complete_on_enum): Adjust.
7425         * completer.c: Include <algorithm>.
7426         (struct gdb_completer_state): New.
7427         (current_completion): New global.
7428         (readline_line_completion_function): Delete.
7429         (noop_completer, filename_completer)
7430         (filename_completer_handle_brkchars, complete_files_symbols)
7431         (linespec_location_completer): Adjust to work with a
7432         completion_tracker instead of a VEC.
7433         (string_or_empty): New.
7434         (collect_explicit_location_matches): Adjust to work with a
7435         completion_tracker instead of a VEC.
7436         (explicit_location_completer): Rename to ...
7437         (complete_explicit_location): ... this and adjust to work with a
7438         completion_tracker instead of a VEC.
7439         (location_completer): Adjust to work with a completion_tracker
7440         instead of a VEC.
7441         (add_struct_fields): Adjust to work with a completion_list instead
7442         of VEC.
7443         (expression_completer): Rename to ...
7444         (complete_expression): ... this and adjust to work with a
7445         completion_tracker instead of a VEC.  Use complete_files_symbols.
7446         (expression_completer): Reimplement on top of complete_expression.
7447         (symbol_completer): Adjust to work with a completion_tracker
7448         instead of a VEC.
7449         (enum complete_line_internal_reason): Add describing comments.
7450         (complete_line_internal_normal_command): Adjust to work with a
7451         completion_tracker instead of a VEC.
7452         (complete_line_internal): Rename to ...
7453         (complete_line_internal_1): ... this and adjust to work with a
7454         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
7455         handle_brkchars phase.
7456         (new_completion_tracker): Delete.
7457         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
7458         complete_line_internal_1.
7459         (free_completion_tracker): Delete.
7460         (INITIAL_COMPLETION_HTAB_SIZE): New.
7461         (completion_tracker::completion_tracker)
7462         (completion_tracker::~completion_tracker): New.
7463         (maybe_add_completion): Delete.
7464         (completion_tracker::maybe_add_completion)
7465         (completion_tracker::add_completion)
7466         (completion_tracker::add_completions): New.
7467         (throw_max_completions_reached_error): Delete.
7468         (complete_line): Adjust to work with a completion_tracker instead
7469         of a VEC.  Don't create a completion_tracker_t or check for max
7470         completions here.
7471         (command_completer, command_completer_handle_brkchars)
7472         (signal_completer, reg_or_group_completer_1)
7473         (reg_or_group_completer, default_completer_handle_brkchars):
7474         Adjust to work with a completion_tracker.
7475         (gdb_completion_word_break_characters_throw): New.
7476         (gdb_completion_word_break_characters): Reimplement.
7477         (line_completion_function): Delete.
7478         (completion_tracker::recompute_lowest_common_denominator)
7479         (expand_preserving_ws)
7480         (completion_tracker::build_completion_result)
7481         (completion_result::completion_result)
7482         (completion_result::completion_result)
7483         (completion_result::~completion_result)
7484         (completion_result::completion_result)
7485         (completion_result::release_match_list, compare_cstrings)
7486         (completion_result::sort_match_list)
7487         (completion_result::reset_match_list)
7488         (gdb_rl_attempted_completion_function_throw)
7489         (gdb_rl_attempted_completion_function): New.
7490         * completer.h (completion_list, struct completion_result)
7491         (class completion_tracker): New.
7492         (complete_line): Add completion_tracker parameter.
7493         (readline_line_completion_function): Delete.
7494         (gdb_rl_attempted_completion_function): New.
7495         (noop_completer, filename_completer, expression_completer)
7496         (location_completer, symbol_completer, command_completer)
7497         (signal_completer, reg_or_group_completer): Update prototypes.
7498         (completion_tracker_t, new_completion_tracker)
7499         (make_cleanup_free_completion_tracker): Delete.
7500         (enum maybe_add_completion_enum): Delete.
7501         (maybe_add_completion): Delete.
7502         (throw_max_completions_reached_error): Delete.
7503         * corefile.c (complete_set_gnutarget): Adjust to work with a
7504         completion_tracker instead of a VEC.
7505         * cp-abi.c (cp_abi_completer): Adjust to work with a
7506         completion_tracker instead of a VEC.
7507         * d-lang.c (d_language_defn): Adjust.
7508         * disasm.c (disassembler_options_completer): Adjust to work with a
7509         completion_tracker instead of a VEC.
7510         * f-lang.c (f_make_symbol_completion_list): Rename to ...
7511         (f_collect_symbol_completion_matches): ... this.  Adjust to work
7512         with a completion_tracker instead of a VEC.
7513         (f_language_defn): Adjust.
7514         * go-lang.c (go_language_defn): Adjust.
7515         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
7516         Adjust to work with a completion_tracker instead of a VEC.
7517         * infrun.c (handle_completer): Likewise.
7518         * interps.c (interpreter_completer): Likewise.
7519         * interps.h (interpreter_completer): Likewise.
7520         * language.c (unknown_language_defn, auto_language_defn)
7521         (local_language_defn): Adjust.
7522         * language.h (language_defn::la_make_symbol_completion_list):
7523         Rename to ...
7524         (language_defn::la_collect_symbol_completion_matches): ... this
7525         and adjust to work with a completion_tracker instead of a VEC.
7526         * m2-lang.c (m2_language_defn): Adjust.
7527         * objc-lang.c (objc_language_defn): Adjust.
7528         * opencl-lang.c (opencl_language_defn): Adjust.
7529         * p-lang.c (pascal_language_defn): Adjust.
7530         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
7531         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
7532         with a completion_tracker.
7533         * rust-lang.c (rust_language_defn): Adjust.
7534         * symtab.c (free_completion_list, do_free_completion_list)
7535         (return_val, completion_tracker): Delete.
7536         (completion_list_add_name, completion_list_add_symbol)
7537         (completion_list_add_msymbol, completion_list_objc_symbol)
7538         (completion_list_add_fields, add_symtab_completions): Add
7539         completion_tracker parameter and use it.
7540         (default_make_symbol_completion_list_break_on_1): Rename to...
7541         (default_collect_symbol_completion_matches_break_on): ... this.
7542         Add completion_tracker parameter and use it instead of allocating
7543         a completion tracker here.
7544         (default_make_symbol_completion_list_break_on): Delete old
7545         implementation.
7546         (default_make_symbol_completion_list): Delete.
7547         (default_collect_symbol_completion_matches): New.
7548         (make_symbol_completion_list): Delete.
7549         (collect_symbol_completion_matches): New.
7550         (make_symbol_completion_type): Rename to ...
7551         (collect_symbol_completion_matches_type): ... this.  Add
7552         completion_tracker parameter and use it instead of VEC.
7553         (make_file_symbol_completion_list_1): Rename to...
7554         (collect_file_symbol_completion_matches): ... this.  Add
7555         completion_tracker parameter and use it instead of VEC.
7556         (make_file_symbol_completion_list): Delete.
7557         (add_filename_to_list): Use completion_list instead of a VEC.
7558         (add_partial_filename_data::list): Now a completion_list.
7559         (make_source_files_completion_list): Work with a completion_list
7560         instead of a VEC.
7561         * symtab.h: Include "completer.h".
7562         (default_make_symbol_completion_list_break_on)
7563         (default_make_symbol_completion_list, make_symbol_completion_list)
7564         (make_symbol_completion_type, make_file_symbol_completion_list)
7565         (make_source_files_completion_list): Delete.
7566         (default_collect_symbol_completion_matches_break_on)
7567         (default_collect_symbol_completion_matches)
7568         (collect_symbol_completion_matches)
7569         (collect_symbol_completion_matches_type)
7570         (collect_file_symbol_completion_matches)
7571         (make_source_files_completion_list): New.
7572         * top.c (init_main): Don't install a rl_completion_entry_function
7573         hook.  Install a rl_attempted_completion_function hook instead.
7574         * tui/tui-layout.c (layout_completer): Adjust to work with a
7575         completion_tracker.
7576         * tui/tui-regs.c (tui_reggroup_completer):
7577         * tui/tui-win.c (window_name_completer, focus_completer)
7578         (winheight_completer): Adjust to work with a completion_tracker.
7579         * value.c: Include "completer.h".
7580         (complete_internalvar): Adjust to work with a completion_tracker.
7581         * value.h (complete_internalvar): Likewise.
7582
7583 2017-07-17  Pedro Alves  <palves@redhat.com>
7584
7585         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
7586         renames.
7587         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
7588         comments to completer_ftype's declaration.
7589         <completer_handle_brkchars>: Change type to
7590         completer_handle_brkchars_ftype.
7591         * command.h (completer_ftype): Add describing comment and give
7592         names to parameters.
7593         (completer_ftype_void): Rename to ...
7594         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
7595         (set_cmd_completer_handle_brkchars): Adjust.
7596         * completer.c (filename_completer_handle_brkchars): New function.
7597         (complete_line_internal_normal_command): New function, factored
7598         out from ...
7599         (complete_line_internal): ... here.
7600         (command_completer_handle_brkchars)
7601         (default_completer_handle_brkchars)
7602         (completer_handle_brkchars_func_for_completer): New functions.
7603         * completer.h (set_gdb_completion_word_break_characters): Delete
7604         declaration.
7605         (completer_handle_brkchars_func_for_completer): New declaration.
7606         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
7607         completer_handle_brkchars_func_for_completer.
7608
7609 2017-07-17  Pedro Alves  <palves@redhat.com>
7610
7611         * completer.c (symbol_completer): New function, based on
7612         make_symbol_completion_list_fn.
7613         * completer.h (symbol_completer): New declaration.
7614         * guile/scm-cmd.c (cmdscm_completers): Adjust.
7615         * python/py-cmd.c (completers): Adjust.
7616         * symtab.c (make_symbol_completion_list_fn): Delete.
7617         * symtab.h (make_symbol_completion_list_fn): Delete.
7618         * cli/cli-decode.c (add_cmd): Adjust.
7619
7620 2017-07-17  Pedro Alves  <palves@redhat.com>
7621
7622         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
7623         * dwarf2read.c: Include "filename-seen-cache.h".
7624         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
7625         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
7626         * filename-seen-cache.c: New file.
7627         * filename-seen-cache.h: New file.
7628         * symtab.c: Include "filename-seen-cache.h".
7629         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7630         (create_filename_seen_cache, clear_filename_seen_cache)
7631         (delete_filename_seen_cache, filename_seen): Delete, parts moved
7632         to filename-seen-cache.h/filename-seen-cache.c.
7633         (output_source_filename, sources_info)
7634         (maybe_add_partial_symtab_filename)
7635         (make_source_files_completion_list): Adjust to use
7636         filename_seen_cache.
7637
7638 2017-07-17  Pedro Alves  <palves@redhat.com>
7639
7640         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
7641         fields.
7642         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
7643         dwarf2_debug_sections*)): New.
7644         (dwarf2_per_objfile::dwarf2_per_objfile(const
7645         dwarf2_per_objfile&)): Declare as deleted.
7646         (dwarf2_per_objfile::operator=): Declare as deleted.
7647         (dwarf2_per_objfile::dwarf2_per_objfile)
7648         (dwarf2_per_objfile::~dwarf2_per_objfile)
7649         (dwarf2_per_objfile::free_cached_comp_units): New.
7650         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7651         ctor.  Call dwarf2_per_objfile's ctor manually.
7652         (dwarf2_locate_sections): Deleted/refactored as ...
7653         (dwarf2_per_objfile::locate_sections): ... this new method.
7654         (free_cached_comp_units): Defer to
7655         dwarf2_per_objfile::free_cached_comp_units.
7656         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7657
7658 2017-07-14  Tom Tromey  <tom@tromey.com>
7659
7660         PR rust/21764:
7661         * rust-exp.y (convert_ast_to_expression): Add "want_type"
7662         parameter.
7663         <UNOP_SIZEOF>: Split into separate case.
7664         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
7665
7666 2017-07-14  Tom Tromey  <tom@tromey.com>
7667
7668         PR rust/21763:
7669         * symtab.c (symbol_matches_domain): Add language_rust to special
7670         case.
7671         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7672         treat LOC_TYPEDEF symbols as variables.
7673
7674 2017-07-14  Pedro Alves  <palves@redhat.com>
7675
7676         * symtab.c (make_file_symbol_completion_list_1): Iterate over
7677         symtabs matching all symtabs with SRCFILE as file name instead of
7678         only considering the first hit, with lookup_symtab.
7679
7680 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7681
7682         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7683         operator_name parameters.
7684         (gen_expr): Update function call.
7685
7686 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7687
7688         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7689         parameter.
7690         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7691         Likewise.
7692         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7693         parameter, use agent_expr::gdbarch instead, update function
7694         calls.
7695         (locexpr_tracepoint_var_ref): Likewise.
7696         (loclist_tracepoint_var_ref): Likewise.
7697         * ax-gdb.c (gen_trace_static_fields): Likewise.
7698         (gen_traced_pop): Likewise.
7699         (gen_frame_args_address): Likewise.
7700         (gen_frame_locals_address): Likewise.
7701         (gen_var_ref): Likewise.
7702         (gen_struct_ref_recursive): Likewise.
7703         (gen_static_field): Likewise.
7704         (gen_maybe_namespace_elt): Likewise.
7705         (gen_expr): Likewise.
7706         (gen_trace_for_var): Likewise.
7707         (gen_trace_for_expr): Likewise.
7708         (gen_trace_for_return_address): Likewise.
7709
7710 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7711
7712         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7713         parameter.
7714         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7715
7716 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7717
7718         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7719         from ax, update calls.
7720         (gen_usual_arithmetic): Likewise.
7721         (gen_integral_promotions): Likewise.
7722         (gen_bitfield_ref): Likewise.
7723         (gen_primitive_field): Likewise.
7724         (gen_struct_ref_recursive): Likewise.
7725         (gen_struct_ref): Likewise.
7726         (gen_maybe_namespace_elt): Likewise.
7727         (gen_struct_elt_for_reference): Likewise.
7728         (gen_namespace_elt): Likewise.
7729         (gen_aggregate_elt_ref): Likewise.
7730         (gen_expr): Get gdbarch from ax, update calls.
7731         (gen_expr_binop_rest): Likewise.
7732
7733 2017-07-13  Pedro Alves  <palves@redhat.com>
7734
7735         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7736         as default tdesc.
7737         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7738         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7739         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7740         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
7741         tdep.
7742         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7743         Get final tdesc from the tdep.
7744         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7745         default tdesc.
7746         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7747         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7748         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7749         Use it as default tdesc.
7750         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7751         down to amd_init_abi.  No longer handle fallback tdesc here.
7752         * amd64-tdep.h (tdesc_x32): Declare.
7753         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7754         parameter.
7755         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7756         as default tdesc.
7757
7758 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7759
7760         * s390-linux-tdep.c (s390_process_record): Add support for
7761         instructions new in arch12.
7762
7763 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7764
7765         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7766         PT_GETFSBASE and PT_GETGSBASE.
7767         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7768         PT_SETGSBASE.
7769
7770 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7771
7772         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7773         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7774         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7775         those rules.
7776         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7777         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7778         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7779         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7780         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7781         * features/i386/amd64.xml: Add 64bit-segments.xml.
7782         * features/i386/amd64-avx-avx512.c: Regenerated.
7783         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7784         * features/i386/amd64-avx-mpx.c: Regenerated.
7785         * features/i386/amd64-avx.c: Regenerated.
7786         * features/i386/amd64-mpx.c: Regenerated.
7787         * features/i386/amd64.c: Regenerated.
7788         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7789         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7790         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7791         * regformats/i386/amd64-avx.dat: Regenerated.
7792         * regformats/i386/amd64-mpx.dat: Regenerated.
7793         * regformats/i386/amd64.dat: Regenerated.
7794
7795 2017-07-10  Yao Qi  <yao.qi@linaro.org>
7796
7797         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7798         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7799
7800 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
7801
7802         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7803         unsetenv.
7804         * gnulib/aclocal.m4: Regenerate.
7805         * gnulib/config.in: Regenerate.
7806         * gnulib/configure: Regenerate.
7807         * gnulib/import/Makefile.am: Regenerate.
7808         * gnulib/import/Makefile.in: Regenerate.
7809         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7810         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7811         * gnulib/import/m4/environ.m4: New file.
7812         * gnulib/import/m4/setenv.m4: New file.
7813         * gnulib/import/setenv.c: New file.
7814         * gnulib/import/unsetenv.c: New file.
7815
7816 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
7817
7818         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7819         address when op is DW_OP_addr.
7820
7821 2017-07-09  Tom Tromey  <tom@tromey.com>
7822
7823         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7824         check and apply to outer type.
7825
7826 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7827
7828         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7829         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7830         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7831         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7832
7833 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7834
7835         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7836
7837 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7838
7839         * corelow.c (get_core_siginfo): Remove.
7840         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7841         instead of get_core_siginfo.
7842         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7843         * gdbarch.h: Re-generate.
7844         * gdbarch.c: Re-generate.
7845         * linux-tdep.c (linux_core_xfer_siginfo): New.
7846         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7847
7848 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7849
7850         * corelow.c (thread_section_name): Move to ...
7851         * gdbcore.h (thread_section_name): ... here.
7852
7853 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7854
7855         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7856         (struct siginfo32): New.
7857         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7858         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7859         via ptrace(PT_LWPINFO).
7860
7861 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7862
7863         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7864         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7865         (fbsd_get_siginfo_type): New.
7866         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7867         (_initialize_fbsd_tdep): New.
7868
7869 2017-07-06  David Blaikie  <dblaikie@gmail.com>
7870
7871         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7872         a singular dwo_unit*) to support multiple CUs in the same way that
7873         multiple TUs are supported.
7874         (create_cus_hash_table): Replace create_dwo_cu with a function for
7875         parsing multiple CUs from a DWO file.
7876         (open_and_init_dwo_file): Use create_cus_hash_table rather than
7877         create_dwo_cu.
7878         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7879         htab_find, rather than comparing the signature to a singleton CU in
7880         the dwo_file.
7881
7882 2017-07-06  Pedro Alves  <palves@redhat.com>
7883
7884         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7885
7886 2017-07-04  Pedro Alves  <palves@redhat.com>
7887
7888         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7889         * gdbtypes.h (TYPE_STATIC): Delete.
7890         (struct fn_field) <is_public, is_abstract, is_static, is_final,
7891         is_synchronized, is_native>: Delete.
7892         <dummy>: Bump.
7893         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7894         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7895         (TYPE_FN_FIELD_ABSTRACT): Delete.
7896
7897 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
7898
7899         * buffer.h (buffer_finish): Fix spelling mistakes.
7900
7901 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
7902
7903         * .dir-locals.el: Automatically switch to C-style comments in
7904         versions of Emacs that support the feature.
7905
7906 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7907             Pedro Alves  <palves@redhat.com>
7908
7909         PR cli/21688
7910         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7911         (process_next_line): New variable 'inline_cmd'.
7912         Adjust 'if' clauses for "python", "compile" and "guile" to use
7913         'command_name_equals' and check for '!inline_cmd'.
7914
7915 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7916
7917         PR cli/21688
7918         * cli/cli-script.c (command_name_equals_not_inline): New function.
7919         (process_next_line): Adjust 'if' clauses for "python", "compile"
7920         and "guile" to use command_name_equals_not_inline.
7921
7922 2017-06-29  Pedro Alves  <palves@redhat.com>
7923
7924         * completer.c (expression_completer): Call
7925         linespec_location_completer instead of location_completer.
7926
7927 2017-06-29  Pedro Alves  <palves@redhat.com>
7928
7929         * completer.c (expression_completer): Remove code that recomputes
7930         'text' from 'word'.
7931
7932 2017-06-29  Yao Qi  <yao.qi@linaro.org>
7933
7934         * regformats/regdat.sh: Generate code with
7935         "ifndef IN_PROCESS_AGENT".
7936
7937 2017-06-28  Pedro Alves  <palves@redhat.com>
7938
7939         * command.h: Include "common/scoped_restore.h".
7940
7941 2017-06-28  Yao Qi  <yao.qi@linaro.org>
7942
7943         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7944         instead of obstack_grow.
7945
7946 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
7947
7948         PR gdb/21337
7949         * symfile.c (reread_symbols): Call objfiles_changed just before
7950         read_symbols.
7951
7952 2017-06-27  Pedro Alves  <palves@redhat.com>
7953
7954         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7955         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7956         (completion_list_add_symbol, completion_list_add_msymbol):
7957         ... these new functions.
7958         (add_symtab_completions)
7959         (default_make_symbol_completion_list_break_on_1): Adjust.
7960
7961 2017-06-27  Pedro Alves  <palves@redhat.com>
7962
7963         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7964         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
7965         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7966         dtor.
7967         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
7968         'storage_obstack' field an auto_obstack.  In-class initialize all
7969         non-bitfield fields.  Make minsyms_read bool.
7970         * symfile.c (read_symbols): Adjust.
7971
7972 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
7973
7974         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7975         (gdbsim_store_register): Likewise.
7976
7977 2017-06-27  Pedro Alves  <palves@redhat.com>
7978
7979         * c-exp.y (name_obstack): Now an auto_obstack.
7980         (yylex): Use auto_obstack::clear.
7981         (c_parse): Use auto_obstack::clear instead of reinitializing and
7982         freeing the obstack.
7983         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7984         * d-exp.y (name_obstack): Now an auto_obstack.
7985         (yylex): Use auto_obstack::clear.
7986         (d_parse): Use auto_obstack::clear instead of reinitializing and
7987         freeing the obstack.
7988         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7989         auto_obstack.
7990         * dwarf2read.c (create_addrmap_from_index)
7991         (dwarf2_build_psymtabs_hard)
7992         (update_enumeration_type_from_children): Likewise.
7993         * gdb_obstack.h (auto_obstack): New type.
7994         * go-exp.y (name_obstack): Now an auto_obstack.
7995         (build_packaged_name): Use auto_obstack::clear.
7996         (go_parse): Use auto_obstack::clear instead of reinitializing and
7997         freeing the obstack.
7998         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7999         auto_obstack.
8000         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
8001         * rust-exp.y (work_obstack): Now an auto_obstack.
8002         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
8003         reinitializing and freeing the obstack.
8004         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
8005         (host_char_to_target): Use auto_obstack.
8006         * utils.h (make_cleanup_obstack_free): Delete declaration.
8007         * valprint.c (generic_emit_char, generic_printstr): Use
8008         auto_obstack.
8009
8010 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
8011
8012         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
8013         thread.
8014         (darwin_init_thread_list): Don't update dummy thread.
8015         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
8016
8017 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8018
8019         * record-full.c (netorder16): Remove.
8020
8021 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8022
8023         * common/diagnostics.h: Define macros for GCC.
8024         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
8025         * common/vec.h: Include diagnostics.h.
8026         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
8027         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
8028         warning.
8029
8030 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
8031
8032         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
8033         New macro.
8034         * ada-lex.l: Ignore deprecated register warnings.
8035
8036 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8037
8038         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8039         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8040
8041 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8042
8043         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8044         its own line.
8045
8046 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8047
8048         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8049
8050 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
8051
8052         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8053         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8054         (xtensa_register_read_masked): Likewise.
8055
8056 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
8057
8058         * common/environ.c (gdb_environ::unset): Update comment.
8059
8060 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8061
8062         * python/py-unwind.c (pyuw_sniffer): Allocate space for
8063         registers.
8064
8065 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8066
8067         * record-full.c (record_full_exec_insn): Use byte_vector.
8068
8069 2017-06-22  Yao Qi  <yao.qi@linaro.org>
8070
8071         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8072         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8073
8074 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8075
8076         * remote.c (cached_reg): Move from here...
8077         * regcache.h (cached_reg): ...to here.
8078         * python/py-unwind.c (struct reg_info): Remove.
8079         (cached_frame_info): Use cached_reg_t.
8080         (pyuw_prev_register): Likewise.
8081         (pyuw_sniffer): Use cached_reg_t and allocate registers.
8082         (pyuw_dealloc_cache): Free all registers.
8083
8084 2017-06-22  Pedro Alves  <palves@redhat.com>
8085             Simon Marchi  <simon.marchi@ericsson.com>
8086
8087         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8088         warning.
8089         * common/diagnostics.h: New file.
8090
8091 2017-06-22  Pedro Alves  <palves@redhat.com>
8092
8093         * common/agent.h: Add include guards.
8094
8095 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
8096
8097         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8098         talk about addressable units instead of bytes.
8099
8100 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8101
8102         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8103         of '::const_iterator'.
8104
8105 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8106
8107         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8108         'unittests/environ-selftests.c'.
8109         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8110         * charset.c (find_charset_names): Declare object 'iconv_env'.
8111         Update code to use 'iconv_env' object.  Remove call to
8112         'free_environ'.
8113         * common/environ.c: Include <utility>.
8114         (make_environ): Delete function.
8115         (free_environ): Delete function.
8116         (gdb_environ::clear): New function.
8117         (gdb_environ::operator=): New function.
8118         (gdb_environ::get): Likewise.
8119         (environ_vector): Delete function.
8120         (set_in_environ): Delete function.
8121         (gdb_environ::set): New function.
8122         (unset_in_environ): Delete function.
8123         (gdb_environ::unset): New function.
8124         (gdb_environ::envp): Likewise.
8125         * common/environ.h: Include <vector>.
8126         (struct gdb_environ): Delete; transform into...
8127         (class gdb_environ): ... this class.
8128         (free_environ): Delete prototype.
8129         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8130         environ_vector): Likewise.
8131         * infcmd.c (run_command_1): Update code to call
8132         'envp' from 'gdb_environ' class.
8133         (environment_info): Update code to call methods from 'gdb_environ'
8134         class.
8135         (unset_environment_command): Likewise.
8136         (path_info): Likewise.
8137         (path_command): Likewise.
8138         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8139         (inferior::inferior): Initialize 'environment' using the host's
8140         information.
8141         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8142         Include "environ.h".
8143         (class inferior) <environment>: Change type from 'struct
8144         gdb_environ' to 'gdb_environ'.
8145         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8146         methods from 'gdb_environ' class.
8147         * solib.c (solib_find_1): Likewise
8148         * unittests/environ-selftests.c: New file.
8149
8150 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8151
8152         * features/i386/i386-linux.xml: Exchange the order of including
8153         32bit-linux.xml and 32bit-sse.xml.
8154         * features/i386/i386-linux.c: Regenerated.
8155
8156 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8157
8158         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
8159         Delete copy ctor and assignment operator.
8160         (tdesc_type): Likewise.
8161         (tdesc_feature): Likewise.
8162         (tdesc_free_reg): Remove.
8163         (tdesc_create_reg): Use new.
8164         (tdesc_free_type): Remove.
8165         (tdesc_create_vector): Use new.
8166         (tdesc_create_union): Likewise.
8167         (tdesc_create_flags): Likewise.
8168         (tdesc_create_enum): Likewise.
8169         (tdesc_free_feature): Delete.
8170         (free_target_description): Use delete.
8171
8172 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
8173
8174         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
8175         registers.
8176
8177 2017-06-19  Pedro Alves  <palves@redhat.com>
8178
8179         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
8180         after gdb::unlinker.
8181
8182 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
8183
8184         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
8185         gdb_environ to access an environment variable.
8186
8187 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
8188
8189         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
8190         gdb_byte*.
8191
8192 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8193
8194         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
8195
8196 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8197
8198         * configure: Re-generate.
8199         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
8200
8201 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8202
8203         * configure: Re-generate.
8204         * warning.m4: Pass -Werror to compiler when checking for
8205         supported warning flags.
8206
8207 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8208
8209         * Makefile.in (COMPILE.pre): Add "-x c++".
8210
8211 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
8212             Pedro Alves  <palves@redhat.com>
8213             Yao Qi  <yao.qi@linaro.org>
8214
8215         * defs.h (RequireLongest): New.
8216         (extract_integer): Declare function template.
8217         (extract_signed_integer): Remove the declaration, but define it
8218         static inline.
8219         (extract_unsigned_integer): Likewise.
8220         (store_integer): Declare function template.
8221         (store_signed_integer): Remove the declaration, but define it
8222         static inline.
8223         (store_unsigned_integer): Likewise.
8224         * findvar.c (extract_integer): New function template.
8225         (extract_signed_integer): Remove.
8226         (extract_unsigned_integer): Remove.
8227         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
8228         instantiations.
8229         (store_integer): New function template.
8230         (store_signed_integer): Remove.
8231         (store_unsigned_integer): Remove.
8232         (store_integer): Explicit instantiations.
8233         * regcache.c (regcache_raw_read_signed): Update.
8234         (regcache::raw_read): New function.
8235         (regcache::raw_read_signed): Remove.
8236         (regcache::raw_read_unsigned): Remove.
8237         (regcache_raw_read_unsigned): Update.
8238         (regcache_raw_write_unsigned): Update.
8239         (regcache::raw_write_signed): Remove.
8240         (regcache::raw_write): New function.
8241         (regcache_cooked_read_signed): Update.
8242         (regcache::raw_write_unsigned): Remove.
8243         (regcache::cooked_read_signed): Remove.
8244         (regcache_cooked_read_unsigned): Update.
8245         (regcache::cooked_read_unsigned): Remove.
8246         (regcache_cooked_write_signed): Update.
8247         (regcache_cooked_write_unsigned): Update.
8248         * regcache.h (regcache) <raw_read_signed>: Remove.
8249         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
8250         <raw_read, raw_write>: New.
8251         <cooked_read_signed, cooked_write_signed>: Remove.
8252         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
8253         <cooked_read, cooked_write>: New.
8254         * sh64-tdep.c (sh64_pseudo_register_read): Update.
8255         (sh64_pseudo_register_write): Update.
8256
8257 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
8258
8259         * arc-tdep.c (arc_disassembler_options): New variable.
8260         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
8261         of default_print_insn.
8262         (arc_delayed_print_insn): Set info->section when needed,
8263         use default_print_insn to retrieve a disassembler.
8264
8265 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
8266
8267         PR gdb/21574
8268         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
8269         to mention $SHELL and startup-with-shell.
8270
8271 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
8272
8273         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
8274
8275 2017-06-14  Yao Qi  <yao.qi@linaro.org>
8276
8277         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
8278         default_print_insn instead of print_insn_aarch64.
8279         * arm-tdep.c (gdb_print_insn_arm): Call
8280         default_print_insn instead of print_insn_big_arm
8281         and print_insn_little_arm.
8282         * i386-tdep.c (i386_print_insn): Call default_print_insn
8283         instead of print_insn_i386.
8284         * ia64-tdep.c (ia64_print_insn): Call
8285         default_print_insn instead of print_insn_ia64.
8286         * mips-tdep.c (gdb_print_insn_mips): Call
8287         default_print_insn instead of print_insn_big_mips
8288         and print_insn_little_mips.
8289         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
8290         instead of print_insn_spu.
8291
8292 2017-06-14  Pedro Alves  <palves@redhat.com>
8293
8294         * ada-lang.c: Include "common/byte-vector.h".
8295         (ada_value_primitive_packed_val): Use gdb::byte_vector.
8296         * charset.c (wchar_iterator::iterate): Resize the vector instead
8297         of reserving it.
8298         * common/byte-vector.h: Include "common/def-vector.h".
8299         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
8300         * cli/cli-dump.c: Include "common/byte-vector.h".
8301         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
8302         * common/byte-vector.h: New file.
8303         * common/def-vector.h: New file.
8304         * common/default-init-alloc.h: New file.
8305         * dwarf2loc.c: Include "common/byte-vector.h".
8306         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
8307         instead of reserving it.
8308         * dwarf2read.c: Include "common/byte-vector.h".
8309         (data_buf::m_vec): Now a gdb::byte_vector.
8310         * gdb_regex.c: Include "common/def-vector.h".
8311         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
8312         * mi/mi-main.c: Include "common/byte-vector.h".
8313         (mi_cmd_data_read_memory): Use gdb::byte_vector.
8314         * printcmd.c: Include "common/byte-vector.h".
8315         (print_scalar_formatted): Use gdb::byte_vector.
8316         * valprint.c: Include "common/byte-vector.h".
8317         (maybe_negate_by_bytes, print_decimal_chars): Use
8318         gdb::byte_vector.
8319
8320 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8321
8322         * darwin-nat.c: Include "nat/fork-inferior.h".
8323
8324 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8325
8326         * configure.nat: Factor out Darwin bits that are not
8327         architecture-specific.  Add fork-inferior.o.
8328
8329 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8330
8331         * configure.nat: Factor out AIX bits that are not
8332         architecture-specific.  Add fork-inferior.o.
8333
8334 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8335
8336         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
8337         (read_pieced_value, write_pieced_value): ...here.  Reduce to
8338         wrappers that just call rw_pieced_value.
8339
8340 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8341
8342         * dwarf2loc.c (write_pieced_value): When writing the data for a
8343         memory piece, use write_memory_with_notification instead of
8344         write_memory.
8345
8346 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8347
8348         * valops.c (read_value_memory): Change embedded_offset to
8349         represent a bit offset instead of a byte offset.
8350         * value.h (read_value_memory): Adjust comment.
8351
8352 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8353
8354         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
8355         dest_offset_bits and source_offset_bits.
8356         (write_pieced_value): Likewise.
8357
8358 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8359
8360         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
8361         given by DW_OP_bit_piece.
8362         (write_pieced_value): Likewise.
8363
8364 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8365
8366         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
8367         some other preparations to the places where sufficient information
8368         is available.
8369         (write_pieced_value): Likewise.
8370
8371 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8372
8373         * dwarf2loc.c (bits_to_bytes): New function.
8374         (read_pieced_value): Fix offset calculations for register pieces
8375         on big-endian targets.
8376         (write_pieced_value): Likewise.
8377
8378 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8379
8380         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
8381         (write_pieced_value): Likewise.
8382
8383 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8384
8385         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
8386         transfer the source value's least significant bits, instead of its
8387         lowest-addressed ones.  Rename type_len to max_offset.
8388         (read_pieced_value): Mirror above changes to write_pieced_value as
8389         applicable.
8390
8391 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8392
8393         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
8394         truncate full bytes from dest_offset_bits before using it as an
8395         offset into the buffer.
8396
8397 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8398
8399         * dwarf2loc.c (write_pieced_value): Include transfer size in
8400         byte-wise check.
8401
8402 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8403
8404         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
8405         calculation of this_size.
8406
8407 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8408
8409         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
8410         when targeting a bit-field.
8411         (write_pieced_value): Likewise.
8412
8413 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8414
8415         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
8416         (allocate_piece_closure): Drop addr_size parameter.
8417         (dwarf2_evaluate_loc_desc_full): Adjust call to
8418         allocate_piece_closure.
8419
8420 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8421
8422         PR gdb/21226
8423         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
8424         the LSB end, independent of endianness.
8425
8426 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8427
8428         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
8429         size capping.
8430
8431 2017-06-13  Yao Qi  <yao.qi@linaro.org>
8432
8433         * mips-linux-nat.c: Move include features/mips*-linux.c to
8434         mips-linux-tdep.c.
8435         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
8436         to mips-linux-tdep.c.
8437         * mips-linux-tdep.c: Include features/mips*-linux.c
8438         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
8439         functions.
8440         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
8441         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
8442         (tdesc_mips64_dsp_linux): Declare.
8443
8444 2017-06-12  Tom Tromey  <tom@tromey.com>
8445
8446         * valprint.h (val_print_type_code_int): Remove.
8447         * valprint.c (generic_val_print_int): Always call
8448         val_print_scalar_formatted.
8449         (val_print_type_code_int): Remove.
8450         * printcmd.c (print_scalar_formatted): Handle options->format==0.
8451         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
8452         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
8453         * ada-valprint.c (ada_val_print_num): Use
8454         val_print_scalar_formatted.
8455
8456 2017-06-12  Tom Tromey  <tom@tromey.com>
8457
8458         * printcmd.c (print_scalar_formatted): Unify the two switches.
8459         Don't convert scalars to LONGEST.
8460
8461 2017-06-12  Tom Tromey  <tom@tromey.com>
8462
8463         PR exp/16225:
8464         * valprint.h (print_decimal_chars): Update.
8465         * valprint.c (maybe_negate_by_bytes): New function.
8466         (print_decimal_chars): Add "is_signed" argument.
8467         * printcmd.c (print_scalar_formatted): Update.
8468
8469 2017-06-12  Tom Tromey  <tom@tromey.com>
8470
8471         PR exp/16225:
8472         * valprint.h (print_binary_chars, print_hex_chars): Update.
8473         * valprint.c (val_print_type_code_int): Update.
8474         (print_binary_chars): Add "zero_pad" argument.
8475         (emit_octal_digit): New function.
8476         (print_octal_chars): Don't zero-pad.
8477         (print_decimal_chars): Likewise.
8478         (print_hex_chars): Add "zero_pad" argument.
8479         * sh64-tdep.c (sh64_do_fp_register): Update.
8480         * regcache.c (regcache::dump): Update.
8481         * printcmd.c (print_scalar_formatted): Update.
8482         * infcmd.c (default_print_one_register_info): Update.
8483
8484 2017-06-12  Pedro Alves  <palves@redhat.com>
8485             Alan Hayward  <alan.hayward@arm.com>
8486
8487         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
8488         (mips_eabi_push_dummy_call): Rename local 'regsize' to
8489         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
8490         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
8491         Assert that abi_regsize bytes fit in 'ref_valbuf'.
8492
8493 2017-06-12  Pedro Alves  <palves@redhat.com>
8494
8495         * dwarf2read.c (mapped_symtab::data): Now a vector of
8496         symtab_index_entry instead of vector of
8497         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
8498         whether an element's name is NULL instead of checking whether the
8499         element itself is NULL.
8500         (find_slot): Change return type.  Adjust.
8501         (hash_expand, , add_index_entry, uniquify_cu_indices)
8502         (write_hash_table): Adjust.
8503
8504 2017-06-12  Pedro Alves  <palves@redhat.com>
8505
8506         * dwarf2read.c (recursively_count_psymbols): New function.
8507         (write_psymtabs_to_index): Call it to compute number of psyms and
8508         pass estimate size of psyms_seen to unordered_set's ctor.
8509
8510 2017-06-12  Pedro Alves  <palves@redhat.com>
8511
8512         * dwarf2read.c (write_hash_table): Check if key already exists
8513         before emplacing.
8514
8515 2017-06-12  Pedro Alves  <palves@redhat.com>
8516
8517         * dwarf2read.c (data_buf::append_space): Rename to...
8518         (data_buf::grow): ... this, and make private.  Adjust all callers.
8519         (data_buf::append_uint): New method.
8520         (add_address_entry, write_one_signatured_type)
8521         (write_psymtabs_to_index): Use it.
8522
8523 2017-06-12  Pedro Alves  <palves@redhat.com>
8524
8525         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
8526         (file_write (FILE *, const std::vector<Elem>&)): Delete.
8527         (data_buf::file_write): Call ::fwrite directly.
8528
8529 2017-06-12  Pedro Alves  <palves@redhat.com>
8530
8531         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
8532         std::vector::erase.
8533
8534 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8535
8536         Code cleanup: C++ify .gdb_index producer.
8537         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
8538         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
8539         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
8540         (create_strtab, add_string): Remove.
8541         (file_write, data_buf): New.
8542         (struct symtab_index_entry): Use std::vector for cu_indices.
8543         (struct mapped_symtab): Use std::vector for data.
8544         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
8545         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
8546         Remove.
8547         (find_slot): Change return type.  Update it to the new data structures.
8548         (hash_expand, add_index_entry): Update it to the new data structures.
8549         (offset_type_compare): Remove.
8550         (uniquify_cu_indices): Update it to the new data structures.
8551         (c_str_view, c_str_view_hasher, vector_hasher): New.
8552         (add_indices_to_cpool): Remove.
8553         (write_hash_table): Update it to the new data structures.
8554         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
8555         (eq_psymtab_cu_index): Remove.
8556         (psym_index_map): New typedef.
8557         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
8558         reference and std::unordered_map for cu_index_htab.
8559         (add_address_entry, add_address_entry_worker, write_address_map)
8560         (write_psymbols): Update it to the new data structures.
8561         (write_obstack): Remove.
8562         (struct signatured_type_index_data): Change types_list to a data_buf
8563         reference and psyms_seen to a std::unordered_set reference.
8564         (write_one_signatured_type, recursively_write_psymbols)
8565         (write_psymtabs_to_index): Update it to the new data structures.
8566
8567 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
8568
8569         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
8570         separate-debug-file commands.
8571         * symfile.h (separate_debug_file_debug): New global.
8572         * symfile.c (separate_debug_file_debug): New global.
8573         (separate_debug_file_exists, find_separate_debug_file): Add
8574         debug output.
8575         (_initialize_symfile): Add "set debug separate-debug-file"
8576         command.
8577         * build-id.c (build_id_to_debug_bfd,
8578         find_separate_debug_file_by_buildid): Add debug output.
8579
8580 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8581
8582         * gdbarch.sh (displaced_step_free_closure): Remove.
8583         * gdbarch.h, gdbarch.c: Re-generate.
8584         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
8585         displaced_step_free_closure.
8586         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
8587         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
8588         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8589         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8590         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8591         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8592         * arch-utils.h (simple_displaced_step_free_closure): Remove.
8593         * arch-utils.c (simple_displaced_step_free_closure): Remove.
8594         * infrun.c (displaced_step_clear): Call xfree instead of
8595         gdbarch_displaced_step_free_closure.
8596
8597 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
8598
8599         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
8600         NULL".
8601
8602 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
8603
8604         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
8605         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
8606         (mn10300_push_dummy_call): Likewise.
8607
8608 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8609
8610         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
8611
8612 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8613
8614         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
8615
8616 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8617
8618         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
8619         able to start inferiors using a shell.
8620         (New remote packets): Announce new packet "QStartupWithShell".
8621         * remote.c: Add PACKET_QStartupWithShell.
8622         (extended_remote_create_inferior): Handle new
8623         PACKET_QStartupWithShell.
8624         (remote_protocol_features) <QStartupWithShell>: New entry for
8625         PACKET_QStartupWithShell.
8626         (_initialize_remote): Call "add_packet_config_cmd" for
8627         QStartupShell.
8628
8629 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8630             Pedro Alves  <palves@redhat.com>
8631
8632         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8633         and "nat/fork-inferior.h".
8634         * common/common-inferior.h: New file, with contents from
8635         "gdb/inferior.h".
8636         * commom/common-utils.c: Include "common-utils.h".
8637         (stringify_argv): New function.
8638         * common/common-utils.h (stringify_argv): New prototype.
8639         * configure.nat: Add "fork-inferior.o" as a dependency for
8640         "*linux*", "fbsd*" and "nbsd*" hosts.
8641         * corefile.c (get_exec_file): Update comment.
8642         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
8643         instead of "startup_inferior".
8644         (darwin_create_inferior): Call "add_thread_silent" after
8645         "fork_inferior".
8646         * fork-child.c: Cleanup unnecessary includes.
8647         (SHELL_FILE): Move to "common/common-fork-child.c".
8648         (environ): Likewise.
8649         (exec_wrapper): Initialize.
8650         (get_exec_wrapper): New function.
8651         (breakup_args): Move to "common/common-fork-child.c"; rename to
8652         "breakup_args_for_exec".
8653         (escape_bang_in_quoted_argument): Move to
8654         "common/common-fork-child.c".
8655         (saved_ui): New variable.
8656         (prefork_hook): New function.
8657         (postfork_hook): Likewise.
8658         (postfork_child_hook): Likewise.
8659         (gdb_startup_inferior): Likewise.
8660         (fork_inferior): Move to "common/common-fork-child.c".  Update
8661         function to support gdbserver.
8662         (startup_inferior): Likewise.
8663         * gdbcore.h (get_exec_file): Remove declaration.
8664         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8665         instead of "startup_inferior".  Call "add_thread_silent" after
8666         "fork_inferior".
8667         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8668         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8669         instead of "startup_inferior".  Call "add_thread_silent" after
8670         "fork_inferior".
8671         * inferior.h: Include "common-inferior.h".
8672         (trace_start_error): Move to "common/common-utils.h".
8673         (trace_start_error_with_name): Likewise.
8674         (fork_inferior): Move prototype to "nat/fork-inferior.h".
8675         (startup_inferior): Likewise.
8676         (gdb_startup_inferior): New prototype.
8677         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8678         * nat/fork-inferior.h: New file.
8679         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8680         instead of "startup_inferior".  Call "add_thread_silent" after
8681         "fork_inferior".
8682         * target.h (target_terminal_init): Move prototype to
8683         "target/target.h".
8684         (target_terminal_inferior): Likewise.
8685         (target_terminal_ours): Likewise.
8686         * target/target.h (target_terminal_init): New prototype, moved
8687         from "target.h".
8688         (target_terminal_inferior): Likewise.
8689         (target_terminal_ours): Likewise.
8690         * utils.c (gdb_flush_out_err): New function.
8691
8692 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8693
8694         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8695         * common/common-gdbthread.h: New file, with parts from
8696         "gdb/gdbthread.h".
8697         * gdbthread.h: Include "common-gdbthread.h".
8698         (switch_to_thread): Moved to "common/common-gdbthread.h".
8699
8700 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8701
8702         * Makefile.in (SFILES): Add "common/job-control.c".
8703         (HFILES_NO_SRCDIR): Add "common/job-control.h".
8704         (COMMON_OBS): Add "job-control.o".
8705         * common/job-control.c: New file, with contents from
8706         "gdb/inflow.c".
8707         * common/job-control.h: New file, with contents from "terminal.h".
8708         * fork-child.c: Include "job-control.h".
8709         * inflow.c: Include "job-control.h".
8710         (gdb_setpgid): Move to "common/common-inflow.c".
8711         (_initialize_inflow): Move setting of "job_control" to
8712         "handle_job_control".
8713         * terminal.h (job_control): Moved to "common/common-terminal.h".
8714         (gdb_setpgid): Likewise.
8715         * top.c: Include "job_control.h".
8716         * utils.c: Likewise.
8717         (job_control): Moved to "job-control.c".
8718
8719 2017-06-07  Pedro Alves  <palves@redhat.com>
8720
8721         * Makefile.in (SFILES): Add gdb_regex.c.
8722         (COMMON_OBS): Add gdb_regex.o.
8723         * ada-lang.c (ada_add_standard_exceptions)
8724         (ada_add_exceptions_from_frame, name_matches_regex)
8725         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8726         parameter type to compiled_regex.  Adjust.
8727         (ada_exceptions_list): Use compiled_regex.
8728         * break-catch-throw.c (exception_catchpoint::pattern): Now a
8729         std::unique_ptr<compiled_regex>.
8730         (exception_catchpoint::~exception_catchpoint): Remove regfree
8731         call.
8732         (check_status_exception_catchpoint): Adjust to use compiled_regex.
8733         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8734         * breakpoint.c (solib_catchpoint::compiled): Now a
8735         std::unique_ptr<compiled_regex>.
8736         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8737         (check_status_catch_solib): Adjust to use compiled_regex.
8738         (add_solib_catchpoint): Adjust to use compiled_regex.
8739         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8740         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8741         compiled_regex reference.  Adjust to use it.
8742         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8743         declaration.  Include "gdb_regex.h".
8744         (apropos_cmd): Change regex parameter to compiled_regex reference.
8745         * gdb_regex.c: New file.
8746         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8747         declarations.
8748         (class compiled_regex): New.
8749         * linux-tdep.c: Include "common/gdb_optional.h".
8750         (struct mapping_regexes): New, factored out from
8751         mapping_is_anonymous_p, and adjusted to use compiled_regex.
8752         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8753         gdb::optional and remove cleanups.  Adjust to compiled_regex.
8754         * probe.c: Include "common/gdb_optional.h".
8755         (collect_probes): Use compiled_regex and gdb::optional and remove
8756         cleanups.
8757         * skip.c: Include "common/gdb_optional.h".
8758         (skiplist_entry::compiled_function_regexp): Now a
8759         gdb::optional<compiled_regex>.
8760         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8761         (free_skiplist_entry): Remove regfree call.
8762         (compile_skip_regexp, skip_rfunction_p): Adjust to use
8763         compiled_regex and gdb::optional.
8764         * symtab.c: Include "common/gdb_optional.h".
8765         (search_symbols): Use compiled_regex and gdb::optional.
8766         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8767         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
8768         to gdb_regex.c.
8769
8770 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8771
8772         * regcache.c (regcache::save): Avoid buffer use.
8773         (regcache::dump): Likewise.
8774
8775 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8776
8777         * sh-tdep.c (sh_pseudo_register_read): Remove
8778         MAX_REGISTER_SIZE.
8779         (sh_pseudo_register_write): Likewise.
8780         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8781         (sh64_pseudo_register_write): Likewise
8782
8783 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8784
8785         * aarch64-tdep.c (aarch64_store_return_value): Use
8786         V_REGISTER_SIZE.
8787         (aarch64_pseudo_read_value): Likewise.
8788         (aarch64_pseudo_write): Likewise.
8789
8790 2017-06-06  Yao Qi  <yao.qi@linaro.org>
8791
8792         * regformats/regdef.h (set_register_cache): Remove the
8793         declaration.
8794
8795 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
8796
8797         * frame.c (frame_unwind_register_signed): Use
8798         frame_unwind_register_value.
8799
8800 2017-06-06  Pedro Alves  <palves@redhat.com>
8801
8802         PR breakpoints/21553
8803         * breakpoint.c (create_breakpoints_sal_default)
8804         (init_breakpoint_sal, create_breakpoint_sal): Use
8805         gdb::unique_xmalloc_ptr for string parameters.
8806         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8807         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
8808         (base_breakpoint_create_breakpoints_sal)
8809         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8810         (strace_marker_create_breakpoints_sal)
8811         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8812         string parameters.
8813         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8814         gdb::unique_xmalloc_ptr for string parameters.
8815         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8816         parameters.
8817
8818 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8819
8820         * alpha-tdep.c (alpha_register_to_value): Use
8821         get_frame_register_value.
8822         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8823
8824 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8825
8826         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8827         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8828         (ia64_value_to_register): Likewise.
8829         (ia64_extract_return_value): Likewise.
8830         (ia64_store_return_value): Likewise.
8831         (ia64_push_dummy_call): Likewise.
8832
8833 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
8834
8835         GDB 8.0 released.
8836
8837 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
8838
8839         * x86-linux-nat.c (struct arch_lwp_info): Remove.
8840
8841 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
8842
8843         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8844         parameter.
8845         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8846
8847 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8848
8849         * event-loop.c (poll_timers): Unallocate timer using delete
8850         instead of xfree.
8851
8852 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8853
8854         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8855         (struct breakpoint) <~breakpoint>: New.
8856         (struct watchpoint): Inherit from breakpoint.
8857         <~watchpoint>: New.
8858         <base>: Remove.
8859         (struct tracepoint): Inherit from breakpoint.
8860         <base>: Remove.
8861         * breakpoint.c (longjmp_breakpoint_ops): Remove.
8862         (struct longjmp_breakpoint): Inherit from breakpoint.
8863         <~longjmp_breakpoint>: New.
8864         <base>: Remove.
8865         (new_breakpoint_from_type): Remove casts.
8866         (watchpoint_in_thread_scope): Remove reference to base field.
8867         (watchpoint_del_at_next_stop): Likewise.
8868         (update_watchpoint): Likewise.
8869         (watchpoint_check): Likewise.
8870         (bpstat_check_watchpoint): Likewise.
8871         (set_longjmp_breakpoint): Likewise.
8872         (struct fork_catchpoint): Inherit from breakpoint.
8873         <base>: Remove.
8874         (struct solib_catchpoint): Inherit from breakpoint.
8875         <~solib_catchpoint>: New.
8876         <base>: Remove.
8877         (dtor_catch_solib): Change to ...
8878         (solib_catchpoint::~solib_catchpoint): ... this.
8879         (breakpoint_hit_catch_solib): Remove reference to base field.
8880         (add_solib_catchpoint): Likewise.
8881         (create_fork_vfork_event_catchpoint): Likewise.
8882         (struct exec_catchpoint): Inherit from breakpoint.
8883         <~exec_catchpoint>: New.
8884         <base>: Remove.
8885         (dtor_catch_exec): Change to ...
8886         (exec_catchpoint::~exec_catchpoint): ... this.
8887         (dtor_watchpoint): Change to ...
8888         (watchpoint::~watchpoint): ... this.
8889         (watch_command_1): Remove reference to base field.
8890         (catch_exec_command_1): Likewise.
8891         (base_breakpoint_dtor): Change to ...
8892         (breakpoint::~breakpoint): ... this.
8893         (base_breakpoint_ops): Remove dtor field value.
8894         (longjmp_bkpt_dtor): Change to ...
8895         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8896         (strace_marker_create_breakpoints_sal): Remove reference to base
8897         field.
8898         (delete_breakpoint): Don't manually call breakpoint destructor.
8899         (create_tracepoint_from_upload): Remove reference to base field.
8900         (trace_pass_set_count): Likewise.
8901         (initialize_breakpoint_ops): Don't initialize
8902         momentary_breakpoint_ops, don't set dtors.
8903         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8904         <~ada_catchpoint>: New.
8905         <base>: Remove.
8906         (create_excep_cond_exprs): Remove reference to base field.
8907         (dtor_exception): Change to ...
8908         (ada_catchpoint::~ada_catchpoint): ... this.
8909         (dtor_catch_exception): Remove.
8910         (dtor_catch_exception_unhandled): Remove.
8911         (dtor_catch_assert): Remove.
8912         (create_ada_exception_catchpoint): Remove reference to base
8913         field.
8914         (initialize_ada_catchpoint_ops): Don't set dtors.
8915         * break-catch-sig.c (struct signal_catchpoint): Inherit from
8916         breakpoint.
8917         <~signal_catchpoint>: New.
8918         <base>: Remove.
8919         (signal_catchpoint_dtor): Change to ...
8920         (signal_catchpoint::~signal_catchpoint): ... this.
8921         (create_signal_catchpoint): Remove reference to base field.
8922         (initialize_signal_catchpoint_ops): Don't set dtor.
8923         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8924         from breakpoint.
8925         <~syscall_catchpoint>: New.
8926         <base>: Remove.
8927         (dtor_catch_syscall): Change to ...
8928         (syscall_catchpoint::~syscall_catchpoint): ... this.
8929         (create_syscall_event_catchpoint): Remove reference to base
8930         field.
8931         (initialize_syscall_catchpoint_ops): Don't set dtor.
8932         * break-catch-throw.c (struct exception_catchpoint): Inherit
8933         from breakpoint.
8934         <~exception_catchpoint>: New.
8935         <base>: Remove.
8936         (dtor_exception_catchpoint): Change to ...
8937         (exception_catchpoint::~exception_catchpoint): ... this.
8938         (handle_gnu_v3_exceptions): Remove reference to base field.
8939         (initialize_throw_catchpoint_ops): Don't set dtor.
8940         * ctf.c (ctf_get_traceframe_address): Remove reference to base
8941         field.
8942         * remote.c (remote_get_tracepoint_status): Likewise.
8943         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8944         * tracefile.c (tracefile_fetch_registers): Likewise.
8945         * tracepoint.c (actions_command): Likewise.
8946         (validate_actionline): Likewise.
8947         (tfind_1): Likewise.
8948         (get_traceframe_location): Likewise.
8949         (find_matching_tracepoint_location): Likewise.
8950         (parse_tracepoint_status): Likewise.
8951         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8952
8953 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8954
8955         * breakpoint.c (struct longjmp_breakpoint): New struct.
8956         (is_tracepoint_type): Change return type to bool.
8957         (is_longjmp_type): New function.
8958         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8959         (set_raw_breakpoint_without_location): Use
8960         new_breakpoint_from_type.
8961         (set_raw_breakpoint): Likewise.
8962
8963 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8964
8965         * breakpoint.c (new_breakpoint_from_type): New function.
8966         (create_breakpoint_sal): Use new_breakpoint_from_type and
8967         unique_ptr.
8968         (create_breakpoint): Likewise.
8969
8970 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
8971
8972         * memattr.c (mem_info_command): Rename to ...
8973         (info_mem_command): ... this.
8974         (mem_enable_command): Rename to ...
8975         (enable_mem_command): ... this.
8976         (mem_disable_command): Rename to ...
8977         (disable_mem_command): ... this.
8978         (mem_delete_command): Rename to ...
8979         (delete_mem_command): ... this.
8980         (_initialize_mem): Adjust function names.
8981
8982 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8983
8984         * btrace.c (handle_pt_insn_events): New.
8985         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
8986         STATUS.  Split into this and ...
8987         (handle_pt_insn_event_flags): ... this.
8988
8989 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8990
8991         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8992         and struct pt_insn.resynced.
8993         * configure: Regenerated.
8994         * config.in: Regenerated.
8995
8996 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8997
8998         * btrace.c (ftrace_find_call_by_number): New function.
8999         (ftrace_new_function): Store objects, not pointers.
9000         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
9001         ftrace_new_gap, ftrace_update_function,
9002         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
9003         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
9004         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
9005         btrace_ends_with_single_insn, btrace_call_get): Account for
9006         btrace_thread_info::functions now storing objects.
9007         * btrace.h (struct btrace_thread_info): Add constructor.
9008         (struct btrace_thread_info) <functions>: Make std::vector.
9009         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
9010         Initialize with default values.
9011         * record-btrace.c (record_btrace_frame_sniffer): Account for
9012         btrace_thread_info::functions now storing objects.
9013
9014 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9015
9016         * btrace.c: Remove typedef bfun_s.
9017         (ftrace_new_gap): Directly add gaps to the list of gaps.
9018         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
9019         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
9020         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
9021         instead of gdb VEC.
9022
9023 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9024
9025         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
9026         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
9027         with btrace_thread_info::next_segment and
9028         btrace_thread_info::prev_segment.
9029         * btrace.h: Remove struct btrace_func_link.
9030         (struct btrace_function): Replace pair of function segment pointers
9031         with pair of indices.
9032         * python/py-record-btrace.c (btpy_call_prev_sibling,
9033         btpy_call_next_sibling): Replace references to
9034         btrace_thread_info::segment with btrace_thread_info::next_segment and
9035         btrace_thread_info::prev_segment.
9036         * record-btrace.c (record_btrace_frame_this_id): Use
9037         btrace_find_call_by_number.
9038
9039 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9040
9041         * btrace.c (ftrace_new_function, ftrace_fixup_level,
9042         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9043         btrace_insn_next, btrace_insn_prev): Remove references to
9044         btrace_thread_info::flow.
9045         * btrace.h (struct btrace_function): Remove FLOW.
9046
9047 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9048
9049         * btrace.c (ftrace_find_call_by_number): New function.
9050         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9051         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9052         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9053         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9054         index.
9055         * btrace.h (struct btrace_function): Turn UP into an index.
9056         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9057         as an index.
9058         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9059         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9060         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
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, ftrace_compute_global_level_offset,
9067         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9068         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9069         btrace_insn_end, btrace_is_empty): Remove references to
9070         btrace_thread_info::begin and btrace_thread_info::end.
9071         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9072         (struct btrace_thread_info) <functions>: Adjust comment.
9073         * record-btrace.c (record_btrace_start_replaying): Remove reference to
9074         btrace_thread_info::begin.
9075
9076 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9077
9078         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9079         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9080         ftrace_update_function): Remove arguments that implicitly were always
9081         BTINFO->END.
9082         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9083         Don't pass BTINFO->END.
9084
9085 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9086
9087         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9088         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9089         btrace_find_insn_by_number): Replace function segment pointer with
9090         index.
9091         (btrace_insn_cmp): Simplify.
9092         * btrace.h: (struct btrace_insn_iterator) Rename index to
9093         insn_index.  Replace function segment pointer with index into function
9094         segment vector.
9095         * record-btrace.c (record_btrace_call_history): Replace function
9096         segment pointer use with index.
9097         (record_btrace_frame_sniffer): Retrieve function call segment through
9098         vector.
9099         (record_btrace_set_replay): Remove defunc't safety check.
9100
9101 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9102
9103         * btrace.c (btrace_ends_with_single_insn): New function.
9104         (btrace_call_get, btrace_call_number, btrace_call_begin,
9105         btrace_call_end, btrace_call_next, btrace_call_prev,
9106         btrace_find_call_by_number): Use index into call segment vector
9107         instead of pointer.
9108         (btrace_call_cmp): Simplify.
9109         * btrace.h (struct btrace_call_iterator): Replace function call segment
9110         pointer with index into vector.
9111         * record-btrace.c (record_btrace_call_history): Use index instead of
9112         pointer.
9113
9114 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9115
9116         * btrace.c (btrace_insn_begin, btrace_insn_end,
9117         btrace_find_insn_by_number): Add btinfo to iterator.
9118         * btrace.h (struct btrace_insn_iterator): Add btinfo.
9119
9120 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9121
9122         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9123         and save pointers directly.
9124         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9125         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9126         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
9127         changed signature of functions.
9128         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9129         (btrace_fetch): Remove code that adds btrace_function pointers to
9130         vector of btrace_functions.
9131         (btrace_clear): Simplify freeing vector of btrace_functions.
9132
9133 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9134
9135         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9136         Replace VEC_* with std::vector functions.
9137         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9138         (struct btrace_thread_info)<functions>: Change type to std::vector.
9139
9140 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9141
9142         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
9143         "Removed targets and native configurations" up.  Merge duplicate
9144         "New commands" sub-sections.  Add "New options" sub-sections.
9145
9146 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
9147
9148         * defs.h (copy_integer_to_size): New declaration.
9149         * findvar.c (copy_integer_to_size): New function.
9150         (do_cint_test): New selftest function.
9151         (copy_integer_to_size_test): Likewise.
9152         (_initialize_findvar): Likewise.
9153         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
9154         (mips_fbsd_collect_reg): Use raw_collect_integer.
9155         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
9156         (mips64_fill_gregset): Use raw_collect_integer
9157         (mips64_fill_fpregset): Use raw_supply_integer.
9158         * regcache.c (regcache::raw_supply_integer): New function.
9159         (regcache::raw_collect_integer): Likewise.
9160         * regcache.h: (regcache::raw_supply_integer): New declaration.
9161         (regcache::raw_collect_integer): Likewise.
9162
9163 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9164
9165         * Makefile.in (SFILES): Add gdbarch-selftests.c.
9166         (COMMON_OBS): Add gdbarch-selftests.o.
9167         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
9168         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
9169         * gdbarch-selftests.c: New file.
9170         * regcache.h (regcache) <~regcache>: Mark it virtual if
9171         GDB_SELF_TEST.
9172         <raw_write>: Likewise.
9173
9174 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9175
9176         * regcache.c (current_regcache): Change it to
9177         regcache::current_regcache.
9178         (regcache_observer_target_changed): Update.
9179         (regcache_thread_ptid_changed): Make it a regcache static
9180         method.
9181         (regcache_thread_ptid_changed): Update.
9182         (class regcache_access): New.
9183         (current_regcache_test): Update.
9184         (_initialize_regcache): Update.
9185         * regcache.h: Include forward_list.
9186         (regcache): Declare regcache_thread_ptid_changed and declare
9187         registers_changed_ptid as friend.
9188
9189 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9190
9191         * i387-tdep.c (i387_register_to_value): Use register_size
9192         instead of TYPE_LENGTH.
9193         * m68k-tdep.c (m68k_register_to_value): Likewise.
9194
9195 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9196
9197         * i387-tdep.c (i387_convert_register_p): Return false if type
9198         code isn't TYPE_CODE_FLT.
9199
9200 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9201
9202         * alpha-tdep.c (alpha_convert_register_p): Return true if type
9203         length is 4.
9204         (alpha_register_to_value): Remove type length check.
9205         (alpha_value_to_register): Likewise.
9206
9207 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9208
9209         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
9210         TYPE_CODE_FLT.
9211
9212 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9213
9214         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
9215         TYPE_CODE_FLT or not.
9216
9217 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9218
9219         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
9220         * avr-tdep.c (avr_gdbarch_init): Likewise.
9221         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9222         * cris-tdep.c (cris_gdbarch_init): Likewise.
9223         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9224         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9225         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9226         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
9227         * mep-tdep.c (mep_gdbarch_init): Likewise.
9228         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9229         * mips-tdep.c (mips_gdbarch_init): Likewise.
9230         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9231         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9232         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9233         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9234         * v850-tdep.c (v850_gdbarch_init): Likewise.
9235
9236 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9237
9238         * selftest-arch.c (tests_with_arch): Call registers_changed
9239         and reinit_frame_cache.
9240         * selftest.c (run_self_tests): Likewise.
9241
9242 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9243
9244         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
9245         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
9246
9247 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9248
9249         * rl78-tdep.c (rl78_gdbarch_init): Don't call
9250         set_gdbarch_print_insn.
9251
9252 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9253
9254         * h8300-tdep.c (h8300_gdbarch_init): Don't call
9255         set_gdbarch_print_insn.
9256
9257 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9258
9259         * alpha-tdep.c (alpha_gdbarch_init): Don't call
9260         set_gdbarch_print_insn.
9261         * arc-tdep.c (arc_gdbarch_init): Likewise.
9262         * arch-utils.c: include dis-asm.h.
9263         (default_print_insn): New function.
9264         * arch-utils.h (default_print_insn): Declare.
9265         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
9266         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9267         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
9268         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
9269         * frv-tdep.c (frv_gdbarch_init): Likewise.
9270         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9271         * gdbarch.sh (print_insn): Use default_print_insn.
9272         * gdbarch.c: Regenerated.
9273         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
9274         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
9275         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9276         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
9277         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9278         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
9279         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
9280         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
9281         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
9282         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9283         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9284         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9285         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9286         * mt-tdep.c (mt_gdbarch_init): Likewise.
9287         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9288         * nios2-tdep.c (nios2_print_insn): Remove.
9289         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
9290         * rx-tdep.c (rx_gdbarch_init): Likewise.
9291         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9292         * score-tdep.c (score_print_insn): Remove.
9293         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
9294         * sh-tdep.c (sh_gdbarch_init): Likewise.
9295         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9296         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9297         * tic6x-tdep.c (tic6x_print_insn): Remove.
9298         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
9299         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
9300         * v850-tdep.c (v850_gdbarch_init): Likewise.
9301         * vax-tdep.c (vax_gdbarch_init): Likewise.
9302         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9303         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
9304
9305 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
9306
9307         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
9308         (MIPS_FP0_REGNUM): Remove.
9309         (MIPS_FSR_REGNUM): Remove.
9310         (mips_fbsd_supply_fpregs): Use mips_regnum.
9311         (mips_fbsd_supply_gregs): Likewise.
9312         (mips_fbsd_collect_fpregs): Likewise.
9313         (mips_fbsd_collect_gregs): Likewise.
9314
9315 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
9316
9317         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
9318         (getpfpregs_supplies): New function.
9319         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
9320         getfpregs_supplies.
9321         (mips_fbsd_store_inferior_registers): Likewise.
9322
9323 2017-05-22  Pedro Alves <palves@redhat.com>
9324
9325         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
9326         maintainer.
9327
9328 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
9329
9330         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
9331         (store_register): Likewise.
9332         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
9333         (get_decimal_float_return_value): Likewise.
9334         (do_ppc_sysv_return_value): Likewise.
9335         (ppc64_sysv_abi_push_integer): Likewise.
9336         (ppc64_sysv_abi_push_freg): Likewise.
9337         (ppc64_sysv_abi_return_value_base): Likewise.
9338         (ppc64_sysv_abi_return_value): Likewise.
9339         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
9340         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
9341         * rs6000-nat.c: Likewise.
9342         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
9343         (rs6000_value_to_register): Likewise.
9344         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
9345
9346 2017-05-21  Tom Tromey  <tom@tromey.com>
9347
9348         PR rust/21466:
9349         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
9350         arrays as "[T]", not "[T; ]".
9351
9352 2017-05-19  Tom Tromey  <tom@tromey.com>
9353
9354         PR rust/21484:
9355         * rust-lang.c (exp_descriptor_rust): New function.
9356         (rust_language_defn): Use it.
9357         * p-lang.c (pascal_language_defn): Update.
9358         * opencl-lang.c (opencl_language_defn): Update.
9359         * objc-lang.c (objc_language_defn): Update.
9360         * m2-lang.c (m2_language_defn): Update.
9361         * language.h (struct language_defn)
9362         <la_watch_location_expression>: New member.
9363         * language.c (unknown_language_defn, auto_language_defn)
9364         (local_language_defn): Update.
9365         * go-lang.c (go_language_defn): Update.
9366         * f-lang.c (f_language_defn): Update.
9367         * d-lang.c (d_language_defn): Update.
9368         * c-lang.h (c_watch_location_expression): Declare.
9369         * c-lang.c (c_watch_location_expression): New function.
9370         (c_language_defn, cplus_language_defn, asm_language_defn)
9371         (minimal_language_defn): Use it.
9372         * breakpoint.c (watch_command_1): Call
9373         la_watch_location_expression.
9374         * ada-lang.c (ada_language_defn): Update.
9375
9376 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9377
9378         PR tui/21482
9379         * gdb_curses.h (NOMACROS): Define.
9380         (NCURSES_NOMACROS): Define.
9381
9382 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9383
9384         PR tui/21482
9385         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
9386         arg to char *.
9387         * tui/tui-wingeneral.c (box_win): Likewise.
9388         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
9389         (tui_show_source_line): Likewise.
9390         (tui_show_exec_info_content): Likewise.
9391
9392 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
9393
9394         * sparc-tdep.c (sparc_structure_return_p)
9395         (sparc_arg_on_registers_p): New functions.
9396         (sparc32_store_arguments): Use them.
9397         * sparc64-tdep.c (sparc64_16_byte_align_p)
9398         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
9399         Handle TYPE_CODE_ARRAY.
9400
9401 2017-05-17  Yao Qi  <yao.qi@linaro.org>
9402
9403         * cli/cli-decode.c (add_alias_cmd): New function.
9404         * command.h (add_alias_cmd): Declare.
9405         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
9406         instead call add_alias_cmd.
9407
9408 2017-05-17  Pedro Alves  <palves@redhat.com>
9409
9410         * Makefile.in (nat_extra_makefile_frag): Rename to ...
9411         (nat_makefile_frag): ... this.  All references updated.
9412         * configure.ac: Likewise.
9413         * configure.nat: Likewise.  Enhance comments.
9414         * configure: Regenerate.
9415
9416 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9417
9418         * procfs.c (procfs_create_inferior): Change prototype to match
9419         definition.
9420
9421 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
9422
9423         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
9424         C++ compiler warning.
9425
9426 2017-05-12  Tom Tromey  <tom@tromey.com>
9427
9428         PR rust/21483:
9429         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
9430         recurse, just call value_struct_elt directly.
9431
9432 2017-05-12  Tom Tromey  <tom@tromey.com>
9433
9434         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
9435         OP_RUST_ARRAY>: Fix.
9436
9437 2017-05-12  Tom Tromey  <tom@tromey.com>
9438
9439         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
9440
9441 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9442
9443         * regcache.c: Include <forward_list>.
9444         (struct regcache_list): Remove.
9445         (current_regcache): Update.
9446         (get_thread_arch_aspace_regcache): Update for std::forward_list.
9447         (regcache_thread_ptid_changed): Likewise.
9448         (registers_changed_ptid): Likewise.
9449         (current_regcache_size): Likewise.
9450
9451 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9452
9453         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
9454         (current_regcache_size): New function.
9455         (current_regcache_test): New function.
9456         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
9457
9458 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9459
9460         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
9461         (print_gp_register_row): Use get_frame_register_value.
9462
9463 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9464
9465         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
9466         (mips_supply_fpregset): Likewise.
9467         (mips64_supply_gregset): Likewise.
9468
9469 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9470
9471         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
9472         regcache->raw_supply_zeroed.
9473
9474 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9475
9476         * configure.nat: Rearrange 'case' statements to match
9477         host before cpu.
9478
9479 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9480
9481         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
9482         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
9483         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
9484         "@nat_extra_makefile_frag@".
9485         (Makefile): Remove dependency on "@frags@".
9486         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
9487         (data-directory/Makefile): Likewise.
9488         * config/aarch64/linux.mh: Deleted; moved contents to
9489         "gdb/configure.nat".
9490         * config/alpha/alpha-linux.mh: Likewise.
9491         * config/alpha/nbsd.mh: Likewise.
9492         * config/arm/linux.mh: Likewise.
9493         * config/arm/nbsdelf.mh: Likewise.
9494         * config/i386/cygwin.mh: Likewise.
9495         * config/i386/cygwin64.mh: Likewise.
9496         * config/i386/darwin.mh: Likewise.
9497         * config/i386/fbsd.mh: Likewise.
9498         * config/i386/fbsd64.mh: Likewise.
9499         * config/i386/go32.mh: Likewise.
9500         * config/i386/i386gnu.mh: Likewise.
9501         * config/i386/i386sol2.mh: Likewise.
9502         * config/i386/linux.mh: Likewise.
9503         * config/i386/linux64.mh: Likewise.
9504         * config/i386/mingw.mh: Likewise.
9505         * config/i386/mingw64.mh: Likewise.
9506         * config/i386/nbsd64.mh: Likewise.
9507         * config/i386/nbsdelf.mh: Likewise.
9508         * config/i386/nto.mh: Likewise.
9509         * config/i386/obsd.mh: Likewise.
9510         * config/i386/obsd64.mh: Likewise.
9511         * config/i386/sol2-64.mh: Likewise.
9512         * config/ia64/linux.mh: Likewise.
9513         * config/m32r/linux.mh: Likewise.
9514         * config/m68k/linux.mh: Likewise.
9515         * config/m68k/nbsdelf.mh: Likewise.
9516         * config/m68k/obsd.mh: Likewise.
9517         * config/m88k/obsd.mh: Likewise.
9518         * config/mips/fbsd.mh: Likewise.
9519         * config/mips/linux.mh: Likewise.
9520         * config/mips/nbsd.mh: Likewise.
9521         * config/mips/obsd64.mh: Likewise.
9522         * config/pa/linux.mh: Likewise.
9523         * config/pa/nbsd.mh: Likewise.
9524         * config/pa/obsd.mh: Likewise.
9525         * config/powerpc/aix.mh: Likewise.
9526         * config/powerpc/fbsd.mh: Likewise.
9527         * config/powerpc/linux.mh: Likewise.
9528         * config/powerpc/nbsd.mh: Likewise.
9529         * config/powerpc/obsd.mh: Likewise.
9530         * config/powerpc/ppc64-linux.mh: Likewise.
9531         * config/powerpc/spu-linux.mh: Likewise.
9532         * config/s390/linux.mh: Likewise.
9533         * config/sh/nbsd.mh: Likewise.
9534         * config/sparc/fbsd.mh: Likewise.
9535         * config/sparc/linux.mh: Likewise.
9536         * config/sparc/linux64.mh: Likewise.
9537         * config/sparc/nbsd64.mh: Likewise.
9538         * config/sparc/nbsdelf.mh: Likewise.
9539         * config/sparc/obsd64.mh: Likewise.
9540         * config/sparc/sol2.mh: Likewise.
9541         * config/tilegx/linux.mh: Likewise.
9542         * config/vax/nbsdelf.mh: Likewise.
9543         * config/vax/obsd.mh: Likewise.
9544         * config/xtensa/linux.mh: Likewise.
9545         * config/i386/i386gnu.mn: New file, with excerpts from
9546         "config/i386/i386gnu.mh".
9547         * configure: Regenerate.
9548         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
9549         *.mh files under "gdb/config".
9550         * configure.nat: New file, with contents from the
9551         "gdb/config/*/*.mh" files.
9552
9553 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
9554
9555         * btrace.c (btrace_clear): Free insn vector.
9556
9557 2017-05-05  Pedro Alves  <palves@redhat.com>
9558
9559         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
9560         * configure: Regenerate.
9561
9562 2017-05-04  Pedro Alves  <palves@redhat.com>
9563
9564         * Makefile.in (SFILES): Add progspace-and-thread.c.
9565         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
9566         (COMMON_OBS): Add progspace-and-thread.o.
9567         * breakpoint.c: Include "progspace-and-thread.h".
9568         (update_inserted_breakpoint_locations)
9569         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
9570         Use scoped_restore_current_pspace_and_thread.
9571         (create_std_terminate_master_breakpoint): Use
9572         scoped_restore_current_program_space.
9573         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
9574         (print_breakpoint_location): Use
9575         scoped_restore_current_program_space.
9576         (bp_loc_is_permanent): Use
9577         scoped_restore_current_pspace_and_thread.
9578         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
9579         (download_tracepoint_locations): Use
9580         scoped_restore_current_pspace_and_thread.
9581         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
9582         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
9583         (enum step_over_calls_kind): Moved from inferior.h.
9584         (class scoped_restore_current_thread): New class.
9585         * gdbthread.h (make_cleanup_restore_current_thread): Delete
9586         declaration.
9587         (scoped_restore_current_thread): New class.
9588         * infcmd.c: Include "common/gdb_optional.h".
9589         (continue_1, proceed_after_attach): Use
9590         scoped_restore_current_thread.
9591         (notice_new_inferior): Use scoped_restore_current_thread.
9592         * inferior.c: Include "progspace-and-thread.h".
9593         (restore_inferior, save_current_inferior): Delete.
9594         (add_inferior_command, clone_inferior_command): Use
9595         scoped_restore_current_pspace_and_thread.
9596         * inferior.h (scoped_restore_current_inferior): New class.
9597         * infrun.c: Include "progspace-and-thread.h" and
9598         "common/gdb_optional.h".
9599         (follow_fork_inferior): Use
9600         scoped_restore_current_pspace_and_thread.
9601         (scoped_restore_exited_inferior): New class.
9602         (handle_vfork_child_exec_or_exit): Use
9603         scoped_restore_exited_inferior,
9604         scoped_restore_current_pspace_and_thread,
9605         scoped_restore_current_thread and scoped_restore.
9606         (fetch_inferior_event): Use scoped_restore_current_thread.
9607         * linespec.c (decode_line_full, decode_line_1): Use
9608         scoped_restore_current_program_space.
9609         * mi/mi-main.c: Include "progspace-and-thread.h".
9610         (exec_continue): Use scoped_restore_current_thread.
9611         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
9612         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
9613         * proc-service.c (ps_pglobal_lookup): Use
9614         scoped_restore_current_program_space.
9615         * progspace-and-thread.c: New file.
9616         * progspace-and-thread.h: New file.
9617         * progspace.c (release_program_space, clone_program_space): Use
9618         scoped_restore_current_program_space.
9619         (restore_program_space, save_current_program_space)
9620         (save_current_space_and_thread): Delete.
9621         (switch_to_program_space_and_thread): Moved to
9622         progspace-and-thread.c.
9623         * progspace.h (save_current_program_space)
9624         (save_current_space_and_thread): Delete declarations.
9625         (scoped_restore_current_program_space): New class.
9626         * remote.c (remote_btrace_maybe_reopen): Use
9627         scoped_restore_current_thread.
9628         * symtab.c: Include "progspace-and-thread.h".
9629         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9630         * thread.c (print_thread_info_1): Use
9631         scoped_restore_current_thread.
9632         (struct current_thread_cleanup): Delete.
9633         (do_restore_current_thread_cleanup)
9634         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
9635         (scoped_restore_current_thread::~scoped_restore_current_thread):
9636         ... this new dtor.
9637         (make_cleanup_restore_current_thread): Rename/convert to ...
9638         (scoped_restore_current_thread::scoped_restore_current_thread):
9639         ... this new ctor.
9640         (thread_apply_all_command): Use scoped_restore_current_thread.
9641         (thread_apply_command): Use scoped_restore_current_thread.
9642         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
9643         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9644
9645 2017-05-04  Pedro Alves  <palves@redhat.com>
9646
9647         * thread.c (make_cleanup_restore_current_thread): Move
9648         find_thread_ptid call before the is_stopped call.  Assert that the
9649         thread is found.  Replace is_stopped call by checking the thread's
9650         state directly.  Remove unnecessary NULL-thread check.
9651
9652 2017-05-04  Pedro Alves  <palves@redhat.com>
9653
9654         * corelow.c (thread_section_name): New class.
9655         (get_core_register_section, get_core_siginfo): Use it.
9656
9657 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9658
9659         * corelow.c (sniff_core_bfd): Remove extra semicolon.
9660         (get_core_register_section): Remove xfree of NULL pointer.
9661
9662 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
9663
9664         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9665         * regcache.c (regcache::raw_supply_zeroed): New function.
9666         * regcache.h (regcache::raw_supply_zeroed): New declaration.
9667
9668 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9669
9670         * gdbarch.sh: Remove commented out definition of
9671         TARGET_CHAR_BIT.
9672         * gdbarch.h: Re-generate.
9673
9674 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
9675
9676         * configure: Regenerate.
9677
9678 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
9679
9680         * solib-target.c (solib_target_relocate_section_addresses):
9681         Remove num_section_bases, num_bases, segment_bases variables.
9682
9683 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9684
9685         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9686
9687 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9688
9689         * solib-target.c: Include <vector>
9690         (struct lm_info_target) <~lm_info_target>: Remove.
9691         <segment_bases, section_bases>: Change type to
9692         std::vector<CORE_ADDR>.
9693         (library_list_start_segment, library_list_start_section,
9694         library_list_end_library,
9695         solib_target_relocate_section_addresses): Adjust.
9696
9697 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9698
9699         * gdbarch.sh (software_single_step): Change return type to
9700         std::vector<CORE_ADDR>.
9701         * gdbarch.c, gdbarch.h: Re-generate.
9702         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9703         Adjust.
9704         (arm_deal_with_atomic_sequence_raw): Adjust.
9705         (thumb_get_next_pcs_raw): Adjust.
9706         (arm_get_next_pcs_raw): Adjust.
9707         (arm_get_next_pcs): Adjust.
9708         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9709         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9710         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9711         (alpha_software_single_step): Adjust.
9712         * alpha-tdep.h (alpha_software_single_step): Adjust.
9713         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9714         * arm-tdep.c (arm_software_single_step): Adjust.
9715         (arm_breakpoint_kind_from_current_state): Adjust.
9716         * arm-tdep.h (arm_software_single_step): Adjust.
9717         * breakpoint.c (insert_single_step_breakpoint): Adjust.
9718         * cris-tdep.c (cris_software_single_step): Adjust.
9719         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9720         (micromips_deal_with_atomic_sequence): Adjust.
9721         (deal_with_atomic_sequence): Adjust.
9722         (mips_software_single_step): Adjust.
9723         * mips-tdep.h (mips_software_single_step): Adjust.
9724         * moxie-tdep.c (moxie_software_single_step): Adjust.
9725         * nios2-tdep.c (nios2_software_single_step): Adjust.
9726         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9727         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9728         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9729         * s390-linux-tdep.c (s390_software_single_step): Adjust.
9730         * sparc-tdep.c (sparc_software_single_step): Adjust.
9731         * spu-tdep.c (spu_software_single_step): Adjust.
9732         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9733
9734 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9735
9736         * gdbarch.sh: Use semi-colon as field separator instead of colon.
9737         * gdbarch.h: Re-generate.
9738
9739 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9740
9741         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9742         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9743         * python/py-instruction.c, python/py-instruction.h: New file.
9744         * python/py-record.c: Add py-instruction.h include.
9745         (gdbpy_initialize_record): Make gdb.Instruction a super class of
9746         gdb.RecordInstruction.
9747         * python/python-internal.h: Add gdbpy_initialize_instruction
9748         declaration.
9749         * python/python.c (do_start_initialization): Add
9750         gdbpy_initialize_instruction.
9751
9752 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9753
9754         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9755         Remove.
9756         (btrace_func_from_recpy_func): New function.
9757         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9758         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9759         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9760         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9761         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9762         Also, use new helper functions.
9763         (btpy_list_item): Use new helper functions.
9764         (recpy_bt_function_call_history): Use new type name.
9765         (btpy_call_getset): Remove.
9766         (gdbpy_initialize_btrace): Remove code to initialize
9767         gdb.BtraceFunctionCall.
9768         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9769         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9770         recpy_bt_func_prev, recpy_bt_func_next): New export.
9771         * python/py-record.c (recpy_func_type): New static object.
9772         (recpy_func_new, recpy_func_level, recpy_func_symbol,
9773         recpy_func_instructions, recpy_func_up, recpy_func_prev,
9774         recpy_func_next): New function.
9775         (recpy_element_hash, recpy_element_richcompare): Updated comment.
9776         (recpy_func_getset): New static object.
9777         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9778         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9779
9780 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9781
9782         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9783         (btpy_object, btpy_insn_type, btpy_new): Remove.
9784         (btpy_list_object): Use gdb.RecordInstruction type instead of
9785         gdb.BtraceInstruction type.
9786         (btrace_insn_from_recpy_insn): New function.
9787         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9788         btpy_new.
9789         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9790         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9791         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9792         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9793         instead of btpy_object.
9794         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9795         btpy_insn_data, btpy_insn_decode): Rename to ...
9796         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9797         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9798         recpy_bt_insn_decode): This.  Also, use new helper functions.
9799         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9800         recpy_insn_type.
9801         (btpy_insn_getset): Remove.
9802         (gdbpy_initialize_btrace): Remove code to initialize
9803         gdb.BtraceInstruction.  Use recpy_element_object.
9804         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9805         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9806         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9807         * python/py-record.c (recpy_insn_type): New static object.
9808         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9809         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9810         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9811         New function.
9812         (recpy_insn_getset): New static object.
9813         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9814         * python/py-record.h (recpy_element_object): New typedef.
9815         (recpy_insn_type, recpy_insn_new): New export.
9816
9817 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9818
9819         * py-record-btrace.c (btpy_insn_new): Removed.
9820         (btpy_insn_or_gap_new): New function.
9821         (btpy_insn_error): Removed.
9822         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9823         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9824         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9825         btpy_insn_or_gap_new instead of btpy_insn_new.
9826         (btpy_insn_getset): Remove btpy_insn_error.
9827         * py-record.c (recpy_gap_type): New static object.
9828         (recpy_gap_object): New typedef.
9829         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9830         recpy_gap_reason_string): New function.
9831         (recpy_gap_getset): New static object.
9832         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9833         * py-record.h (recpy_gap_new): New export.
9834
9835 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9836
9837         * python/py-record.c (recpy_ptid): Remove.
9838         (recpy_record_getset): Remove recpy_ptid.
9839
9840 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9841
9842         * btrace.c (btrace_fetch): Set inferior_ptid.
9843         * python/py-record-btrace.c: Add "py-record.h" include.
9844         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9845         recpy_bt_end, recpy_bt_instruction_history,
9846         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9847         in gdb.Record object instead of current ptid.
9848         * python/py-record.c: Include new "py-record.h" file.
9849         (recpy_record_object): Moved to py-record.h.
9850         * python/py-record.h: New file.
9851
9852 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9853
9854         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9855         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9856         indentation.
9857
9858 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
9859
9860         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9861         the past maintainers section.
9862
9863 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9864
9865         * infcmd.c (get_return_value): Use regcache ctor, and remove
9866         cleanup.
9867
9868 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9869             Pedro Alves  <palves@redhat.com>
9870
9871         * regcache.c (regcache::regcache): New tag dispatch ctor.
9872         (do_cooked_read): Moved above.
9873         (regcache_dup): Use the tag dispatch ctor..
9874         * regcache.h (regcache): Declare ctor, delete copy ctor and
9875         assignment operator, remove friend regcache_dup.
9876
9877 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9878
9879         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9880         call method save instead of regcache_cpy.
9881         * regcache.h (struct regcache): Make regcache_dup a friend.
9882
9883 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9884
9885         * regcache.c (struct regcache): Move to regcache.h
9886         (regcache::arch): New method.
9887         (regcache_get_ptid): Update.
9888         (get_regcache_arch): Call arch method.
9889         (get_regcache_aspace): Call method aspace.
9890         (register_buffer): Change it to method.
9891         (regcache_save): Change it to regcache::save.
9892         (regcache_restore): Likewise.
9893         (regcache_cpy_no_passthrough): Remove the declaration.
9894         (regcache_cpy): Call methods restore and cpy_no_passthrough.
9895         (regcache_cpy_no_passthrough): Change it to method
9896         cpy_no_passthrough.
9897         (regcache_register_status): Change it to method
9898         get_register_status.
9899         (regcache_invalidate): Change it to method invalidate.
9900         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9901         (regcache_raw_update): Change it to method raw_update.
9902         (regcache_raw_read): Likewise.
9903         (regcache_raw_read_signed): Likewise.
9904         (regcache_raw_read_unsigned): Likewise.
9905         (regcache_raw_write_signed): Likewise.
9906         (regcache_raw_write_unsigned): Likewise.
9907         (regcache_cooked_read): Likewise.
9908         (regcache_cooked_read_value): Likewise.
9909         (regcache_cooked_read_signed): Likewise.
9910         (regcache_cooked_read_unsigned): Likewise.
9911         (regcache_cooked_write_signed): Likewise.
9912         (regcache_cooked_write_unsigned): Likewise.
9913         (regcache_raw_set_cached_value): Likewise.
9914         (regcache_raw_write): Likewise.
9915         (regcache_cooked_write): Likewise.
9916         (regcache_xfer_part): Likewise.
9917         (regcache_raw_read_part): Likewise.
9918         (regcache_raw_write_part): Likewise.
9919         (regcache_cooked_read_part): Likewise.
9920         (regcache_cooked_write_part): Likewise.
9921         (regcache_raw_supply): Likewise.
9922         (regcache_raw_collect): Likewise.
9923         (regcache_transfer_regset): Likewise.
9924         (regcache_supply_regset): Likewise.
9925         (regcache_collect_regset): Likewise.
9926         (regcache_debug_print_register): Likewise.
9927         (enum regcache_dump_what): Move it to regcache.h.
9928         (regcache_dump): Change it to method dump.
9929         * regcache.h (enum regcache_dump_what): New.
9930         (class regcache): New.
9931         * target.c (target_fetch_registers): Call method
9932         debug_print_register.
9933         (target_store_registers): Likewise.
9934
9935 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9936
9937         * windows-nat.c (struct lm_info_windows): Initialize field.
9938         (windows_make_so): Allocate lm_info_windows with new.
9939         (windows_free_so): Free lm_info_windows with delete.
9940
9941 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9942
9943         * solib-darwin.c (struct lm_info_darwin): Initialize field.
9944         (darwin_current_sos): Allocate lm_info_darwin with new, remove
9945         cleanup.
9946         (darwin_free_so): Free lm_info_darwin with delete.
9947
9948 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9949
9950         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9951         <l_addr_p>: Change type to bool.
9952         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9953         (svr4_free_so): Free lm_info_svr4 with delete.
9954         (svr4_copy_library_list): Replace memcpy with call to copy
9955         constructor.
9956         (library_list_start_library, svr4_default_sos): Allocate
9957         lm_info_svr4 with new.
9958
9959 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9960
9961         * solib-target.c (struct lm_info_target): Add destructor,
9962         initialize fields.
9963         <name>: Change type to std::string.
9964         (library_list_start_library): Allocate lm_info_target with new.
9965         (solib_target_free_library_list): Free lm_info_target with
9966         delete.
9967         (solib_target_current_sos): Adapt to std::string.
9968         (solib_target_free_so): Free lm_info_target with delete.
9969
9970 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9971
9972         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9973         fields.
9974         (frv_current_sos): Allocate lm_info_frv with new.
9975         (frv_relocate_main_executable): Free lm_info_frv with delete,
9976         allocate with new.
9977         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9978
9979 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9980
9981         * solib-frv.c (struct lm_info_frv): Fix indentation.
9982
9983 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9984
9985         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9986         map field.
9987         (dsbt_current_sos): Allocate lm_info_dsbt with new.
9988         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9989         and allocate with new.
9990         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9991
9992 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9993
9994         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9995         <filename, member_name>: Change type to std::string.
9996         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9997         (library_list_start_library): Allocate lm_info_aix with new.
9998         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9999         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
10000         with copy constructor.
10001
10002 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10003
10004         * solist.h (struct lm_info): Remove.
10005         (struct lm_info_base): New class.
10006         (struct so_list) <lm_info>: Change type to lm_info_base *.
10007         * nto-tdep.c (struct lm_info): Remove.
10008         (lm_addr): Adjust.
10009         * solib-aix.c (struct lm_info): Rename to ...
10010         (struct lm_info_aix): ... this.  Extend lm_info_base.
10011         (lm_info_p): Rename to ...
10012         (lm_info_aix_p): ... this, and adjust.
10013         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
10014         solib_aix_parse_libraries, library_list_start_library,
10015         solib_aix_free_library_list, solib_aix_parse_libraries,
10016         solib_aix_get_library_list,
10017         solib_aix_relocate_section_addresses, solib_aix_free_so,
10018         solib_aix_get_section_offsets,
10019         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
10020         Adjust.
10021         (struct solib_aix_inferior_data) <library_list>: Adjust.
10022         * solib-darwin.c (struct lm_info): Rename to ...
10023         (struct lm_info_darwin): ... this.  Extend lm_info_base.
10024         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
10025         * solib-dsbt.c (struct lm_info): Rename to ...
10026         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
10027         (struct dsbt_info) <main_executable_lm_info): Adjust.
10028         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
10029         dsbt_relocate_section_addresses): Adjust.
10030         * solib-frv.c (struct lm_info): Rename to ...
10031         (struct lm_info_frv): ... this.  Extend lm_info_base.
10032         (main_executable_lm_info): Adjust.
10033         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
10034         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
10035         find_canonical_descriptor_in_load_object,
10036         frv_fdpic_find_canonical_descriptor): Adjust.
10037         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10038         to lm_info_svr4.
10039         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10040         svr4_clear_so, svr4_copy_library_list,
10041         library_list_start_library, svr4_default_sos, svr4_read_so_list,
10042         svr4_current_sos, svr4_fetch_objfile_link_map,
10043         solist_update_incremental): Adjust.
10044         * solib-svr4.h (struct lm_info_svr4): Move here from
10045         solib-svr4.c.
10046         * solib-target.c (struct lm_info): Rename to ...
10047         (struct lm_info_target): ... this.  Extend lm_info_base.
10048         (lm_info_p): Rename to ...
10049         (lm_info_target_p): ... this.
10050         (solib_target_parse_libraries, library_list_start_segment,
10051         library_list_start_section, library_list_start_library,
10052         library_list_end_library, solib_target_free_library_list,
10053         solib_target_current_sos, solib_target_free_so,
10054         solib_target_relocate_section_addresses): Adjust.
10055         * windows-nat.c (struct lm_info): Rename to ...
10056         (struct lm_info_windows): ... this.  Extend lm_info_base.
10057         (windows_make_so, handle_load_dll, handle_unload_dll,
10058         windows_xfer_shared_libraries): Adjust.
10059
10060 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10061
10062         * solib-darwin.c (struct darwin_so_list): Remove.
10063         (darwin_current_sos): Allocate an so_list object instead of a
10064         darwin_so_list, separately allocate an lm_info object.
10065         (darwin_free_so): Free lm_info.
10066
10067 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
10068
10069         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10070         with fprintf_filtered.
10071
10072 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10073
10074         * regcache.c (regcache::regcache): New function.
10075         (regcache::~regcache): New function.
10076         (regcache_xmalloc_1): Remove.
10077         (regcache_xmalloc): Call new regcache.
10078         (regcache_xfree): Call delete regcache.
10079         (get_thread_arch_aspace_regcache): Call new regcache.
10080
10081 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10082
10083         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10084         lwp instead of ptid_get_lwp.
10085
10086 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10087
10088         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10089         lwp_info instead of getting from inferior_ptid.
10090
10091 2017-04-27  Keith Seitz  <keiths@redhat.com>
10092
10093         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10094         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10095         (CV_CONVERSION_BADNESS): Define.
10096         (rank_one_type): Remove overly restrictive rvalue reference
10097         rank checks.
10098         Add cv-qualifier checks and subranks for type equality.
10099         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10100         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10101         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10102
10103 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
10104
10105         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10106         count when creating the object.
10107
10108 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
10109             Ulrich Weigand  <uweigand@de.ibm.com>
10110
10111         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10112         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10113         is used in AIX.
10114         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10115         (process_xcoff_symbol): Likewise.
10116         (scan_xcoff_symtab): Likewise.
10117
10118 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10119
10120         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10121         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10122         (ia64_access_reg): Use get_frame_register_unsigned.
10123         (ia64_access_rse_reg): Likewise.
10124         (ia64_libunwind_frame_prev_register): Likewise.
10125
10126 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
10127
10128         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10129         * gdbarch.c: Regenerated.
10130         * gdbarch.h: Regenerated.
10131         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10132         visibility external.
10133         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10134         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10135         (enum cfa_how_kind): Move to ...
10136         (struct dwarf2_frame_state_reg_info): Likewise.
10137         (struct dwarf2_frame_state): Likewise.
10138         * dwarf2-frame.h: ... here.
10139         (dwarf2_frame_state_alloc_regs): New declaration.
10140         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10141         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10142
10143 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10144
10145         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10146         regcache_raw_read_unsigned.
10147         (xtensa_pseudo_register_write): Likewise.
10148
10149 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10150
10151         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
10152         (nds32_pseudo_register_write): Likewise.
10153
10154 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10155
10156         * regcache.c (struct regcache) <readonly_p>: Change its type
10157         to bool.
10158         (regcache_xmalloc_1): Update parameter type and callers update.
10159
10160 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10161
10162         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
10163         set_gdbarch_wchar_bit.
10164         * arm-tdep.c (arm_gdbarch_init): Likewise.
10165
10166 2017-04-25  Pedro Alves  <palves@redhat.com>
10167
10168         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
10169         (BothAreRelocatable, memcopy, memmove): Don't define.
10170         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
10171         macros.
10172
10173 2017-04-25  Pedro Alves  <palves@redhat.com>
10174
10175         * common/common-defs.h: Include "common/poison.h".
10176         * common/function-view.h: (Not, Or, Requires): Move to traits.h
10177         and adjust.
10178         * common/poison.h: New file.
10179         * common/traits.h: Include <type_traits>.
10180         (Not, Or, Requires): New, moved from common/function-view.h.
10181
10182 2017-04-25  Pedro Alves  <palves@redhat.com>
10183
10184         * breakpoint.h (struct breakpoint): In-class initialize all
10185         fields.  Make boolean fields "bool".
10186         * breakpoint.c (init_raw_breakpoint_without_location): Remove
10187         memset call and initializations no longer necessary.
10188
10189 2017-04-25  Pedro Alves  <palves@redhat.com>
10190
10191         * btrace.c (pt_btrace_insn_flags): Change parameter type to
10192         reference.
10193         (pt_btrace_insn): New function.
10194         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
10195
10196 2017-04-25  Pedro Alves  <palves@redhat.com>
10197
10198         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
10199         "base" field and inherit from "bp_location" instead.  Add
10200         non-default ctor.
10201         (allocate_location_exception): Use new non-default ctor.
10202         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
10203         (init_bp_location): Convert to ...
10204         (bp_location::bp_location): ... this new ctor, and remove memset
10205         call.
10206         (base_breakpoint_allocate_location): Use the new non-default ctor.
10207         * breakpoint.h (bp_location): Now a class.  Declare default and
10208         non-default ctors.  In-class initialize all members.
10209         (init_bp_location): Remove declaration.
10210
10211 2017-04-25  Pedro Alves  <palves@redhat.com>
10212
10213         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
10214         assignment operator.
10215
10216 2017-04-24  Yao Qi  <yao.qi@linaro.org>
10217
10218         * doublest.c (convert_doublest_to_floatformat): Call
10219         floatformat_totalsize_bytes.
10220
10221 2017-04-22  Tom Tromey  <tom@tromey.com>
10222
10223         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
10224         ui_out_emit_list.
10225         * stack.c (print_frame): Use ui_out_emit_list.
10226         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10227         ui_out_emit_list.
10228         * mi/mi-main.c (print_one_inferior)
10229         (mi_cmd_data_list_register_names)
10230         (mi_cmd_data_list_register_values, mi_cmd_list_features)
10231         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
10232         ui_out_emit_list.
10233         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
10234         (mi_output_solib_attribs): Use ui_out_emit_list,
10235         ui_out_emit_tuple.
10236         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
10237         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
10238         (mi_cmd_stack_list_args, list_args_or_locals): Use
10239         ui_out_emit_list.
10240         * disasm.c (do_assembly_only): Use ui_out_emit_list.
10241         * breakpoint.c (print_solib_event, output_thread_groups): Use
10242         ui_out_emit_list.
10243
10244 2017-04-22  Tom Tromey  <tom@tromey.com>
10245
10246         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
10247         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
10248         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
10249
10250 2017-04-22  Tom Tromey  <tom@tromey.com>
10251
10252         * tracepoint.c (tvariables_info_1)
10253         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
10254
10255 2017-04-22  Tom Tromey  <tom@tromey.com>
10256
10257         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
10258         annotate_arg_emitter.
10259         * breakpoint.c (print_mention_watchpoint)
10260         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
10261         * annotate.h (struct annotate_arg_emitter): New.
10262
10263 2017-04-22  Tom Tromey  <tom@tromey.com>
10264
10265         * record-btrace.c (record_btrace_insn_history)
10266         (record_btrace_insn_history_range, record_btrace_call_history)
10267         (record_btrace_call_history_range): Use ui_out_emit_tuple.
10268         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
10269         ui_out_emit_tuple.
10270         * stack.c (print_frame_info): Use ui_out_emit_tuple.
10271         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
10272         * skip.c (skip_info): Use ui_out_emit_tuple.
10273         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
10274         * progspace.c (print_program_space): Use ui_out_emit_tuple.
10275         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
10276         * osdata.c (info_osdata): Use ui_out_emit_tuple.
10277         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10278         ui_out_emit_tuple.
10279         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
10280         (output_register, mi_cmd_data_read_memory)
10281         (mi_cmd_data_read_memory_bytes, mi_load_progress)
10282         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
10283         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
10284         Use ui_out_emit_tuple.
10285         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
10286         ui_out_emit_tuple.
10287         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10288         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
10289         * linux-thread-db.c (info_auto_load_libthread_db): Use
10290         ui_out_emit_tuple.
10291         * inferior.c (print_inferior): Use ui_out_emit_tuple.
10292         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
10293         * disasm.c (do_mixed_source_and_assembly_deprecated)
10294         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
10295         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
10296         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
10297         * breakpoint.c (print_one_breakpoint_location)
10298         (print_one_breakpoint): Use ui_out_emit_tuple.
10299         * auto-load.c (print_script, info_auto_load_cmd): Use
10300         ui_out_emit_tuple.
10301         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
10302
10303 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
10304
10305         * thread.c (print_thread_info_1): Remove dead code.
10306
10307 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10308
10309         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
10310         GDB_SELF_TEST.
10311         * arm-tdep.c (selftests::arm_record_test): Likewise.
10312
10313 2017-04-21  Yao Qi  <yao.qi@linaro.org>
10314
10315         * regcache.c (regcache_restore): Remove argument 2.  Replace
10316         argument 3 with regcache.  Get register status from
10317         src->register_status and get register contents from
10318         register_buffer (src, regnum).
10319         (regcache_cpy): Update.
10320
10321 2017-04-19  Pedro Alves  <palves@redhat.com>
10322
10323         * gdbthread.h (thread): Add missing closing parenthesis in
10324         comment.
10325
10326 2017-04-19  Pedro Alves  <palves@redhat.com>
10327
10328         * common/refcounted-object.h: New file.
10329         * gdbthread.h: Include "common/refcounted-object.h".
10330         (thread_info): Inherit from refcounted_object and add comments.
10331         (thread_info::incref, thread_info::decref)
10332         (thread_info::m_refcount): Delete.
10333         (thread_info::deletable): Use the refcounted_object::refcount()
10334         method.
10335         * inferior.c (current_inferior_): Add comment.
10336         (set_current_inferior): Increment/decrement refcounts.
10337         (prune_inferiors, remove_inferior_command): Skip inferiors marked
10338         not-deletable instead of comparing with the current inferior.
10339         (initialize_inferiors): Increment the initial inferior's refcount.
10340         * inferior.h (struct inferior): Forward declare.
10341         Include "common/refcounted-object.h".
10342         (current_inferior, set_current_inferior): Move declaration to
10343         before struct inferior's definition, and fix comment.
10344         (inferior): Inherit from refcounted_object.  Add comments.
10345         * thread.c (switch_to_thread_no_regs): Reference the thread's
10346         inferior pointer directly instead of doing a ptid lookup.
10347         (switch_to_no_thread): New function.
10348         (switch_to_thread(thread_info *)): New function, factored out
10349         from ...
10350         (switch_to_thread(ptid_t)): ... this.
10351         (restore_current_thread): Delete.
10352         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
10353         fields, and add 'inf' field.
10354         (do_restore_current_thread_cleanup): Check whether old->inf is
10355         alive instead of looking up an inferior by ptid.  Use
10356         switch_to_thread and switch_to_no_thread.
10357         (restore_current_thread_cleanup_dtor): Use old->inf directly
10358         instead of lookup up an inferior by id.  Decref the inferior.
10359         Don't restore 'removable'.
10360         (make_cleanup_restore_current_thread): Same the inferior pointer
10361         in old, instead of the inferior number.  Incref the inferior.
10362         Don't save/clear 'removable'.
10363
10364 2017-04-19  Pedro Alves  <palves@redhat.com>
10365
10366         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10367         unittests/scoped_restore-selftests.c.
10368         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
10369         * common/scoped_restore.h (scoped_restore_base): Make "class".
10370         (scoped_restore_base::release): New public method.
10371         (scoped_restore_base::scoped_restore_base): New protected ctor.
10372         (scoped_restore_base::m_saved_var): New protected field.
10373         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
10374         scoped_restore_base base class instead of m_saved_var directly.
10375         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
10376         (scoped_restore_tmpl::scoped_restore_tmpl(const
10377         scoped_restore_tmpl<T>&)): Likewise.
10378         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
10379         method.
10380         (scoped_restore_tmpl::saved_var): New method.
10381         (scoped_restore_tmpl::m_saved_var): Delete.
10382         * inferior.h (inferior::detaching): Now a bool.
10383         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
10384         cleanup.
10385         * unittests/scoped_restore-selftests.c: New file.
10386
10387 2017-04-19  Pedro Alves  <palves@redhat.com>
10388
10389         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
10390         Re-sort in alphabetic order.
10391
10392 2017-04-18  Pedro Alves  <palves@redhat.com>
10393
10394         * xml-support.c (obstack_xml_printf): Delete.
10395         * xml-support.h (obstack_xml_printf): Delete.
10396
10397 2017-04-18  Pedro Alves  <palves@redhat.com>
10398
10399         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
10400         vdebug, verror, body_text, start_element, end_element, name,
10401         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
10402         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
10403         is_xinclude>: Make private and add m_ prefix.
10404         (gdb_xml_parser::body_text): New method, based on ...
10405         (gdb_xml_body_text): ... this.  Adjust.
10406         (gdb_xml_parser::vdebug): New method, based on ...
10407         (gdb_xml_debug): ... this.  Adjust.
10408         (gdb_xml_parser::verror): New method, based on ...
10409         (gdb_xml_error): ... this.  Adjust.
10410         (gdb_xml_parser::start_element): New method, based on ...
10411         (gdb_xml_start_element): ... this.  Adjust.
10412         (gdb_xml_start_element_wrapper): Defer to
10413         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
10414         (gdb_xml_parser::end_element): New method, based on ...
10415         (gdb_xml_end_element_wrapper): ... this.  Adjust.
10416         (gdb_xml_parser::~gdb_xml_parser): Adjust.
10417         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
10418         (gdb_xml_parser::use_dtd): New method, based on ...
10419         (gdb_xml_use_dtd): ... this.  Adjust.
10420         (gdb_xml_parser::parse): New method, based on ...
10421         (gdb_xml_parse): ... this.  Adjust.
10422         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
10423         (xinclude_start_include): Adjust to call the parser's name method.
10424         (xml_xinclude_default, xml_xinclude_start_doctype)
10425         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
10426         method.
10427         (xml_process_xincludes): Adjust to call parser methods.
10428         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
10429         declarations.
10430
10431 2017-04-18  Pedro Alves  <palves@redhat.com>
10432
10433         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
10434         gdb::optional<std::string>.
10435         * xml-support.c: Include <string>.
10436         (scope_level::scope_level(scope_level &&))
10437         (scope_level::~scope_level): Delete.
10438         (scope_level::body): Now a std::string.
10439         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
10440         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
10441         parameter.
10442         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
10443         (xinclude_parsing_data::output): Now a std::string reference.
10444         (xinclude_start_include): Adjust.
10445         (xml_xinclude_default): Adjust.
10446         (xml_process_xincludes): Add 'output' parameter, and return bool.
10447         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
10448         and return bool.
10449         * xml-tdesc.c: Include <unordered_map> and <string>.
10450         (tdesc_xml_cache): Delete.
10451         (tdesc_xml_cache_s): Delete.
10452         (xml_cache): Now an std::unordered_map.
10453         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
10454         (target_fetch_description_xml): Change return type to
10455         gdb::optional<std::string>, and adjust.
10456         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
10457         (target_fetch_description_xml): Change return type to
10458         gdb::optional<std::string>.
10459
10460 2017-04-18  Pedro Alves  <palves@redhat.com>
10461
10462         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10463         unittests/optional-selftests.c.
10464         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
10465         * unittests/optional-selftests.c: New file.
10466         * unittests/optional/assignment/1.cc: New file.
10467         * unittests/optional/assignment/2.cc: New file.
10468         * unittests/optional/assignment/3.cc: New file.
10469         * unittests/optional/assignment/4.cc: New file.
10470         * unittests/optional/assignment/5.cc: New file.
10471         * unittests/optional/assignment/6.cc: New file.
10472         * unittests/optional/assignment/7.cc: New file.
10473         * unittests/optional/cons/copy.cc: New file.
10474         * unittests/optional/cons/default.cc: New file.
10475         * unittests/optional/cons/move.cc: New file.
10476         * unittests/optional/cons/value.cc: New file.
10477         * unittests/optional/in_place.cc: New file.
10478         * unittests/optional/observers/1.cc: New file.
10479         * unittests/optional/observers/2.cc: New file.
10480
10481 2017-04-18  Pedro Alves  <palves@redhat.com>
10482
10483         * common/gdb_optional.h: Include common/traits.h.
10484         (in_place_t): New type.
10485         (in_place): New constexpr variable.
10486         (optional::optional): Remove member initialization of
10487         m_instantiated.
10488         (optional::optional(in_place_t...)): New constructor.
10489         (optional::~optional): Use reset.
10490         (optional::optional(const optional&)): New.
10491         (optional::optional(const optional&&)): New.
10492         (optional::optional(T &)): New.
10493         (optional::optional(T &&)): New.
10494         (operator::operator=(const optional &)): New.
10495         (operator::operator=(optional &&)): New.
10496         (operator::operator= (const T &))
10497         (operator::operator= (T &&))
10498         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
10499         (operator::reset): New.
10500         (operator::m_instantiated):: Add in-class initializer.
10501         * common/traits.h: Include <type_traits>.
10502         (struct And): New types.
10503
10504 2017-04-18  Pedro Alves  <palves@redhat.com>
10505
10506         * xml-support.c: Include <vector>.
10507         (scope_level::scope_level(const gdb_xml_element *))
10508         (scope_level::scope_level(scope_level&&)): New.
10509         (scope_level::~scope_level): New.
10510         (scope_level_s): Delete.
10511         (gdb_xml_parser::scopes): Now a std::vector.
10512         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
10513         Use std::vector.
10514         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
10515         scope cleanup code.
10516         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
10517         of the scopes member.  Use std::vector::emplace_back.
10518
10519 2017-04-18  Pedro Alves  <palves@redhat.com>
10520
10521         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
10522         a bool.
10523         (gdb_xml_end_element): Change type of first parameter.
10524         (gdb_xml_cleanup): Rename to ...
10525         (gdb_xml_parser::~gdb_xml_parser): ... this.
10526         (gdb_xml_create_parser_and_cleanup): Delete with ...
10527         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
10528         to this new ctor.
10529         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
10530         using gdb_xml_create_parser_and_cleanup.
10531         (xinclude_parsing_data): Add ctor/dtor.
10532         (xml_xinclude_cleanup): Delete.
10533         (xml_process_xincludes): Create a local xinclude_parsing_data
10534         instead of heap-allocating one.  Create a local gdb_xml_parser
10535         instead of heap-allocating one with
10536         gdb_xml_create_parser_and_cleanup.
10537
10538 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
10539
10540         PR threads/20743
10541         * fbsd-nat.c (resume_one_thread_cb): Remove.
10542         (resume_all_threads_cb): Remove.
10543         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
10544         iterate_over_threads.
10545
10546 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10547
10548         * NEWS: Create a new section for the next release branch.
10549         Rename the section of the current branch, now that it has
10550         been cut.
10551
10552 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10553
10554         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
10555         * version.in: Bump version to 8.0.50.DATE-git.
10556
10557 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
10558
10559         PR gdb/21385
10560         * windows-nat.c (windows_create_inferior): Declare 'allargs'
10561         independently of the host, and fix build breakage on Cygwin.
10562
10563 2017-04-13  Pedro Alves  <palves@redhat.com>
10564
10565         * inferior.c (free_inferior): Convert to ...
10566         (inferior::~inferior): ... this dtor.
10567         (inferior::inferior): New ctor, factored out from ...
10568         (add_inferior_silent): ... here.  Allocate the inferior with a new
10569         expression.
10570         (delete_inferior): Call delete instead of free_inferior.
10571         * inferior.h (gdb_environ, continuation): Forward declare.
10572         (inferior): Now a class.  Add in-class initialization to all
10573         members.  Make boolean fields bool, except 'detaching'.
10574         (inferior::inferior): New explicit ctor.
10575         (inferior::~inferior): New.
10576
10577 2017-04-13  Pedro Alves  <palves@redhat.com>
10578
10579         * inferior.c (init_inferior_list): Delete.
10580         * inferior.h (init_inferior_list): Delete.
10581
10582 2017-04-13  Pedro Alves  <palves@redhat.com>
10583
10584         PR threads/13217
10585         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
10586         (top level): Call it twice, with different thread sets.
10587
10588 2017-04-13  Pedro Alves  <palves@redhat.com>
10589
10590         * thread.c: Include <algorithm>.
10591         (thread_array_cleanup): Delete.
10592         (scoped_inc_dec_ref): New class.
10593         (live_threads_count): New function.
10594         (set_thread_refcount): Delete.
10595         (tp_array_compar_ascending): Now a bool.
10596         (tp_array_compar): Convert to a std::sort comparison function.
10597         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
10598         and live_threads_count.
10599
10600 2017-04-13  Pedro Alves  <palves@redhat.com>
10601
10602         * infrun.c (follow_fork_inferior): Also switch the current
10603         inferior.
10604
10605 2017-04-13  Pedro Alves  <palves@redhat.com>
10606
10607         * breakpoint.c (watch_command_1): Save watchpoint-frame info
10608         before calling create_internal_breakpoint.
10609
10610 2017-04-13  Pedro Alves  <palves@redhat.com>
10611
10612         * fork-child.c (execv_argv): New class.
10613         (breakup_args): Refactored as ...
10614         (execv_argv::init_for_no_shell): .. this method of execv_argv.
10615         Copy arguments to storage and replace separators with NULL
10616         terminators in place.
10617         (escape_bang_in_quoted_argument): Adjust to return bool.
10618         (execv_argv::execv_argv): New ctor.
10619         (execv_argv::init_for_shell): New method, factored out from
10620         fork_inferior.  Don't strdup strings into the vector.
10621         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
10622         Remove free_vector_argv call.
10623
10624 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10625
10626         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10627         tdep->rx_psw_type.
10628
10629 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10630
10631         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10632         * rx-tdep.c (rx_gdbarch_init): Likewise.
10633
10634 2017-04-13  Pedro Alves  <palves@redhat.com>
10635
10636         * breakpoint.h (struct breakpoint): Reindent.
10637
10638 2017-04-13  Pedro Alves  <palves@redhat.com>
10639
10640         * breakpoint.c (bp_location): Rename to ...
10641         (bp_locations): ... this.  All references updated.
10642         (bp_location_count): Rename to ...
10643         (bp_locations_count): ... this.  All references updated.
10644         (bp_location_placed_address_before_address_max): Rename to ...
10645         (bp_locations_placed_address_before_address_max): ... this.  All
10646         references updated.
10647         (bp_location_shadow_len_after_address_max): Rename to ...
10648         (bp_locations_shadow_len_after_address_max): ... this.  All
10649         references updated.
10650         (bp_location_compare_addrs): Rename to ...
10651         (bp_locations_compare_addrs): ... this.  All references updated.
10652         (bp_location_compare):Rename to ...
10653         (bp_locations_compare): ... this.  All references updated.
10654         (bp_location_target_extensions_update): Rename to ...
10655         (bp_locations_target_extensions_update): ... this.  All references
10656         updated.
10657
10658 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10659
10660         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10661         * common/common.m4: Check headers 'termios.h', 'termio.h' and
10662         'sgtty.h'.
10663         * common/gdb_termios.h: New file, with parts of "terminal.h".
10664         * inflow.c: Include "gdb_termios.h".
10665         * ser-unix.c: Include "gdb_termios.h".
10666         * terminal.h: Move terminal-related defines to
10667         "common/gdb_termios.h".
10668
10669 2017-04-12  Tom Tromey  <tom@tromey.com>
10670
10671         * probe.c (parse_probes): Update.
10672         * location.h (delete_event_location): Don't declare.
10673         (event_location_deleter::operator()): Update.
10674         * location.c (event_location_deleter::operator()): Rename from
10675         delete_event_location.
10676         * linespec.h (linespec_result) <location>: Change type to
10677         event_location_up.
10678         * linespec.c (canonicalize_linespec, event_location_to_sals)
10679         (decode_objc): Update.
10680         (linespec_result): Don't call delete_event_location.
10681         * breakpoint.c (create_breakpoints_sal)
10682         (bkpt_probe_create_sals_from_location)
10683         (strace_marker_create_sals_from_location): Update.
10684
10685 2017-04-12  Tom Tromey  <tom@tromey.com>
10686
10687         * linespec.h (struct linespec_result): Add constructor and
10688         destructor.
10689         (init_linespec_result, destroy_linespec_result)
10690         (make_cleanup_destroy_linespec_result): Don't declare.
10691         * linespec.c (init_linespec_result): Remove.
10692         (linespec_result::~linespec_result): Rename from
10693         destroy_linespec_result.  Update.
10694         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10695         Remove.
10696         * breakpoint.c (create_breakpoint, break_range_command)
10697         (decode_location_default): Update.
10698         * ax-gdb.c (agent_command_1): Update.
10699
10700 2017-04-12  Tom Tromey  <tom@tromey.com>
10701
10702         * remote.c (remote_download_tracepoint): Update.
10703         * python/py-breakpoint.c (bppy_get_location): Update.
10704         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10705         (gdbscm_breakpoint_location): Update.
10706         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10707         * breakpoint.h (struct breakpoint) <location, location_range_end>:
10708         Change type to event_location_up.
10709         * breakpoint.c (create_overlay_event_breakpoint)
10710         (create_longjmp_master_breakpoint)
10711         (create_std_terminate_master_breakpoint)
10712         (create_exception_master_breakpoint)
10713         (breakpoint_event_location_empty_p, print_breakpoint_location)
10714         (print_one_breakpoint_location, create_thread_event_breakpoint)
10715         (init_breakpoint_sal, create_breakpoint)
10716         (print_recreate_ranged_breakpoint, break_range_command)
10717         (init_ada_exception_breakpoint, say_where): Update.
10718         (base_breakpoint_dtor): Don't call delete_event_location.
10719         (bkpt_print_recreate, tracepoint_print_recreate)
10720         (dprintf_print_recreate, update_static_tracepoint)
10721         (breakpoint_re_set_default): Update.
10722
10723 2017-04-12  Tom Tromey  <tom@tromey.com>
10724
10725         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10726         type of "to_do".  Update.
10727         (compute_stack_depth): Use std::vector.
10728
10729 2017-04-12  Tom Tromey  <tom@tromey.com>
10730
10731         * printcmd.c (find_instruction_backward): Use std::vector.
10732
10733 2017-04-12  Tom Tromey  <tom@tromey.com>
10734
10735         * symfile.c (objfilep): Remove typedef.
10736         (reread_symbols): Use a std::vector.
10737
10738 2017-04-12  Tom Tromey  <tom@tromey.com>
10739
10740         * mi/mi-main.c (exec_direction_forward): Remove.
10741         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10742         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10743         scoped_restore.
10744         * guile/guile.c (guile_repl_command, guile_command)
10745         (gdbscm_execute_gdb_command): Use scoped_restore.
10746         * go-exp.y (go_parse): Use scoped_restore.
10747         * d-exp.y (d_parse): Use scoped_restore.
10748         * cli/cli-decode.c (cmd_func): Use scoped_restore.
10749         * c-exp.y (c_parse): Use scoped_restore.
10750
10751 2017-04-12  Tom Tromey  <tom@tromey.com>
10752
10753         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10754         (mi_parse): Update return type.
10755         (mi_parse_free): Remove.
10756         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10757         (mi_parse::~mi_parse): Rename from mi_parse_free.
10758         (mi_parse_cleanup): Remove.
10759         (mi_parse): Return a unique_ptr.  Use new.
10760         * mi/mi-main.c (mi_execute_command): Update.
10761
10762 2017-04-12  Tom Tromey  <tom@tromey.com>
10763
10764         * location.c (explicit_location_lex_one): Return a
10765         unique_xmalloc_ptr.
10766         (string_to_explicit_location): Update.  Remove cleanups.
10767
10768 2017-04-12  Tom Tromey  <tom@tromey.com>
10769
10770         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10771         (compare_value_and_voffset): Change type.  Update.
10772         (compute_vtable_size): Change type of "offset_vec".
10773         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
10774         (gnuv3_get_typeid): Remove extraneous declaration.
10775
10776 2017-04-12  Tom Tromey  <tom@tromey.com>
10777
10778         * charset.h (wchar_iterator): Fix comment.
10779
10780 2017-04-12  Tom Tromey  <tom@tromey.com>
10781
10782         * charset.c (iconv_wrapper): New class.
10783         (cleanup_iconv): Remove.
10784         (convert_between_encodings): Use it.
10785
10786 2017-04-12  Tom Tromey  <tom@tromey.com>
10787
10788         * symfile.h (increment_reading_symtab): Update type.
10789         * symfile.c (decrement_reading_symtab): Remove.
10790         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10791         * psymtab.c (psymtab_to_symtab): Update.
10792         * dwarf2read.c (dw2_instantiate_symtab): Update.
10793
10794 2017-04-12  Tom Tromey  <tom@tromey.com>
10795
10796         * jit.c (struct jit_reader): Declare separately.  Add constructor
10797         and destructor.  Change type of "handle".
10798         (loaded_jit_reader): Define separately.
10799         (jit_reader_load): Update.  New "new".
10800         (jit_reader_unload_command): Use "delete".
10801         * gdb-dlfcn.h (struct dlclose_deleter): New.
10802         (gdb_dlhandle_up): New typedef.
10803         (gdb_dlopen, gdb_dlsym): Update types.
10804         (gdb_dlclose): Remove.
10805         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10806         (gdb_dlsym): Change type of "handle".
10807         (make_cleanup_dlclose): Remove.
10808         (dlclose_deleter::operator()): Rename from gdb_dlclose.
10809         * compile/compile-c-support.c (load_libcc): Update.
10810
10811 2017-04-12  Tom Tromey  <tom@tromey.com>
10812
10813         * symtab.h (find_pcs_for_symtab_line): Change return type.
10814         * symtab.c (find_pcs_for_symtab_line): Change return type.
10815         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10816         type of "vec".  Update.
10817         (ltpy_get_pcs_for_line): Update.
10818         * linespec.c (decode_digits_ordinary): Update.
10819
10820 2017-04-12  Tom Tromey  <tom@tromey.com>
10821
10822         * tracepoint.c (actions_command): Update.
10823         * python/python.c (python_command, python_interactive_command):
10824         Update.
10825         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10826         * guile/guile.c (guile_command): Update.
10827         * defs.h (read_command_lines, read_command_lines_1): Return
10828         command_line_up.
10829         (command_lines_deleter): New struct.
10830         (command_line_up): New typedef.
10831         * compile/compile.c (compile_code_command)
10832         (compile_print_command): Update.
10833         * cli/cli-script.h (get_command_line, copy_command_lines): Return
10834         command_line_up.
10835         (make_cleanup_free_command_lines): Remove.
10836         * cli/cli-script.c (get_command_line, read_command_lines_1)
10837         (copy_command_lines): Return command_line_up.
10838         (while_command, if_command, read_command_lines, define_command)
10839         (document_command): Update.
10840         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10841         Remove.
10842         * breakpoint.h (breakpoint_set_commands): Change type of
10843         "commands".
10844         * breakpoint.c (breakpoint_set_commands): Change type of
10845         "commands".  Update.
10846         (do_map_commands_command, update_dprintf_command_list)
10847         (create_tracepoint_from_upload): Update.
10848
10849 2017-04-12  Tom Tromey  <tom@tromey.com>
10850
10851         * tracepoint.c (scope_info): Update.
10852         * spu-tdep.c (spu_catch_start): Update.
10853         * python/python.c (gdbpy_decode_line): Update.
10854         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10855         * python/py-breakpoint.c (bppy_init): Update.
10856         * probe.c (parse_probes): Update.
10857         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10858         * location.h (event_location_deleter): New struct.
10859         (event_location_up): New typedef.
10860         (new_linespec_location, new_address_location, new_probe_location)
10861         (new_explicit_location, copy_event_location)
10862         (string_to_event_location, string_to_event_location_basic)
10863         (string_to_explicit_location): Update return type.
10864         (make_cleanup_delete_event_location): Remove.
10865         * location.c (new_linespec_location, new_address_location)
10866         (new_probe_location, new_explicit_location, copy_event_location):
10867         Return event_location_up.
10868         (delete_event_location_cleanup)
10869         (make_cleanup_delete_event_location): Remove.
10870         (string_to_explicit_location, string_to_event_location_basic)
10871         (string_to_event_location): Return event_location_up.
10872         * linespec.c (canonicalize_linespec, event_location_to_sals)
10873         (decode_line_with_current_source)
10874         (decode_line_with_last_displayed, decode_objc): Update.
10875         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10876         * completer.c (location_completer): Update.
10877         * cli/cli-cmds.c (edit_command, list_command): Update.
10878         * breakpoint.c (create_overlay_event_breakpoint)
10879         (create_longjmp_master_breakpoint)
10880         (create_std_terminate_master_breakpoint)
10881         (create_exception_master_breakpoint)
10882         (create_thread_event_breakpoint): Update.
10883         (init_breakpoint_sal): Update.  Remove some dead code.
10884         (create_breakpoint_sal): Change type of "location".  Update.
10885         (create_breakpoints_sal, create_breakpoint, break_command_1)
10886         (dprintf_command, break_range_command, until_break_command)
10887         (init_ada_exception_breakpoint)
10888         (strace_marker_create_sals_from_location)
10889         (update_static_tracepoint, trace_command, ftrace_command)
10890         (strace_command, create_tracepoint_from_upload): Update.
10891         * break-catch-throw.c (re_set_exception_catchpoint): Update.
10892         * ax-gdb.c (agent_command_1): Update.
10893
10894 2017-04-12  Pedro Alves  <palves@redhat.com>
10895
10896         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10897         * configure.tgt: Handle i[34567]86-*-go32* and
10898         i[34567]86-*-msdosdjgpp*.
10899         * i386-tdep.c (i386_svr4_reg_to_regnum):
10900         Make extern.
10901         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10902         i386-go32-tdep.c.
10903         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10904         * i386-go32-tdep.c: New file.
10905         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10906         declarations.
10907
10908 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
10909
10910         * aix-thread.c (pd_status2str): Change return type to const char *.
10911
10912 2017-04-12  Pedro Alves  <palves@redhat.com>
10913
10914         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10915         calls to set_gdbarch_gnu_triplet_regexp.
10916
10917 2017-04-12  Pedro Alves  <palves@redhat.com>
10918
10919         PR gdb/21323
10920         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10921         New enum value.
10922         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10923         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10924         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10925         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10926         * gdbarch.h, gdbarch.c: Regenerate.
10927         * aarch64-tdep.c (aarch64_gdbarch_init): Override
10928         gdbarch_wchar_bit and gdbarch_wchar_signed.
10929         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10930         * arm-tdep.c (arm_gdbarch_init): Likewise.
10931         * avr-tdep.c (avr_gdbarch_init): Likewise.
10932         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10933         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10934         * i386-tdep.c (i386_go32_init_abi): Likewise.
10935         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10936         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10937         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10938         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10939         * sh-tdep.c (sh_gdbarch_init): Likewise.
10940         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10941         * sparc64-tdep.c (sparc64_init_abi): Likewise.
10942         * windows-tdep.c (windows_init_abi): Likewise.
10943         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10944
10945 2017-04-12  Pedro Alves  <palves@redhat.com>
10946
10947         PR c++/21323
10948         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10949         cplus_primitive_type_char32_t>: New enum values.
10950         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10951         and cplus_primitive_type_char32_t.
10952         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10953         32, use the archtecture's built-in type for char16_t and char32_t,
10954         respectively.  Otherwise, fallback to init_integer_type as before,
10955         but make the type unsigned, and issue a complaint.
10956         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10957
10958 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
10959
10960         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10961         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10962
10963 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10964
10965         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10966         'const char *'.
10967
10968 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10969
10970         * common/common-utils.c (free_vector_argv): New function.
10971         * common/common-utils.h: Include <vector>.
10972         (free_vector_argv): New prototype.
10973         * darwin-nat.c (darwin_create_inferior): Rewrite function
10974         prototype in order to constify "exec_file" and accept a
10975         "std::string" for "allargs".
10976         * fork-child.c: Include <vector>.
10977         (breakup_args): Rewrite function, using C++.
10978         (fork_inferior): Rewrite function header, constify "exec_file_arg"
10979         and accept "std::string" for "allargs".  Update the code to
10980         calculate "argv" based on "allargs".  Update calls to "exec_fun"
10981         and "execvp".
10982         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10983         order to constify "exec_file" and accept a "std::string" for
10984         "allargs".
10985         * go32-nat.c (go32_create_inferior): Likewise.
10986         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10987         * infcmd.c (run_command_1): Constify "exec_file".  Use
10988         "std::string" for inferior arguments.
10989         * inferior.h (fork_inferior): Update prototype.
10990         * linux-nat.c (linux_nat_create_inferior): Rewrite function
10991         prototype in order to constify "exec_file" and accept a
10992         "std::string" for "allargs".
10993         * nto-procfs.c (procfs_create_inferior): Likewise.
10994         * procfs.c (procfs_create_inferior): Likewise.
10995         * remote-sim.c (gdbsim_create_inferior): Likewise.
10996         * remote.c (extended_remote_run): Update code to accept
10997         "std::string" as argument.
10998         (extended_remote_create_inferior): Rewrite function prototype in
10999         order to constify "exec_file" and accept a "std::string" for
11000         "allargs".
11001         * rs6000-nat.c (super_create_inferior): Likewise.
11002         (rs6000_create_inferior): Likewise.
11003         * target.h (struct target_ops) <to_create_inferior>: Likewise.
11004         * windows-nat.c (windows_create_inferior): Likewise.
11005
11006 2017-04-11  Pedro Alves  <palves@redhat.com>
11007
11008         * thread.c: Fix whitespace throughout.
11009
11010 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11011
11012         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
11013
11014 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
11015
11016         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
11017
11018 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
11019
11020         PR gdb/21364
11021         * osdata.c (info_osdata): Check if 'type' is an empty string
11022         instead of NULL.
11023
11024 2017-04-10  Pedro Alves  <palves@redhat.com>
11025
11026         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
11027         (ptid_to_global_thread_id, in_thread_list)
11028         (do_captured_list_thread_ids, set_resumed, set_running)
11029         (set_executing, set_stop_requested, finish_thread_state)
11030         (validate_registers_access, can_access_registers_ptid)
11031         (print_thread_info_1, switch_to_thread)
11032         (do_restore_current_thread_cleanup)
11033         (make_cleanup_restore_current_thread, thread_command)
11034         (thread_name_command): Use operator== instead of ptid_equal.
11035
11036 2017-04-10  Pedro Alves  <palves@redhat.com>
11037
11038         * thread.c (struct current_thread_cleanup) <next>: Delete field.
11039         (current_thread_cleanup_chain): Delete.
11040         (restore_current_thread_cleanup_dtor)
11041         (make_cleanup_restore_current_thread): Remove references to
11042         current_thread_cleanup_chain.
11043
11044 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
11045
11046         * msp430-tdep.c (msp430_pseudo_register_read): Never return
11047         REG_UNKNOWN.
11048
11049 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11050
11051         PR gdb/19942
11052         * gdbthread.h (thread_info::deletable): New method.
11053         (thread_info::incref): New method.
11054         (thread_info::decref): New method.
11055         (thread_info::refcount): Move it to private.
11056         * infrun.c (save_stop_context): Call inc_refcount.
11057         (release_stop_context_cleanup): Likewise.
11058         * thread.c (set_thread_exited): New function.
11059         (init_thread_list): Delete "tp" only it is deletable, otherwise
11060         call set_thread_exited.
11061         (delete_thread_1): Call set_thread_exited.
11062         (current_thread_cleanup) <inferior_pid>: Remove.
11063         <thread>: New field.
11064         (restore_current_thread_ptid_changed): Removed.
11065         (do_restore_current_thread_cleanup): Adjust.
11066         (restore_current_thread_cleanup_dtor): Don't call
11067         find_thread_ptid.
11068         (set_thread_refcount): Use dec_refcount.
11069         (make_cleanup_restore_current_thread): Adjust.
11070         (thread_apply_all_command): Call inc_refcount.
11071         (_initialize_thread): Don't call
11072         observer_attach_thread_ptid_changed.
11073
11074 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11075
11076         * thread.c (delete_thread_1): Hoist code on marking thread as
11077         exited.
11078
11079 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11080
11081         * windows-nat.c (windows_detach): Initialize ptid with
11082         minus_one_ptid.
11083
11084 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11085
11086         * unittests/ptid-selftests.c: Fix erroneous assert messages.
11087
11088 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
11089
11090         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11091         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11092         (bfin_pseudo_register_write): Likewise
11093
11094 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
11095
11096         * common/ptid.h (struct ptid): Change to...
11097         (class ptid_t): ... this.
11098         <ptid_t>: New constructors.
11099         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11100         matches>: New methods.
11101         <make_null, make_minus_one>: New static methods.
11102         <pid>: Rename to...
11103         <m_pid>: ...this.
11104         <lwp>: Rename to...
11105         <m_lwp>: ...this.
11106         <tid>: Rename to...
11107         <m_tid>: ...this.
11108         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11109         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11110         as references, move comment to class ptid_t.
11111         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11112         ptid_t static methods.
11113         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11114         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11115         Take ptid arguments as references, implement using ptid_t methods.
11116         * unittests/ptid-selftests.c: New file.
11117         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11118         unittests/ptid-selftests.c.
11119         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11120
11121 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11122
11123         * python/python.c (python_run_simple_file): Cast mode literal to
11124         non-const char pointer as expected by PyFile_FromString.
11125
11126 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
11127
11128         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11129         minus_one_ptid and null_ptid.
11130
11131 2017-04-05  Pedro Alves  <palves@redhat.com>
11132
11133         * warning.m4 (build_warnings): Remove -Wno-write-strings.
11134         * configure: Regenerate.
11135
11136 2017-04-05  Pedro Alves  <palves@redhat.com>
11137
11138         * ada-exp.y (yyerror): Constify.
11139         * ada-lang.c (bound_name, get_selections)
11140         (ada_variant_discrim_type)
11141         (ada_variant_discrim_name, ada_value_struct_elt)
11142         (ada_lookup_struct_elt_type, is_unchecked_variant)
11143         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11144         (catch_ada_exception_command_split)
11145         (catch_ada_assert_command_split, catch_assert_command)
11146         (ada_op_name): Constify.
11147         * ada-lang.h (ada_yyerror, get_selections)
11148         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
11149         * arc-tdep.c (arc_print_frame_cache): Constify.
11150         * arm-tdep.c (arm_skip_stub): Constify.
11151         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
11152         (gen_aggregate_elt_ref): Constify.
11153         * bcache.c (print_bcache_statistics): Constify.
11154         * bcache.h (print_bcache_statistics): Constify.
11155         * break-catch-throw.c (catch_exception_command_1):
11156         * breakpoint.c (struct ep_type_description::description):
11157         Constify.
11158         (add_solib_catchpoint): Constify.
11159         (catch_fork_command_1): Add cast.
11160         (add_catch_command): Constify.
11161         * breakpoint.h (add_catch_command, add_solib_catchpoint):
11162         Constify.
11163         * bsd-uthread.c (bsd_uthread_state): Constify.
11164         * buildsym.c (patch_subfile_names): Constify.
11165         * buildsym.h (next_symbol_text_func, patch_subfile_names):
11166         Constify.
11167         * c-exp.y (yyerror): Constify.
11168         (token::oper): Constify.
11169         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
11170         * c-varobj.c (cplus_describe_child): Constify.
11171         * charset.c (find_charset_names): Add cast.
11172         (find_charset_names): Constify array and add const_cast.
11173         * cli/cli-cmds.c (complete_command, cd_command): Constify.
11174         (edit_command): Constify.
11175         * cli/cli-decode.c (lookup_cmd): Constify.
11176         * cli/cli-dump.c (dump_memory_command, dump_value_command):
11177         Constify.
11178         (struct dump_context): Constify.
11179         (add_dump_command, restore_command): Constify.
11180         * cli/cli-script.c (get_command_line): Constify.
11181         * cli/cli-script.h (get_command_line): Constify.
11182         * cli/cli-utils.c (check_for_argument): Constify.
11183         * cli/cli-utils.h (check_for_argument): Constify.
11184         * coff-pe-read.c (struct read_pe_section_data): Constify.
11185         * command.h (lookup_cmd): Constify.
11186         * common/print-utils.c (decimal2str): Constify.
11187         * completer.c (gdb_print_filename): Constify.
11188         * corefile.c (set_gnutarget): Constify.
11189         * cp-name-parser.y (yyerror): Constify.
11190         * cp-valprint.c (cp_print_class_member): Constify.
11191         * cris-tdep.c (cris_register_name, crisv32_register_name):
11192         Constify.
11193         * d-exp.y (yyerror): Constify.
11194         (struct token::oper): Constify.
11195         * d-lang.h (d_yyerror): Constify.
11196         * dbxread.c (struct header_file_location::name): Constify.
11197         (add_old_header_file, add_new_header_file, last_function_name)
11198         (dbx_next_symbol_text, add_bincl_to_list)
11199         (find_corresponding_bincl_psymtab, set_namestring)
11200         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
11201         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
11202         * defs.h (command_line_input, print_address_symbolic)
11203         (deprecated_readline_begin_hook): Constify.
11204         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
11205         Constify.
11206         * event-top.c (handle_line_of_input): Constify and add cast.
11207         * exceptions.c (catch_errors): Constify.
11208         * exceptions.h (catch_errors): Constify.
11209         * expprint.c (print_subexp_standard, op_string, op_name)
11210         (op_name_standard, dump_raw_expression, dump_raw_expression):
11211         * expression.h (op_name, op_string, dump_raw_expression):
11212         Constify.
11213         * f-exp.y (yyerror): Constify.
11214         (struct token::oper): Constify.
11215         (struct f77_boolean_val::name): Constify.
11216         * f-lang.c (f_word_break_characters): Constify.
11217         * f-lang.h (f_yyerror): Constify.
11218         * fork-child.c (fork_inferior): Add cast.
11219         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
11220         (new_variant): Constify.
11221         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
11222         * gdbarch.c: Regenerate.
11223         * gdbcore.h (set_gnutarget): Constify.
11224         * go-exp.y (yyerror): Constify.
11225         (token::oper): Constify.
11226         * go-lang.h (go_yyerror): Constify.
11227         * go32-nat.c (go32_sysinfo): Constify.
11228         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
11229         * guile/scm-cmd.c (cmdscm_function): Constify.
11230         * guile/scm-param.c (pascm_param_value): Constify.
11231         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
11232         (h8300sx_register_name): Constify.
11233         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
11234         Constify.
11235         * ia64-tdep.c (ia64_register_names): Constify.
11236         * infcmd.c (construct_inferior_arguments): Constify.
11237         (path_command, attach_post_wait): Constify.
11238         * language.c (show_range_command, show_case_command)
11239         (unk_lang_error): Constify.
11240         * language.h (language_defn::la_error)
11241         (language_defn::la_name_of_this): Constify.
11242         * linespec.c (decode_line_2): Constify.
11243         * linux-thread-db.c (thread_db_err_str): Constify.
11244         * lm32-tdep.c (lm32_register_name): Constify.
11245         * m2-exp.y (yyerror): Constify.
11246         * m2-lang.h (m2_yyerror): Constify.
11247         * m32r-tdep.c (m32r_register_names): Constify and make static.
11248         * m68hc11-tdep.c (m68hc11_register_names): Constify.
11249         * m88k-tdep.c (m88k_register_name): Constify.
11250         * macroexp.c (appendmem): Constify.
11251         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
11252         (upgrade_type, parse_external, parse_partial_symbols)
11253         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
11254         (new_symbol): Constify.
11255         * memattr.c (mem_info_command): Constify.
11256         * mep-tdep.c (register_name_from_keyword): Constify.
11257         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
11258         Constify.
11259         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
11260         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
11261         * mi/mi-main.c (captured_mi_execute_command): Constify and add
11262         cast.
11263         (mi_execute_async_cli_command): Constify.
11264         * mips-tdep.c (mips_register_name): Constify.
11265         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
11266         (am33_register_name, am33_2_register_name)
11267         * moxie-tdep.c (moxie_register_names): Constify.
11268         * nat/linux-osdata.c (osdata_type): Constify fields.
11269         * nto-tdep.c (nto_parse_redirection): Constify.
11270         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
11271         (lookup_child_selector): Constify.
11272         (objc_methcall::name): Constify.
11273         * objc-lang.h (lookup_objc_class, lookup_child_selector)
11274         (lookup_struct_typedef): Constify.
11275         * objfiles.c (pc_in_section): Constify.
11276         * objfiles.h (pc_in_section): Constify.
11277         * p-exp.y (struct token::oper): Constify.
11278         (yyerror): Constify.
11279         * p-lang.h (pascal_yyerror): Constify.
11280         * parser-defs.h (op_name_standard): Constify.
11281         (op_print::string): Constify.
11282         (exp_descriptor::op_name): Constify.
11283         * printcmd.c (print_address_symbolic): Constify.
11284         * psymtab.c (print_partial_symbols): Constify.
11285         * python/py-breakpoint.c (stop_func): Constify.
11286         (bppy_get_expression): Constify.
11287         * python/py-cmd.c (cmdpy_completer::name): Constify.
11288         (cmdpy_function): Constify.
11289         * python/py-event.c (evpy_add_attribute)
11290         (gdbpy_initialize_event_generic): Constify.
11291         * python/py-event.h (evpy_add_attribute)
11292         (gdbpy_initialize_event_generic): Constify.
11293         * python/py-evts.c (add_new_registry): Constify.
11294         * python/py-finishbreakpoint.c (outofscope_func): Constify.
11295         * python/py-framefilter.c (get_py_iter_from_func): Constify.
11296         * python/py-inferior.c (get_buffer): Add cast.
11297         * python/py-param.c (parm_constant::name): Constify.
11298         * python/py-unwind.c (fprint_frame_id): Constify.
11299         * python/python.c (gdbpy_parameter_value): Constify.
11300         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
11301         * remote.c (memory_packet_config::name): Constify.
11302         (show_packet_config_cmd, remote_write_bytes)
11303         (remote_buffer_add_string):
11304         * reverse.c (exec_reverse_once): Constify.
11305         * rs6000-tdep.c (variant::name, variant::description): Constify.
11306         * rust-exp.y (rustyyerror): Constify.
11307         * rust-lang.c (rust_op_name): Constify.
11308         * rust-lang.h (rustyyerror): Constify.
11309         * serial.h (serial_ops::name): Constify.
11310         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
11311         (sh_sh3e_register_name, sh_sh2e_register_name)
11312         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
11313         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
11314         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
11315         (sh_sh4al_dsp_register_name): Constify.
11316         * sh64-tdep.c (sh64_register_name): Constify.
11317         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
11318         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
11319         * stabsread.c (patch_block_stabs, read_type_number)
11320         (ref_map::stabs, ref_add, process_reference)
11321         (symbol_reference_defined, define_symbol, define_symbol)
11322         (error_type, read_type, read_member_functions, read_cpp_abbrev)
11323         (read_one_struct_field, read_struct_fields, read_baseclasses)
11324         (read_tilde_fields, read_struct_type, read_array_type)
11325         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
11326         (read_huge_number, read_range_type, read_args, common_block_start)
11327         (find_name_end): Constify.
11328         * stabsread.h (common_block_start, define_symbol)
11329         (process_one_symbol, symbol_reference_defined, ref_add):
11330         * symfile.c (get_section_index, add_symbol_file_command):
11331         * symfile.h (get_section_index): Constify.
11332         * target-descriptions.c (tdesc_type::name): Constify.
11333         (tdesc_free_type): Add cast.
11334         * target.c (find_default_run_target):
11335         (add_deprecated_target_alias, find_default_run_target)
11336         (target_announce_detach): Constify.
11337         (do_option): Constify.
11338         * target.h (add_deprecated_target_alias): Constify.
11339         * thread.c (print_thread_info_1): Constify.
11340         * top.c (deprecated_readline_begin_hook, command_line_input):
11341         Constify.
11342         (init_main): Add casts.
11343         * top.h (handle_line_of_input): Constify.
11344         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
11345         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
11346         (tfind_command): Rename to ...
11347         (tfind_command_1): ... this and constify.
11348         (tfind_command): New function.
11349         (tfind_end_command, tfind_start_command): Adjust.
11350         (encode_source_string): Constify.
11351         * tracepoint.h (encode_source_string): Constify.
11352         * tui/tui-data.c (tui_partial_win_by_name): Constify.
11353         * tui/tui-data.h (tui_partial_win_by_name): Constify.
11354         * tui/tui-source.c (tui_set_source_content_nil): Constify.
11355         * tui/tui-source.h (tui_set_source_content_nil): Constify.
11356         * tui/tui-win.c (parse_scrolling_args): Constify.
11357         * tui/tui-windata.c (tui_erase_data_content): Constify.
11358         * tui/tui-windata.h (tui_erase_data_content): Constify.
11359         * tui/tui-winsource.c (tui_erase_source_content): Constify.
11360         * tui/tui.c (tui_enable): Add cast.
11361         * utils.c (defaulted_query): Constify.
11362         (init_page_info): Add cast.
11363         (puts_debug, subset_compare): Constify.
11364         * utils.h (subset_compare): Constify.
11365         * varobj.c (varobj_format_string): Constify.
11366         * varobj.h (varobj_format_string): Constify.
11367         * vax-tdep.c (vax_register_name): Constify.
11368         * windows-nat.c (windows_detach): Constify.
11369         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
11370         * xml-support.c (gdb_xml_end_element): Constify.
11371         * xml-tdesc.c (tdesc_start_reg): Constify.
11372         * xstormy16-tdep.c (xstormy16_register_name): Constify.
11373         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
11374         * xtensa-tdep.h (xtensa_register_t::name): Constify.
11375
11376 2017-04-05  Pedro Alves  <palves@redhat.com>
11377
11378         * proc-api.c (struct trans): Constify.
11379         (procfs_note): Constify.
11380         * proc-events.c (struct trans, syscall_table):
11381         * proc-flags.c (struct trans): Constify.
11382         * proc-utils.h (procfs_note): Constify.
11383         * proc-why.c (struct trans): Constify.
11384         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
11385         (procfs_detach): Constify.
11386         * sol-thread.c (struct string_map): Constify.
11387         (td_err_string, td_state_string): Constify.
11388
11389 2017-04-05  Pedro Alves  <palves@redhat.com>
11390
11391         * proc-api.c (procfs_filename): Don't initialize
11392         procfs_filename.
11393         (prepare_to_trace): Assume procfs_filename is non-NULL.
11394         (_initialize_proc_api): Give procfs_filename a default value here.
11395
11396 2017-04-05  Pedro Alves  <palves@redhat.com>
11397
11398         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
11399         'cond_string' parameter.
11400         (extract_exception_regexp): Constify 'string' parameter.
11401         (catch_exception_command_1): Constify.
11402         * breakpoint.c (init_catchpoint)
11403         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
11404         parameter.
11405         (ep_parse_optional_if_clause, catch_fork_command_1)
11406         (catch_exec_command_1): Constify.
11407         * breakpoint.h (init_catchpoint): Constify 'cond_string'
11408         parameter.
11409         (ep_parse_optional_if_clause): Constify.
11410         * cli/cli-utils.c (remove_trailing_whitespace)
11411         (check_for_argument): Constify.
11412         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
11413         non-const overload.
11414         (check_for_argument): Likewise.
11415
11416 2017-04-05  Pedro Alves  <palves@redhat.com>
11417
11418         * event-top.c (command_line_handler): Add cast to execute_command
11419         call.
11420         * record-btrace.c (cmd_record_btrace_bts_start)
11421         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
11422         (cmd_record_btrace_start): Add cast to execute_command call.
11423         * record-full.c (record_full_goto_insn):
11424         * record.c (record_start, record_stop): Add cast to
11425         execute_command_to_string calls.
11426         (cmd_record_start): Add cast to execute_command calls.
11427
11428 2017-04-05  Pedro Alves  <palves@redhat.com>
11429
11430         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
11431         static inline function.
11432         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
11433         array and use gdb_PyArg_ParseTupleAndKeywords.
11434         * python/py-cmd.c (cmdpy_init): Likewise.
11435         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
11436         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
11437         (infpy_search_memory): Likewise.
11438         * python/py-objfile.c (objfpy_add_separate_debug_file)
11439         (gdbpy_lookup_objfile): Likewise.
11440         * python/py-symbol.c (gdbpy_lookup_symbol)
11441         (gdbpy_lookup_global_symbol): Likewise.
11442         * python/py-type.c (gdbpy_lookup_type): Likewise.
11443         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
11444         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
11445         Likewise.
11446
11447 2017-04-05  Pedro Alves  <palves@redhat.com>
11448
11449         * python/python-internal.h (gdb_PyGetSetDef): New type.
11450         * python/py-block.c (block_object_getset)
11451         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
11452         * python/py-event.c (event_object_getset)
11453         (finish_breakpoint_object_getset): Likewise.
11454         * python/py-inferior.c (inferior_object_getset): Likewise.
11455         * python/py-infthread.c (thread_object_getset): Likewise.
11456         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
11457         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
11458         * python/py-objfile.c (objfile_getset): Likewise.
11459         * python/py-progspace.c (pspace_getset): Likewise.
11460         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
11461         Likewise.
11462         * python/py-record.c (recpy_record_getset): Likewise.
11463         * python/py-symbol.c (symbol_object_getset): Likewise.
11464         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
11465         Likewise.
11466         * python/py-type.c (type_object_getset, field_object_getset):
11467         Likewise.
11468         * python/py-value.c (value_object_getset): Likewise.
11469
11470 2017-04-05  Pedro Alves  <palves@redhat.com>
11471
11472         * python/python-internal.h (gdb_PyObject_CallMethod)
11473         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
11474         New functions.
11475         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
11476         (PySys_GetObject, PySys_SetPath): New macros.
11477
11478 2017-04-05  Pedro Alves  <palves@redhat.com>
11479
11480         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
11481         info_osdata_command.
11482         * osdata.c (info_osdata_command): Rename to ...
11483         (info_osdata): ... this.  Constify 'type' parameter, and remove
11484         the 'from_tty' parameter.  Accept NULL TYPE.
11485         (info_osdata_command): New function.
11486         * osdata.h (info_osdata_command): Remove declaration.
11487         (info_osdata): New declaration.
11488
11489 2017-04-05  Pedro Alves  <palves@redhat.com>
11490
11491         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
11492         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
11493         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
11494         parameter.
11495         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
11496         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
11497         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
11498         parameter.
11499         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
11500         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
11501         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
11502         (mi_cmd_file_list_exec_source_files)
11503         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
11504         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11505         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
11506         parameter.
11507         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
11508         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
11509         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
11510         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
11511         (mi_cmd_stack_info_frame): Constify 'command' parameter.
11512         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
11513         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
11514         'command' parameter.
11515         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
11516         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
11517         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
11518         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
11519         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
11520         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
11521         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
11522         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
11523         (mi_cmd_var_set_update_range): Constify 'command' parameter.
11524         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
11525         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
11526         parameter.
11527         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
11528         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
11529         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
11530         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
11531         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
11532         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
11533         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
11534         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
11535         (mi_cmd_data_list_changed_registers)
11536         (mi_cmd_data_write_register_values)
11537         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
11538         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
11539         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
11540         (mi_cmd_list_features, mi_cmd_list_target_features)
11541         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
11542         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
11543         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
11544         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
11545         (mi_cmd_trace_frame_collected): Constify 'command'
11546         parameter.
11547         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
11548         'command' parameter.
11549
11550 2017-04-05  Pedro Alves  <palves@redhat.com>
11551
11552         * ada-lang.c (ada_completer_word_break_characters): Now a const
11553         array.
11554         (ada_get_gdb_completer_word_break_characters): Constify.
11555         * completer.c (gdb_completer_command_word_break_characters)
11556         (gdb_completer_file_name_break_characters)
11557         (gdb_completer_quote_characters): Now const arrays.
11558         (get_gdb_completer_quote_characters): Constify.
11559         (set_rl_completer_word_break_characters): New function.
11560         (set_gdb_completion_word_break_characters)
11561         (complete_line_internal): Use it.
11562         * completer.h (get_gdb_completer_quote_characters): Constify.
11563         (set_rl_completer_word_break_characters): Declare.
11564         * f-lang.c (f_word_break_characters): Constify.
11565         * language.c (default_word_break_characters): Constify.
11566         * language.h (language_defn::la_word_break_characters): Constify.
11567         (default_word_break_characters): Constify.
11568         * top.c (init_main): Use set_rl_completer_word_break_characters.
11569
11570 2017-04-05  Pedro Alves  <palves@redhat.com>
11571
11572         * aix-thread.c (aix_thread_pid_to_str)
11573         (aix_thread_extra_thread_info): Constify.
11574         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
11575         * bsd-uthread.c (bsd_uthread_extra_thread_info)
11576         (bsd_uthread_pid_to_str): Constify.
11577         * corelow.c (core_pid_to_str): Constify.
11578         * darwin-nat.c (darwin_pid_to_str): Constify.
11579         * fbsd-nat.c (fbsd_pid_to_str): Constify.
11580         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
11581         Constify.
11582         * gnu-nat.c (gnu_pid_to_str): Constify.
11583         * go32-nat.c (go32_pid_to_str): Constify.
11584         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
11585         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
11586         * inferior.c (inferior_pid_to_str): Constify.
11587         * linux-nat.c (linux_nat_pid_to_str): Constify.
11588         * linux-tdep.c (linux_core_pid_to_str): Constify.
11589         * linux-thread-db.c (thread_db_pid_to_str)
11590         (thread_db_extra_thread_info): Constify.
11591         * nto-tdep.c (nto_extra_thread_info): Constify.
11592         * nto-tdep.h (nto_extra_thread_info): Constify.
11593         * obsd-nat.c (obsd_pid_to_str): Constify.
11594         * procfs.c (procfs_pid_to_str): Constify.
11595         * ravenscar-thread.c (ravenscar_extra_thread_info)
11596         (ravenscar_pid_to_str): Constify.
11597         * remote-sim.c (gdbsim_pid_to_str): Constify.
11598         * remote.c (remote_threads_extra_info, remote_pid_to_str):
11599         Constify.
11600         * sol-thread.c (solaris_pid_to_str): Constify.
11601         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
11602         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
11603         * target.c (default_pid_to_str, target_pid_to_str)
11604         (normal_pid_to_str, default_pid_to_str): Constify.
11605         * target.h (target_ops::to_pid_to_str)
11606         (target_ops::to_extra_thread_info): Constify.
11607         (target_pid_to_str, normal_pid_to_str): Constify.
11608         * windows-nat.c (windows_pid_to_str): Constify.
11609         * gdbarch.sh (core_pid_to_str): Constify.
11610         * target-delegates.c: Regenerate.
11611         * gdbarch.h, gdbarch.c: Regenerate.
11612
11613 2017-04-05  Pedro Alves  <palves@redhat.com>
11614
11615         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
11616         the memory of the temporary warning_pre_print override.
11617         * utils.c (warning_pre_print): Constify.
11618         * utils.h (warning_pre_print): Constify.
11619
11620 2017-04-05  Pedro Alves  <palves@redhat.com>
11621
11622         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
11623         (shell_command): New function.
11624         (make_command): Use std::string.
11625         (init_cli_cmds): Register shell_command instead of shell_escape.
11626
11627 2017-04-05  Pedro Alves  <palves@redhat.com>
11628
11629         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11630         * tracepoint.c (default_collect): Don't initialize.
11631
11632 2017-04-05  Pedro Alves  <palves@redhat.com>
11633
11634         * macroexp.c (macro_buffer::shared): Now a bool.
11635         (init_buffer): Update.
11636         (init_shared_buffer): Constify 'addr' parameter.
11637         (substitute_args, expand, macro_expand, macro_expand_next): Remove
11638         casts.
11639
11640 2017-04-05  Pedro Alves  <palves@redhat.com>
11641
11642         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
11643         * disasm.c (set_disassembler_options): Constify local.
11644         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11645
11646 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
11647
11648         PR gdb/21352
11649         * tracefile.c (tsave_command): Fix argument parsing for '-r'
11650         option.
11651
11652 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11653
11654         * frame.c (frame_unwind_register_unsigned): Call
11655         frame_unwind_register_value.
11656
11657 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11658
11659         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11660         Use gdb_test_multiple, and don't match anchor.
11661
11662 2017-04-05  Pedro Alves  <palves@redhat.com>
11663
11664         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11665         (Write After Approval): Remove Simon Marchi.
11666
11667 2017-04-05  Pedro Alves  <palves@redhat.com>
11668
11669         * common/gdb_optional.h (optional::optional): Make constexpr and
11670         initialize m_dummy.
11671
11672 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11673
11674         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11675         (amd64fbsd_jmp_buf_reg_offset): Remove.
11676         (amd64fbsd_supply_uthread): Remove function.
11677         (amd64fbsd_collect_uthread): Remove function.
11678         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11679         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11680         (x86_64-*-freebsd*): Remove bsd-uthread.o.
11681         (fbsd-nat.c): Update comment.
11682         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11683         (i386fbsd_jmp_buf_reg_offset): Remove.
11684         (i386fbsd_supply_uthread): Remove function.
11685         (i386fbsd_collect_uthread): Remove function.
11686         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11687
11688 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11689
11690         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11691         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11692         * NEWS: Mention that support for FreeBSD/alpha was removed.
11693         * alpha-fbsd-tdep.c: Delete file.
11694         * config/alpha/fbsd.mh: Delete file.
11695         * configure.host: Delete alpha*-*-freebsd* and
11696         alpha*-*-kfreebsd*-gnu.
11697         * configure.tgt: Delete alpha*-*-freebsd* and
11698         alpha*-*-kfreebsd*-gnu.
11699
11700 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11701
11702         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11703         amd64bsd_store_inferior_registers): Use ptid from regcache.
11704
11705 2017-04-04  Pedro Alves  <palves@redhat.com>
11706
11707         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
11708         data fields, make them private and add "m_" prefixes.
11709         (lnp_state_machine::lnp_state_machine): New ctor.
11710         (record_line, check_line_address, handle_set_discriminator)
11711         (handle_set_address, handle_advance_pc, handle_special_opcode)
11712         (handle_advance_line, handle_set_file, handle_negate_stmt)
11713         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11714         (end_sequence, advance_line): New methods.
11715         (m_gdbarch, m_record_lines_p): New fields.
11716         (lnp_reader_state): Delete.
11717         (dwarf_record_line): Rename to ...
11718         (lnp_state_machine::record_line): ... adjust.
11719         (init_lnp_state_machine): Delete.
11720         (lnp_state_machine::lnp_state_machine): New.
11721         (check_line_address): Rename to ...
11722         (lnp_state_machine::check_line_address): This.
11723         (dwarf_decode_lines_1): Remove reference to "reader_state".
11724         Adjust lnp_state_machine having a non-default ctor.  Use bool.
11725         State machine internal state manipulation moved to
11726         lnp_state_machine methods.
11727
11728 2017-04-04  Pedro Alves  <palves@redhat.com>
11729
11730         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11731         unittests/offset-type-selftests.c.
11732         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11733         * common/offset-type.h: New file.
11734         * common/preprocessor.h: New file.
11735         * common/traits.h: New file.
11736         * common/valid-expr.h: New file.
11737         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
11738         sect_offset and cu_offset strong typedefs throughout.
11739         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11740         typedefs throughout.
11741         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
11742         sect_offset and cu_offset strong typedefs throughout.
11743         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11744         typedefs throughout.
11745         * gdbtypes.h: Include "common/offset-type.h".
11746         (cu_offset): Now an offset type (strong typedef) instead of a
11747         struct.
11748         (sect_offset): Likewise.
11749         (union call_site_parameter_u): Rename "param_offset" field to
11750         "param_cu_off".
11751         * unittests/offset-type-selftests.c: New file.
11752
11753 2017-04-04  Pedro Alves  <palves@redhat.com>
11754
11755         * common/underlying.h: New file.
11756         * dwarf2read.c: Include "common/gdb_optional.h" and
11757         "common/underlying.h".
11758         (dir_index, file_name_index): New types.
11759         (file_entry): Use them.
11760         (file_entry::include): Use to_underlying.
11761         (line_header::add_file_name): Use dir_index.
11762         (read_formatted_entries): Use gdb::optional.  Read form before
11763         writting to file_entry.
11764         (dwarf_decode_line_header): Use dir_index.
11765         (lnp_state_machine::current_file): Use to_underlying.
11766         (lnp_state_machine::file): Change type to file_name_index.
11767         (dwarf_record_line): Use to_underlying.
11768         (init_lnp_state_machine): Use file_name_index.
11769         (dwarf_decode_lines_1): Use dir_index and file_name_index.
11770
11771 2017-04-04  Pedro Alves  <palves@redhat.com>
11772
11773         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11774         operator bool, has_value and get methods.
11775
11776 2017-04-04  Pedro Alves  <palves@redhat.com>
11777
11778         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11779         fields.
11780         (line_header): Initialize all data fields.  Change type of
11781         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11782         Change type of include_dirs to std::vector<const char *>.  Remove
11783         num_include_dirs, include_dirs_size.  Change type of file_names to
11784         std::vector<file_entry>.  Remove num_file_names, file_names_size.
11785         (line_header::line_header): New.
11786         (line_header::add_include_dir, line_header::add_file_name): New
11787         methods.
11788         (line_header::include_dir_at): Remove NULL check.
11789         (line_header::file_name_at): Add const overload.
11790         (line_header_up): New unique_ptr typedef.
11791         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
11792         std::vector.  Remove free_line_header call.
11793         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
11794         free_line_header call.
11795         (free_cu_line_header): Delete.
11796         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11797         (setup_type_unit_groups): Use line_header_up instead of cleanups.
11798         Adjust to use std::vector.
11799         (free_line_header): Delete.
11800         (free_line_header_voidp): Use delete.
11801         (add_include_dir): Replace with ...
11802         (line_header::add_include_dir): ... this method.  Use std::vector.
11803         (add_file_name): Replace with ...
11804         (line_header::add_file_name): ... this method.  Use std::vector.
11805         (add_include_dir_stub): Delete.
11806         (read_formatted_entries): Remove memset.
11807         (dwarf_decode_line_header): Return a line_header_up instead of a
11808         raw pointer.  Remove cleanup handling.  Pass lambdas to
11809         read_formatted_entries.  Adjust to use line_header methods.
11810         (dwarf_decode_lines_1): Adjust to use line_header methods.
11811         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11812         use std::vector.
11813
11814 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
11815
11816         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11817         instead of struct ptid.
11818
11819 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
11820
11821         * frame.c (get_frame_register_bytes): Unwind using value.
11822         (put_frame_register_bytes): Likewise.
11823
11824 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
11825
11826         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11827         aggregate-like.
11828
11829 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
11830
11831         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11832
11833 2017-03-29  Yao Qi  <yao.qi@linaro.org>
11834
11835         * gdbthread.h (struct thread_info): Declare constructor and
11836         destructor.  Add some in-class member initializers.
11837         * thread.c (free_thread): Remove.
11838         (init_thread_list): Call delete instead of free_thread.
11839         (new_thread): Call thread_info constructor.
11840         (thread_info::thread_info): New function.
11841         (thread_info::~thread_info): New function.
11842         (delete_thread_1): Call delete instead of free_thread.
11843         (make_cleanup_restore_current_thread): Move tp and frame to
11844         inner block.
11845
11846 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11847
11848         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11849         (arc_skip_prologue): Likewise.
11850         (arc_make_frame_cache): Likewise.
11851         (arc_pv_get_operand): New function.
11852         (arc_is_in_prologue): Likewise.
11853         (arc_analyze_prologue): Likewise.
11854         (arc_print_frame_cache): Likewise.
11855         (MAX_PROLOGUE_LENGTH): New constant.
11856
11857 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11858
11859         * configure.tgt: Add arc-insn.o.
11860         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11861         (dump_arc_instruction_command): New function.
11862         (arc_fprintf_disasm): Likewise.
11863         (arc_disassemble_info): Likewise.
11864         (arc_insn_get_operand_value): Likewise.
11865         (arc_insn_get_operand_value_signed): Likewise.
11866         (arc_insn_get_memory_base_reg): Likewise.
11867         (arc_insn_get_memory_offset): Likewise.
11868         (arc_insn_get_branch_target): Likewise.
11869         (arc_insn_dump): Likewise.
11870         (arc_insn_get_linear_next_pc): Likewise.
11871         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11872         (arc_disassemble_info): Likewise.
11873         (arc_insn_get_branch_target): Likewise.
11874         (arc_insn_get_linear_next_pc): Likewise.
11875         * NEWS: Mention new "maint print arc arc-instruction".
11876
11877 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11878
11879         * arc-tdep (maintenance_print_arc_list): New variable.
11880         (maintenance_print_arc_command): New function.
11881
11882 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11883
11884         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11885         Add "limm" and "reserved".
11886         (arc_cannot_fetch_register, arc_cannot_store_register): Add
11887         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11888         * arc-tdep.h (arc_regnum): Likewise.
11889
11890 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11891
11892         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11893         for THREADPTR register.
11894         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11895         register.
11896         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11897         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11898         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11899
11900 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11901
11902         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11903         registers above gdbarch_num_regs (gdbarch) as privileged in
11904         call0 ABI.
11905
11906 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11907
11908         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11909         for a single specified register or for all registers in
11910         a0_base..a0_base + C0_NREGS range.
11911         (supply_gregset_reg): Call regcache_raw_supply for a single
11912         specified register or for all registers in a0_base..a0_base +
11913         C0_NREGS range.
11914
11915 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11916
11917         * arch/xtensa.h (C0_NREGS): Add definition.
11918         * xtensa-tdep.c (C0_NREGS): Remove definition.
11919
11920 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11921
11922         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11923         Drop xtensa_default_isa initialization.
11924         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11925
11926 2017-03-27  Pedro Alves  <palves@redhat.com>
11927
11928         * dwarf2read.c (file_entry) <dir_index>: Add comment.
11929         (file_entry::include_dir): New method.
11930         (line_header::include_dir_at, line_header::file_name_at): New
11931         methods.
11932         (setup_type_unit_groups, setup_type_unit_groups)
11933         (psymtab_include_file_name): Simplify using the new methods.
11934         (lnp_state_machine) <the_line_header>: New field.
11935         <file>: Add comment.
11936         (lnp_state_machine::current_file): New method.
11937         (dwarf_record_line): Simplify using the new methods.
11938         (init_lnp_state_machine): Initialize the "the_line_header" field.
11939         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11940         Simplify using the new methods.
11941
11942 2017-03-27  Pedro Alves  <palves@redhat.com>
11943
11944         * cp-name-parser.y (make_empty): Delete.
11945         (demangler_special, nested_name, ptr_operator, array_indicator)
11946         (direct_declarator, declarator_1): Use fill_comp instead of
11947         make_empty.
11948
11949 2017-03-27  Pedro Alves  <palves@redhat.com>
11950
11951         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11952         to ATTRIBUTE_PRINTF.
11953         * solib-target.c (library_list_start_list): Print "string" not
11954         "version".
11955         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11956         gdb_xml_error call.
11957
11958 2017-03-27  Pedro Alves  <palves@redhat.com>
11959
11960         * dwarf2read.c (struct file_and_directory): New.
11961         (dwarf2_get_dwz_file): Adjust to use std::string.
11962         (dw2_get_file_names_reader): Adjust to use file_and_directory.
11963         (find_file_and_directory): Adjust to return a file_and_directory
11964         object.
11965         (read_file_scope): Adjust to use file_and_directory.  Remove
11966         make_cleanup/do_cleanups calls.
11967         (open_and_init_dwp_file): Adjust to use std::string.  Remove
11968         make_cleanup/do_cleanups calls.
11969         * python/python.c (do_start_initialization): Adjust to ldirname
11970         returning a std::string.
11971         * utils.c (ldirname): Now returns a std::string.
11972         * utils.h (ldirname): Change return type to std::string.
11973         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11974         returning a std::string.
11975         * xml-tdesc.c (file_read_description_xml): Likewise.
11976
11977 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
11978
11979         * regcache.c (regcache_debug_print_register): New function.
11980         * regcache.h (regcache_debug_print_register): New declaration.
11981         * target.c (debug_print_register): Remove.
11982         (target_fetch_registers): Call regcache_debug_print_register.
11983         (target_store_registers): Likewise.
11984
11985 2017-03-24  Pádraig Brady  <pbrady@fb.com>
11986
11987         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11988         reference beyond the 'lh->include_dirs' array before accessing to
11989         it.
11990         (psymtab_include_file_name): Likewise.
11991         (dwarf_decode_lines_1): Likewise.
11992         (dwarf_decode_lines): Likewise.
11993         (file_file_name): Likewise.
11994
11995 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
11996
11997         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11998         inferior_ptid.
11999         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12000         ps_lsetfpregs): Likewise.
12001         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
12002         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
12003         ps_lsetfpregs): Likewise.
12004         * target.c (target_fetch_registers, target_store_registers):
12005         Remove asserts.
12006
12007 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
12008
12009         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
12010
12011 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12012
12013         * aarch64-tdep.c (aarch64_process_record_test): Declare.
12014         (_initialize_aarch64_tdep): Register it.
12015         (aarch64_record_load_store): Handle PRFM instruction.
12016         (aarch64_process_record_test): New function.
12017
12018 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12019
12020         * aarch64-tdep.c (aarch64_record_load_store): Fix code
12021         indentation.
12022
12023 2017-03-23  Yao Qi  <yao.qi@linaro.org>
12024
12025         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
12026
12027 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12028
12029         python/python.c (do_start_initialization): Fix memory leak.
12030
12031 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12032
12033         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
12034         using get_ptrace_pid.
12035         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12036         inferior_ptid.
12037         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12038         inferior_ptid instead of pid.
12039
12040 2017-03-22  Yao Qi  <yao.qi@linaro.org>
12041
12042         * aarch64-tdep.c: Wrap locally used classes in anonymous
12043         namespace.
12044         * arm-tdep.c: Likewise.
12045         * linespec.c: Likewise.
12046         * ui-out.c: Likewise.
12047
12048 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
12049
12050         PR gdb/19637
12051         * python/lib/gdb/printer/bound_registers.py: Import sys.
12052
12053 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12054
12055         * windows-nat.c (do_windows_fetch_inferior_registers): Add
12056         windows_thread_info parameter and use it instead of
12057         current_thread.
12058         (windows_fetch_inferior_registers): Don't set current_thread,
12059         pass the thread to do_windows_fetch_inferior_registers.  Use
12060         ptid from regcache instead of inferior_ptid.
12061         (do_windows_store_inferior_registers): Add windows_thread_info
12062         parameter and use it instead of current_thread.
12063         (windows_store_inferior_registers): Don't set current_thread,
12064         pass the thread to do_windows_store_inferior_registers.  Use
12065         ptid from regcache instead of inferior_ptid.
12066
12067 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12068
12069         * ser-mingw.c (ser_windows_raw): Remove reference to
12070         struct serial::current_timeout.
12071
12072 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
12073
12074         PR tdep/20928
12075         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12076         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12077         (sparc64_fsr_type): Fix %fsr decoding.
12078
12079 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
12080
12081         * python/py-record-btrace.c (btpy_insn_data): Change return type
12082         for Python 2.
12083
12084 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12085
12086         * spu-linux-nat.c (spu_fetch_inferior_registers,
12087         spu_store_inferior_registers): Use ptid from regcache, set and
12088         restore inferior_ptid.
12089         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12090         Likewise.
12091
12092 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12093
12094         * i386-linux-nat.c (fetch_register, store_register,
12095         i386_linux_fetch_inferior_registers,
12096         i386_linux_store_inferior_registers): Use ptid from regcache.
12097         * ia64-linux-nat.c (ia64_linux_fetch_register,
12098         ia64_linux_store_register): Likewise.
12099         * inf-ptrace.c (inf_ptrace_fetch_register,
12100         inf_ptrace_store_register): Likewise.
12101         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12102         m32r_linux_store_inferior_registers): Likewise.
12103         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12104         m68kbsd_store_inferior_registers): Likewise.
12105         * m68k-linux-nat.c (fetch_register, store_register,
12106         m68k_linux_fetch_inferior_registers,
12107         m68k_linux_store_inferior_registers): Likewise.
12108         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12109         m88kbsd_store_inferior_registers): Likewise.
12110         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12111         mips_fbsd_store_inferior_registers): Likewise.
12112         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12113         mips64_linux_regsets_store_registers): Likewise.
12114         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12115         mipsnbsd_store_inferior_registers): Likewise.
12116         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12117         mips64obsd_store_inferior_registers): Likewise.
12118         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12119         Likewise.
12120         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12121         ppcfbsd_store_inferior_registers): Likewise.
12122         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12123         ppc_linux_store_inferior_registers): Likewise.
12124         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12125         ppcnbsd_store_inferior_registers): Likewise.
12126         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12127         ppcobsd_store_registers): Likewise.
12128         * procfs.c (procfs_fetch_registers, procfs_store_registers):
12129         Likewise.
12130         * ravenscar-thread.c (ravenscar_fetch_registers,
12131         ravenscar_store_registers, ravenscar_prepare_to_store):
12132         Likewise.
12133         * record-btrace.c (record_btrace_fetch_registers,
12134         record_btrace_store_registers, record_btrace_prepare_to_store):
12135         Likewise.
12136         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12137         Lookup inferior using ptid from regcache, instead of
12138         current_inferior.
12139         * remote.c (remote_fetch_registers, remote_store_registers): Use
12140         ptid from regcache.
12141         * rs6000-nat.c (fetch_register, store_register): Likewise.
12142         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12143         s390_linux_store_inferior_registers): Likewise.
12144         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12145         shnbsd_store_inferior_registers): Likewise.
12146         * sol-thread.c (sol_thread_fetch_registers,
12147         sol_thread_store_registers): Likewise.
12148         * sparc-nat.c (sparc_fetch_inferior_registers,
12149         sparc_store_inferior_registers): Likewise.
12150         * tilegx-linux-nat.c (fetch_inferior_registers,
12151         store_inferior_registers): Likewise.
12152         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
12153         vaxbsd_store_inferior_registers): Likewise.
12154         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
12155         store_xtregs): Likewise.
12156
12157 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12158
12159         PR gdb/14441
12160         * NEWS: Mention support for rvalue references in GDB and python.
12161         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
12162         supports both lvalue and rvalue references.
12163
12164 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12165
12166         PR gdb/14441
12167         * gdbtypes.c (rank_one_type): Implement overloading
12168         resolution rules regarding rvalue references.
12169
12170 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12171
12172         PR gdb/14441
12173         * aarch64-tdep.c (aarch64_type_align)
12174         (aarch64_extract_return_value, aarch64_store_return_value): Change
12175         lvalue reference type checks to general reference type checks.
12176         * amd64-tdep.c (amd64_classify): Likewise.
12177         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
12178         Likewise.
12179         * arm-tdep.c (arm_type_align, arm_extract_return_value)
12180         (arm_store_return_value): Likewise.
12181         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
12182         * c-typeprint.c (c_print_type): Likewise.
12183         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
12184         (cplus_number_of_children, cplus_describe_child): Likewise.
12185         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
12186         * completer.c (expression_completer): Likewise.
12187         * cp-support.c (make_symbol_overload_list_adl_namespace):
12188         Likewise.
12189         * darwin-nat-info.c (info_mach_region_command): Likewise.
12190         * dwarf2loc.c (entry_data_value_coerce_ref)
12191         (value_of_dwarf_reg_entry): Likewise.
12192         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
12193         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
12194         Likewise.
12195         * findvar.c (extract_typed_address, store_typed_address):
12196         Likewise.
12197         * gdbtypes.c (rank_one_type): Likewise.
12198         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
12199         * infcall.c (value_arg_coerce): Likewise.
12200         * language.c (pointer_type): Likewise.
12201         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
12202         Likewise.
12203         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
12204         * mn10300-tdep.c (mn10300_type_align): Likewise.
12205         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
12206         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
12207         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
12208         Likewise.
12209         * printcmd.c (print_formatted, x_command): Likewise.
12210         * python/py-type.c (typy_get_composite, typy_template_argument):
12211         Likewise.
12212         * python/py-value.c (valpy_referenced_value)
12213         (valpy_get_dynamic_type, value_has_field): Likewise.
12214         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
12215         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
12216         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
12217         * spu-tdep.c (spu_scalar_value_p): Likewise.
12218         * symtab.c (lookup_symbol_aux): Likewise.
12219         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
12220         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
12221         Likewise.
12222         * valops.c (value_cast_pointers, value_cast)
12223         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
12224         (value_struct_elt, value_struct_elt_bitpos)
12225         (value_find_oload_method_list, find_overload_match)
12226         (value_rtti_indirect_type): Likewise.
12227         * valprint.c (val_print_scalar_type_p, generic_val_print):
12228         Likewise.
12229         * value.c (value_actual_type, value_as_address, unpack_long)
12230         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
12231         (coerce_ref): Likewise.
12232         * varobj.c (varobj_get_value_type): Likewise.
12233
12234 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12235
12236         PR gdb/14441
12237         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
12238         table of constants.
12239         * python/lib/gdb/command/explore.py: Support exploring values
12240         of rvalue reference types.
12241         * python/lib/gdb/types.py: Implement get_basic_type() for
12242         rvalue reference types.
12243         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
12244         constant.
12245         * python/py-value.c (valpy_getitem): Add an rvalue reference
12246         check.
12247         (valpy_reference_value): Add new parameter "refcode".
12248         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
12249         New wrappers for valpy_reference_value().
12250         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12251         (gdbpy_invoke_xmethod): Likewise.
12252
12253 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12254
12255         PR gdb/14441
12256         * dwarf2read.c (process_die, read_type_die_1): Handle the
12257         DW_TAG_rvalue_reference_type DIE.
12258         (read_tag_reference_type): Add new parameter "refcode".
12259
12260 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12261
12262         PR gdb/14441
12263         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
12264         (c_type_print_modifier, c_type_print_varspec_suffix)
12265         (c_type_print_base): Support printing rvalue reference types.
12266         * c-valprint.c (c_val_print, c_value_print): Support printing
12267         rvalue reference values.
12268
12269 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12270
12271         PR gdb/14441
12272         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
12273         typename.
12274         * cp-support.c (replace_typedefs): Handle
12275         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
12276         * python/py-type.c (typy_lookup_type): Likewise.
12277
12278 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12279
12280         PR gdb/14441
12281         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
12282         * parse.c (insert_type): Change assert statement.
12283         (follow_types): Handle rvalue reference types.
12284         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
12285         constant.
12286
12287 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12288
12289         PR gdb/14441
12290         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
12291         value_ref() interface.
12292         * c-valprint.c (c_value_print): Likewise.
12293         * infcall.c (value_arg_coerce): Likewise.
12294         * python/py-value.c (valpy_reference_value): Likewise.
12295         * valops.c (value_cast, value_reinterpret_cast)
12296         (value_dynamic_cast, typecmp): Likewise.
12297         (value_ref): Parameterize by kind of return value reference type.
12298         * value.h (value_ref): Add new parameter "refcode".
12299
12300 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12301
12302         PR gdb/14441
12303         * dwarf2read.c (read_tag_reference_type): Use
12304         lookup_lvalue_reference_type() instead of lookup_reference_type().
12305         * eval.c (evaluate_subexp_standard): Likewise.
12306         * f-exp.y: Likewise.
12307         * gdbtypes.c (make_reference_type, lookup_reference_type):
12308         Generalize with rvalue reference types.
12309         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
12310         convenience wrappers for lookup_reference_type().
12311         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
12312         reference kind parameter.
12313         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
12314         wrappers for lookup_reference_type().
12315         * guile/scm-type.c (gdbscm_type_reference): Use
12316         lookup_lvalue_reference_type() instead of lookup_reference_type().
12317         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
12318         * parse.c (follow_types): Likewise.
12319         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
12320         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
12321         Likewise.
12322         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12323         (gdbpy_invoke_xmethod): Likewise.
12324         * stabsread.c: Provide extra argument to make_reference_type()
12325         call.
12326         * valops.c (value_ref, value_rtti_indirect_type): Use
12327         lookup_lvalue_reference_type() instead of lookup_reference_type().
12328
12329 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12330
12331         PR gdb/14441
12332         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
12333         (TYPE_IS_REFERENCE): New macro.
12334         (struct type): Add rvalue_reference_type field.
12335         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
12336
12337 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
12338
12339         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
12340         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
12341         New function definition.
12342         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
12343         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
12344         New function declaration.
12345         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
12346         * mi/mi-interp.h: New file.
12347         * solib.c (info_sharedlibrary_command): Replace for loop with
12348         ALL_SO_LIBS macro
12349         * solib.h (update_solib_list): New function declaration.
12350         (so_list_head): Move macro.
12351         * solist.h (ALL_SO_LIBS): New macro.
12352
12353 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
12354
12355         * infcmd.c (post_create_inferior): Remove unused argument in
12356         call to solib_add.
12357         * remote.c (remote_start_remote): Likewise.
12358         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
12359         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
12360         (enable_break): Likewise.
12361         * solib.c (update_solib_list): Remove unused target argument
12362         and its documentation.
12363         (solib_add): Remove unused target argument.  Remove unused
12364         argument in call to update_solib_list.
12365         (info_sharedlibrary_command): Remove unused argument in call
12366         to update_solib_list.
12367         (sharedlibrary_command): Remove unused argument in call to
12368         solib_add.
12369         (handle_solib_event): Likewise.
12370         (reload_shared_libraries): Likewise.
12371         * solib.h (solib_add): Remove unused target argument.
12372
12373 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12374
12375         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
12376         (s390_displaced_step_fixup): Cover relative branches with the
12377         default fixup handling.  This fixes lack of support for some
12378         relative branch instructions.
12379
12380 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12381
12382         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
12383         ptid from regcache.
12384
12385 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12386
12387         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
12388         i386_darwin_store_inferior_registers): Use ptid from regcache.
12389
12390 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12391
12392         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
12393         i386bsd_store_inferior_registers): Use ptid from regcache.
12394
12395 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12396
12397         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
12398         hppaobsd_store_registers): Use ptid from regcache.
12399
12400 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12401
12402         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
12403         hppanbsd_store_registers): Use ptid from regcache.
12404
12405 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12406
12407         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
12408         from regcache.  Use get_ptrace_pid.
12409
12410 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12411
12412         * corelow.c (get_core_register_section): Use ptid from regcache,
12413         update doc.
12414
12415 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12416
12417         * bsd-uthread.c (bsd_uthread_fetch_registers,
12418         bsd_uthread_store_registers): Use ptid from regcache, set and
12419         restore inferior_ptid.
12420
12421 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12422
12423         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
12424         fetch_fp_regs, store_register, store_regs, store_fp_register,
12425         store_fp_regs): Use ptid from regcache.
12426
12427 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12428
12429         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
12430         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
12431         store_vfp_regs): Use ptid from regcache.
12432
12433 2017-03-17  Pedro Alves  <palves@redhat.com>
12434
12435         PR remote/21188
12436         * ser-base.c (ser_base_wait_for): Add comment.
12437         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
12438         version.
12439         * ser-unix.c (hardwire_raw): Remove reference to
12440         scb->current_timeout.
12441         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
12442         (hardwire_ops): Install ser_base_readchar instead of
12443         hardwire_readchar.
12444         * serial.h (struct serial) <current_timeout, timeout_remaining>:
12445         Remove fields.
12446
12447 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
12448
12449         PR gdb/19637
12450         * python/lib/gdb/printer/bound_registers.py: Add support for
12451         Python 3.
12452
12453 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12454
12455         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
12456         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
12457         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
12458         byte_offset to subobj_byte_offset.  Fix the handling of
12459         DWARF_VALUE_STACK on big-endian targets when coming via an
12460         implicit pointer.
12461         (dwarf2_evaluate_loc_desc): Adjust call to
12462         dwarf2_evaluate_loc_desc_full.
12463         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
12464         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
12465
12466 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12467
12468         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
12469         and REVSH instructions.
12470
12471 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12472
12473         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
12474         (arm_record_test): Declare.
12475         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
12476         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
12477         align with the manual.
12478         (thumb_record_misc): Adjust the code order to align with the
12479         manual.
12480         (thumb2_record_decode_insn_handler): Fix instruction matching.
12481         (instruction_reader_thumb): New class.
12482         (arm_record_test): New function.
12483
12484 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12485
12486         * arm-tdep.c (abstract_memory_reader): New class.
12487         (instruction_reader): New class.
12488         (extract_arm_insn): Add argument 'reader'.  Callers updated.
12489         (decode_insn): Likewise.
12490
12491 2017-03-16  Doug Evans  <dje@google.com>
12492
12493         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
12494         member.  Change type of TYPE member to SCM.  All uses updated.
12495         (lsscm_make_lazy_string_smob): Add assert.
12496         (lsscm_make_lazy_string): Flag bad length values.
12497         (lsscm_elt_type): New function.
12498         (gdbscm_lazy_string_to_value): Rewrite to use
12499         lsscm_safe_lazy_string_to_value.
12500         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
12501         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
12502         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
12503         in incoming type.
12504         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12505         * guile/scm-type.c (tyscm_scm_to_type): New function.
12506
12507 2017-03-15  Doug Evans  <dje@google.com>
12508
12509         PR python/17728, python/18439, python/18779
12510         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
12511         member.  Change type of TYPE member to PyObject *.  All uses updated.
12512         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
12513         (gdbpy_create_lazy_string_object): Flag bad length values.
12514         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
12515         Handle typedefs in incoming type.
12516         (stpy_lazy_string_elt_type): New function.
12517         (gdbpy_extract_lazy_string): Call it.
12518         * python/py-value.c (valpy_lazy_string): Flag bad length values.
12519         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
12520         typedefs in incoming type.
12521
12522 2017-03-16  Doug Evans  <dje@google.com>
12523
12524         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12525         * guile/scm-type.c (tyscm_scm_to_type): New function.
12526
12527 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
12528
12529         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
12530         "ULONGEST" for "skip".
12531
12532 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12533
12534         PR gdb/21220
12535         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
12536         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
12537         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
12538         over ptrace peek/poke until end of buffer or error.
12539
12540 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
12541
12542         * parse.c (length_of_subexp): Make static.
12543         * parser-defs.h (length_of_subexp): Remove.
12544
12545 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12546
12547         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
12548         as well.
12549
12550 2017-03-14  Pedro Alves  <palves@redhat.com>
12551
12552         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
12553         (main): Use std::unique_ptr.  Remove calls to
12554         cp_demangled_name_parse_free.
12555
12556 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12557
12558         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
12559         alphabsd_store_inferior_registers): Use regcache->ptid instead
12560         of inferior_ptid.
12561
12562 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12563
12564         * aix-thread.c (aix_thread_fetch_registers,
12565         aix_thread_store_registers): Use regcache->ptid instead of
12566         inferior_ptid.
12567
12568 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12569
12570         * aarch64-linux-nat.c (fetch_gregs_from_thread,
12571         store_gregs_to_thread, fetch_fpregs_from_thread,
12572         store_fpregs_to_thread): Use regcache->ptid instead of
12573         inferior_ptid.
12574
12575 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12576
12577         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
12578         amd64_linux_fetch_inferior_registers): Use regcache->ptid
12579         instead of inferior_ptid.
12580
12581 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12582
12583         * target.c (target_fetch_registers, target_store_registers): Add
12584         assert.
12585
12586 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12587
12588         * regcache.h (regcache_get_ptid): New function.
12589         * regcache.c (regcache_get_ptid): New function.
12590
12591 2017-03-13  Mark Wielaard  <mark@klomp.org>
12592
12593         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
12594
12595 2017-03-10  Keith Seitz  <keiths@redhat.com>
12596
12597         PR c++/8218
12598         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
12599
12600 2017-03-08  Pedro Alves  <palves@redhat.com>
12601
12602         PR gdb/18360
12603         * infrun.c (start_step_over, do_target_resume, resume)
12604         (restart_threads): Assert we're not resuming a thread that is
12605         meant to be stopped.
12606         (infrun_thread_stop_requested_callback): Delete.
12607         (infrun_thread_stop_requested): If the thread is internally
12608         stopped, queue a pending stop event and clear the thread's
12609         inline-frame state.
12610         (handle_stop_requested): New function.
12611         (handle_syscall_event, handle_inferior_event_1): Use
12612         handle_stop_requested.
12613         (handle_stop_requested): New function.
12614         (handle_signal_stop): Set the thread's stop_signal here instead of
12615         at caller.
12616         (finish_step_over): Clear step over info unconditionally.
12617         (handle_signal_stop): If the user had interrupted the event
12618         thread, consider the stop a random signal.
12619         (handle_signal_stop) <signal arrived while stepping over
12620         breakpoint>: Don't restart threads here.
12621         (stop_waiting): Don't clear step-over info here.
12622
12623 2017-03-08  Pedro Alves  <palves@redhat.com>
12624
12625         PR 21206
12626         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12627         goes to argument 2, not 1.
12628
12629 2017-03-08  Pedro Alves  <palves@redhat.com>
12630
12631         PR cli/21218
12632         * top.c (gdb_readline_wrapper): Avoid passing NULL to
12633         display_gdb_prompt.
12634         (command_line_input): Add comment.
12635
12636 2017-03-08  Pedro Alves  <palves@redhat.com>
12637
12638         PR tui/21216
12639         * tui/tui-file.c (tui_file::write): New.
12640         * tui/tui-file.h (tui_file): Override "write".
12641         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
12642         factored out from ...
12643         (tui_puts): ... here.
12644         (tui_putc): Use them.
12645         (tui_write): New function.
12646         * tui/tui-io.h (tui_write): Declare.
12647
12648 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
12649
12650         * Makefile.in (SFILES): Replace "environ.c" with
12651         "common/environ.c".
12652         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12653         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
12654         to...
12655         * common/environ.c: ... here.
12656         * environ.h: Moved to...
12657         * common/environ.h: ... here.
12658
12659 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12660
12661         * gdbarch.sh (pstring_ptr): New static function.
12662         (gdbarch_disassembler_options): Use it.
12663         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12664         not valid_disassembler_option->name.
12665         * gdbarch.c: Regenerate.
12666
12667 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12668
12669         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12670
12671 2017-03-07  Pedro Alves  <palves@redhat.com>
12672
12673         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12674
12675 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12676
12677         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12678         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12679         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
12680         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
12681
12682 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
12683
12684         * xtensa-linux-nat.c (fetch_gregs): Remove const.
12685
12686 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
12687
12688         * remote.c (remote_add_target_side_commands): Use range-based
12689         for loop.
12690
12691 2017-03-03  Yao Qi  <yao.qi@linaro.org>
12692
12693         PR gdb/21165
12694         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12695         value is lazy.
12696         * valprint.c (common_val_print): Likewise.
12697
12698 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
12699
12700         * NEWS: Mention new set/show disassembler-options commands.
12701         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12702         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12703         (prospective_options): New static variable.
12704         (gdb_disassembler::gdb_disassembler): Initialize
12705         m_di.disassembler_options.
12706         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12707         (get_disassembler_options): New function.
12708         (set_disassembler_options): Likewise.
12709         (set_disassembler_options_sfunc): Likewise.
12710         (show_disassembler_options_sfunc): Likewise.
12711         (disassembler_options_completer): Likewise.
12712         (_initialize_disasm): Likewise.
12713         * disasm.h (get_disassembler_options): New prototype.
12714         (set_disassembler_options): Likewise.
12715         * gdbarch.sh (gdbarch_disassembler_options): New variable.
12716         (gdbarch_verify_disassembler_options): Likewise.
12717         * gdbarch.c: Regenerate.
12718         * gdbarch.h: Likewise.
12719         * arm-tdep.c (num_disassembly_options): Delete.
12720         (set_disassembly_style): Likewise.
12721         (arm_disassembler_options): New static variable.
12722         (set_disassembly_style_sfunc): Convert short style name into long
12723         option name.  Call set_disassembler_options.
12724         (show_disassembly_style_sfunc): New function.
12725         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12726         set_gdbarch_verify_disassembler_options.
12727         (_initialize_arm_tdep): Delete regnames variable and update callers.
12728         (arm_disassembler_options): Initialize.
12729         (disasm_options): New variable.
12730         (num_disassembly_options): Rename from this...
12731         (num_disassembly_styles): ...to this.  Compute by scanning through
12732         disasm_options.
12733         (valid_disassembly_styles): Initialize using disasm_options.
12734         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12735         set_arm_regname_option.
12736         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12737         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12738         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12739         set_gdbarch_verify_disassembler_options.
12740         * s390-tdep.c (s390_disassembler_options): New static variable.
12741         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12742         set_gdbarch_verify_disassembler_options.
12743
12744 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12745
12746         * remote.c (remote_add_target_side_condition): Remove "struct"
12747         keyword from range-based for loop.
12748
12749 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12750
12751         * remote.c (remote_add_target_side_condition): Use range-based
12752         for loop.  Update comment.
12753
12754 2017-02-27  Yao Qi  <yao.qi@linaro.org>
12755
12756         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12757
12758 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
12759
12760         * regcache.c (regcache_raw_update): New function.
12761         (regcache_raw_read): Move code to regcache_raw_update.
12762         * regcache.h (regcache_raw_update): New declaration.
12763         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12764
12765 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
12766
12767         * dwarf2read.c (create_debug_type_hash_table): Initialize
12768         header.signature and header.type_offset_in_tu.
12769
12770 2017-02-24  Pedro Alves  <palves@redhat.com>
12771
12772         * symtab.c (make_file_symbol_completion_list_1): Use
12773         add_symtab_completions.
12774
12775 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12776
12777         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12778
12779 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12780
12781         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12782         I386_MAX_REGISTER_SIZE.
12783         (i386_pseudo_register_write): Likewise.
12784         (i386_process_record): Likewise.
12785         * i387-tdep.c (i387_supply_xsave): Likewise.
12786         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12787         (store_register): Likewise.
12788
12789 2017-02-23  Pedro Alves  <palves@redhat.com>
12790
12791         * ada-lang.c: Include "common/function-view.h".
12792         (ada_iterate_over_symbols): Adjust to use function_view as
12793         callback type.
12794         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12795         (ada_make_symbol_completion_list): Use a lambda.
12796         (ada_exc_search_name_matches): Delete.
12797         (name_matches_regex): New.
12798         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12799         * compile/compile-c-support.c: Include "common/function-view.h".
12800         (print_one_macro): Change prototype to accept a ui_file pointer.
12801         (write_macro_definitions): Use a lambda.
12802         * dwarf2read.c: Include "common/function-view.h".
12803         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12804         (dw2_expand_symtabs_matching): Adjust to use function_view as
12805         callback type.
12806         * language.h: Include "common/function-view.h".
12807         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12808         function_view as callback type.
12809         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12810         * linespec.c: Include "common/function-view.h".
12811         (collect_info::add_symbol): New method.
12812         (struct symbol_and_data_callback, iterate_inline_only, struct
12813         symbol_matcher_data, iterate_name_matcher): Delete.
12814         (iterate_over_all_matching_symtabs): Adjust to use function_view
12815         as callback type and lambdas.
12816         (iterate_over_file_blocks): Adjust to use function_view as
12817         callback type.
12818         (decode_compound_collector): Now a class with private fields.
12819         (decode_compound_collector::release_symbols): New method.
12820         (collect_one_symbol): Rename to...
12821         (decode_compound_collector::operator()): ... this and adjust.
12822         (lookup_prefix_sym): decode_compound_collector construction bits
12823         move to decode_compound_collector ctor.  Pass the
12824         decode_compound_collector object directly as callback.  Remove
12825         cleanups and use decode_compound_collector::release_symbols
12826         instead.
12827         (symtab_collector): Now a class with private fields.
12828         (symtab_collector::release_symtabs): New method.
12829         (add_symtabs_to_list): Rename to...
12830         (symtab_collector::operator()): ... this and adjust.
12831         (collect_symtabs_from_filename): symtab_collector construction
12832         bits move to symtab_collector ctor.  Pass the symtab_collector
12833         object directly as callback.  Remove cleanups and use
12834         symtab_collector::release_symtabs instead.
12835         (collect_symbols): Delete.
12836         (add_matching_symbols_to_info): Use lambdas.
12837         * macrocmd.c (print_macro_callback): Delete.
12838         (info_macro_command): Use a lambda.
12839         (info_macros_command): Pass print_macro_definition as callable
12840         directly.
12841         (print_one_macro): Remove 'ignore' parameter.
12842         (macro_list_command): Adjust.
12843         * macrotab.c (macro_for_each_data::fn): Now a function_view.
12844         (macro_for_each_data::user_data): Delete field.
12845         (foreach_macro): Adjust to call the function_view.
12846         (macro_for_each): Adjust to use function_view as callback type.
12847         (foreach_macro_in_scope): Adjust to call the function_view.
12848         (macro_for_each_in_scope): Adjust to use function_view as callback
12849         type.
12850         * macrotab.h: Include "common/function-view.h".
12851         (macro_callback_fn): Declare a prototype instead of a pointer.
12852         Remove "user_data" parameter.
12853         (macro_for_each, macro_for_each_in_scope): Adjust to use
12854         function_view as callback type.
12855         * psymtab.c (partial_map_expand_apply)
12856         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12857         Adjust to use function_view as callback type and to return bool.
12858         (psym_expand_symtabs_matching): Adjust to use function_view as
12859         callback types.
12860         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12861         to use function_view as callback type and to return bool.
12862         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12863         callback types.
12864         * symfile.c (expand_symtabs_matching): Adjust to use function_view
12865         as callback types.
12866         * symfile.h: Include "common/function-view.h".
12867         (expand_symtabs_file_matcher_ftype)
12868         (expand_symtabs_symbol_matcher_ftype)
12869         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12870         return bool.
12871         (quick_symbol_functions::map_symtabs_matching_filename)
12872         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12873         function_view as callback type and return bool.
12874         (expand_symtabs_matching): Adjust to use function_view as callback
12875         type.
12876         (maintenance_expand_name_matcher)
12877         (maintenance_expand_file_matcher): Delete.
12878         (maintenance_expand_symtabs): Use lambdas.
12879         * symtab.c (iterate_over_some_symtabs): Adjust to use
12880         function_view as callback types and return bool.
12881         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
12882         of a cleanup.
12883         (lookup_symtab_callback): Delete.
12884         (lookup_symtab): Use a lambda.
12885         (iterate_over_symbols): Adjust to use function_view as callback
12886         type.
12887         (struct search_symbols_data, search_symbols_file_matches)
12888         (search_symbols_name_matches): Delete.
12889         (search_symbols): Use a pair of lambdas.
12890         (struct add_name_data, add_macro_name, symbol_completion_matcher)
12891         (symtab_expansion_callback): Delete.
12892         (default_make_symbol_completion_list_break_on_1): Use lambdas.
12893         * symtab.h: Include "common/function-view.h".
12894         (iterate_over_some_symtabs): Adjust to use function_view as
12895         callback type and return bool.
12896         (iterate_over_symtabs): Adjust to use function_view as callback
12897         type.
12898         (symbol_found_callback_ftype): Remove 'data' parameter and return
12899         bool.
12900         (iterate_over_symbols): Adjust to use function_view as callback
12901         type.
12902
12903 2017-02-23  Pedro Alves  <palves@redhat.com>
12904
12905         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12906         (%.o) <unittests/%.c>: New pattern.
12907         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12908         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12909         * common/function-view.h: New file.
12910         * unittests/function-view-selftests.c: New file.
12911         * configure: Regenerate.
12912
12913 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
12914
12915         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12916         inferior_ptid.
12917         * go32-nat.c (go32_thread_alive): Likewise.
12918
12919 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12920
12921         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12922         delete.
12923
12924 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12925
12926         * varobj.c (varobj_clear_saved_item): Use delete instead of
12927         xfree.
12928         (update_dynamic_varobj_children): Likewise.
12929
12930 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12931
12932         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12933
12934 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
12935
12936         * common/enum-flags.h (enum_flags::enum_flags): Initialize
12937         m_enum_value to 0 in default constructor.
12938
12939 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
12940
12941         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12942         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12943         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12944         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12945         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12946         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12947         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12948         IS_STORE_CONDITIONAL_INSN.
12949
12950 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12951
12952         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12953
12954 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12955
12956         * NEWS (Changes since GDB 7.12): Add DWARF-5.
12957
12958 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12959
12960         * dwarf2read.c (skip_one_die, read_attribute_value)
12961         (dwarf2_const_value_attr, dump_die_shallow)
12962         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12963         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12964
12965 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12966
12967         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12968         (dwarf_parse_macro_header): Accept DWARF version 5.
12969         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12970
12971 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12972
12973         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12974         DW_AT_GNU_*.
12975         * common/common-exceptions.h (enum errors): Likewise.
12976         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12977         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12978         (dwarf_expr_context::execute_stack_op): Likewise.
12979         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12980         Likewise.
12981         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12982         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12983         (show_entry_values_debug, call_site_to_target_addr)
12984         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12985         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12986         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12987         (value_of_dwarf_block_entry, indirect_pieced_value)
12988         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12989         (disassemble_dwarf_expression): Likewise.
12990         * dwarf2read.c (process_die, inherit_abstract_dies)
12991         (read_call_site_scope): Likewise.
12992         * gdbtypes.h (struct func_type, struct call_site_parameter)
12993         (struct call_site): Likewise.
12994         * stack.c (read_frame_arg): Likewise.
12995         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12996
12997 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12998
12999         * defs.h (read_unsigned_leb128): New declaration.
13000         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
13001         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
13002         (dwarf2_find_location_expression): Call also
13003         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
13004         * dwarf2loc.h (dwarf2_version): New declaration.
13005         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
13006         rnglists.
13007         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
13008         .debug_rnglists.
13009         (struct dwop_section_names): Add loclists_dwo.
13010         (dwop_section_names): Add .debug_loclists.dwo.
13011         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
13012         (struct dwarf2_per_cu_data): Add dwarf_version.
13013         (struct dwo_sections): Add loclists.
13014         (struct attr_abbrev): Add implicit_const.
13015         (read_indirect_line_string): New declaration.
13016         (read_unsigned_leb128): Delete declaration.
13017         (rcuh_kind): New definition.
13018         (read_and_check_comp_unit_head): Change parameter
13019         is_debug_types_section to section_kind.
13020         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
13021         (read_comp_unit_head): Change parameter abfd to section, add parameter
13022         section_kind.  Handle DWARF-5.
13023         (error_check_comp_unit_head): Accept also DWARF version 5.
13024         (read_and_check_comp_unit_head): Change parameter
13025         is_debug_types_section to section_kind.
13026         (read_and_check_type_unit_head): Delete function.
13027         (read_abbrev_offset): Handle DWARF-5.
13028         (create_debug_type_hash_table): Add parameter section_kind.  Process
13029         only DW_UT_type.  Use signature and type_offset_in_tu from struct
13030         comp_unit_head.
13031         (create_debug_types_hash_table): Update create_debug_type_hash_table
13032         caller.
13033         (create_all_type_units): Call create_debug_type_hash_table.
13034         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
13035         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13036         caller.
13037         (skip_one_die): Handle DW_FORM_implicit_const.
13038         (dwarf2_rnglists_process): New function.
13039         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13040         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13041         (read_attribute_value): Handle DW_FORM_implicit_const,
13042         DW_FORM_line_strp.
13043         (read_attribute): Handle DW_FORM_implicit_const.
13044         (read_indirect_string_at_offset_from): New function from
13045         read_indirect_string_at_offset.
13046         (read_indirect_string_at_offset): Call
13047         read_indirect_string_at_offset_from.
13048         (read_indirect_line_string_at_offset): New function.
13049         (read_indirect_string): New function comment.
13050         (read_indirect_line_string): New function.
13051         (read_unsigned_leb128): Make it global.
13052         (dwarf2_string_attr): Handle DWARF-5.
13053         (add_include_dir_stub, read_formatted_entries): New functions.
13054         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13055         Handle DWARF-5.
13056         (per_cu_header_read_in): Update read_comp_unit_head caller.
13057         (dwarf2_version): New function.
13058         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13059         rnglists.
13060         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13061         fields.
13062
13063 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13064
13065         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13066
13067 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13068
13069         * dwarf2read.c (dwarf2_ranges_process): New function from
13070         dwarf2_ranges_read.
13071         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13072         dwarf2_ranges_process.
13073
13074 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13075
13076         * dwarf2read.c (create_debug_type_hash_table): New function from
13077         create_debug_types_hash_table.
13078         (create_debug_types_hash_table): Call create_debug_type_hash_table.
13079         (create_all_type_units, open_and_init_dwo_file): Update
13080         create_debug_types_hash_table callers.
13081
13082 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13083
13084         PR gdb/16188
13085         * fork-child.c (trace_start_error): Fix thinko.  va_end should
13086         refer to 'ap', not 'args'.
13087
13088 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13089             Pedro Alves  <palves@redhat.com>
13090
13091         PR gdb/16188
13092         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13093         calls succeeded.
13094         * fork-child.c (trace_start_error): New function.
13095         (trace_start_error_with_name): Likewise.
13096         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13097         * inf-ptrace.c (inf_ptrace_me): Likewise.
13098         * inferior.h (trace_start_error): New prototype.
13099         (trace_start_error_with_name): Likewise.
13100
13101 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
13102
13103         PR gdb/21164
13104         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13105         NULL before using it.
13106         * symmisc.c (maintenance_print_symbols): Likewise.
13107         (maintenance_print_msymbols): Likewise.
13108
13109 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13110
13111         * NEWS: Add record Python bindings entry.
13112
13113 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13114
13115         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13116         py-record-full.o.
13117         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13118         * python/py-record-btrace.c, python/py-record-btrace.h,
13119         python/py-record-full.c, python/py-record-full.h: New file.
13120         * python/py-record.c: Add include for py-record-btrace.h and
13121         py-record-full.h.
13122         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13123         recpy_instruction_history, recpy_function_call_history, recpy_begin,
13124         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13125         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13126         New definition.
13127         (gdbpy_initialize_btrace): New export.
13128         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13129
13130 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13131
13132         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13133         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13134         * python/py-record.c: New file.
13135         * python/python-internal.h (gdbpy_start_recording,
13136         gdbpy_current_recording, gdpy_stop_recording,
13137         gdbpy_initialize_record): New export.
13138         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13139         (python_GdbMethods): Add gdbpy_start_recording,
13140         gdbpy_current_recording and gdbpy_stop_recording.
13141
13142 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13143
13144         * record-btrace.c (record_btrace_record_method): New function.
13145         (init_record_btrace_ops): Initialize to_record_method.
13146         * record-full.c (record_full_record_method): New function.
13147         (init_record_full_ops, init_record_full_core_ops): Add
13148         record_full_record_method.
13149         * record.h (enum record_method): New enum.
13150         * target-debug.h (target_debug_print_enum_record_method: New define.
13151         * target-delegates.c: Regenerate.
13152         * target.c (target_record_method): New function.
13153         * target.h: Include record.h.
13154         (struct target_ops) <to_record_method>: New field.
13155         (target_record_method): New export.
13156
13157 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13158
13159         * record.h (record_start, record_stop): New export.
13160         * record.c (record_start, record_stop): New function.
13161
13162 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13163
13164         * btrace.c (btrace_fetch): Copy function call segments pointer
13165         into a vector.
13166         (btrace_clear): Clear the vector.
13167         (btrace_find_insn_by_number): Use binary search to find the correct
13168         function call segment.
13169         * btrace.h (brace_fun_p): New typedef.
13170         (struct btrace_thread_info) <functions>: New field.
13171
13172 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13173
13174         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
13175         * btrace.c (btrace_decode_error): ... here.  New function.
13176         * btrace.h (btrace_decode_error): New export.
13177
13178 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13179
13180         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
13181         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
13182         btrace_find_insn_by_number): Remove special case for gaps.
13183         * btrace.h (btrace_insn_get_error): New export.
13184         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
13185         * record-btrace.c (btrace_insn_history): Print number for gaps.
13186         (record_btrace_info, record_btrace_goto): Handle gaps.
13187
13188 2017-02-14  Tom Tromey  <tom@tromey.com>
13189
13190         PR python/13598:
13191         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
13192         event.
13193         * python/py-evts.c (gdbpy_initialize_py_events): Add
13194         before_prompt registry.
13195         * python/py-events.h (events_object) <before_prompt>: New field.
13196
13197 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
13198
13199         * btrace.c (ftrace_new_switch): Preserve up link and flags.
13200
13201 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
13202
13203         * symfile (_initialize_symfile): Add usage text to the load command's
13204         help text.
13205
13206 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
13207
13208         * utils.c (defaulted_query): Don't query on secondary UIs.
13209
13210 2017-02-10  Tom Tromey  <tom@tromey.com>
13211
13212         * rust-lang.c (rust_get_disr_info): Remove unused variable.
13213
13214 2017-02-10  Tom Tromey  <tom@tromey.com>
13215
13216         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
13217         "cleanup" local.
13218         * python/py-type.c (typy_legacy_template_argument): Remove
13219         unnecessary "cleanup" local.
13220
13221 2017-02-10  Tom Tromey  <tom@tromey.com>
13222
13223         * python/python.c (do_start_initialization): New function, from
13224         _initialize_python.
13225         (_initialize_python): Call do_start_initialization.
13226         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
13227         goto.
13228
13229 2017-02-10  Tom Tromey  <tom@tromey.com>
13230
13231         * python/py-prettyprint.c (pretty_print_one_value): Use
13232         gdbpy_ref.
13233
13234 2017-02-10  Tom Tromey  <tom@tromey.com>
13235
13236         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
13237         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
13238         gdbpy_ref.
13239         * python/py-type.c (field_new): Use gdbpy_ref.
13240         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
13241         gdbpy_ref.
13242         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
13243         (py_free_pspace): Likewise.
13244         (pspace_to_pspace_object): Likewise.
13245         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
13246         (py_free_objfile): Likewise.
13247         (objfile_to_objfile_object): Likewise.
13248         * python/py-inferior.c (delete_thread_object): Use
13249         gdbpy_ref.
13250         (infpy_read_memory): Likewise.
13251         (py_free_inferior): Likewise.
13252         * python/py-evtregistry.c (create_eventregistry_object): Use
13253         gdbpy_ref.
13254         * python/py-event.c (create_event_object): Use gdbpy_ref.
13255
13256 2017-02-10  Tom Tromey  <tom@tromey.com>
13257
13258         * python/py-ref.h (gdbpy_ref_policy): Now a template.
13259         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
13260         used.
13261         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
13262         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
13263         python/py-exitedevent.c, python/py-finishbreakpoint.c,
13264         python/py-framefilter.c, python/py-function.c,
13265         python/py-inferior.c, python/py-infevents.c,
13266         python/py-linetable.c, python/py-newobjfileevent.c,
13267         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
13268         python/py-signalevent.c, python/py-stopevent.c,
13269         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
13270         python/py-unwind.c, python/py-utils.c, python/py-value.c,
13271         python/py-varobj.c, python/py-xmethods.c, python/python.c,
13272         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
13273
13274 2017-02-10  Tom Tromey  <tom@tromey.com>
13275
13276         * ui-out.h (ui_out_emit_type): New class.
13277         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
13278         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
13279         and ui_out_emit_tuple.
13280         (enumerate_locals): Likewise.
13281         (py_mi_print_variables, py_print_locals, py_print_args): Use
13282         ui_out_emit_list.
13283         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
13284         ui_out_emit_list.
13285         * common/gdb_optional.h: New file.
13286
13287 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
13288
13289         * MAINTAINERS (Write After Approval): Update my e-mail address.
13290
13291 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
13292
13293         PR gdb/21122
13294         * breakpoint.c (_initialize_breakpoint): Update the help description
13295         of the 'commands' command to indicate that it takes a list argument.
13296
13297 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
13298
13299         * interps.c (current_interp_set_logging): Remove "return".
13300
13301 2017-02-09  Gary Benson  <gbenson@redhat.com>
13302
13303         * symtab.c (add_symtab_completions): Prevent NULL pointer
13304         dereference.
13305
13306 2017-02-08  Pedro Alves  <palves@redhat.com>
13307
13308         * interps.c (interp::interp): Remove reference to quiet_p.
13309         (interp_set): Make static.  Remove dead "Switching to" output
13310         code.
13311         (interp_quiet_p, interp_set_quiet): Delete.
13312         (interpreter_exec_cmd): Don't set the interpreter quiet.
13313         * interps.h (interp_quiet_p): Make static.
13314         (class interp) <quiet_p>: Remove field
13315
13316 2017-02-08  Jerome Guitton  <guitton@adacore.com>
13317
13318         * cli/cli-decode.c (find_command_name_length): Make it extern.
13319         * cli/cli-decode.h (find_command_name_length): Declare.
13320         * cli/cli-script.c (command_name_equals, line_first_arg):
13321         New functions.
13322         (process_next_line): Use cli-decode to parse command names.
13323         (build_command_line): Make args a constant pointer.
13324
13325 2017-02-08  Jerome Guitton  <guitton@adacore.com>
13326
13327         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
13328         Remove case-insensitive search.
13329
13330 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13331
13332         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
13333         at the end of the line.  Avoids an ARI warning.
13334
13335 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
13336
13337         * NEWS: Mention support for record/replay of Intel 64 rdrand and
13338         rdseed instructions.
13339         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
13340
13341 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
13342
13343         PR tdep/20936
13344         Provide and use sparc32 and sparc64 target description XML files.
13345         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
13346         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
13347         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
13348         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
13349         * features/sparc/sparc32-solaris.xml: New file.
13350         * features/sparc/sparc64-solaris.xml: New file.
13351         * features/sparc/sparc32-solaris.c: Generated.
13352         * features/sparc/sparc64-solaris.c: Generated.
13353         * sparc-tdep.h: Account for differences in target descriptions.
13354         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
13355         (sparc32_register_type): Use target provided registers.
13356         (validate_tdesc_registers): New function.
13357         (sparc32_gdbarch_init): Use tdesc_has_registers.
13358         Set pseudoregister functions.
13359         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
13360         (sparc64_register_type): Use target provided registers.
13361         (sparc64_init_abi): Set pseudoregister functions.
13362
13363 2017-02-03  Tom Tromey  <tom@tromey.com>
13364
13365         PR rust/21097:
13366         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
13367         with a single member.
13368
13369 2017-02-03  Pedro Alves  <palves@redhat.com>
13370
13371         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
13372         (cli_interp_base::~cli_interp_base): New.
13373         (cli_interp): New struct.
13374         (as_cli_interp): Cast the interp itself to cli_interp.
13375         (cli_interpreter_pre_command_loop): Rename to ...
13376         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
13377         parameter.
13378         (cli_interpreter_init): Rename to ...
13379         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
13380         boolean.  Make extern.
13381         (cli_interpreter_resume): Rename to ...
13382         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
13383         extern.
13384         (cli_interpreter_suspend): Rename to ...
13385         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
13386         extern.
13387         (cli_interpreter_exec): Rename to ...
13388         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
13389         extern.
13390         (cli_interpreter_supports_command_editing): Rename to ...
13391         (cli_interp_base::supports_command_editing): ... this.  Remove
13392         'interp' parameter.  Make extern.
13393         (cli_ui_out): Rename to ...
13394         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
13395         Make extern.
13396         (cli_set_logging): Rename to ...
13397         (cli_interp_base::set_logging): ... this.  Remove 'interp'
13398         parameter.  Make extern.
13399         (cli_interp_procs): Delete.
13400         (cli_interp_factory): Adjust to use "new".
13401         * cli/cli-interp.h: Include "interps.h".
13402         (struct cli_interp_base): New struct.
13403         * interps.c (struct interp): Delete.  Fields moved to interps.h.
13404         (interp_new): Delete.
13405         (interp::interp, interp::~interp): New.
13406         (interp_set): Use bool, and return void.  Assume the interpreter
13407         has suspend, init and resume methods, and that the all return
13408         void.
13409         (set_top_level_interpreter): interp_set returns void.
13410         (interp_ui_out): Adapt.
13411         (current_interp_set_logging): Adapt.
13412         (interp_data): Delete.
13413         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
13414         (interp_exec): Adapt.
13415         (top_level_interpreter_data): Delete.
13416         * interps.h (interp_init_ftype, interp_resume_ftype)
13417         (interp_suspend_ftype, interp_exec_ftype)
13418         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
13419         (class interp): New.
13420         (interp_new): Delete.
13421         (interp_set): Now returns void.  Use bool.
13422         (interp_data, top_level_interpreter_data): Delete.
13423         * mi/mi-common.h: Include interps.h.
13424         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
13425         init, resume, suspect, exec, interp_ui_out, set_logging and
13426         pre_command_loop methods.
13427         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
13428         (mi_interpreter_init): Rename to ...
13429         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
13430         bool, return void and make extern.  Adjust.
13431         (mi_interpreter_resume): ... Rename to ...
13432         (mi_interp::resume): ... this.  Remove the 'data' parameter,
13433         return void and make extern.  Adjust.
13434         (mi_interpreter_suspend): ... Rename to ...
13435         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
13436         return void and make extern.  Adjust.
13437         (mi_interpreter_exec): ... Rename to ...
13438         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
13439         extern.  Adjust.
13440         (mi_interpreter_pre_command_loop): ... Rename to ...
13441         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
13442         parameter and make extern.
13443         (mi_on_normal_stop_1): Adjust.
13444         (mi_ui_out): Rename to ...
13445         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
13446         parameter and make extern.  Adjust.
13447         (mi_set_logging): Rename to ...
13448         (mi_interp::set_logging): ... this.  Remove the 'interp'
13449         parameter and make extern.  Adjust.
13450         (mi_interp_procs): Delete.
13451         (mi_interp_factory): Adjust to use 'new'.
13452         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
13453         (mi_print_exception, mi_execute_command, mi_load_progress):
13454         Adjust.
13455         * tui/tui-interp.c (tui_interp): New class.
13456         (as_tui_interp): Return a tui_interp pointer.
13457         (tui_on_normal_stop, tui_on_signal_received)
13458         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
13459         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
13460         to use interp::interp_ui_out.
13461         (tui_init): Rename to ...
13462         (tui_interp::init): ... this.  Remove the 'self' parameter, use
13463         bool, return void and make extern.  Adjust.
13464         (tui_resume): Rename to ...
13465         (tui_interp::resume): ... this.  Remove the 'data' parameter,
13466         return void and make extern.  Adjust.
13467         (tui_suspend): Rename to ...
13468         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
13469         return void and make extern.  Adjust.
13470         (tui_ui_out): Rename to ...
13471         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
13472         parameter, and make extern.  Adjust.
13473         (tui_exec): Rename to ...
13474         (tui_interp::exec): ... this.  Remove the 'data' parameter and
13475         make extern.
13476         (tui_interp_procs): Delete.
13477         (tui_interp_factory): Use "new".
13478
13479 2017-02-02  Tom Tromey  <tom@tromey.com>
13480
13481         * rust-exp.y (ends_raw_string, space_then_number)
13482         (rust_identifier_start_p): Return bool.
13483         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
13484         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
13485         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
13486         (rust_chartype_p): Return bool.
13487         (val_print_struct, rust_print_struct_def, rust_print_type):
13488         Update.
13489         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
13490         Return bool.
13491
13492 2017-02-02  Tom Tromey  <tom@tromey.com>
13493
13494         * rust-lang.c: Reindent.
13495
13496 2017-02-02  Tom Tromey  <tom@tromey.com>
13497
13498         * rust-lang.h (rust_crate_for_block): Update.
13499         * rust-lang.c (rust_crate_for_block): Return std::string.
13500         (rust_get_disr_info): Use std:;string, not
13501         gdb::unique_xmalloc_ptr.
13502         * rust-exp.y (crate_name): Update.
13503
13504 2017-02-02  Pedro Alves  <palves@redhat.com>
13505
13506         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
13507         field out of gdb_disassembler_test and make it static.
13508
13509 2017-02-02  Pedro Alves  <palves@redhat.com>
13510
13511         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
13512         mi1_interp and mi_interp fields.
13513
13514 2017-02-02  Pedro Alves  <palves@redhat.com>
13515
13516         * cli/cli-interp.c (struct saved_output_files, saved_output):
13517         Moved from cli/cli-logging.c.
13518         (cli_set_logging): New function.
13519         (cli_interp_procs): Install cli_set_logging.
13520         * cli/cli-interp.h (make_logging_output, cli_set_logging):
13521         Declare.
13522         * cli/cli-logging.c (struct saved_output_files, saved_output):
13523         Moved to cli/cli-interp.c.
13524         (pop_output_files): Don't save outputs here.
13525         (make_logging_output): New function.
13526         (handle_redirections): Don't build tee nor save previous outputs
13527         here.
13528         * interps.c (current_interp_set_logging): Change prototype.
13529         Assume there's always a set_logging_proc method installed.
13530         * interps.h (interp_set_logging_ftype): Change prototype.
13531         (current_interp_set_logging): Change prototype and adjust comment.
13532         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
13533         use make_logging_output.
13534         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
13535 2017-02-02  Pedro Alves  <palves@redhat.com>
13536
13537         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
13538         from ...
13539         (set_logging_overwrite): ... here.
13540         (logging_no_redirect_file): Delete.
13541         (set_logging_redirect): Don't handle redirection on the fly.
13542         Instead warn that "logging off" / "logging on" is necessary.
13543         (pop_output_files): Delete references to logging_no_redirect_file.
13544         (show_logging_command): Always speak in terms of what will happen
13545         once logging is reenabled.
13546
13547 2017-02-02  Pedro Alves  <palves@redhat.com>
13548
13549         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
13550
13551 2017-02-02  Pedro Alves  <palves@redhat.com>
13552
13553         * disasm.c (gdb_pretty_print_insn): Rename to ...
13554         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
13555         Remove gdbarch parameter.  Adapt to clear the object's buffers
13556         instead of allocating new buffers, and to print using the object's
13557         gdb_disassembler instead of calling gdb_print_insn.
13558         (dump_insns): Use gdb_pretty_print_disassembler.
13559         * disasm.h (gdb_pretty_print_insn): Delete declaration.
13560         (gdb_pretty_print_disassembler): New class.
13561         * record-btrace.c (btrace_insn_history): Use
13562         gdb_pretty_print_disassembler.
13563
13564 2017-02-02  Pedro Alves  <palves@redhat.com>
13565
13566         * ada-lang.c (type_as_string): Use string_file.
13567         * ada-valprint.c (ada_print_floating): Use string_file.
13568         * ada-varobj.c (ada_varobj_scalar_image)
13569         (ada_varobj_get_value_image): Use string_file.
13570         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
13571         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
13572         * breakpoint.c (update_inserted_breakpoint_locations)
13573         (insert_breakpoint_locations, reattach_breakpoints)
13574         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
13575         (print_it_watchpoint): Use string_file.
13576         (save_breakpoints): Use stdio_file.
13577         * c-exp.y (oper): Use string_file.
13578         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
13579         tee_file.
13580         (pop_output_files): Use delete.
13581         (handle_redirections): Use stdio_file and tee_file.
13582         * cli/cli-setshow.c (do_show_command): Use string_file.
13583         * compile/compile-c-support.c (c_compute_program): Use
13584         string_file.
13585         * compile/compile-c-symbols.c (generate_vla_size): Take a
13586         'string_file &' instead of a 'ui_file *'.
13587         (generate_c_for_for_one_variable): Take a 'string_file &' instead
13588         of a 'ui_file *'.  Use string_file.
13589         (generate_c_for_variable_locations): Take a 'string_file &'
13590         instead of a 'ui_file *'.
13591         * compile/compile-internal.h (generate_c_for_for_one_variable):
13592         Take a 'string_file &' instead of a 'ui_file *'.
13593         * compile/compile-loc2c.c (push, pushf, unary, binary)
13594         (print_label, pushf_register_address, pushf_register)
13595         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
13596         'ui_file *'.  Adjust.
13597         * compile/compile.c (compile_to_object): Use string_file.
13598         * compile/compile.h (compile_dwarf_expr_to_c)
13599         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
13600         'ui_file *'.
13601         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
13602         (replace_typedefs_qualified_name): Use string_file and
13603         obstack_copy0.
13604         * disasm.c (gdb_pretty_print_insn): Use string_file.
13605         (gdb_disassembly): Adjust reference the null_stream global.
13606         (do_ui_file_delete): Delete.
13607         (gdb_insn_length): Use null_stream.
13608         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
13609         * dwarf2loc.c (dwarf2_compile_property_to_c)
13610         (locexpr_generate_c_location, loclist_generate_c_location): Take a
13611         'string_file &' instead of a 'ui_file *'.
13612         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
13613         * dwarf2read.c (do_ui_file_peek_last): Delete.
13614         (dwarf2_compute_name): Use string_file.
13615         * event-top.c (gdb_setup_readline): Use stdio_file.
13616         * gdbarch.sh (verify_gdbarch): Use string_file.
13617         * gdbtypes.c (safe_parse_type): Use null_stream.
13618         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
13619         string_file.
13620         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
13621         'string_file *' instead of a 'ui_file *'.
13622         (gdbscm_arch_disassemble): Use string_file.
13623         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
13624         * guile/scm-ports.c (class ioscm_file_port): Now a class that
13625         inherits from ui_file.
13626         (ioscm_file_port_delete, ioscm_file_port_rewind)
13627         (ioscm_file_port_put): Delete.
13628         (ioscm_file_port_write): Rename to ...
13629         (ioscm_file_port::write): ... this.  Remove file_port_magic
13630         checks.
13631         (ioscm_file_port_new): Delete.
13632         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13633         ui_file_up.
13634         * guile/scm-type.c (tyscm_type_name): Use string_file.
13635         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
13636         Use string_file.
13637         * infcmd.c (print_return_value_1): Use string_file.
13638         * infrun.c (print_target_wait_results): Use string_file.
13639         * language.c (add_language): Use string_file.
13640         * location.c (explicit_to_string_internal): Use string_file.
13641         * main.c (captured_main_1): Use null_file.
13642         * maint.c (maintenance_print_architecture): Use stdio_file.
13643         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13644         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13645         event_channel>: Change type to mi_console_file pointer.
13646         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13647         (mi_console_file_delete): Delete.
13648         (struct mi_console_file): Delete.
13649         (mi_console_file_magic): Delete.
13650         (mi_console_file_new): Delete.
13651         (mi_console_file::mi_console_file): New.
13652         (mi_console_file_delete): Delete.
13653         (mi_console_file_fputs): Delete.
13654         (mi_console_file::write): New.
13655         (mi_console_raw_packet): Delete.
13656         (mi_console_file::flush): New.
13657         (mi_console_file_flush): Delete.
13658         (mi_console_set_raw): Rename to ...
13659         (mi_console_file::set_raw): ... this.
13660         * mi/mi-console.h (class mi_console_file): New class.
13661         (mi_console_file_new, mi_console_set_raw): Delete.
13662         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13663         (mi_set_logging): Use delete and tee_file.  Adjust.
13664         * mi/mi-main.c (output_register): Use string_file.
13665         (mi_cmd_data_evaluate_expression): Use string_file.
13666         (mi_cmd_data_read_memory): Use string_file.
13667         (mi_cmd_execute, print_variable_or_computed): Use string_file.
13668         * mi/mi-out.c (mi_ui_out::main_stream): New.
13669         (mi_ui_out::rewind): Use main_stream and
13670         string_file.
13671         (mi_ui_out::put): Use main_stream and string_file.
13672         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13673         Allocate a 'string_file' instead.
13674         (mi_out_new): Don't allocate a mem_fileopen stream here.
13675         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13676         (mi_ui_out::main_stream): Declare method.
13677         * printcmd.c (eval_command): Use string_file.
13678         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13679         * python/py-arch.c (archpy_disassemble): Use string_file.
13680         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13681         * python/py-frame.c (frapy_str): Use string_file.
13682         * python/py-framefilter.c (py_print_type, py_print_single_arg):
13683         Use string_file.
13684         * python/py-type.c (typy_str): Use string_file.
13685         * python/py-unwind.c (unwind_infopy_str): Use string_file.
13686         * python/py-value.c (valpy_str): Use string_file.
13687         * record-btrace.c (btrace_insn_history): Use string_file.
13688         * regcache.c (regcache_print): Use stdio_file.
13689         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13690         * remote.c (escape_buffer): Use string_file.
13691         * rust-lang.c (rust_get_disr_info): Use string_file.
13692         * serial.c (serial_open_ops_1): Use stdio_file.
13693         (do_serial_close): Use delete.
13694         * stack.c (print_frame_arg): Use string_file.
13695         (print_frame_args): Remove local mem_fileopen stream, not used.
13696         (print_frame): Use string_file.
13697         * symmisc.c (maintenance_print_symbols): Use stdio_file.
13698         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13699         Take a 'string_file *' instead of a 'ui_file *'.
13700         * top.c (new_ui): Use stdio_file and stderr_file.
13701         (free_ui): Use delete.
13702         (execute_command_to_string): Use string_file.
13703         (quit_confirm): Use string_file.
13704         * tracepoint.c (collection_list::append_exp): Use string_file.
13705         * tui/tui-disasm.c (tui_disassemble): Use string_file.
13706         * tui/tui-file.c: Don't include "ui-file.h".
13707         (enum streamtype, struct tui_stream): Delete.
13708         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13709         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13710         (tui_file::tui_file): New method.
13711         (tui_file_fputs): Delete.
13712         (tui_file_get_strbuf): Delete.
13713         (tui_file::puts): New method.
13714         (tui_file_adjust_strbuf): Delete.
13715         (tui_file_flush): Delete.
13716         (tui_file::flush): New method.
13717         * tui/tui-file.h: Tweak intro comment.
13718         Include ui-file.h.
13719         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13720         (tui_file_adjust_strbuf): Delete declarations.
13721         (class tui_file): New class.
13722         * tui/tui-io.c (tui_initialize_io): Use tui_file.
13723         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13724         (tui_register_format): Use string_stream.
13725         * tui/tui-stack.c (tui_make_status_line): Use string_file.
13726         (tui_get_function_from_frame): Use string_file.
13727         * typeprint.c (type_to_string): Use string_file.
13728         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13729         (null_stream): New global.
13730         (ui_file_delete): Delete.
13731         (ui_file::ui_file): New.
13732         (null_file_isatty): Delete.
13733         (ui_file::~ui_file): New.
13734         (null_file_rewind): Delete.
13735         (ui_file::printf): New.
13736         (null_file_put): Delete.
13737         (null_file_flush): Delete.
13738         (ui_file::putstr): New.
13739         (null_file_write): Delete.
13740         (ui_file::putstrn): New.
13741         (null_file_read): Delete.
13742         (ui_file::putc): New.
13743         (null_file_fputs): Delete.
13744         (null_file_write_async_safe): Delete.
13745         (ui_file::vprintf): New.
13746         (null_file_delete): Delete.
13747         (null_file::write): New.
13748         (null_file_fseek): Delete.
13749         (null_file::puts): New.
13750         (ui_file_data): Delete.
13751         (null_file::write_async_safe): New.
13752         (gdb_flush, ui_file_isatty): Adjust.
13753         (ui_file_put, ui_file_rewind): Delete.
13754         (ui_file_write): Adjust.
13755         (ui_file_write_for_put): Delete.
13756         (ui_file_write_async_safe, ui_file_read): Adjust.
13757         (ui_file_fseek): Delete.
13758         (fputs_unfiltered): Adjust.
13759         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13760         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13761         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13762         (set_ui_file_data): Delete.
13763         (string_file::~string_file, string_file::write)
13764         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13765         (do_ui_file_as_string, ui_file_as_string): Delete.
13766         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13767         (struct mem_file): Delete.
13768         (mem_file_new): Delete.
13769         (stdio_file::stdio_file): New.
13770         (mem_file_delete): Delete.
13771         (stdio_file::stdio_file): New.
13772         (mem_fileopen): Delete.
13773         (stdio_file::~stdio_file): New.
13774         (mem_file_rewind): Delete.
13775         (stdio_file::set_stream): New.
13776         (mem_file_put): Delete.
13777         (stdio_file::open): New.
13778         (mem_file_write): Delete.
13779         (stdio_file_magic, struct stdio_file): Delete.
13780         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13781         (stdio_file::flush): New.
13782         (stdio_file_read): Rename to ...
13783         (stdio_file::read): ... this.  Adjust.
13784         (stdio_file_write): Rename to ...
13785         (stdio_file::write): ... this.  Adjust.
13786         (stdio_file_write_async_safe): Rename to ...
13787         (stdio_file::write_async_safe) ... this.  Adjust.
13788         (stdio_file_fputs): Rename to ...
13789         (stdio_file::puts) ... this.  Adjust.
13790         (stdio_file_isatty): Delete.
13791         (stdio_file_fseek): Delete.
13792         (stdio_file::isatty): New.
13793         (stderr_file_write): Rename to ...
13794         (stderr_file::write) ... this.  Adjust.
13795         (stderr_file_fputs): Rename to ...
13796         (stderr_file::puts) ... this.  Adjust.
13797         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13798         (stderr_file::stderr_file): New.
13799         (tee_file_magic): Delete.
13800         (struct tee_file): Delete.
13801         (tee_file::tee_file): New.
13802         (tee_file_new): Delete.
13803         (tee_file::~tee_file): New.
13804         (tee_file_delete): Delete.
13805         (tee_file_flush): Rename to ...
13806         (tee_file::flush): ... this.  Adjust.
13807         (tee_file_write): Rename to ...
13808         (tee_file::write): ... this.  Adjust.
13809         (tee_file::write_async_safe): New.
13810         (tee_file_fputs): Rename to ...
13811         (tee_file::puts): ... this.  Adjust.
13812         (tee_file_isatty): Rename to ...
13813         (tee_file::isatty): ... this.  Adjust.
13814         * ui-file.h (struct obstack, struct ui_file): Don't
13815         forward-declare.
13816         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13817         (ui_file_write_ftype)
13818         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13819         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13820         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13821         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13822         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13823         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13824         (set_ui_file_fseek): Delete.
13825         (ui_file_data, ui_file_delete, ui_file_rewind)
13826         (struct ui_file): New.
13827         (ui_file_up): New.
13828         (class null_file): New.
13829         (null_stream): Declare.
13830         (ui_file_write_for_put, ui_file_put): Delete.
13831         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13832         Delete.
13833         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13834         (gdb_fopen, tee_file_new): Delete.
13835         (struct string_file): New.
13836         (struct stdio_file): New.
13837         (stdio_file_up): New.
13838         (struct stderr_file): New.
13839         (class tee_file): New.
13840         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13841         of a 'ui_file *'.  Adjust.
13842         * ui-out.h (class ui_out) <field_stream>: Likewise.
13843         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13844         (null_stream): Delete.
13845         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13846         Adjust.
13847         * utils.h (struct ui_file): Delete forward declaration..
13848         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13849         (error_stream): Take a 'string_file &' instead of a
13850         'ui_file *'.
13851         * varobj.c (varobj_value_get_print_value): Use string_file.
13852         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13853         * gdbarch.c: Regenerate.
13854
13855 2017-02-02  Pedro Alves  <palves@redhat.com>
13856
13857         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13858         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
13859         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
13860         Adjust to call gdb_print_insn instead of
13861         gdb_disassembler::print_insn.
13862         (dump_insns, do_mixed_source_and_assembly_deprecated)
13863         (do_mixed_source_and_assembly, do_assembly_only): Add back a
13864         'gdbarch' parameter.  Remove gdb_disassembler parameter.
13865         (gdb_disassembly): Don't allocate a gdb_disassembler here.
13866         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13867         declaration.
13868         (gdb_pretty_print_insn): Re-add declaration.
13869         * record-btrace.c (btrace_insn_history): Don't allocate a
13870         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
13871
13872 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
13873
13874         * disasm.h (gdb_disassembly): Remove file_string parameter.
13875         * disasm.c (gdb_disassembly): Likewise.
13876         * cli/cli-cmds.c (print_disassembly): Adapt.
13877         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13878         * stack.c (do_gdb_disassembly): Likewise.
13879
13880 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13881
13882         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13883         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13884         targets.  And if the implicit value is longer than needed, extract
13885         the first bytes instead of the "least significant" ones.
13886
13887 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13888
13889         * btrace.c (btrace_enable): Do not call btrace_add_pc for
13890         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13891         (btrace_fetch): Assert can_access_registers_ptid.
13892         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13893         validate_registers_access.
13894
13895 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13896
13897         * gdbthread.h (can_access_registers_ptid): New.
13898         * thread.c (can_access_registers_ptid): New.
13899
13900 2017-02-01  Pedro Alves  <palves@redhat.com>
13901
13902         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13903
13904 2017-01-31  Pedro Alves  <palves@redhat.com>
13905
13906         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13907         Fix typos.
13908
13909 2017-01-31  Pedro Alves  <palves@redhat.com>
13910
13911         * stack.c (print_frame_args): Remove local mem_fileopen stream,
13912         not used.
13913
13914 2017-01-31  Pedro Alves  <palves@redhat.com>
13915
13916         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13917
13918 2017-01-31  Pedro Alves  <palves@redhat.com>
13919
13920         * common/scoped_restore.h
13921         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13922         change the value's parameter type to T2.
13923         (make_scoped_restore): Likewise.
13924
13925 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13926             Richard Henderson  <rth@redhat.com>
13927
13928         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13929         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13930         GS_BASE for older kernels.
13931         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13932         GS_BASE for older kernels.
13933         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13934         and GS_BASE to the offset table.
13935         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13936         system register group.
13937         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13938         for older kernels.
13939         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13940         amd64 ABI.
13941         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13942         AMD64_GSBASE_REGNUM.
13943         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13944         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13945         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13946         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13947         i386/64bit-segments.xml in those rules.
13948         * features/i386/64bit-segments.xml: New file.
13949         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13950         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13951         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13952         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13953         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13954         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13955         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13956         * features/i386/amd64-avx-linux.c: Regenerated.
13957         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13958         * features/i386/amd64-avx-mpx.c: Regenerated.
13959         * features/i386/amd64-avx512-linux.c: Regenerated.
13960         * features/i386/amd64-linux.c: Regenerated.
13961         * features/i386/amd64-mpx-linux.c: Regenerated.
13962         * features/i386/i386-avx-mpx-linux.c: Regenerated.
13963         * features/i386/i386-avx-mpx.c: Regenerated.
13964         * features/i386/x32-avx-linux.c: Regenerated.
13965         * features/i386/x32-avx512-linux.c: Regenerated.
13966         * regformats/i386/amd64-avx-linux.dat: Regenerated.
13967         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13968         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13969         * regformats/i386/amd64-linux.dat: Regenerated.
13970         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13971         * regformats/i386/x32-avx-linux.dat: Regenerated.
13972         * regformats/i386/x32-avx512-linux.dat: Regenerated.
13973         * regformats/i386/x32-linux.dat: Regenerated.
13974
13975 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13976
13977         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13978         Set to AMD64_NUM_REGS.
13979
13980 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13981
13982         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13983         that checks validity of a register number.
13984
13985 2017-01-27  Kees Cook  <keescook@google.com>
13986
13987         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13988         fetch_fpregs if target has fpa registers.
13989         (arm_linux_store_inferior_registers): Call store_fpregs if target
13990         has fpa registers.
13991
13992 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13993
13994         * cris-tdep.c (cris_gdbarch_init): Remove check for
13995         info.byte_order and force it to BFD_ENDIAN_LITTLE.
13996
13997 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
13998
13999         * corelow.c (get_core_register_section): Check for regset
14000         existence before checking for REGSET_VARIABLE_SIZE.
14001
14002 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14003             Pedro Alves  <palves@redhat.com>
14004
14005         PR gdb/20939
14006         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
14007         call memory_error, save memaddr instead.
14008         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
14009         negative, cal memory_error.
14010         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
14011
14012 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14013
14014         * disasm-selftests.c (memory_error_test): New function.
14015         (_initialize_disasm_selftests): Register memory_error_test.
14016
14017 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14018
14019         * Makefile.in (SFILES): Add disasm-selftests.c and
14020         selftest-arch.c.
14021         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
14022         * disasm-selftests.c: New file.
14023         * selftest-arch.c: New file.
14024         * selftest-arch.h: New file.
14025
14026 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14027
14028         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
14029         to bfd_arch_mep.  Don't return 0 if section is not
14030         found.  Call print_insn_mep.
14031
14032 2017-01-26  Pedro Alves  <palves@redhat.com>
14033             Yao Qi  <yao.qi@linaro.org>
14034
14035         * arm-tdep.c: Include "disasm.h".
14036         (gdb_print_insn_arm): Update code to get gdbarch.
14037         * disasm.c (dis_asm_read_memory): Change it to
14038         gdb_disassembler::dis_asm_read_memory.
14039         (dis_asm_memory_error): Likewise.
14040         (dis_asm_print_address): Likewise.
14041         (gdb_pretty_print_insn): Change it to
14042         gdb_disassembler::pretty_print_insn.
14043         (dump_insns): Add one argument gdb_disassemlber.  All
14044         callers updated.
14045         (do_mixed_source_and_assembly_deprecated): Likewise.
14046         (do_mixed_source_and_assembly): Likewise.
14047         (do_assembly_only): Likewise.
14048         (gdb_disassembler::gdb_disassembler): New.
14049         (gdb_disassembler::print_insn): New.
14050         * disasm.h (class gdb_disassembler): New.
14051         (gdb_pretty_print_insn): Remove declaration.
14052         (gdb_disassemble_info): Likewise.
14053         * guile/scm-disasm.c (class gdbscm_disassembler): New.
14054         (gdbscm_disasm_read_memory_worker): Update.
14055         (gdbscm_disasm_read_memory): Update.
14056         (gdbscm_disasm_memory_error): Remove.
14057         (gdbscm_disasm_print_address): Remove.
14058         (gdbscm_disassembler::gdbscm_disassembler): New.
14059         (gdbscm_print_insn_from_port): Update.
14060         * mips-tdep.c: Include disasm.h.
14061         (gdb_print_insn_mips): Update code to get gdbarch.
14062         * record-btrace.c (btrace_insn_history): Update.
14063         * spu-tdep.c: Include disasm.h.
14064         (struct spu_dis_asm_data): Remove.
14065         (struct spu_dis_asm_info): New.
14066         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14067         SPU id.
14068         (gdb_print_insn_spu): Cast disassemble_info to
14069         spu_dis_asm_info.
14070
14071 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14072
14073         * disasm.c (do_ui_file_delete): Delete.
14074         (gdb_insn_length): Move code creating stream to ...
14075         * utils.c (null_stream): ... here.  New function.
14076         * utils.h (null_stream): Declare.
14077
14078 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
14079
14080         * python/py-inferior.c (find_thread_object): Return directly
14081         from the loop.  Remove "found" variable.
14082
14083 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
14084
14085         GDB 7.12.1 released.
14086
14087 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14088
14089         * python/py-function.c (fnpy_call): Reorder declarations to have
14090         the gdbpy_enter object declared first.
14091         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14092
14093 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14094
14095         PR python/21068
14096         * python/python-internal.h (PyMem_RawMalloc): Define for
14097         Python < 3.4.
14098         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14099         PyMem_RawMalloc instead of PyMem_Malloc.
14100
14101 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
14102             Luis Machado  <lgustavo@codesourcery.com>
14103
14104         * NEWS (New commands): Mention flash-erase.
14105         (New MI commands): Mention target-flash-erase.
14106         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14107         command.
14108         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14109         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14110         * target.c (flash_erase_command): New function.
14111         (initialize_targets): Add new flash-erase command.
14112         * target.h (flash_erase_command): New declaration.
14113
14114 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
14115
14116         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14117         HAVE_SYS_PROCFS_H is defined.
14118
14119 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14120
14121         * remote.c (struct cached_reg): Change data into a pointer.
14122         * (stop_reply_dtr): Free data pointers before deleting vector.
14123         (process_stop_reply): Likewise.
14124         (remote_parse_stop_reply): Allocate space for data
14125
14126 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14127
14128         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14129         MAX_REGISTER_SIZE.
14130         (amd64_pseudo_register_read_value): Likewise.
14131         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14132         (store_register_using_P): Likewise.
14133         * regcache.c (regcache_xfer_part): Likewise.
14134
14135 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
14136
14137         Split real and pseudo registers.
14138         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14139         (sparc32_pseudo_regnum): New enum.
14140         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14141         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14142         (SPARC32_CP0_REGISTERS): New macro.
14143         (sparc32_pseudo_register_name): New function.
14144         (sparc32_register_name): Use sparc32_pseudo_register_name.
14145         (sparc32_pseudo_register_type): New function.
14146         (sparc32_register_type): Use sparc32_pseudo_register_type.
14147         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14148         pseudo register numbers.
14149         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
14150         (SPARC64_CP0_REGISTERS): New macro.
14151         (sparc64_pseudo_register_name): New function.
14152         (sparc64_register_name): Use sparc64_pseudo_register_name.
14153         (sparc64_pseudo_register_type): New function.
14154         (sparc64_register_type): Use sparc64_pseudo_register_type.
14155         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
14156         pseudo register numbers.
14157         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
14158         sparc64_store_arguments): Handle pseudo register numbers.
14159
14160 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14161
14162         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
14163         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
14164         output.
14165         (getpkt_or_notif_sane_1): Likewise.
14166
14167 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14168
14169         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
14170         of CC.  Pass "-x c++-header" instead of "-x c".
14171
14172 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14173
14174         * remote.c (remote_can_async_p): Update comment.
14175
14176 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14177
14178         * linux-nat.c (linux_nat_can_async_p): Update comment.
14179
14180 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14181
14182         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
14183
14184 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
14185
14186         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
14187
14188 2017-01-10  Tom Tromey  <tom@tromey.com>
14189
14190         * python/py-type.c (typy_legacy_template_argument): Update.
14191         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
14192         ~demangle_parse_info): Declare new members.
14193         (cp_demangled_name_to_comp): Return unique_ptr.
14194         (cp_demangled_name_parse_free)
14195         (make_cleanup_cp_demangled_name_parse_free)
14196         (cp_new_demangle_parse_info): Remove.
14197         * cp-support.c (do_demangled_name_parse_free_cleanup)
14198         (make_cleanup_cp_demangled_name_parse_free): Remove.
14199         (inspect_type, cp_canonicalize_string_full)
14200         (cp_canonicalize_string): Update.
14201         (mangled_name_to_comp): Change return type.
14202         (cp_class_name_from_physname, method_name_from_physname)
14203         (cp_func_name, cp_remove_params): Update.
14204         * cp-name-parser.y (demangle_parse_info): New constructor, from
14205         cp_new_demangle_parse_info.
14206         (~demangle_parse_info): New destructor, from
14207         cp_demangled_name_parse_free.
14208         (cp_merge_demangle_parse_infos): Update.
14209         (cp_demangled_name_to_comp): Change return type.
14210
14211 2017-01-10  Tom Tromey  <tom@tromey.com>
14212
14213         * top.c (prevent_dont_repeat): Change return type.
14214         * python/python.c (execute_gdb_command): Use std::string.
14215         Update.
14216         * guile/guile.c (gdbscm_execute_gdb_command): Update.
14217         * command.h (prevent_dont_repeat): Change return type.
14218         * breakpoint.c (bpstat_do_actions_1): Update.
14219
14220 2017-01-10  Tom Tromey  <tom@tromey.com>
14221
14222         * value.h (scoped_value_mark::~scoped_value_mark): Call
14223         free_to_mark.
14224         (scoped_value_mark::free_to_mark): New method.
14225         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
14226         scoped_value_mark.
14227
14228 2017-01-10  Tom Tromey  <tom@tromey.com>
14229
14230         * python/py-value.c (valpy_dereference, valpy_referenced_value)
14231         (valpy_reference_value, valpy_const_value, valpy_get_address)
14232         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
14233         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
14234         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
14235         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
14236         scoped_value_mark.
14237         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
14238         * value.h (scoped_value_mark): New class.
14239
14240 2017-01-10  Tom Tromey  <tom@tromey.com>
14241
14242         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
14243         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
14244         * psymtab.c (discard_psymtabs_upto): Remove.
14245         (make_cleanup_discard_psymtabs): Remove.
14246         (struct psymtab_state): Remove.
14247
14248 2017-01-10  Tom Tromey  <tom@tromey.com>
14249
14250         * record-full.c (record_full_save_cleanups): Remove.
14251         (record_full_save): Use gdb::unlinker.
14252         * gcore.c (do_bfd_delete_cleanup): Remove.
14253         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
14254         cleanups.
14255         * dwarf2read.c (unlink_if_set): Remove.
14256         (write_psymtabs_to_index): Use gdb::unlinker.
14257         * common/gdb_unlinker.h: New file.
14258
14259 2017-01-10  Tom Tromey  <tom@tromey.com>
14260
14261         * windows-tdep.c (windows_xfer_shared_library): Update.
14262         * windows-nat.c (windows_make_so): Update.
14263         * utils.h (make_cleanup_bfd_unref): Remove.
14264         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
14265         * symfile.h (symfile_bfd_open)
14266         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
14267         * symfile.c (read_symbols, symbol_file_add)
14268         (separate_debug_file_exists): Update.
14269         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
14270         (generic_load, reread_symbols): Update.
14271         * symfile-mem.c (symbol_file_add_from_memory): Update.
14272         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
14273         (spu_symbol_file_add_from_memory): Update.
14274         * solist.h (struct target_so_ops) <bfd_open>: Return
14275         gdb_bfd_ref_ptr.
14276         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
14277         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
14278         gdb_bfd_ref_ptr.
14279         (solib_map_sections, reload_shared_libraries_1): Update.
14280         * solib-svr4.c (enable_break): Update.
14281         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
14282         * solib-frv.c (enable_break2): Update.
14283         * solib-dsbt.c (enable_break): Update.
14284         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
14285         gdb_bfd_ref_ptr.
14286         (darwin_solib_get_all_image_info_addr_at_init): Update.
14287         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
14288         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
14289         * record-full.c (record_full_save): Update.
14290         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
14291         * procfs.c (insert_dbx_link_bpt_in_file): Update.
14292         * minidebug.c (find_separate_debug_file_in_section): Return
14293         gdb_bfd_ref_ptr.
14294         * machoread.c (macho_add_oso_symfile): Change abfd to
14295         gdb_bfd_ref_ptr.
14296         (macho_symfile_read_all_oso): Update.
14297         (macho_check_dsym): Return gdb_bfd_ref_ptr.
14298         (macho_symfile_read): Update.
14299         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
14300         (jit_bfd_try_read_symtab): Update.
14301         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14302         (gdb_bfd_openw, gdb_bfd_openr_iovec)
14303         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14304         gdb_bfd_ref_ptr.
14305         (gdb_bfd_ref_policy): New struct.
14306         (gdb_bfd_ref_ptr): New typedef.
14307         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14308         (gdb_bfd_openw, gdb_bfd_openr_iovec)
14309         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14310         gdb_bfd_ref_ptr.
14311         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14312         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14313         (gcore_command): Update.
14314         * exec.c (exec_file_attach): Update.
14315         * elfread.c (elf_symfile_read): Update.
14316         * dwarf2read.c (dwarf2_get_dwz_file): Update.
14317         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
14318         (open_and_init_dwo_file): Update.
14319         (open_dwp_file): Return gdb_bfd_ref_ptr.
14320         (open_and_init_dwp_file): Update.
14321         * corelow.c (core_open): Update.
14322         * compile/compile-object-load.c (compile_object_load): Update.
14323         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
14324         * coffread.c (coff_symfile_read): Update.
14325         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
14326         gdb_bfd_ref_ptr.  Rename.
14327         (dump_bfd_file, restore_command): Update.
14328         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14329         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14330         (find_separate_debug_file_by_buildid): Update.
14331
14332 2017-01-10  Tom Tromey  <tom@tromey.com>
14333
14334         * common/gdb_ref_ptr.h: New file.
14335         * python/py-ref.h (struct gdbpy_ref_policy): New.
14336         (gdbpy_ref): Now a typedef.
14337
14338 2017-01-10  Tom Tromey  <tom@tromey.com>
14339
14340         * utils.h (make_cleanup_htab_delete): Don't declare.
14341         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
14342         Remove.
14343         * linespec.c (decode_compound_collector): Add constructor,
14344         destructor.
14345         (lookup_prefix_sym): Remove cleanup.
14346         (symtab_collector): Add constructor, destructor.
14347         (collect_symtabs_from_filename): Remove cleanup.
14348         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
14349         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
14350         Use htab_up.
14351         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
14352         * dwarf2read.c (dw2_expand_symtabs_matching)
14353         (dw2_map_symbol_filenames, dwarf_decode_macros)
14354         (write_psymtabs_to_index): Use htab_up.
14355         * dwarf2loc.c (func_verify_no_selftailcall)
14356         (call_site_find_chain_1, func_verify_no_selftailcall)
14357         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
14358         std::vector, gdb::unique_xmalloc_ptr.
14359         (call_sitep): Remove typedef.
14360         (dwarf2_locexpr_baton_eval): Remove unused variable.
14361
14362 2017-01-10  Tom Tromey  <tom@tromey.com>
14363
14364         * python/python-internal.h (make_cleanup_py_decref)
14365         (make_cleanup_py_xdecref): Don't declare.
14366         * python/py-utils.c (py_decref, make_cleanup_py_decref)
14367         (py_xdecref, make_cleanup_py_xdecref): Remove.
14368
14369 2017-01-10  Tom Tromey  <tom@tromey.com>
14370
14371         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
14372         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
14373
14374 2017-01-10  Tom Tromey  <tom@tromey.com>
14375
14376         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
14377
14378 2017-01-10  Tom Tromey  <tom@tromey.com>
14379
14380         * python/py-utils.c (unicode_to_encoded_string)
14381         (python_string_to_target_string)
14382         (python_string_to_target_python_string)
14383         (python_string_to_host_string, gdbpy_obj_to_string)
14384         (get_addr_from_python): Use gdbpy_ref.
14385
14386 2017-01-10  Tom Tromey  <tom@tromey.com>
14387
14388         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
14389         gdbpy_ref.
14390
14391 2017-01-10  Tom Tromey  <tom@tromey.com>
14392
14393         * python/python.c (eval_python_command, gdbpy_decode_line)
14394         (gdbpy_run_events, gdbpy_start_type_printers)
14395         (gdbpy_apply_type_printers): Use gdbpy_ref.
14396
14397 2017-01-10  Tom Tromey  <tom@tromey.com>
14398
14399         * python/py-param.c (get_doc_string, compute_enum_values): Use
14400         gdbpy_ref.
14401
14402 2017-01-10  Tom Tromey  <tom@tromey.com>
14403
14404         * python/py-inferior.c (find_thread_object, build_inferior_list):
14405         Use gdbpy_ref.
14406
14407 2017-01-10  Tom Tromey  <tom@tromey.com>
14408
14409         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14410
14411 2017-01-10  Tom Tromey  <tom@tromey.com>
14412
14413         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
14414         gdbpy_ref.
14415
14416 2017-01-10  Tom Tromey  <tom@tromey.com>
14417
14418         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
14419         extra incref.
14420         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
14421         Use gdbpy_ref.
14422
14423 2017-01-10  Tom Tromey  <tom@tromey.com>
14424
14425         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14426         gdbpy_ref.
14427
14428 2017-01-10  Tom Tromey  <tom@tromey.com>
14429
14430         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
14431         decref results of PyArg_ParseTupleAndKeywords.
14432
14433 2017-01-10  Tom Tromey  <tom@tromey.com>
14434
14435         * python/python.c (python_run_simple_file): Use
14436         unique_xmalloc_ptr, gdbpy_ref.
14437
14438 2017-01-10  Tom Tromey  <tom@tromey.com>
14439
14440         * python/py-prettyprint.c (print_stack_unless_memory_error)
14441         (print_string_repr, print_children): Use gdbpy_ref.
14442         (dummy_python_frame): New class.
14443         (dummy_python_frame::dummy_python_frame): Rename from
14444         push_dummy_python_frame.
14445         (py_restore_tstate): Remove.
14446
14447 2017-01-10  Tom Tromey  <tom@tromey.com>
14448
14449         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14450
14451 2017-01-10  Tom Tromey  <tom@tromey.com>
14452
14453         * python/python.c (ensure_python_env, restore_python_env):
14454         Remove.
14455         * python/python-internal.h (ensure_python_env): Don't declare.
14456         * varobj.h (varobj_ensure_python_env): Don't declare.
14457         * varobj.c (varobj_ensure_python_env): Remove.
14458
14459 2017-01-10  Tom Tromey  <tom@tromey.com>
14460
14461         * varobj.c (varobj_value_get_print_value): Use
14462         gdbpy_enter_varobj.
14463
14464 2017-01-10  Tom Tromey  <tom@tromey.com>
14465
14466         * python/py-prettyprint.c (print_string_repr, print_children):
14467         Update.
14468         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
14469         of "encoding".
14470         * varobj.c (varobj_value_get_print_value): Update.
14471         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
14472
14473 2017-01-10  Tom Tromey  <tom@tromey.com>
14474
14475         * varobj.c (varobj_get_display_hint)
14476         (dynamic_varobj_has_child_method, install_new_value_visualizer)
14477         (varobj_set_visualizer, free_variable): Use
14478         gdbpy_enter_varobj.
14479
14480 2017-01-10  Tom Tromey  <tom@tromey.com>
14481
14482         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
14483         (do_finish_initialization): New function.  Use gdbpy_ref.
14484         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
14485         do_finish_initialization.
14486
14487 2017-01-10  Tom Tromey  <tom@tromey.com>
14488
14489         * python/py-param.c (get_set_value, get_show_value): Use
14490         gdbpy_enter, gdbpy_ref.
14491
14492 2017-01-10  Tom Tromey  <tom@tromey.com>
14493
14494         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
14495
14496 2017-01-10  Tom Tromey  <tom@tromey.com>
14497
14498         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
14499
14500 2017-01-10  Tom Tromey  <tom@tromey.com>
14501
14502         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
14503         Use gdbpy_enter_varobj.
14504
14505 2017-01-10  Tom Tromey  <tom@tromey.com>
14506
14507         * varobj.c (gdbpy_enter_varobj): New constructor.
14508         * python/python-internal.h (gdbpy_enter_varobj): New class.
14509         * python/py-varobj.c (py_varobj_get_iterator): Use
14510         gdbpy_enter_varobj.
14511
14512 2017-01-10  Tom Tromey  <tom@tromey.com>
14513
14514         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
14515         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14516         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
14517         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
14518         unique_xmalloc_ptr.
14519         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
14520
14521 2017-01-10  Tom Tromey  <tom@tromey.com>
14522
14523         * python/py-xmethods.c (invoke_match_method): Use
14524         gdbpy_ref.
14525
14526 2017-01-10  Tom Tromey  <tom@tromey.com>
14527
14528         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
14529         gdbpy_enter, gdbpy_ref.
14530
14531 2017-01-10  Tom Tromey  <tom@tromey.com>
14532
14533         * python/python.c (python_interactive_command): Use gdbpy_enter.
14534
14535 2017-01-10  Tom Tromey  <tom@tromey.com>
14536
14537         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
14538         gdbpy_ref.
14539
14540 2017-01-10  Tom Tromey  <tom@tromey.com>
14541
14542         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
14543         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14544
14545 2017-01-10  Tom Tromey  <tom@tromey.com>
14546
14547         * utils.h (htab_deleter): New struct.
14548         (htab_up): New typedef.
14549         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
14550         gdbpy_enter, gdbpy_ref, htab_up.
14551
14552 2017-01-10  Tom Tromey  <tom@tromey.com>
14553
14554         * python/py-unwind.c (pending_frame_invalidate): Remove.
14555         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
14556
14557 2017-01-10  Tom Tromey  <tom@tromey.com>
14558
14559         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
14560         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
14561
14562 2017-01-10  Tom Tromey  <tom@tromey.com>
14563
14564         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
14565
14566 2017-01-10  Tom Tromey  <tom@tromey.com>
14567
14568         * python/python.c (gdbpy_eval_from_control_command)
14569         (gdbpy_source_script, gdbpy_run_events)
14570         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
14571         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
14572         gdbpy_enter.
14573
14574 2017-01-10  Tom Tromey  <tom@tromey.com>
14575
14576         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
14577
14578 2017-01-10  Tom Tromey  <tom@tromey.com>
14579
14580         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
14581
14582 2017-01-10  Tom Tromey  <tom@tromey.com>
14583
14584         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
14585         (python_on_inferior_call_pre, python_on_inferior_call_post)
14586         (python_on_memory_change, python_on_register_change)
14587         (python_inferior_exit, python_new_objfile, add_thread_object)
14588         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
14589
14590 2017-01-10  Tom Tromey  <tom@tromey.com>
14591
14592         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
14593         (bpfinishpy_handle_exit): Use gdbpy_enter.
14594
14595 2017-01-10  Tom Tromey  <tom@tromey.com>
14596
14597         * python/py-cmd.c (cmdpy_destroyer)
14598         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
14599         gdbpy_enter.
14600
14601 2017-01-10  Tom Tromey  <tom@tromey.com>
14602
14603         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14604         gdbpy_enter.
14605         (gdbpy_breakpoint_has_cond): Likewise.
14606
14607 2017-01-10  Tom Tromey  <tom@tromey.com>
14608
14609         * python/python.c (gdbpy_enter): New constructor.
14610         (~gdbpy_enter): New destructor.
14611         (restore_python_env, ensure_python_env): Rewrite.
14612         * python/python-internal.h (gdbpy_enter): New class.
14613
14614 2017-01-10  Tom Tromey  <tom@tromey.com>
14615
14616         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
14617
14618 2017-01-10  Tom Tromey  <tom@tromey.com>
14619
14620         * python/py-value.c (value_has_field, get_field_flag)
14621         (get_field_type, valpy_getitem, convert_value_from_python): Use
14622         gdbpy_ref.
14623
14624 2017-01-10  Tom Tromey  <tom@tromey.com>
14625
14626         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14627         gdbpy_ref.
14628
14629 2017-01-10  Tom Tromey  <tom@tromey.com>
14630
14631         * python/py-prettyprint.c (search_pp_list)
14632         (find_pretty_printer_from_objfiles)
14633         (find_pretty_printer_from_progspace)
14634         (find_pretty_printer_from_gdb, find_pretty_printer)
14635         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
14636         gdbpy_ref.
14637
14638 2017-01-10  Tom Tromey  <tom@tromey.com>
14639
14640         * python/py-param.c (call_doc_function): Use gdbpy_ref.
14641
14642 2017-01-10  Tom Tromey  <tom@tromey.com>
14643
14644         * python/py-linetable.c (build_line_table_tuple_from_pcs)
14645         (ltpy_get_all_source_lines): Use gdbpy_ref.
14646
14647 2017-01-10  Tom Tromey  <tom@tromey.com>
14648
14649         * python/py-framefilter.c (extract_sym, extract_value)
14650         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14651         gdbpy_ref.
14652
14653 2017-01-10  Tom Tromey  <tom@tromey.com>
14654
14655         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14656
14657 2017-01-10  Tom Tromey  <tom@tromey.com>
14658
14659         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14660
14661 2017-01-10  Tom Tromey  <tom@tromey.com>
14662
14663         * python/py-function.c (convert_values_to_python, fnpy_init): Use
14664         gdbpy_ref.
14665
14666 2017-01-10  Tom Tromey  <tom@tromey.com>
14667
14668         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14669
14670 2017-01-10  Tom Tromey  <tom@tromey.com>
14671
14672         * python/py-type.c (convert_field, make_fielditem, typy_fields)
14673         (typy_range): Use gdbpy_ref.
14674
14675 2017-01-10  Tom Tromey  <tom@tromey.com>
14676
14677         * python/py-threadevent.c (create_thread_event_object): Use
14678         gdbpy_ref.
14679         * python/py-stopevent.c (create_stop_event_object): Simplify.
14680         (emit_stop_event): Use gdbpy_ref.
14681         * python/py-signalevent.c (create_signal_event_object): Use
14682         gdbpy_ref.
14683         * python/py-newobjfileevent.c (create_new_objfile_event_object)
14684         (emit_new_objfile_event, create_clear_objfiles_event_object)
14685         (emit_clear_objfiles_event): Use gdbpy_ref.
14686         * python/py-infevents.c (create_inferior_call_event_object)
14687         (create_register_changed_event_object)
14688         (create_memory_changed_event_object, emit_inferior_call_event)
14689         (emit_memory_changed_event, emit_register_changed_event): Use
14690         gdbpy_ref.
14691         * python/py-exitedevent.c (create_exited_event_object)
14692         (emit_exited_event): Use gdbpy_ref.
14693         * python/py-event.h (evpy_emit_event): Remove
14694         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14695         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14696         * python/py-continueevent.c (emit_continue_event): Use
14697         gdbpy_ref.
14698         * python/py-breakpoint.c (gdbpy_breakpoint_created)
14699         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14700         gdbpy_ref.
14701         * python/py-bpevent.c (create_breakpoint_event_object): Use
14702         gdbpy_ref.
14703
14704 2017-01-10  Tom Tromey  <tom@tromey.com>
14705
14706         * python/py-ref.h: New file.
14707
14708 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14709
14710         * cli-out.c (cli_ui_out::do_redirect): Change return type to
14711         void.
14712         * cli-out.h (cli_ui_out::do_redirect): Likewise.
14713         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14714         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14715         * ui-out.c (ui_out::redirect): Likewise.
14716         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14717         * cli/cli-logging.c (set_logging_redirect): Update call site of
14718         ui_out::redirect.
14719         (handle_redirections): Likewise.
14720         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14721         * top.c (execute_command_to_string): Likewise.
14722         * utils.c (do_ui_out_redirect_pop): Likewise.
14723
14724 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14725
14726         * stack.c (_initialize_stack): Update "frame" command help message.
14727
14728 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
14729
14730         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14731
14732 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14733
14734         * x86-linux-nat.h: Include gdb_proc_service.h.
14735
14736 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14737
14738         * ser-base.h: Include serial.h.
14739
14740 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14741
14742         * ppc-linux-tdep.h: Include ppc-tdep.h.
14743
14744 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14745
14746         * nat/amd64-linux-siginfo.h: Include signal.h.
14747
14748 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14749
14750         * nat/aarch64-linux-hw-point.h: Include break-common.h.
14751
14752 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14753
14754         * mi/mi-parse.h: Include mi-cmds.h.
14755
14756 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14757
14758         * inf-loop.c: Don't include "target.h".
14759         * inf-loop.h: Include it here.
14760
14761 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14762
14763         * dfp.h: Include "dboulest.h" and "expression.h".
14764
14765 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14766
14767         * ax-gdb.h: Include "ax.h".
14768
14769 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14770
14771         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14772         with nat/gdb_ptrace.h.
14773
14774 2017-01-05  Yao Qi  <yao.qi@linaro.org>
14775
14776         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14777         new line.
14778         (mips64_fbsd_sigframe_init): Likewise.
14779
14780 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14781
14782         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14783         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14784
14785 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14786
14787         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14788         * NEWS: Mention new FreeBSD/mips native configuration.
14789         * config/mips/fbsd.mh: New file.
14790         * configure.host: Add mips*-*-freebsd*.
14791         * mips-fbsd-nat.c: New file.
14792
14793 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14794
14795         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14796         (ALLDEPFILES): Add mips-fbsd-tdep.c.
14797         * NEWS: Mention new FreeBSD/mips target.
14798         * configure.tgt: Add mips*-*-freebsd*.
14799         * mips-fbsd-tdep.c: New file.
14800         * mips-fbsd-tdep.h: New file.
14801
14802 2017-01-04  Yao Qi  <yao.qi@linaro.org>
14803
14804         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14805         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14806
14807 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14808
14809         Update copyright year range in all GDB files.
14810
14811 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14812
14813         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14814
14815 For older changes see ChangeLog-2016.
14816 \f
14817 Local Variables:
14818 mode: change-log
14819 left-margin: 8
14820 fill-column: 74
14821 version-control: never
14822 coding: utf-8
14823 End: