Update my e-mail address.
[external/binutils.git] / gdb / ChangeLog
1 2017-11-06  Luis Machado  <luis.machado@linaro.org>
2
3         * MAINTAINERS (Write After Approval): Update my e-mail address.
4
5 2017-11-06  Pedro Alves  <palves@redhat.com>
6
7         * gnu-nat.c (gnu_terminal_init): Delete.
8         (gnu_target): Don't install gnu_terminal_init.
9         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
10         (child_terminal_init): ... this function.
11
12 2017-11-06  Pedro Alves  <palves@redhat.com>
13
14         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
15         sgtty.h.
16         * config.in, configure: Regenerate.
17
18 2017-11-06  Pedro Alves  <palves@redhat.com>
19
20         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
21         (async_init_signals): Adjust.
22         (handle_stop_sig): Rename to ...
23         (handle_sigtstp): ... this.
24         (async_stop_sig): Rename to ...
25         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
26         SIGTSTP path.
27         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
28         instead of STOP_SIGNAL thoughout.
29         (handle_stop_sig): Rename to ...
30         (handle_sigtstp): ... this.
31         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
32
33 2017-11-06  Pedro Alves  <palves@redhat.com>
34
35         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
36         longer set flags twice in row.
37
38 2017-11-06  Pedro Alves  <palves@redhat.com>
39
40         * Makefile.in (SER_HARDWIRE): Update comment.
41         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
42         * common/gdb_termios.h: Delete file.
43         * common/job-control.c: Include termios.h and unistd.h instead of
44         gdb_termios.h.
45         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
46         check.
47         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
48         Remove sgtty code.
49         * configure.ac: No longer check for termio.h and sgtty.h.
50         * configure: Regenerate.
51         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
52         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
53         Replace PROCESS_GROUP_TYPE references with pid_t references
54         throughout.
55         (gdb_getpgrp): Delete.
56         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
57         (child_terminal_inferior): Remove comment.  Remove sgtty code.
58         (child_terminal_ours_1): Use tcgetpgrp directly instead of
59         gdb_getpgrp.  Use serial_set_tty_state instead aof
60         serial_noflush_set_tty_state.  Remove sgtty code.
61         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
62         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
63         (inferior_process_group): Now returns pid_t.
64         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
65         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
66         * ser-event.c (serial_event_ops): Update.
67         * ser-go32.c (dos_noflush_set_tty_state): Delete.
68         (dos_ops): Update.
69         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
70         * ser-pipe.c (pipe_ops): Update.
71         * ser-tcp.c (tcp_ops): Update.
72         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
73         HAVE_TERMIOS checks.
74         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
75         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
76         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
77         assume termios.
78         (hardwire_noflush_set_tty_state): Delete.
79         (hardwire_print_tty_state, hardwire_drain_output)
80         (hardwire_flush_output, hardwire_flush_input)
81         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
82         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
83         code, and assume termios.
84         (hardwire_ops): Update.
85         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
86         * serial.c (serial_noflush_set_tty_state): Delete.
87         * serial.h (serial_noflush_set_tty_state): Delete.
88         (serial_ops::noflush_set_tty_state): Delete.
89
90 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
91
92         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
93         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
94         (COMMON_OBS): Remove doublest.o and dfp.o.
95         Do not build target-float.c (instead of doublest.c)
96         with -Wformat-nonliteral.
97
98         * doublest.c: Remove file.
99         * doublest.h: Remove file.
100         * dfp.c: Remove file.
101         * dfp.h: Remove file.
102
103         * target-float.c: Do not include "doublest.h" and "dfp.h".
104         (DOUBLEST): Move here from doublest.h.
105         (enum float_kind): Likewise.
106         (FLOATFORMAT_CHAR_BIT): Likewise.
107         (FLOATFORMAT_LARGEST_BYTES): Likewise.
108         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
109         (floatformat_precision): Likewise.
110         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
111         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
112         Likewise.
113         (host_float_format, host_double_format, host_long_double_format):
114         Likewise.
115         (floatformat_to_string, floatformat_from_string): Likewise.
116         (floatformat_to_doublest): Likewise.  Also, inline the original
117         convert_floatformat_to_doublest.
118         (floatformat_from_doublest): Likewise.  Also, inline the original
119         convert_floatformat_from_doublest.
120
121         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
122         (MAX_DECIMAL_STRING): Move here from dfp.c.
123         (match_endianness): Likewise.
124         (set_decnumber_context, decimal_check_errors): Likewise.
125         (decimal_from_number, decimal_to_number): Likewise.
126         (decimal_to_string, decimal_from_string): Likewise.  Make static.
127         (decimal_from_longest, decimal_from_ulongest): Likewise.
128         (decimal_to_longest): Likewise.
129         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
130         (decimal_convert): Likewise.
131
132 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
133
134         * doublest.c: Do not include "gdbtypes.h".
135         (extract_typed_floating): Remove.
136         (store_typed_floating): Remove.
137         (convert_typed_floating): Remove.
138         * doublest.h (struct type): Remove.
139         (DOUBLEST_PRINT_FORMAT): Remove.
140         (DOUBLEST_SCAN_FORMAT): Remove.
141         (extract_typed_floating): Remove.
142         (store_typed_floating): Remove.
143         (convert_typed_floating): Remove.
144
145         * dfp.c (decimal_from_doublest): Remove.
146         (decimal_to_doublest): Remove.
147         * dfp.h: Do not include "doublest.h".
148         (decimal_from_doublest): Remove.
149         (decimal_to_doublest): Remove.
150
151         * value.c: Do not include "doublest.h" and "dfp.h".
152         (value_as_double): Remove.
153         (unpack_double): Remove.
154         (value_from_double): Remove.
155         (value_from_decfloat): Remove.
156         * value.h: Do not include "doublest.h".
157         (value_as_double): Remove.
158         (unpack_double): Remove.
159         (value_from_double): Remove.
160         (value_from_decfloat): Remove.
161
162 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
163
164         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
165         (i386_extract_return_value): Use target_float_convert.
166         (i386_store_return_value): Likewise.
167         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
168         (i387_value_to_register): Likewise.
169         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
170         (ia64_register_to_value): Use target_float_convert.
171         (ia64_value_to_register): Likewise.
172         (ia64_extract_return_value): Likewise.
173         (ia64_store_return_value): Likewise.
174         (ia64_push_dummy_call): Likewise.
175         * m68k-tdep.c: Include "target-float.h".
176         (m68k_register_to_value): Use target_float_convert.
177         (m68k_value_to_register): Likewise.
178         (m68k_svr4_extract_return_value): Likewise.
179         (m68k_svr4_store_return_value): Likewise.
180         * ppc-sysv-tdep.c: Include "target-float.h".
181         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
182         (do_ppc_sysv_return_value): Likewise.
183         (ppc64_sysv_abi_push_freg): Likewise.
184         (ppc64_sysv_abi_return_value_base): Likewise.
185         * rs6000-aix-tdep.c: Include "target-float.h".
186         (rs6000_push_dummy_call): Use target_float_convert.
187         (rs6000_return_value): Likewise.
188         * rs6000-lynx178-tdep.c: Include "target-float.h".
189         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
190         (rs6000_lynx178_return_value): Likewise.
191         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
192         (rs6000_register_to_value): Use target_float_convert.
193         (rs6000_value_to_register): Likewise.
194         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
195         (arm_extract_return_value): Use target_float_convert.
196         (arm_store_return_value): Likewise.
197         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
198         (sh_register_convert_to_virtual): Use target_float_convert.
199         (sh_register_convert_to_raw): Likewise.
200         * sh64-tdep.c: Include "target-float.h".
201         (sh64_extract_return_value): Use target_float_convert.
202         (sh64_register_convert_to_virtual): Likewise.
203         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
204
205 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
206
207         * target-float.c (floatformat_to_host_double): New function.
208         (floatformat_from_host_double): Likewise.
209         (target_float_to_host_double): Likewise.
210         (target_float_from_host_double): Likewise.
211         * target-float.h (target_float_to_host_double): Add prototype.
212         (target_float_from_host_double): Likewise.
213
214         * guile/scm-value.c: Include "target-float.h".
215         (gdbscm_value_to_real): Use target_float_to_host_double.
216         Handle integer source values via value_as_long.
217         * guile/scm-math.c: Include "target-float.h".  Do not include
218         "doublest.h", "dfp.h", and "expression.h".
219         (vlscm_convert_typed_number): Use target_float_from_host_double.
220         (vlscm_convert_number): Likewise.
221
222         * python/py-value.c (valpy_float): Use target_float_to_host_double.
223         (convert_value_from_python): Use target_float_from_host_double.
224
225 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
226
227         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
228         (cast_from_fixed): Likewise.
229         (ada_scaling_type): New function.
230         (ada_delta): Return value instead of DOUBLEST.  Perform target
231         arithmetic instead of host arithmetic.
232         (scaling_factor): Rename to ...
233         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
234         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
235         (ada_fixed_to_float): Remove.
236         (ada_float_to_fixed): Remove.
237         * ada-lang.h (ada_fixed_to_float): Remove.
238         (ada_float_to_fixed): Remove.
239         (ada_delta): Return value instead of DOUBLEST.
240         (ada_scaling_factor): Add prototype.
241
242         * ada-typeprint.c: Include "target-float.h".
243         (print_fixed_point_type): Perform target arithmetic instead of
244         host arithmetic.
245         * ada-valprint.c: Include "target-float.h".
246         (ada_val_print_num): Perform target arithmetic instead of
247         host arithmetic for fixed-point types.
248
249 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
250
251         * target-float.c: Include <math.h>.
252         (floatformat_binop): New function.
253         (floatformat_compare): Likewise.
254         (target_float_binop): Likewise.
255         (target_float_compare): Likewise.
256         * target-float.h: Include "expression.h".
257         (target_float_binop): Add prototype.
258         (target_float_compare): Likewise.
259
260         * valarith.c: Do not include "doublest.h" and "dfp.h".
261         Include "common/byte-vector.h".
262         (value_args_as_decimal): Remove, replace by ...
263         (value_args_as_target_float): ... this function.  Handle both
264         binary and decimal target floating-point formats.
265         (scalar_binop): Handle both binary and decimal FP using
266         value_args_as_target_float and target_float_binop.
267         (value_equal): Handle both binary and decimal FP using
268         value_args_as_target_float and target_float_compare.
269         (value_less): Likewise.
270         (value_pos): Handle all scalar types as simple copy.
271         (value_neg): Handle all scalar types via BINOP_SUB from 0.
272         * dfp.c (decimal_binop): Throw error instead of internal_error
273         when called with an unsupported operation code.
274
275 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
276
277         * target-float.c (target_float_to_string): New function.
278         (target_float_from_string): New function.
279         * target-float.h (target_float_to_string): Add prototype.
280         (target_float_from_string): Add prototype.
281
282         * valprint.c: Include "target-float.h".  Do not include
283         "doublest.h" and "dfp.h".
284         (print_floating): Use target_float_to_string.
285         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
286         (printf_floating): Use target_float_to_string.
287         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
288         (print_i387_value): Use target_float_to_string.
289         * mips-tdep.c: Include "target-float.h".
290         (mips_print_fp_register): Use target_float_to_string.
291         * sh64-tdep.c: Include "target-float.h".
292         (sh64_do_fp_register): Use target_float_to_string.
293
294         * parse.c: Include "target-float.h".  Do not include
295         "doublest.h" and "dfp.h".
296         (parse_float): Use target_float_from_string.
297         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
298         (define_symbol): Use target_float_from_string.
299         * gdbarch-selftests.c: Include "target-float.h".
300         (register_to_value_test): Use target_float_from_string.
301
302 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
303
304         * Makefile.c (SFILES): Add target-float.c.
305         (HFILES_NO_SRCDIR): Add target-float.h.
306         (COMMON_OBS): Add target-float.o.
307         * target-float.h: New file.
308         * target-float.c: New file.
309
310         * doublest.c (floatformat_classify): Fix detection of float_zero.
311
312         * gdbtypes.c (is_floating_type): New function.
313         * gdbtypes.h (is_floating_type): Add prototype.
314
315         * value.c: Do not include "floatformat.h".
316         (unpack_double): Use target_float_is_valid.
317         (is_floating_value): New function.
318         * value.h (is_floating_value): Add prototype-
319
320         * valarith.c: Include "target-float.h".
321         (value_logical_not): Use target_float_is_zero.
322
323         * python/py-value.c: Include "target-float.h".
324         (valpy_nonzero): Use target_float_is_zero.
325
326 2017-11-04  Tom Tromey  <tom@tromey.com>
327
328         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
329
330 2017-11-04  Tom Tromey  <tom@tromey.com>
331
332         * breakpoint.c (set_momentary_breakpoint): Return
333         breakpoint_up.
334         (until_break_command): Update.
335         (new_until_break_fsm): Change argument types to
336         breakpoint_up.
337         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
338         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
339         Remove.
340         * infcmd.c (finish_forward): Update.
341         * breakpoint.h (set_momentary_breakpoint)
342         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
343         (make_cleanup_delete_breakpoint): Remove.
344         (struct breakpoint_deleter): New.
345         (breakpoint_up): New typedef.
346         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
347         (insert_exception_resume_breakpoint): Update.
348         (insert_exception_resume_from_probe): Update.
349         (insert_longjmp_resume_breakpoint): Update.
350         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
351         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
352         * infcall.c (call_function_by_hand_dummy): Update
353
354 2017-11-04  Tom Tromey  <tom@tromey.com>
355
356         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
357
358 2017-11-04  Tom Tromey  <tom@tromey.com>
359
360         * linux-tdep.c (linux_core_info_proc_mappings): Use
361         gdb::def_vector.
362         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
363         "size" argument.
364         (linux_corefile_thread): Update.
365         (linux_make_corefile_notes): Remove unused variable.
366
367 2017-11-04  Tom Tromey  <tom@tromey.com>
368
369         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
370         gdb::byte_vector.
371
372 2017-11-04  Tom Tromey  <tom@tromey.com>
373
374         * objfiles.c (do_free_objfile_cleanup): Remove.
375         * compile/compile-object-load.c (compile_object_load): Update.
376         * objfiles.h (make_cleanup_free_objfile): Remove.
377
378 2017-11-04  Tom Tromey  <tom@tromey.com>
379
380         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
381         (adi_read_versions): Change "tags" to "gdb_byte *".
382         (adi_print_versions): Likewise.
383
384 2017-11-04  Tom Tromey  <tom@tromey.com>
385
386         * breakpoint.c
387         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
388         from start_rbreak_breakpoints.
389         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
390         * breakpoint.h (class scoped_rbreak_breakpoints): New.
391         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
392         * symtab.c (do_end_rbreak_breakpoints): Remove.
393         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
394
395 2017-11-04  Tom Tromey  <tom@tromey.com>
396
397         * cp-namespace.c (reset_directive_searched): Remove.
398         (cp_lookup_symbol_via_imports): Use scoped_restore.
399         * cp-support.c (reset_directive_searched): Remove.
400         (make_symbol_overload_list_using): Use scoped_restore.
401         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
402         (reset_directive_searched): Remove.
403
404 2017-11-04  Tom Tromey  <tom@tromey.com>
405
406         * symfile.c (find_separate_debug_file_by_debuglink): Use
407         unique_xmalloc_ptr.
408
409 2017-11-04  Tom Tromey  <tom@tromey.com>
410
411         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
412         type of "info".
413         (compute_stack_depth): Likewise.
414         (do_compile_dwarf_expr_to_c): Use std::vector.
415
416 2017-11-04  Tom Tromey  <tom@tromey.com>
417
418         * compile/compile-object-load.c (link_callbacks_einfo): Use
419         std::string.
420
421 2017-11-04  Tom Tromey  <tom@tromey.com>
422
423         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
424         Use scoped_free_pendings.
425         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
426         scoped_free_pendings.
427         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
428         (xcoff_initial_scan): Likewise.
429         * buildsym.c (reset_symtab_globals): Update comment.
430         (scoped_free_pendings): Rename from really_free_pendings.
431         (prepare_for_building): Update comment.
432         (buildsym_init): Likewise.
433         * buildsym.h (class scoped_free_pendings): New class.
434         (really_free_pendings): Don't declare.
435
436 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
437
438         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
439         output when converting a zero value to a special byteorder format.
440
441 2017-11-02  Yao Qi  <yao.qi@linaro.org>
442
443         * frame.c (do_frame_register_read): Remove aspace.
444         * jit.c (jit_frame_sniffer): Likwise.
445         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
446         * regcache.c (regcache::regcache): Pass nullptr.
447         (regcache_print): Caller updated.
448         * regcache.h (regcache::regcache): Remove one constructor
449         parameter aspace.
450
451 2017-11-02  Yao Qi  <yao.qi@linaro.org>
452
453         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
454
455 2017-11-02  Yao Qi  <yao.qi@linaro.org>
456
457         * breakpoint.c (insert_single_step_breakpoints): Update.
458         * frame.c (struct frame_info) <aspace>: Add const.
459         (frame_save_as_regcache): Add const.
460         (get_frame_address_space): Return const address_space *.
461         * frame.h (get_frame_address_space): Update declaration.
462         * infrun.c (struct step_over_info) <aspace>: Add const.
463         (set_step_over_info): Make aspace const.
464         (displaced_step_prepare_throw): Change variable const.
465         (resume): Likewise.
466         (proceed): Likewise.
467         (adjust_pc_after_break): Likewise.
468         (save_waitstatus): Likewise.
469         (handle_signal_stop): Likewise.
470         (keep_going_pass_signal): Likewise.
471         * jit.c (jit_frame_sniffer): Add const.
472         * mips-tdep.c (mips_single_step_through_delay): Likewise.
473         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
474         * record-full.c (record_full_wait_1): Likewise.
475         * regcache.c (regcache::regcache): Change parameter to const.
476         * regcache.h (regcache::regcache): Likewise.
477         (regcache::aspace): Return const address_space *.
478         (regcache) <m_aspace>: Add const.
479
480 2017-11-02  Yao Qi  <yao.qi@linaro.org>
481
482         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
483         * frame.c (create_sentinel_frame): Likewise.
484         * infrun.c (displaced_step_prepare_throw): Likewise.
485         (resume): Likewise.
486         (thread_still_needs_step_over_bp): Likewise.
487         (proceed): Likewise.
488         (do_target_wait): Likewise.
489         (adjust_pc_after_break): Likewise.
490         (handle_syscall_event): Likewise.
491         (save_waitstatus): Likewise.
492         (handle_inferior_event_1): Likewise.
493         (handle_signal_stop): Likewise.
494         (keep_going_pass_signal): Likewise.
495         * linux-nat.c (status_callback): Likewise.
496         (save_stop_reason): Likewise.
497         (resume_stopped_resumed_lwps): Likewise.
498         * record-full.c (record_full_exec_insn): Likewise.
499         (record_full_wait_1): Likewise.
500         * regcache.c (get_regcache_aspace): Remove.
501         * regcache.h (get_regcache_aspace): Remove.
502
503 2017-11-02  Yao Qi  <yao.qi@linaro.org>
504
505         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
506         (init_regcache_descr): Use gdbarch_num_regs.
507         (regcache::regcache): Likewise.
508         (regcache::get_register_status): Likewise.
509         (regcache::assert_raw_regnum): Likewise.
510         (regcache::cooked_read): Likewise.
511         (regcache::cooked_read_value): Likewise.
512         (regcache::cooked_write): Likewise.
513         (regcache::dump): Likewise.
514         (regcache::num_raw_registers): New method.
515         * regcache.h (class regcache) <num_raw_registers>: New.
516
517 2017-11-02  Yao Qi  <yao.qi@linaro.org>
518
519         * regcache.c (regcache::assert_regnum): New method.
520         (regcache::invalidate): Call assert_regnum.
521         (regcache::raw_update): Likewise.
522         (regcache::raw_write): Likewise.
523         (regcache::raw_read_part): Likewise.
524         (regcache::raw_write_part): Likewise.
525         (regcache::raw_supply): Likewise.
526         (regcache::raw_supply_integer): Likewise.
527         (regcache::raw_supply_zeroed): Likewise.
528         (regcache::raw_collect): Likewise.
529         (regcache::raw_collect_integer): Likewise.
530         * regcache.h (regcache::assert_regnum): Declare.
531
532 2017-11-02  Yao Qi  <yao.qi@linaro.org>
533
534         * regcache.c (regcache::dump): Remove code.
535
536 2017-11-02  Yao Qi  <yao.qi@linaro.org>
537
538         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
539         Remove.
540         <sizeof_cooked_register_status>: Remove.
541         (init_regcache_descr): Update.
542         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
543         (regcache::save): Likewise.
544         (regcache::dump): Likewise.
545
546 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
547
548         * ft32-tdep.c (ft32_fetch_instruction): New function.
549         (ft32_analyze_prologue): Use ft32_fetch_instruction().
550
551 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
552
553         * cli/cli-script.c (execute_control_command): Rename to ...
554         (execute_control_command_1): ... this.
555         (execute_control_command): New function.
556
557 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
558
559         * tracepoint.c (tfind_command): Remove const_cast.
560
561 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
562
563         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
564
565 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
566
567         * common/common-utils.h (in_inclusive_range): New function.
568         * arm-tdep.c (arm_record_extension_space): Use
569         in_inclusive_range.
570         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
571         * cris-tdep.c (cris_spec_reg_applicable): Use
572         in_inclusive_range.
573
574 2017-10-30  Pedro Alves  <palves@redhat.com>
575             Simon Marchi <simon.marchi@ericsson.com>
576
577         * remote.c (remote_set_syscall_catchpoint): Build a std::string
578         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
579
580 2017-10-30  Pedro Alves  <palves@redhat.com>
581
582         * common/common-utils.c (string_appendf, string_vappendf): New
583         functions.
584         * common/common-utils.h (string_appendf, string_vappendf): New
585         declarations.
586         * unittests/common-utils-selftests.c (string_appendf_func)
587         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
588         (string_vappendf_tests): New functions.
589         (_initialize_common_utils_selftests): Register "string_appendf" and
590         "string_vappendf tests".
591
592 2017-10-30  Pedro Alves  <palves@redhat.com>
593
594         * unittests/common-utils-selftests.c (format_func): New typedef.
595         (string_printf_tests, string_vprintf_tests): Tests factored out
596         and merged to ...
597         (test_format_func): ... this new function.
598         (string_printf_tests, string_vprintf_tests): Reimplement on top of
599         test_format_func.
600
601 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
602
603         * darwin-nat.c: Remove include of gdb.h.
604
605 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
606
607         * xtensa-xtregs.c: Fix formatting issues.
608
609 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
610
611         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
612
613 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
614
615         PR python/21213
616         * python/py-infthread.c (thpy_get_inferior): Increment reference
617         of inferior before returning it.
618
619 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
620
621         * unittests/common-utils-selftests.c (format): Add
622         ATTRIBUTE_PRINTF.
623
624 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
625
626         * xml-syscall.c (struct syscall_desc): Add constructor.
627         <name>: Change type to std::string.
628         (syscall_desc_up): New typedef.
629         (syscall_desc_p): Remove typeder.
630         (DEF_VEC_P(syscall_desc_p)): Remove.
631         (struct syscall_group_desc): Add constructor.
632         <name>: Change type to std::string.
633         <syscalls>: Change type to std::vector.
634         (syscall_group_desc_up): New typedef.
635         (syscall_group_desc_p): Remove typedef.
636         (DEF_VEC_P(syscall_group_desc_p)): Remove.
637         (struct syscalls_info) <syscalls>: Change type to std::vector of
638         unique_ptr.
639         <groups>: Likewise.
640         <my_gdb_datadir>: Change type to std::string.
641         (syscalls_info_up): New typedef.
642         (allocate_syscalls_info): Remove.
643         (syscalls_info_free_syscalls_desc): Remove.
644         (syscalls_info_free_syscall_group_desc): Remove.
645         (free_syscalls_info): Remove.
646         (make_cleanup_free_syscalls_info): Remove.
647         (syscall_group_create_syscall_group_desc): Adjust.
648         (syscall_group_add_syscall): Adjust.
649         (syscall_create_syscall_desc): Adjust.
650         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
651         (init_syscalls_info): Adjust.
652         (syscall_group_get_group_by_name): Adjust.
653         (xml_get_syscall_number): Adjust.
654         (xml_get_syscall_name): Adjust.
655         (xml_list_of_syscalls): Adjust.
656         (xml_list_syscalls_by_group): Adjust.
657         (xml_list_of_groups): Adjust.
658
659 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
660
661         * probe.h: Don't include gdb_vecs.h.
662         (DEF_VEC_P (probe_p)): Remove.
663         (find_probes_in_objfile): Return an std::vector.
664         * probe.c (find_probes_in_objfile): Likewise.
665         * breakpoint.c (breakpoint_objfile_data)
666         <longjmp_probes>: Change type to std::vector.
667         <exception_probes>: Likewise.
668         (free_breakpoint_probes): Don't manually free vectors.
669         (create_longjmp_master_breakpoint): Adjust.
670         (create_exception_master_breakpoint): Adjust.
671         * solib-svr4.c (svr4_create_probe_breakpoints): Change
672         parameter type, adjust.
673         (svr4_create_solib_event_breakpoints): Adjust.
674
675 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
676
677         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
678         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
679         with new.
680         (free_breakpoint_probes): Rename to ...
681         (free_breakpoint_objfile_data): ... this, and call delete on
682         bp_objfile_data..
683
684 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
685
686         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
687         (loaded_script_ptr): Remove typedef.
688         (DEF_VEC_P (loaded_script_ptr)): Remove.
689         (struct collect_matching_scripts_data): Add constructor.
690         <scripts_p>: Change type to (pointer to) std::vector.
691         (collect_matching_scripts_data): Adjust.
692         (sort_scripts_by_name): Make suitable for std::sort.
693         (print_scripts): Don't sort vector, adjust to std::vector.
694         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
695
696 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
697
698         * symfile.c (filename_language): Make struct, not typedef.  Add
699         constructor.
700         <ext>: Change type to std::string.
701         (DEF_VEC_O (filename_language)): Remove.
702         (filename_language_table): Change type to std::vector.
703         (add_filename_language): Adjust.
704         (set_ext_lang_command): Adjust.
705         (info_ext_lang_command): Adjust.
706         (deduce_language_from_filename): Adjust.
707         (class scoped_restore_filename_language_table): Remove.
708         (test_filename_language): Use scoped_restore.
709         (test_set_ext_lang_command): Use scoped_restore, adjust to
710         std::vector change.
711
712 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
713
714         * symfile.c: Include selftest.h.
715         (class scoped_restore_filename_language_table): New.
716         (test_filename_language): New test.
717         (test_set_ext_lang_command): New test.
718         (_initialize_symfile): Register tests.
719
720 2017-10-27  Keith Seitz  <keiths@redhat.com>
721
722         * breakpoint.c (print_breakpoint_location): Use the symbol saved
723         in the bp_location, falling back to find_pc_sect_function when
724         needed.
725         (add_location_to_breakpoint): Save sal->symbol.
726         * breakpoint.h (struct bp_location) <symbol>: New field.
727         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
728         * symtab.h (struct symtab_and_line) <symbol>: New field.
729
730 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
731
732         PR gdb/13669
733         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
734         to rewind obstack.
735
736 2017-10-26  Pedro Alves  <palves@redhat.com>
737
738         * remote.c (remote_async_terminal_ours_p): Delete.
739         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
740         Remove references to 'remote_async_terminal_ours_p'.
741
742 2017-10-26  Yao Qi  <yao.qi@linaro.org>
743
744         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
745
746 2017-10-26  Yao Qi  <yao.qi@linaro.org>
747
748         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
749         aspace const.
750         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
751         Likewise.
752         * breakpoint.c (bpstat_check_location): Remove cast.
753         (breakpoint_hit_catch_fork): Make aspce const.
754         (breakpoint_hit_catch_solib): Likewise.
755         (breakpoint_hit_catch_exec): Likewise.
756         (breakpoint_hit_ranged_breakpoint): Likewise.
757         (breakpoint_hit_watchpoint): Likewise.
758         (base_breakpoint_breakpoint_hit): Likewise.
759         (bkpt_breakpoint_hit): Likewise.
760         (dprintf_breakpoint_hit): Likewise.
761         (tracepoint_breakpoint_hit): Likewise.
762         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
763
764 2017-10-26  Yao Qi  <yao.qi@linaro.org>
765
766         * breakpoint.c (breakpoint_location_address_match): Change
767         "struct address_space *" to "const address_space".
768         (breakpoint_location_address_range_overlap): Likewise.
769         (breakpoint_here_p): Likewise.
770         (breakpoint_in_range_p): Likewise.
771         (moribund_breakpoint_here_p): Likewise.
772         (bp_location_inserted_here_p): Likewise.
773         (software_breakpoint_inserted_here_p): Likewise.
774         (hardware_breakpoint_inserted_here_p): Likewise.
775         (hardware_watchpoint_inserted_in_range): Likewise.
776         (bpstat_check_location): Likewise.
777         (bpstat_stop_status): Likewise.
778         (breakpoint_address_match): Likewise.
779         (breakpoint_address_match_range): Likewise.
780         (breakpoint_location_address_match): Likewise.
781         (breakpoint_location_address_range_overlap): Likewise.
782         (insert_single_step_breakpoint): Likewise.
783         (breakpoint_has_location_inserted_here): Likewise.
784         (single_step_breakpoint_inserted_here_p): Likewise.
785         (pc_at_non_inline_function): Likewise.
786         * breakpoint.h (bpstat_stop_status): Update declaration.
787         (breakpoint_here_p): Likewise.
788         (breakpoint_in_range_p): Likewise.
789         (moribund_breakpoint_here_p): Likewise.
790         (breakpoint_inserted_here_p): Likewise.
791         (software_breakpoint_inserted_here_p): Likewise.
792         (hardware_breakpoint_inserted_here_p): Likewise.
793         (breakpoint_has_location_inserted_here): Likewise.
794         (single_step_breakpoint_inserted_here_p): Likewise.
795         (hardware_watchpoint_inserted_in_range): Likewise.
796         (breakpoint_address_match): Likewise.
797         (insert_single_step_breakpoint): Likewise.
798         (pc_at_non_inline_function): Likewise.
799         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
800         * record.c (record_check_stopped_by_breakpoint): Likewise.
801         * record.h (record_check_stopped_by_breakpoint): Likewise.
802         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
803
804 2017-10-25  Yao Qi  <yao.qi@linaro.org>
805
806         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
807         regcache->arch () instead get_regcache_arch.
808         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
809         Likewise.
810         (aarch64_fbsd_store_inferior_registers): Likewise.
811         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
812         (store_gregs_to_thread): Likewise.
813         (fetch_fpregs_from_thread): Likewise.
814         (store_fpregs_to_thread): Likewise.
815         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
816         (aarch64_store_return_value): Likewise.
817         (aarch64_software_single_step): Likewise.
818         * aix-thread.c (aix_thread_wait): Likewise.
819         (supply_reg32): Likewise.
820         (supply_sprs64): Likewise.
821         (supply_sprs32): Likewise.
822         (fill_gprs64): Likewise.
823         (fill_gprs32): Likewise.
824         (fill_sprs64): Likewise.
825         (fill_sprs32): Likewise.
826         (store_regs_user_thread): Likewise.
827         (store_regs_kernel_thread): Likewise.
828         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
829         (alphabsd_store_inferior_registers): Likewise.
830         * alpha-tdep.c (alpha_extract_return_value): Likewise.
831         (alpha_store_return_value): Likewise.
832         (alpha_deal_with_atomic_sequence): Likewise.
833         (alpha_next_pc): Likewise.
834         (alpha_software_single_step): Likewise.
835         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
836         (amd64bsd_store_inferior_registers): Likewise.
837         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
838         Likewise.
839         (amd64_linux_store_inferior_registers): Likewise.
840         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
841         (amd64_collect_native_gregset): Likewise.
842         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
843         (amd64obsd_collect_uthread): Likewise.
844         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
845         (amd64_collect_fpregset): Likewise.
846         (amd64_supply_fxsave): Likewise.
847         (amd64_supply_xsave): Likewise.
848         (amd64_collect_fxsave): Likewise.
849         (amd64_collect_xsave): Likewise.
850         * arc-tdep.c (arc_write_pc): Likewise.
851         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
852         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
853         (arm_fbsd_store_inferior_registers): Likewise.
854         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
855         (store_vfp_regs): Likewise.
856         (arm_linux_fetch_inferior_registers): Likewise.
857         (arm_linux_store_inferior_registers): Likewise.
858         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
859         (arm_linux_sigreturn_next_pc): Likewise.
860         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
861         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
862         (fetch_register): Likewise.
863         (store_register): Likewise.
864         * arm-tdep.c (arm_is_thumb): Likewise.
865         (displaced_in_arm_mode): Likewise.
866         (bx_write_pc): Likewise.
867         (arm_get_next_pcs_addr_bits_remove): Likewise.
868         (arm_software_single_step): Likewise.
869         (arm_extract_return_value): Likewise.
870         (arm_store_return_value): Likewise.
871         (arm_write_pc): Likewise.
872         * bfin-tdep.c (bfin_extract_return_value): Likewise.
873         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
874         (bsd_uthread_store_registers): Likewise.
875         * core-regset.c (fetch_core_registers): Likewise.
876         * corelow.c (get_core_registers): Likewise.
877         * cris-tdep.c (cris_store_return_value): Likewise.
878         (cris_extract_return_value): Likewise.
879         (find_step_target): Likewise.
880         (find_step_target): Likewise.
881         (cris_software_single_step): Likewise.
882         * ctf.c (ctf_fetch_registers): Likewise.
883         * darwin-nat.c (cancel_breakpoint): Likewise.
884         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
885         * frv-tdep.c (frv_extract_return_value): Likewise.
886         * ft32-tdep.c (ft32_store_return_value): Likewise.
887         (ft32_extract_return_value): Likewise.
888         * go32-nat.c (fetch_register): Likewise.
889         (go32_fetch_registers): Likewise.
890         (go32_store_registers): Likewise.
891         (store_register): Likewise.
892         * h8300-tdep.c (h8300_extract_return_value): Likewise.
893         (h8300_store_return_value): Likewise.
894         * hppa-linux-nat.c (fetch_register): Likewise.
895         (store_register): Likewise.
896         (hppa_linux_fetch_inferior_registers): Likewise.
897         (hppa_linux_store_inferior_registers): Likewise.
898         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
899         (i386_darwin_store_inferior_registers): Likewise.
900         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
901         (gnu_store_registers): Likewise.
902         * i386-linux-nat.c (fetch_register): Likewise.
903         (store_register): Likewise.
904         (supply_gregset): Likewise.
905         (fill_gregset): Likewise.
906         (i386_linux_fetch_inferior_registers): Likewise.
907         (i386_linux_store_inferior_registers): Likewise.
908         (i386_linux_resume): Likewise.
909         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
910         Likewise.
911         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
912         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
913         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
914         (i386obsd_collect_uthread): Likewise.
915         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
916         (i386_supply_gregset): Likewise.
917         (i386_collect_gregset): Likewise.
918         (i386_supply_fpregset): Likewise.
919         (i386_collect_fpregset): Likewise.
920         (i386_mpx_bd_base): Likewise.
921         * i386-v4-nat.c (supply_fpregset): Likewise.
922         (fill_fpregset): Likewise.
923         * i387-tdep.c (i387_supply_fsave): Likewise.
924         (i387_collect_fsave): Likewise.
925         (i387_supply_fxsave): Likewise.
926         (i387_collect_fxsave): Likewise.
927         (i387_supply_xsave): Likewise.
928         (i387_collect_xsave): Likewise.
929         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
930         (ia64_linux_store_registers): Likewise.
931         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
932         (ia64_extract_return_value): Likewise.
933         (ia64_store_return_value): Likewise.
934         (find_func_descr): Likewise.
935         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
936         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
937         (inf_ptrace_store_registers): Likewise.
938         * infrun.c (use_displaced_stepping): Likewise.
939         (displaced_step_prepare_throw): Likewise.
940         (resume): Likewise.
941         (proceed): Likewise.
942         (do_target_wait): Likewise.
943         (adjust_pc_after_break): Likewise.
944         (handle_inferior_event_1): Likewise.
945         (handle_signal_stop): Likewise.
946         (save_infcall_suspend_state): Likewise.
947         (restore_infcall_suspend_state): Likewise.
948         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
949         * jit.c (jit_frame_prev_register): Likewise.
950         * linux-nat.c (save_stop_reason): Likewise.
951         (linux_nat_wait_1): Likewise.
952         (resume_stopped_resumed_lwps): Likewise.
953         * linux-record.c (record_linux_sockaddr): Likewise.
954         (record_linux_msghdr): Likewise.
955         (record_linux_system_call): Likewise.
956         * linux-tdep.c (linux_collect_thread_registers): Likewise.
957         * lm32-tdep.c (lm32_extract_return_value): Likewise.
958         (lm32_store_return_value): Likewise.
959         * m32c-tdep.c (m32c_read_flg): Likewise.
960         (m32c_pseudo_register_read): Likewise.
961         (m32c_pseudo_register_write): Likewise.
962         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
963         (m32r_linux_collect_gregset): Likewise.
964         * m32r-tdep.c (m32r_store_return_value): Likewise.
965         (m32r_extract_return_value): Likewise.
966         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
967         (m68kbsd_collect_fpregset): Likewise.
968         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
969         * m68k-linux-nat.c (fetch_register): Likewise.
970         (old_fetch_inferior_registers): Likewise.
971         (old_store_inferior_registers): Likewise.
972         (store_regs): Likewise.
973         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
974         (m68k_svr4_store_return_value): Likewise.
975         * m88k-tdep.c (m88k_store_arguments): Likewise.
976         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
977         (mi_cmd_data_write_register_values): Likewise.
978         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
979         (mips_fbsd_store_inferior_registers): Likewise.
980         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
981         (mips_fbsd_supply_gregs): Likewise.
982         (mips_fbsd_collect_fpregs): Likewise.
983         (mips_fbsd_collect_gregs): Likewise.
984         (mips_fbsd_supply_fpregset): Likewise.
985         (mips_fbsd_collect_fpregset): Likewise.
986         (mips_fbsd_supply_gregset): Likewise.
987         (mips_fbsd_collect_gregset): Likewise.
988         * mips-linux-nat.c (supply_gregset): Likewise.
989         (fill_gregset): Likewise.
990         (supply_fpregset): Likewise.
991         (fill_fpregset): Likewise.
992         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
993         (mips_fill_gregset): Likewise.
994         (mips_supply_fpregset): Likewise.
995         (mips_fill_fpregset): Likewise.
996         (mips64_supply_gregset): Likewise.
997         (micromips_linux_sigframe_validate): Likewise.
998         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
999         (mipsnbsd_fetch_inferior_registers): Likewise.
1000         (mipsnbsd_store_inferior_registers): Likewise.
1001         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
1002         (mipsnbsd_supply_gregset): Likewise.
1003         (mipsnbsd_iterate_over_regset_sections): Likewise.
1004         (mipsnbsd_supply_reg): Likewise.
1005         (mipsnbsd_supply_fpreg): Likewise.
1006         * mips-tdep.c (mips_in_frame_stub): Likewise.
1007         (mips_dummy_id): Likewise.
1008         (is_octeon_bbit_op): Likewise.
1009         (micromips_bc1_pc): Likewise.
1010         (extended_mips16_next_pc): Likewise.
1011         (mips16_next_pc): Likewise.
1012         (deal_with_atomic_sequence): Likewise.
1013         * moxie-tdep.c (moxie_process_readu): Likewise.
1014         * nios2-tdep.c (nios2_get_next_pc): Likewise.
1015         * nto-procfs.c (procfs_store_registers): Likewise.
1016         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
1017         (ppcfbsd_store_inferior_registers): Likewise.
1018         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
1019         (fetch_altivec_register): Likewise.
1020         (get_spe_registers): Likewise.
1021         (fetch_spe_register): Likewise.
1022         (fetch_altivec_registers): Likewise.
1023         (fetch_all_gp_regs): Likewise.
1024         (fetch_all_fp_regs): Likewise.
1025         (store_vsx_register): Likewise.
1026         (store_altivec_register): Likewise.
1027         (set_spe_registers): Likewise.
1028         (store_spe_register): Likewise.
1029         (store_altivec_registers): Likewise.
1030         (store_all_gp_regs): Likewise.
1031         (store_all_fp_regs): Likewise.
1032         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1033         (ppc_linux_collect_gregset): Likewise.
1034         (ppc_canonicalize_syscall): Likewise.
1035         (ppc_linux_record_signal): Likewise.
1036         (ppu2spu_prev_register): Likewise.
1037         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1038         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1039         (ppcobsd_store_registers): Likewise.
1040         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1041         Likewise.
1042         (ppc_ravenscar_generic_store_registers): Likewise.
1043         * procfs.c (procfs_fetch_registers): Likewise.
1044         (procfs_store_registers): Likewise.
1045         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1046         (ravenscar_store_registers): Likewise.
1047         (ravenscar_prepare_to_store): Likewise.
1048         * record-btrace.c (record_btrace_fetch_registers): Likewise.
1049         * record-full.c (record_full_wait_1): Likewise.
1050         (record_full_registers_change): Likewise.
1051         (record_full_store_registers): Likewise.
1052         (record_full_core_fetch_registers): Likewise.
1053         (record_full_save): Likewise.
1054         (record_full_goto_insn): Likewise.
1055         * regcache.c (regcache_register_size): Likewise.
1056         (get_regcache_arch): Remove.
1057         (regcache_read_pc): Likewise.
1058         * regcache.h (get_regcache_arch): Remove.
1059         * remote-sim.c (gdbsim_fetch_register): Likewise.
1060         (gdbsim_store_register): Likewise.
1061         * remote.c (fetch_register_using_p): Likewise.
1062         (send_g_packet): Likewise.
1063         (remote_prepare_to_store): Likewise.
1064         (store_registers_using_G): Likewise.
1065         * reverse.c (save_bookmark_command): Likewise.
1066         (goto_bookmark_command): Likewise.
1067         * rs6000-aix-tdep.c (branch_dest): Likewise.
1068         * rs6000-nat.c (rs6000_ptrace64): Likewise.
1069         (fetch_register): Likewise.
1070         * rs6000-tdep.c (ppc_supply_reg): Likewise.
1071         (ppc_collect_reg): Likewise.
1072         (ppc_collect_gregset): Likewise.
1073         (ppc_collect_fpregset): Likewise.
1074         (ppc_collect_vsxregset): Likewise.
1075         (ppc_collect_vrregset): Likewise.
1076         (ppc_displaced_step_hw_singlestep): Likewise.
1077         (rs6000_pseudo_register_read): Likewise.
1078         (rs6000_pseudo_register_write): Likewise.
1079         * s390-linux-nat.c (supply_gregset): Likewise.
1080         (fill_gregset): Likewise.
1081         (s390_linux_fetch_inferior_registers): Likewise.
1082         * s390-linux-tdep.c (s390_write_pc): Likewise.
1083         (s390_software_single_step): Likewise.
1084         (s390_all_but_pc_registers_record): Likewise.
1085         (s390_linux_syscall_record): Likewise.
1086         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1087         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1088         (shnbsd_store_inferior_registers): Likewise.
1089         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1090         (sh_extract_return_value_fpu): Likewise.
1091         (sh_store_return_value_nofpu): Likewise.
1092         (sh_corefile_supply_regset): Likewise.
1093         (sh_corefile_collect_regset): Likewise.
1094         * sh64-tdep.c (sh64_extract_return_value): Likewise.
1095         (sh64_store_return_value): Likewise.
1096         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1097         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1098         (sparc_store_inferior_registers): Likewise.
1099         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1100         (sparc_ravenscar_prepare_to_store): Likewise.
1101         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1102         (sparc_analyze_control_transfer): Likewise.
1103         (sparc_step_trap): Likewise.
1104         (sparc_software_single_step): Likewise.
1105         (sparc32_gdbarch_init): Likewise.
1106         (sparc_supply_rwindow): Likewise.
1107         (sparc_collect_rwindow): Likewise.
1108         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1109         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1110         (sparc64nbsd_collect_gregset): Likewise.
1111         (sparc64nbsd_supply_fpregset): Likewise.
1112         (sparc64nbsd_collect_fpregset): Likewise.
1113         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1114         (sparc64_supply_gregset): Likewise.
1115         (sparc64_collect_gregset): Likewise.
1116         (sparc64_supply_fpregset): Likewise.
1117         (sparc64_collect_fpregset): Likewise.
1118         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
1119         * spu-tdep.c (spu_unwind_sp): Likewise.
1120         (spu2ppu_prev_register): Likewise.
1121         (spu_memory_remove_breakpoint): Likewise.
1122         * stack.c (return_command): Likewise.
1123         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
1124         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
1125         * tracefile.c (trace_save_ctf): Likewise.
1126         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
1127         (do_windows_store_inferior_registers): Likewise.
1128         (windows_resume): Likewise.
1129         * xtensa-linux-nat.c (fill_gregset): Likewise.
1130         (supply_gregset_reg): Likewise.
1131         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
1132         (xtensa_register_read_masked): Likewise.
1133         (xtensa_supply_gregset): Likewise.
1134         (xtensa_extract_return_value): Likewise.
1135         (xtensa_store_return_value): Likewise.
1136
1137 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
1138
1139         * doublest.c (floatformat_from_string): New function.
1140         * doublest.h (floatformat_from_string): Add prototype.
1141
1142         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
1143         (OP_FLOAT): ... this.
1144         * expression.h: Do not include "doublest.h".
1145         (union exp_element): Replace doubleconst and decfloatconst by
1146         new element floatconst.
1147         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
1148         (ada_evaluate_subexp): Likewise.
1149         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
1150         OP_DOUBLE and OP_DECFLOAT.
1151         * expprint.c (print_subexp_standard): Likewise.
1152         (dump_subexp_body_standard): Likewise.
1153         * breakpoint.c (watchpoint_exp_is_const): Likewise.
1154
1155         * parse.c: Include "dfp.h".
1156         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1157         (write_exp_elt_floatcst): New function.
1158         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
1159         and OP_DECFLOAT.
1160         (operator_check_standard): Likewise.
1161         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
1162         Return target format buffer instead of host DOUBLEST.
1163         Use floatformat_from_string and decimal_from_string to parse
1164         either binary or decimal floating-point types.
1165         (parse_c_float): Remove.
1166         * parser-defs.h: Do not include "doublest.h".
1167         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1168         (write_exp_elt_floatcst): Add prototype.
1169         (parse_float): Update prototype.
1170         (parse_c_float): Remove.
1171
1172         * c-exp.y: Do not include "dfp.h".
1173         (typed_val_float): Use byte buffer instead of DOUBLEST.
1174         (typed_val_decfloat): Remove.
1175         (DECFLOAT): Remove.
1176         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1177         (parse_number): Update to new parse_float interface.
1178         Parse suffixes and determine type before calling parse_float.
1179         Handle decimal and binary FP types the same way.
1180
1181         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1182         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
1183         (parse_number): Update to new parse_float interface.
1184         Parse suffixes and determine type before calling parse_float.
1185
1186         * f-exp.y: Replace dval by typed_val_float.
1187         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1188         (parse_number): Use parse_float instead of atof.
1189
1190         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1191         (parse_go_float): Remove.
1192         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1193         (parse_number): Call parse_float instead of parse_go_float.
1194         Parse suffixes and determine type before calling parse_float.
1195
1196         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1197         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1198         (parse_number): Update to new parse_float interface.
1199         Parse suffixes and determine type before calling parse_float.
1200
1201         * m2-exp.y: Replace dval by byte buffer val.
1202         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1203         (parse_number): Call parse_float instead of atof.
1204
1205         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1206         (lex_number): Call parse_float instead of strtod.
1207         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
1208         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
1209         Use write_exp_elt_floatcst.
1210         (unit_testing): Remove static variable.
1211         (rust_type): Do not check unit_testing.
1212         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
1213
1214         * ada-exp.y (type_float, type_double): Remove.
1215         (typed_val_float): Use byte buffer instead of DOUBLEST.
1216         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1217         * ada-lex.l (processReal): Use parse_float instead of sscanf.
1218
1219 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
1220
1221         * aarch64-tdep.h (enum aarch64_regnum): Remove.
1222         * arch/aarch64.h: New file.
1223
1224 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1225
1226         * dfp.h (decimal_from_string): Use const reference for argument.
1227         * dfp.c (decimal_from_string): Likewise.
1228
1229 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1230
1231         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
1232         * sh64-tdep.c (sh64_do_fp_register): Likewise.
1233         * mips-tdep.c (mips_print_fp_register): Likewise.
1234
1235 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1236
1237         * common/format.h (enum argclass): Replace decfloat_arg by
1238         dec32float_arg, dec64float_arg, and dec128float_arg.
1239         * common/format.c (parse_format_string): Update to return
1240         new decimal float argument classes.
1241
1242         * printcmd.c (printf_decfloat): Rename to ...
1243         (printf_floating): ... this.  Add argclass argument, and use it
1244         instead of parsing the format string again.  Add support for
1245         binary floating-point values, using floatformat_to_string.
1246         Convert value to the target format if it doesn't already match.
1247         (ui_printf): Call printf_floating instead of printf_decfloat,
1248         also for double_arg / long_double_arg.  Pass argclass.
1249
1250         * dfp.c (decimal_to_string): Add format string argument.
1251         * dfp.h (decimal_to_string): Likewise.
1252
1253         * doublest.c (floatformat_to_string): Add format string argument.
1254         * doublest.h (floatformat_to_string): Likewise.
1255
1256 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1257
1258         * doublest.c (floatformat_precision): New routine.
1259         (floatformat_to_string): Likewise.
1260         * doublest.c (floatformat_to_string): Add prototype.
1261
1262         * printcmd.c (print_scalar_formatted): Only call print_floating
1263         on floating-point types.
1264         * valprint.c: Do not include "floatformat.h".
1265         (generic_val_print_decfloat): Remove.
1266         (generic_val_print): Call generic_val_print_float for both
1267         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
1268         (print_floating): Use floatformat_to_string.  Handle decimal float.
1269         (print_decimal_floating): Remove, merge into floatformat_to_string.
1270         * value.h (print_decimal_floating): Remove.
1271
1272         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
1273
1274 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1275
1276         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
1277
1278 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1279
1280         * memattr.h: Don't include vec.h.
1281         (struct mem_attrib): Initialize fields.
1282         <unknown>: New static method.
1283         (struct mem_region): Add constructors, operator<, initialize
1284         fields.
1285         * memattr.c: Include algorithm.
1286         (default_mem_attrib, unknown_mem_attrib): Remove.
1287         (user_mem_region_list): New global.
1288         (target_mem_region_list, mem_region_list): Change type to
1289         std::vector<mem_region>.
1290         (mem_use_target): Now a function.
1291         (target_mem_regions_valid): Change type to bool.
1292         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
1293         (require_user_regions): Adjust.
1294         (require_target_regions): Adjust.
1295         (create_mem_region): Adjust.
1296         (lookup_mem_region): Adjust.
1297         (invalidate_target_mem_regions): Adjust.
1298         (mem_clear): Rename to...
1299         (user_mem_clear): ... this, and adjust.
1300         (mem_command): Adjust.
1301         (info_mem_command): Adjust.
1302         (mem_enable, enable_mem_command, mem_disable,
1303         disable_mem_command): Adjust.
1304         (mem_delete): Adjust.
1305         (delete_mem_command): Adjust.
1306         * memory-map.h (parse_memory_map): Return an std::vector.
1307         * memory-map.c (parse_memory_map): Likewise.
1308         (struct memory_map_parsing_data): Add constructor.
1309         <memory_map>: Point to std::vector.
1310         (memory_map_start_memory): Adjust.
1311         (memory_map_end_memory): Adjust.
1312         (memory_map_end_property): Adjust.
1313         (clear_result): Remove.
1314         * remote.c (remote_memory_map): Return an std::vector.
1315         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
1316         Remove.
1317         (target_debug_print_mem_region_vector): New.
1318         * target-delegates.c: Regenerate.
1319         * target.h (mem_region_vector): New typedef.
1320         (to_memory_map): Return mem_region_vector.
1321         (target_memory_map): Return an std::vector.
1322         * target.c (target_memory_map): Return an std::vector.
1323         (flash_erase_command): Adjust.
1324
1325 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1326
1327         * memory-map.c (struct memory_map_parsing_data) <property_name>:
1328         Change type to std::string.
1329         (memory_map_start_property): Adjust.
1330         (memory_map_end_property): Adjust.
1331
1332 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1333
1334         * infrun.h: Include common/byte-vector.h.
1335         (struct displaced_step_closure): New struct.
1336         (struct buf_displaced_step_closure): New struct.
1337         * infrun.c (displaced_step_closure::~displaced_step_closure):
1338         Provide default implementation.
1339         (displaced_step_clear): Deallocate step closure with delete.
1340         * aarch64-tdep.c (displaced_step_closure): Rename to ...
1341         (aarch64_displaced_step_closure): ... this, extend
1342         displaced_step_closure.
1343         (aarch64_displaced_step_data) <dsc>: Change type to
1344         aarch64_displaced_step_closure.
1345         (aarch64_displaced_step_copy_insn): Adjust to type change, use
1346         unique_ptr.
1347         (aarch64_displaced_step_fixup): Add cast for displaced step
1348         closure.
1349         * amd64-tdep.c (displaced_step_closure): Rename to ...
1350         (amd64_displaced_step_closure): ... this, extend
1351         displaced_step_closure.
1352         <insn_buf>: Change type to std::vector<gdb_byte>.
1353         <max_len>: Remove.
1354         (fixup_riprel): Change type of DSC parameter, adjust to type
1355         change of insn_buf.
1356         (fixup_displaced_copy): Change type of DSC parameter.
1357         (amd64_displaced_step_copy_insn): Instantiate
1358         amd64_displaced_step_closure.
1359         (amd64_displaced_step_fixup): Add cast for closure type, adjust
1360         to type change of insn_buf.
1361         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
1362         parameter DSC.
1363         (arm_linux_copy_svc): Likewise.
1364         (cleanup_kernel_helper_return): Likewise.
1365         (arm_catch_kernel_helper_return): Likewise.
1366         (arm_linux_displaced_step_copy_insn): Instantiate
1367         arm_displaced_step_closure.
1368         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
1369         (displaced_read_reg): Change type of parameter DSC.
1370         (branch_write_pc): Likewise.
1371         (load_write_pc): Likewise.
1372         (alu_write_pc): Likewise.
1373         (displaced_write_reg): Likewise.
1374         (arm_copy_unmodified): Likewise.
1375         (thumb_copy_unmodified_32bit): Likewise.
1376         (thumb_copy_unmodified_16bit): Likewise.
1377         (cleanup_preload): Likewise.
1378         (install_preload): Likewise.
1379         (arm_copy_preload): Likewise.
1380         (thumb2_copy_preload): Likewise.
1381         (install_preload_reg): Likewise.
1382         (arm_copy_preload_reg): Likewise.
1383         (cleanup_copro_load_store): Likewise.
1384         (install_copro_load_store): Likewise.
1385         (arm_copy_copro_load_store) Likewise.
1386         (thumb2_copy_copro_load_store): Likewise.
1387         (cleanup_branch): Likewise.
1388         (install_b_bl_blx): Likewise.
1389         (arm_copy_b_bl_blx): Likewise.
1390         (thumb2_copy_b_bl_blx): Likewise.
1391         (thumb_copy_b): Likewise.
1392         (install_bx_blx_reg): Likewise.
1393         (arm_copy_bx_blx_reg): Likewise.
1394         (thumb_copy_bx_blx_reg): Likewise.
1395         (cleanup_alu_imm): Likewise.
1396         (arm_copy_alu_imm): Likewise.
1397         (thumb2_copy_alu_imm): Likewise.
1398         (cleanup_alu_reg): Likewise.
1399         (install_alu_reg): Likewise.
1400         (arm_copy_alu_reg): Likewise.
1401         (thumb_copy_alu_reg): Likewise.
1402         (cleanup_alu_shifted_reg): Likewise.
1403         (install_alu_shifted_reg): Likewise.
1404         (arm_copy_alu_shifted_reg): Likewise.
1405         (cleanup_load): Likewise.
1406         (cleanup_store): Likewise.
1407         (arm_copy_extra_ld_st): Likewise.
1408         (install_load_store): Likewise.
1409         (thumb2_copy_load_literal): Likewise.
1410         (thumb2_copy_load_reg_imm): Likewise.
1411         (arm_copy_ldr_str_ldrb_strb): Likewise.
1412         (cleanup_block_load_all): Likewise.
1413         (cleanup_block_store_pc): Likewise.
1414         (cleanup_block_load_pc): Likewise.
1415         (arm_copy_block_xfer): Likewise.
1416         (thumb2_copy_block_xfer): Likewise.
1417         (cleanup_svc): Likewise.
1418         (install_svc): Likewise.
1419         (arm_copy_svc): Likewise.
1420         (thumb_copy_svc): Likewise.
1421         (arm_copy_undef): Likewise.
1422         (thumb_32bit_copy_undef): Likewise.
1423         (arm_copy_unpred): Likewise.
1424         (arm_decode_misc_memhint_neon): Likewise.
1425         (arm_decode_unconditional): Likewise.
1426         (arm_decode_miscellaneous): Likewise.
1427         (arm_decode_dp_misc): Likewise.
1428         (arm_decode_ld_st_word_ubyte): Likewise.
1429         (arm_decode_media): Likewise.
1430         (arm_decode_b_bl_ldmstm): Likewise.
1431         (arm_decode_ext_reg_ld_st): Likewise.
1432         (thumb2_decode_dp_shift_reg): Likewise.
1433         (thumb2_decode_ext_reg_ld_st): Likewise.
1434         (arm_decode_svc_copro): Likewise.
1435         (thumb2_decode_svc_copro): Likewise.
1436         (install_pc_relative): Likewise.
1437         (thumb_copy_pc_relative_16bit): Likewise.
1438         (thumb_decode_pc_relative_16bit): Likewise.
1439         (thumb_copy_pc_relative_32bit): Likewise.
1440         (thumb_copy_16bit_ldr_literal): Likewise.
1441         (thumb_copy_cbnz_cbz): Likewise.
1442         (thumb2_copy_table_branch): Likewise.
1443         (cleanup_pop_pc_16bit_all): Likewise.
1444         (thumb_copy_pop_pc_16bit): Likewise.
1445         (thumb_process_displaced_16bit_insn): Likewise.
1446         (decode_thumb_32bit_ld_mem_hints): Likewise.
1447         (thumb_process_displaced_32bit_insn): Likewise.
1448         (thumb_process_displaced_insn): Likewise.
1449         (arm_process_displaced_insn): Likewise.
1450         (arm_displaced_init_closure): Likewise.
1451         (arm_displaced_step_fixup): Add cast for closure.
1452         * arm-tdep.h: Include infrun.h.
1453         (displaced_step_closure): Rename to ...
1454         (arm_displaced_step_closure): ... this, extend
1455         displaced_step_closure.
1456         <u::svc::copy_svc_os>: Change type of parameter DSC.
1457         <cleanup>: Likewise.
1458         (arm_process_displaced_insn): Likewise.
1459         (arm_displaced_init_closure): Likewise.
1460         (displaced_read_reg): Likewise.
1461         (displaced_write_reg): Likewise.
1462         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1463         Adjust.
1464         * i386-tdep.h: Include infrun.h.
1465         (i386_displaced_step_closure): New typedef.
1466         * i386-tdep.c (i386_displaced_step_copy_insn): Use
1467         i386_displaced_step_closure.
1468         (i386_displaced_step_fixup): Adjust.
1469         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
1470         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
1471         and unique_ptr.
1472         (ppc_displaced_step_fixup): Adjust.
1473         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
1474         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
1475         and unique_ptr.
1476         (s390_displaced_step_fixup): Adjust.
1477
1478 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1479
1480         * interps.h (interp_resume, interp_suspend, interp_set_temp):
1481         Remove declarations.
1482
1483 2017-10-20  Tom Tromey  <tom@tromey.com>
1484
1485         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
1486         std::vector.
1487         (gdb_bfd_record_inclusion): Update.
1488         (bfdp): Remove typedef.
1489
1490 2017-10-20  Tom Tromey  <tom@tromey.com>
1491
1492         * gdb_bfd.c (gdb_bfd_ref): Use new.
1493         (struct gdb_bfd_data): Add constructor, destructor, and member
1494         initializers.
1495         (gdb_bfd_unref): Use delete.
1496
1497 2017-10-20  Tom Tromey  <tom@tromey.com>
1498
1499         * exec.c (exec_file_attach): Use new_bfd_ref.
1500         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
1501         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1502         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
1503         new_bfd_ref.
1504         * gdb_bfd.h (new_bfd_ref): New function.
1505
1506 2017-10-20  Pedro Alves  <palves@redhat.com>
1507
1508         * main.c (captured_command_loop): Add attribute noinline.
1509
1510 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
1511
1512         * interps.c (struct interp_factory): Add constructor.
1513         (interp_factory_p): Remove typedef.
1514         (DEF_VEC_P(interp_factory_p)): Remove.
1515         (interpreter_factories): Change type to std::vector.
1516         (interp_factory_register): Adjust.
1517         (interp_lookup): Adjust.
1518         (interpreter_completer): Adjust.
1519
1520 2017-10-19  Tom Tromey  <tom@tromey.com>
1521
1522         * break-catch-syscall.c (catch_syscall_completer): Use
1523         std::string, gdb::unique_xmalloc_ptr.
1524
1525 2017-10-19  Tom Tromey  <tom@tromey.com>
1526
1527         * infcall.c (call_function_by_hand_dummy): Use std::string.
1528
1529 2017-10-19  Tom Tromey  <tom@tromey.com>
1530
1531         * mi/mi-main.c (mi_cmd_execute): Update.
1532         * top.h (prepare_execute_command): Return scoped_value_mark.
1533         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
1534         Add move constructor.
1535         * top.c (prepare_execute_command): Return scoped_value_mark.
1536         (execute_command): Update.
1537
1538 2017-10-19  Pedro Alves  <palves@redhat.com>
1539
1540         * xml-support.c (xml_fetch_content_from_file): Check fread's
1541         return.
1542
1543 2017-10-19  Pedro Alves  <palves@redhat.com>
1544
1545         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
1546         async.
1547         (handle_error_fd): New function.
1548         (ser_base_async): Add/delete an event loop file handler for
1549         error_fd.
1550
1551 2017-10-19  Pedro Alves  <palves@redhat.com>
1552
1553         * xml-support.c (xml_fetch_content_from_file): Don't read in
1554         chunks.  Instead use fseek to determine the file's size, and read
1555         it in one go.
1556
1557 2017-11-18  Keith Seitz  <keiths@redhat.com>
1558
1559         * c-exp.y (oper): Canonicalize conversion operators of user-defined
1560         types.
1561         Add whitespace to front of type name.
1562
1563 2017-10-18  Keith Seitz  <keiths@redhat.com>
1564
1565         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
1566         DW_AT_accessibility.
1567
1568 2017-10-18  Yao Qi  <yao.qi@linaro.org>
1569
1570         * features/tic6x-c62x-linux.c: Remove.
1571
1572 2017-10-17  Tom Tromey  <tom@tromey.com>
1573
1574         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
1575         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
1576         (do_mixed_source_and_assembly): Likewise.
1577
1578 2017-10-17  Tom Tromey  <tom@tromey.com>
1579
1580         * regcache.c (regcache::xfer_part): Remove assertion.
1581
1582 2017-10-17  Pedro Alves  <palves@redhat.com>
1583
1584         * xml-support.c (xml_fetch_content_from_file): Call
1585         unique_ptr::release() instead unique_ptr::get() when passing
1586         through xrealloc.
1587
1588 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1589
1590         * regcache.c (regcache::xfer_part): Remove parameters read and
1591         write, add parameter is_raw.  All callers are updated.
1592
1593 2017-10-16  Keith Seitz  <keiths@redhat.com>
1594
1595         * c-typeprint.c (enum access_specifier): Moved here from
1596         c_type_print_base.
1597         (output_access_specifier): New function.
1598         (c_type_print_base): Consider typedefs when assessing
1599         whether access labels are needed.
1600         Use output_access_specifier as needed.
1601         Output access specifier for typedefs, if needed.
1602         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
1603         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
1604         fields.
1605         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
1606         accessor macros.
1607
1608 2017-10-16  Tom Tromey  <tom@tromey.com>
1609
1610         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1611         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1612         * target.c (target_fileio_read_stralloc): Update.
1613         * sparc64-tdep.c (adi_is_addr_mapped): Update.
1614         * target.h (target_fileio_read_stralloc): Return
1615         unique_xmalloc_ptr.
1616
1617 2017-10-16  Tom Tromey  <tom@tromey.com>
1618
1619         * xml-syscall.c (xml_init_syscalls_info): Update.
1620         * xml-support.c (xinclude_start_include): Update.
1621         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1622         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1623         (xml_fetch_content_from_file): Likewise.
1624         * osdata.c (get_osdata): Update.
1625         * target.h (target_read_stralloc, target_get_osdata): Return
1626         unique_xmalloc_ptr.
1627         * solib-aix.c (solib_aix_get_library_list): Update.
1628         * solib-target.c (solib_target_current_sos): Update.
1629         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1630         * xml-tdesc.c (fetch_available_features_from_target): Update.
1631         (target_fetch_description_xml): Update.
1632         (file_read_description_xml): Update.
1633         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1634         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1635         (remote_pid_to_exec_file): Update.
1636         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1637         (target_get_osdata): Likewise.
1638
1639 2017-10-16  Tom Tromey  <tom@tromey.com>
1640
1641         * remote.c (remote_register_number_and_offset): Use std::vector.
1642         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1643         (putpkt_binary): Use gdb::def_vector.
1644         (compare_sections_command): Use gdb::byte_vector.
1645
1646 2017-10-16  Tom Tromey  <tom@tromey.com>
1647
1648         * ppc-linux-nat.c (hwdebug_insert_point): Use
1649         gdb::unique_xmalloc_ptr, XDUP.
1650
1651 2017-10-16  Tom Tromey  <tom@tromey.com>
1652
1653         * probe.c (parse_probes): Use std::string.
1654         (info_probes_for_ops, enable_probes_command)
1655         (disable_probes_command): Remove cleanups.
1656
1657 2017-10-16  Tom Tromey  <tom@tromey.com>
1658
1659         * buildsym.c (block_compar): Remove.
1660         (end_symtab_get_static_block): Use std::vector.
1661
1662 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
1663
1664         * memrange.h (struct mem_range): Define operator< and operator==.
1665         (mem_range_s): Remove.
1666         (DEF_VEC_O (mem_range_s)): Remove.
1667         (normalize_mem_ranges): Change parameter type to std::vector.
1668         * memrange.c (compare_mem_ranges): Remove.
1669         (normalize_mem_ranges): Change parameter type to std::vector,
1670         adjust to vector change.
1671         * exec.c (section_table_available_memory): Return vector, remove
1672         parameter.
1673         (section_table_read_available_memory): Adjust to std::vector
1674         change.
1675         * remote.c (remote_read_bytes): Adjust to std::vector
1676         change.
1677         * tracepoint.h (traceframe_available_memory): Change parameter
1678         type to std::vector.
1679         * tracepoint.c (traceframe_available_memory): Change parameter
1680         type to std::vector, adjust.
1681         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1682         std::vector change.
1683         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1684         unittests/memrange-selftests.c.
1685         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1686         * gdb/unittests/memrange-selftests.c: New file.
1687
1688 2017-10-16  Pedro Alves  <palves@redhat.com>
1689
1690         * elfread.c (probe_key_free): Rename range-for variable.
1691         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1692         (find_probe_by_pc, collect_probes): Rename range-for variable.
1693
1694 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1695
1696         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1697         * features/tic6x-c62x.c: Remove.
1698         * features/tic6x-c64x-linux.c: Remove.
1699         * features/tic6x-c64x.c: Remove.
1700         * features/tic6x-c64xp-linux.c: Remove.
1701         * features/tic6x-c64xp.c: Remove.
1702         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1703         initialize_tdesc_tic6x_*_linux functions.
1704         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1705         initialize_tdesc_tic6x_* functions.
1706
1707 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1708
1709         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1710         tic6x-c62x.
1711         * regformats/tic6x-c62x.dat: Remove.
1712         * regformats/tic6x-c64x.dat: Remove.
1713         * regformats/tic6x-c64xp.dat: Remove.
1714
1715 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1716
1717         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1718         (the !HAVE_LIBEXPAT version).
1719
1720 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1721
1722         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1723         const.
1724
1725 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1726
1727         * target.h: Include tracepoint.h.
1728         (enum trace_find_type): Move to tracepoint.h.
1729         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1730         * tracepoint.h: Don't include target.h
1731         (enum trace_find_type): Move from target.h.
1732         (parse_traceframe_info): Return a unique ptr.
1733         * tracepoint.c (current_traceframe_info): Change type to unique
1734         ptr.
1735         (free_traceframe_info): Remove.
1736         (clear_traceframe_info): Don't manually free
1737         current_traceframe_info.
1738         (free_result): Remove.
1739         (parse_traceframe_info): Return a unique ptr.
1740         (get_traceframe_info): Adjust to unique ptr.
1741         * ctf.c (ctf_traceframe_info): Return a unique ptr.
1742         * remote.c (remote_traceframe_info): Return a unique ptr.
1743         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1744         ptr.
1745         * target-debug.h (target_debug_print_traceframe_info_up): New
1746         macro.
1747         * target-delegates.c: Regenerate.
1748
1749 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1750
1751         * memrange.h (struct mem_range): Add constructors.
1752         * tracepoint.h (struct traceframe_info) <memory>: Change type to
1753         std::vector<mem_range>.
1754         * tracepoint.c (free_traceframe_info): Don't manually free
1755         vector.
1756         (traceframe_info_start_memory): Adjust to vector change.
1757         (traceframe_available_memory): Likewise.
1758         * tracefile-tfile.c (build_traceframe_info): Likewise.
1759         * ctf.c (ctf_traceframe_info): Likewise.
1760
1761 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1762
1763         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1764         std::vector<int>.
1765         * tracepoint.c (free_traceframe_info): Deallocate with delete.
1766         (traceframe_info_start_tvar): Adjust to vector change.
1767         (parse_traceframe_info): Allocate with new.
1768         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1769         vector change.
1770         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1771         change.
1772         tfile_traceframe_info): Allocate with new.
1773         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1774         change.
1775
1776 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1777
1778         * tracepoint.c (traceframe_info): Rename to...
1779         (current_traceframe_info): ...this.
1780         (clear_traceframe_info): Adjust.
1781         (get_traceframe_info): Adjust.
1782
1783 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1784
1785         * nat/linux-osdata.c: Include algorithm.
1786         (compare_processes): Remove.
1787         (struct pid_pgid_entry): New struct.
1788         (linux_xfer_osdata_processgroups): Use std::vector instead of
1789         XNEWVEC.
1790
1791 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1792
1793         * objfiles.h: Don't include symfile.h.
1794         (struct partial_symbol): Remove forward-declaration.
1795         (struct objfile) <global_psymbols, static_psymbols>: Change type
1796         to std::vector<partial_symbol *>.
1797         * objfiles.c (objfile::objfile): Don't memset those fields.
1798         (objfile::~objfile): Don't free those fields.
1799         * psympriv.h (struct psymbol_allocation_list): Remove
1800         forward-declaration.
1801         (add_psymbol_to_list): Change psymbol_allocation_list parameter
1802         to std::vector.
1803         (start_psymtab_common): Change parameters to std::vector.
1804         * psymtab.c: Include algorithm.
1805         (require_partial_symbols): Call shrink_to_fit.
1806         (find_pc_sect_psymbol): Adjust to vector change.
1807         (match_partial_symbol): Likewise.
1808         (lookup_partial_symbol): Likewise.
1809         (psym_relocate): Likewise.
1810         (dump_psymtab): Likewise.
1811         (recursively_search_psymtabs): Likewise.
1812         (compare_psymbols): Remove.
1813         (sort_pst_symbols): Adjust to vector change.
1814         (start_psymtab_common): Likewise.
1815         (end_psymtab_common): Likewise.
1816         (psymbol_bcache_full): De-constify return value.
1817         (add_psymbol_to_bcache): Likewise.
1818         (extend_psymbol_list): Remove.
1819         (append_psymbol_to_list): Adjust to vector change.
1820         (add_psymbol_to_list): Likewise.
1821         (init_psymbol_list): Likewise.
1822         (maintenance_info_psymtabs): Likewise.
1823         (maintenance_check_psymtabs): Likewise.
1824         * symfile.h (struct psymbol_allocation_list): Remove.
1825         * symfile.c (reread_symbols): Adjust to vector change.
1826         * dbxread.c (start_psymtab): Change type of parameters.
1827         (dbx_symfile_read): Adjust to vector change.
1828         (read_dbx_symtab): Likewise.
1829         (start_psymtab): Change type of parameters.
1830         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1831         (create_partial_symtab): Likewise.
1832         (add_partial_symbol): Likewise.
1833         (write_one_signatured_type): Likewise.
1834         (recursively_write_psymbols): Likewise.
1835         * mdebugread.c (parse_partial_symbols): Likewise.
1836         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1837         (scan_xcoff_symtab): Adjust to vector change.
1838         (xcoff_initial_scan): Likewise.
1839
1840 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
1841
1842         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1843
1844 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1845
1846         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1847         Remove s390x-*-expedite, add s390x-expedite.
1848
1849 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1850
1851         * features/s390-gs-linux64.c: Regenerated.
1852         * features/s390x-gs-linux64.c: Regenerated.
1853
1854 2017-10-13  Tom Tromey  <tom@tromey.com>
1855
1856         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1857         * solib.c (update_solib_list, reload_shared_libraries_1): Use
1858         delete.
1859         * symfile.c (symbol_file_add_with_addrs): Use new.
1860         (symbol_file_add_separate): Update comment.
1861         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1862         * jit.c (jit_object_close_impl): Use new.
1863         (jit_unregister_code): Use delete.
1864         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1865         (~objfile): Rename from free_objfile.
1866         (free_objfile_separate_debug, do_free_objfile_cleanup)
1867         (free_all_objfiles, objfile_purge_solibs): Use delete.
1868         * objfiles.h (struct objfile): Add constructor and destructor.
1869         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
1870         (allocate_objfile, free_objfile): Don't declare.
1871         (struct objstats): Add initializers.
1872
1873 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1874
1875         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1876         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1877         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1878         * gdbarch.h: Regenerate.
1879         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1880         Adjust comment.
1881         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1882         (i386_displaced_step_fixup): Adjust comment.
1883         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1884
1885 2017-10-12  Tom Tromey  <tom@tromey.com>
1886
1887         * prologue-value.h (pv_area::store_would_trash): Return bool.
1888         (pv_area::find_reg): Likewise.
1889         * prologue-value.c (pv_area::store_would_trash): Return bool.
1890         (pv_area::find_reg): Likewise.
1891
1892 2017-10-12  Tom Tromey  <tom@tromey.com>
1893
1894         * s390-linux-tdep.c (s390_store, s390_load)
1895         (s390_check_for_saved, s390_analyze_prologue): Update.
1896         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1897         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1898         * prologue-value.h (class pv_area): Move from prologue-value.c.
1899         Change names of members.  Add constructor, destructor, member
1900         functions.
1901         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1902         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1903         (pv_area_fetch, pv_area_scan): Don't declare.
1904         * prologue-value.c (struct pv_area::area_entry): Now member of
1905         pv_area.
1906         (struct pv_area): Move to prologue-value.h.
1907         (pv_area::pv_area): Rename from make_pv_area.
1908         (pv_area::~pv_area): Rename from free_pv_area.
1909         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1910         (clear_entries, find_entry, overlaps, store_would_trash, store)
1911         (fetch, find_reg, scan): Now member of pv_area.
1912         Remove "area" argument.  Update.
1913         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1914         Update.
1915         * mn10300-tdep.c (push_reg, check_for_saved)
1916         (mn10300_analyze_prologue): Update.
1917         * mep-tdep.c (is_arg_spill, check_for_saved)
1918         (mep_analyze_prologue): Update.
1919         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1920         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1921         (m32c_is_struct_return, m32c_analyze_prologue): Update.
1922         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1923         Update.
1924         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1925         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1926
1927 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1928
1929         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1930         * linux-nat.c (linux_nat_delete_thread): New variable.
1931         (lwp_free): Invoke linux_nat_delete_thread if set.
1932         (linux_nat_set_delete_thread): New function.
1933         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1934         thread delete callback.
1935         * arm-linux-nat.c (arm_linux_delete_thread): New function.
1936         (_initialize_arm_linux_nat): Assign thread delete callback.
1937         * s390-linux-nat.c (s390_delete_thread): New function.
1938         (_initialize_s390_nat): Assign thread delete callback.
1939         * x86-linux-nat.c (x86_linux_add_target): Likewise.
1940         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1941         function.
1942         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1943         declaration.
1944         * nat/x86-linux.c (x86_linux_delete_thread): New function.
1945         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1946
1947 2017-10-09  Tom Tromey  <tom@tromey.com>
1948
1949         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1950         std::string.
1951         * tui/tui-layout.c (enum tui_status): Use std::string.
1952
1953 2017-10-11  Tom Tromey  <tom@tromey.com>
1954
1955         * gdbthread.h (thread_command): Constify.
1956         * inferior.h (detach_command): Constify.
1957         * top.h (set_history, show_history): Constify.
1958         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1959         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1960         * bsd-kvm.c (bsd_kvm_cmd): Constify.
1961         * printcmd.c (set_command): Constify.
1962         (non_const_set_command): New function.
1963         * dcache.c (set_dcache_command, show_dcache_command): Constify.
1964         * breakpoint.c (enable_command, disable_command, delete_command)
1965         (catch_command, tcatch_command, set_breakpoint_cmd)
1966         (show_breakpoint_cmd): Constify.
1967         * macrocmd.c (macro_command): Constify.
1968         * infcmd.c (unset_command, kill_command, detach_command)
1969         (info_proc_cmd): Constify.
1970         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1971         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1972         (info_auto_load_cmd): Constify.
1973         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1974         (unset_tdesc_cmd): Constify.
1975         * ada-lang.c (set_ada_command, show_ada_command)
1976         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1977         * guile/guile.c (set_guile_command, show_guile_command)
1978         (info_guile_command): Constify.
1979         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1980         Constify.
1981         * skip.c (skip_command): Constify.
1982         * compile/compile.c (_initialize_compile): Constify.
1983         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
1984         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1985         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1986         (maint_btrace_pt_show_cmd): Constify.
1987         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
1988         Constify.
1989         * python/python.c (user_show_python, user_set_python): Constify.
1990         * mips-tdep.c (set_mips_command, show_mips_command)
1991         (set_mipsfpu_command): Constify.
1992         * record-btrace.c (cmd_record_btrace_start)
1993         (cmd_set_record_btrace, cmd_show_record_btrace)
1994         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
1995         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
1996         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
1997         Constify.
1998         * symfile.c (overlay_command): Constify.
1999         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
2000         * cli/cli-logging.c (set_logging_command, show_logging_command):
2001         Constify.
2002         * cli/cli-dump.c (dump_command, append_command)
2003         (srec_dump_command, ihex_dump_command, verilog_dump_command)
2004         (tekhex_dump_command, binary_dump_command)
2005         (binary_append_command): Constify.
2006         * cli/cli-decode.c (struct cmd_list_element): Change type of
2007         "fun".
2008         * cli/cli-cmds.c (info_command, show_command, set_debug)
2009         (show_debug): Constify.
2010         (show_command): Add non-const overload.
2011         * top.c (set_history, show_history): Constify.
2012         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
2013         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
2014         * target.c (target_command): Constify.
2015         * sparc64-tdep.c (info_adi_command): Constify.
2016         * record-full.c (cmd_record_full_start): Constify.
2017         (set_record_full_command): Constify.  Fix typo.
2018         (show_record_full_command): Constify.
2019         * thread.c (thread_command, thread_apply_command): Constify.
2020         * memattr.c (dummy_cmd): Constify.
2021         * value.c (function_command): Constify.
2022         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
2023         * probe.c (info_probes_command): Constify.
2024         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
2025         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
2026         (show_thread_cmd, set_thread_default_cmd)
2027         (show_thread_default_cmd): Constify.
2028         (check_empty): Constify.
2029         * tracepoint.c (tfind_command): Constify.
2030         * cp-support.c (maint_cplus_command): Constify.
2031         * windows-tdep.c (info_w32_command): Constify.
2032         * record.c (cmd_record_start, set_record_command)
2033         (show_record_command, info_record_command, cmd_record_goto):
2034         Constify.
2035         * ravenscar-thread.c (set_ravenscar_command)
2036         (show_ravenscar_command): Constify.
2037         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2038         Constify.
2039         (add_internal_problem_command): Remove casts.
2040         * arc-tdep.c (maintenance_print_arc_command): Constify.
2041         * valprint.c (set_print, show_print, set_print_raw)
2042         (show_print_raw): Constify.
2043         * maint.c (maintenance_command, maintenance_info_command)
2044         (maintenance_print_command, maintenance_set_cmd)
2045         (maintenance_show_cmd, set_per_command_cmd)
2046         (show_per_command_cmd, maintenance_check_command): Constify.
2047         * language.c (set_check, show_check): Constify.
2048         * typeprint.c (show_print_type, set_print_type): Constify.
2049         * go32-nat.c (go32_info_dos_command): Constify.
2050
2051 2017-10-11  Tom Tromey  <tom@tromey.com>
2052
2053         * breakpoint.c (prepare_re_set_context): Remove.
2054         (breakpoint_re_set_one): Update.  Don't use cleanups.
2055         (breakpoint_re_set): Use scoped_restore, std::string, and
2056         scoped_restore_current_language.
2057
2058 2017-10-11  Tom Tromey  <tom@tromey.com>
2059
2060         * breakpoint.c (commands_command_1): Use std::string.
2061         (cleanup_executing_breakpoints): Remove.
2062         (bpstat_do_actions_1): Use scoped_restore.
2063         (bpstat_check_watchpoint): Use std::string.
2064         (decode_static_tracepoint_spec): Likewise.
2065         (break_range_command): Likewise.
2066         (watch_command_1): Likewise.
2067         (compare_breakpoints): Change argument types.
2068         (clear_command): Use std::vector.
2069         (cleanup_executing_breakpoints): Remove.
2070         (update_global_location_list): Use unique_xmalloc_ptr.
2071         (strace_command): Remove unused declaration.
2072
2073 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2074
2075         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2076         * NEWS: Mention new FreeBSD/arm native configuration.
2077         * configure.host: Add arm*-*-freebsd*.
2078         * configure.nat: Likewise.
2079         * arm-fbsd-nat.c: New file.
2080
2081 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2082
2083         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2084         (ALLDEPFILES): Add arm-fbsd-tdep.c.
2085         * NEWS: Mention new FreeBSD/arm target.
2086         * configure.tgt: Add arm*-*-freebsd*.
2087         * arm-fbsd-tdep.c: New file.
2088         * arm-fbsd-tdep.h: New file.
2089
2090 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2091
2092         * linux-tdep.c (linux_make_corefile_notes): Remove call to
2093         `gdbarch_elfcore_write_linux_prpsinfo'.
2094         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2095         method.
2096         (elf_internal_linux_prpsinfo): Remove declaration.
2097         * gdbarch.h: Regenerate.
2098         * gdbarch.c: Regenerate.
2099
2100 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2101
2102         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2103         `set_gdbarch_elfcore_write_linux_prpsinfo'.
2104
2105 2017-10-11  Pedro Alves  <palves@redhat.com>
2106
2107         * breakpoint.c (reattach_breakpoints): Delete.
2108         * breakpoint.h (reattach_breakpoints): Delete.
2109
2110 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
2111
2112         * symfile.c (registered_sym_fns): Make struct, not typedef.
2113         (DEF_VEC_O (registered_sym_fns)): Remove.
2114         (symtab_fns): Change type to std::vector.
2115         (add_symtab_fns): Adjust.
2116         (find_sym_fns): Adjust.
2117
2118 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
2119
2120         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
2121         * arc-tdep.h (arc_arch_is_em): New function.
2122         (arc_arch_is_hs): Likewise.
2123
2124 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
2125
2126         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
2127         parentheses in the declaration.
2128         (macro_lookup_inclusion): Likewise.
2129         (macro_lookup_definition): Likewise.
2130         * p-lang.h (pascal_builtin_types): Likewise.
2131         * tui/tui-data.c (tui_win_list): Likewise.
2132         * tui/tui-data.h (tui_win_list): Likewise.
2133         * utils.h (make_cleanup_free_section_addr_info): Likewise.
2134
2135 2017-10-11  Mark Rages  <markrages@gmail.com>
2136
2137         * target-memory.c (block_boundaries): Fix for block address not
2138         aligned on block size.
2139
2140 2017-10-10  Pedro Alves <palves@redhat.com>
2141             Tom Tromey  <tom@tromey.com>
2142
2143         * breakpoint.c (struct captured_breakpoint_query_args)
2144         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
2145         (print_breakpoint): New.
2146         * breakpoint.h (print_breakpoint): Declare.
2147         * common/common-exceptions.h (enum return_reason): Remove
2148         references to catch_exceptions.
2149         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
2150         Delete.
2151         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
2152         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
2153         * gdb.h: Delete.
2154         * gdbthread.h (thread_select): Declare.
2155         * mi/mi-cmd-break.c: Don't include gdb.h.
2156         (breakpoint_notify): Use print_breakpoint.
2157         * mi/mi-cmd-catch.c: Don't include gdb.h.
2158         * mi/mi-interp.c: Don't include gdb.h.
2159         (mi_print_breakpoint_for_event): New.
2160         (mi_breakpoint_created, mi_breakpoint_modified): Use
2161         mi_print_breakpoint_for_event.
2162         * mi/mi-main.c: Don't include gdb.h.
2163         (mi_cmd_thread_select): Parse the global thread ID here.  Use
2164         thread_select instead of gdb_thread_select.
2165         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
2166         of using gdb_list_thread_ids.
2167         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
2168         FILEIO_ENOSYS here.
2169         (remote_fileio_request): Use TRY/CATCH instead of
2170         catch_exceptions.
2171         * symfile-mem.c (struct symbol_file_add_from_memory_args)
2172         (symbol_file_add_from_memory_wrapper): Delete.
2173         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
2174         * thread.c: Don't include gdb.h.
2175         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
2176         (thread_alive): Use thread_select.
2177         (do_captured_thread_select): Delete, parts salvaged as ...
2178         (thread_select): ... this new function.
2179         (gdb_thread_select): Delete.
2180
2181 2017-10-10  Pedro Alves  <palves@redhat.com>
2182             Tom Tromey  <tom@tromey.com>
2183
2184         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
2185         and reverse logic.
2186         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
2187         No longer macros.  Instead ...
2188         (enum wp_check_result): They're now values of this new
2189         enumeration.
2190         (watchpoint_check): Change return type to wp_check_result and
2191         parameter type to bpstat.
2192         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
2193         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
2194         catch_errors.  Reverse logic of watchpoint_check call.
2195         (breakpoint_re_set_one): Now returns void and takes a breakpoint
2196         pointer as parameter.
2197         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
2198         * common/common-exceptions.c (throw_exception_sjlj): Update
2199         comments to avoid mentioning catch_errors.
2200         * exceptions.c (catch_errors): Delete.
2201         * exceptions.h: Update comments to avoid mentioning catch_errors.
2202         (catch_errors_ftype, catch_errors): Delete.
2203         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
2204         (hook_stop_stub): Delete.
2205         (restore_selected_frame): Change return type to void, and
2206         parameter type to const frame_id &.
2207         (restore_infcall_control_state): Use TRY/CATCH instead of
2208         catch_errors.
2209         * main.c (captured_command_loop): Return void and remove
2210         parameter.  Remove references to catch_errors.
2211         (captured_main): Use TRY/CATCH instead of catch_errors.
2212         * objc-lang.c (objc_submethod_helper_data)
2213         (find_objc_msgcall_submethod_helper): Delete.
2214         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
2215         catch_errors.
2216         * record-full.c (record_full_message): Return void.
2217         (record_full_message_args, record_full_message_wrapper): Delete.
2218         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
2219         instead of catch_errors.
2220         * solib-aix.c (solib_aix_open_symbol_file_object): Change
2221         parameter type to int.
2222         * solib-darwin.c (open_symbol_file_object): Ditto.
2223         * solib-dsbt.c (open_symbol_file_object): Ditto.
2224         * solib-frv.c (open_symbol_file_object): Ditto.
2225         * solib-svr4.c (open_symbol_file_object): Ditto.
2226         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
2227         * solib.c (update_solib_list): Use TRY/CATCH instead of
2228         catch_errors.
2229         * solist.h (struct target_so_ops) <open_symbol_file_object>:
2230         Change type.
2231         * symmisc.c (struct print_symbol_args): Remove.
2232         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
2233         (print_symbol): Change type.
2234         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
2235         and remove parameters.
2236         (catch_errors): New.
2237         (get_windows_debug_event): Adjust.
2238
2239 2017-10-09  Tom Tromey  <tom@tromey.com>
2240
2241         * mi/mi-main.c (free_splay_tree): Remove.
2242         (list_available_thread_groups): Use splay_tree_up.
2243         * common/gdb_splay_tree.h: New file.
2244
2245 2017-10-09  Tom Tromey  <tom@tromey.com>
2246
2247         * mi/mi-main.c (do_nothing): Remove.
2248         (list_available_thread_groups): Update.
2249
2250 2017-10-09  Pedro Alves  <palves@redhat.com>
2251
2252         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
2253         reading registers when switching context.
2254
2255 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
2256
2257         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
2258         (fbsd_convert_siginfo): Likewise.
2259         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
2260
2261 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
2262
2263         * configure.ac (try_guile_versions): Remove guile-2.2.
2264         * configure: Regenerate.
2265
2266 2017-10-09  Tom Tromey  <tom@tromey.com>
2267
2268         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
2269         (COMPILE.pre): Use $(CXX).
2270
2271 2017-10-09  Pedro Alves  <palves@redhat.com>
2272
2273         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
2274         Use bool.
2275         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2276         * cp-support.h (cp_remove_params): Now returns a
2277         gdb::unique_xmalloc_ptr.
2278         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
2279         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
2280         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
2281         returning a gdb::unique_xmalloc_ptr.
2282         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2283         * stack.c (find_frame_funname): Adjust to cp_remove_params
2284         returning a gdb::unique_xmalloc_ptr.
2285
2286 2017-10-08  Tom Tromey  <tom@tromey.com>
2287
2288         * dwarf2read.c (dwarf2_get_dwz_file): Use
2289         gdb::unique_xmalloc_ptr.
2290         (find_slot_in_mapped_hash): Likewise.
2291         (dwarf2_physname): Likewise.
2292         (create_dwo_unit_in_dwp_v1): Use std::string.
2293         (create_dwo_unit_in_dwp_v2): Likewise.
2294         (lookup_dwo_cutu): Likewise.
2295         (inherit_abstract_dies): Use std::vector.
2296         (read_array_type): Likewise.
2297         (dwarf_decode_macros): Remove unused declaration.
2298         (unsigned_int_compar): Remove.
2299         (dwarf2_build_psymtabs_hard): Use scoped_restore.
2300         (psymtabs_addrmap_cleanup): Remove.
2301
2302 2017-10-08  Tom Tromey  <tom@tromey.com>
2303
2304         * frame-unwind.c (frame_unwind_try_unwinder): Update.
2305         * frame.h (frame_cleanup_after_sniffer): Declare.
2306         (frame_prepare_for_sniffer): Return void.
2307         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
2308         type of argument.
2309         (frame_prepare_for_sniffer): Return void.
2310
2311 2017-10-08  Tom Tromey  <tom@tromey.com>
2312
2313         * utils.h (make_cleanup_value_free): Remove.
2314         * utils.c (do_value_free, struct cleanup): Remove.
2315         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
2316         Use gdb_value_up.
2317         * value.h (struct value_deleter): New.
2318         (gdb_value_up): New typedef.
2319
2320 2017-10-08  Tom Tromey  <tom@tromey.com>
2321
2322         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
2323         (make_cleanup_free_search_symbols): Remove.
2324         (search_symbols): Return std::vector.
2325         (symbol_search::compare_search_syms): Now member of
2326         symbol_search.  Change arguments.
2327         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
2328         (symtab_symbol_info, rbreak_command): Update.
2329         * symtab.h (struct symbol_search) <next>: Remove.
2330         Add constructors.
2331         (symbol_search::operator<): New function.
2332         (symbol_search::operator==): New function.
2333         (search_symbols): Remove std::vector.
2334         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
2335         (symbol_search::compare_search_syms): Declare.
2336
2337 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2338
2339         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
2340         arch/aarch64-insn.o.
2341         Remove one rule.
2342         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
2343
2344 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2345
2346         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
2347         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
2348         arch/arm-linux.o respectively.
2349         * configure.tgt: Likewise.
2350
2351 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2352
2353         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
2354         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
2355
2356 2017-10-06  Pedro Alves  <palves@redhat.com>
2357
2358         * windows-nat.c: Include <algorithm>.
2359
2360 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2361
2362         * configure.tgt (i386_tobjs): New variable.
2363         (amd64_tobjs): New variable.
2364         Set $cpu_obs and $os_obs.
2365
2366 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2367
2368         * Makefile.in (CONFIG_SRC_SUBDIR): New.
2369         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
2370         (clean): Remove object files and dependency files.
2371         (distclean): Remove the directory.
2372         * configure.ac: Invoke AC_CONFIG_COMMANDS.
2373         * configure: Re-generated.
2374         * configure.tgt: Replace amd64.o with arch/amd64.o.
2375
2376 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
2377
2378         PR build/22188
2379         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
2380         and SETEND.
2381
2382 2017-10-05  Pedro Alves  <palves@redhat.com>
2383
2384         * linux-nat.c (linux_child_follow_fork): When following the parent
2385         and detaching the child, consult the parent thread's architecture
2386         instead of the child's.
2387
2388 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2389
2390         * ax.h: Do not include "doublest.h".
2391         (union agent_val): Remove.
2392
2393 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2394
2395         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
2396         (decimal_to_string): Return std::string object.
2397         (decimal_from_string): Accept std::string object.  Return bool.
2398         (decimal_from_integral, decimal_from_doublest): Remove.
2399         (decimal_from_longest): Add prototype.
2400         (decimal_from_ulongest): Likewise.
2401         (decimal_to_longest): Likewise.
2402         (decimal_from_doublest): Likewise.
2403         * dfp.c: Do not include "gdbtypes.h" or "value.h".
2404         (MAX_DECIMAL_STRING): Move here.
2405         (decimal_to_string): Return std::string object.
2406         (decimal_from_string): Accept std::string object.  Return bool.
2407         (decimal_from_integral): Remove, replace by ...
2408         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
2409         (decimal_to_longest): New function.
2410         (decimal_from_floating): Remove, replace by ...
2411         (decimal_from_doublest): ... this new function.
2412         (decimal_to_doublest): Update to new decimal_to_string interface.
2413
2414         * value.c (unpack_long): Use decimal_to_longest.
2415         * valops.c (value_cast): Use decimal_from_doublest instead of
2416         decimal_from_floating.  Use decimal_from_[u]longest isntead of
2417         decimal_from_integral.
2418         * valarith.c (value_args_as_decimal): Likewise.
2419         * valprint.c (print_decimal_floating): Update to new
2420         decimal_to_string interface.
2421         * printcmd.c (printf_decfloat): Likewise.
2422         * c-exp.y (parse_number): Update to new decimal_from_string interface.
2423
2424 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2425
2426         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
2427         * gdbtypes.c: Include "floatformat.h".
2428         * value.c: Likewise.
2429         * m68k-tdep.c: Likewise.
2430
2431         * findvar.c: Do not include "floatformat.h".
2432         * amd64-darwin-tdep.c: Likewise.
2433         * arm-linux-tdep.c: Likewise.
2434         * i386-darwin-tdep.c: Likewise.
2435         * i387-tdep.c: Likewise.
2436         * m68k-linux-tdep.c: Likewise.
2437         * mep-tdep.c: Likewise.
2438         * mips-tdep.c: Likewise.
2439         * nios2-tdep.c: Likewise.
2440         * s390-linux-tdep.c: Likewise.
2441         * sparc-obsd-tdep.c: Likewise.
2442         * sparc-tdep.c: Likewise.
2443         * sparc64-tdep.c: Likewise.
2444         * spu-tdep.c: Likewise.
2445         * tic6x-tdep.c: Likewise.
2446         * tilegx-tdep.c: Likewise.
2447         * vax-tdep.c: Likewise.
2448         * xstormy16-tdep.c: Likewise.
2449         * xtensa-tdep.c: Likewise.
2450
2451         * top.c: Do not include "doublest.h".
2452         * aarch64-tdep.c: Likewise.
2453         * alpha-tdep.c: Likewise.
2454         * arm-linux-tdep.c: Likewise.
2455         * m68k-linux-tdep.c: Likewise.
2456         * tilegx-tdep.c: Likewise.
2457         * xstormy16-tdep.c: Likewise.
2458
2459 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2460
2461         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
2462         (mipsn32_fbsd_sigframe): Define.
2463         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
2464         for FreeBSD/mipsn32.
2465
2466 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2467
2468         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
2469         AT_HWCAP.
2470
2471 2017-10-05  Tristan Gingold  <tgingold@free.fr>
2472
2473         * MAINTAINERS (Misc): Update my email address.
2474
2475 2017-10-04  Pedro Alves  <palves@redhat.com>
2476
2477         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
2478         it instead of target_gdbarch.
2479         (get_remote_state, get_remote_packet_size): Adjust
2480         get_remote_arch_state calls, passing down target_gdbarch
2481         explicitly.
2482         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
2483         'gdbarch' and use it instead of target_gdbarch.
2484         (get_memory_packet_size): Adjust get_remote_arch_state calls,
2485         passing down target_gdbarch explicitly.
2486         (struct stop_reply) <arch>: New field.
2487         (remote_parse_stop_reply): Use the stopped thread's architecture,
2488         not the current inferior's.  Save the architecture in the
2489         stop_reply.
2490         (process_stop_reply): Use the stop reply's architecture.
2491         (process_g_packet, remote_fetch_registers)
2492         (remote_prepare_to_store, store_registers_using_G)
2493         (remote_store_registers): Adjust get_remote_arch_state calls,
2494         using the regcache's architecture.
2495         (remote_get_trace_status): Adjust get_remote_arch_state calls,
2496         passing down target_gdbarch explicitly.
2497         * spu-multiarch.c (spu_thread_architecture): Defer to the target
2498         beneath instead of calling target_gdbarch.
2499         * target.c (default_thread_architecture): Use the specified
2500         inferior's architecture, instead of the current inferior's
2501         architecture (via target_gdbarch).
2502
2503 2017-10-04  Pedro Alves  <palves@redhat.com>
2504
2505         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
2506         case.
2507         (regcache_print): Handle !target_has_registers here instead.
2508
2509 2017-10-04  Pedro Alves  <palves@redhat.com>
2510
2511         * frame.c (create_test_frame): Delete.
2512         * frame.h (create_test_frame): Delete.
2513         * gdbarch-selftests.c: Include gdbthread.h and target.h.
2514         (class regcache_test): Delete.
2515         (test_target_has_registers, test_target_has_stack)
2516         (test_target_has_memory, test_target_prepare_to_store)
2517         (test_target_store_registers): New functions.
2518         (test_target_ops): New class.
2519         (register_to_value_test): Error out if there's already a
2520         process_stratum (or higher) target pushed.  Create a fuller mock
2521         environment, with mock target_ops, inferior, address space, thread
2522         and inferior_ptid.
2523         * progspace.c (struct address_space): Move to ...
2524         * progspace.h (struct address_space): ... here.
2525         * regcache.h (regcache::~regcache, regcache::raw_write)
2526         [GDB_SELF_TEST]: No longer virtual.
2527
2528 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2529
2530         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
2531
2532 2017-10-04  Pedro Alves  <palves@redhat.com>
2533
2534         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
2535         out of 'between TRY and CATCH'.
2536
2537 2017-10-04  Pedro Alves  <palves@redhat.com>
2538
2539         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
2540         * common/common-exceptions.h (TRY): Open an outermost scope.
2541         Expand intro comment.
2542         (CATCH): Reindent.
2543         (END_CATCH): Close the outermost scope.
2544         * completer.c (complete_line_internal): Add missing END_CATCH.
2545
2546 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2547
2548         * NEWS (Changes since GDB 8.0): Add entry about new
2549         'set-cwd-on-gdbserver' feature.
2550         (New remote packets): Add entry for QSetWorkingDir.
2551         * common/common-inferior.h (set_inferior_cwd): New prototype.
2552         * infcmd.c (set_inferior_cwd): Remove "static".
2553         (show_cwd_command): Expand text to include remote debugging.
2554         * remote.c: Add PACKET_QSetWorkingDir.
2555         (remote_protocol_features) <QSetWorkingDir>: New entry for
2556         PACKET_QSetWorkingDir.
2557         (extended_remote_set_inferior_cwd): New function.
2558         (extended_remote_create_inferior): Call
2559         "extended_remote_set_inferior_cwd".
2560         (_initialize_remote): Call "add_packet_config_cmd" for
2561         QSetWorkingDir.
2562
2563 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2564
2565         * NEWS (New commands): Mention "set/show cwd".
2566         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
2567         "cd" command's help text.
2568         * common/common-inferior.h (get_inferior_cwd): New prototype.
2569         * infcmd.c (inferior_cwd_scratch): New global variable.
2570         (set_inferior_cwd): New function.
2571         (get_inferior_cwd): Likewise.
2572         (set_cwd_command): Likewise.
2573         (show_cwd_command): Likewise.
2574         (_initialize_infcmd): Add "set/show cwd" commands.
2575         * inferior.h (class inferior) <cwd>: New field.
2576         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
2577         (fork_inferior): Change inferior's cwd before its execution.
2578         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
2579         to CreateProcess.
2580
2581 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2582
2583         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
2584         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
2585         (COMMON_OBS): Add gdb_tilde_expand.o.
2586         * common/gdb_tilde_expand.c: New file.
2587         * common/gdb_tilde_expand.h: Likewise.
2588
2589 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
2590
2591         * gdbarch.sh (objfile): Remove duplicate declaration.
2592         * gdbarch.h: Regenerate.
2593
2594 2017-10-03  Tom Tromey  <tom@tromey.com>
2595
2596         * utils.c (internal_vproblem): Use string_vprintf.
2597
2598 2017-10-03  Tom Tromey  <tom@tromey.com>
2599
2600         * printcmd.c (info_symbol_command): Use std::string.
2601
2602 2017-10-03  Tom Tromey  <tom@tromey.com>
2603
2604         * top.c (gdb_safe_append_history): Use std::string.
2605
2606 2017-10-03  Tom Tromey  <tom@tromey.com>
2607
2608         * event-top.c (stdin_event_handler): Update.
2609         * main.c (captured_main_1): Update.
2610         * top.h (make_delete_ui_cleanup): Remove.
2611         (struct ui): Add constructor and destructor.
2612         (new_ui, delete_ui): Remove.
2613         * top.c (make_delete_ui_cleanup): Remove.
2614         (new_ui_command): Use std::unique_ptr.
2615         (delete_ui_cleanup): Remove.
2616         (ui::ui): Rename from new_ui.  Update.
2617         (free_ui): Remove.
2618         (ui::~ui): Rename from delete_ui.  Update.
2619
2620 2017-10-03  Tom Tromey  <tom@tromey.com>
2621
2622         * symfile.c (load_progress): Use gdb::byte_vector.
2623
2624 2017-10-03  Tom Tromey  <tom@tromey.com>
2625
2626         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2627         declaration.
2628         * printcmd.c (x_command): Remove unused declaration.
2629         * symfile.c (symbol_file_command): Remove unused declaration.
2630
2631 2017-10-03  Tom Tromey  <tom@tromey.com>
2632
2633         * utils.c (internal_vproblem): Use std::string.
2634         (defaulted_query): Likewise.
2635
2636 2017-10-03  Tom Tromey  <tom@tromey.com>
2637
2638         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2639         * top.c (execute_command_to_string): Update.
2640         * utils.c (make_cleanup_restore_page_info): Remove.
2641         (do_restore_page_info_cleanup): Remove.
2642         (set_batch_flag_and_restore_page_info):
2643         New.
2644         (make_cleanup_restore_page_info): Remove.
2645         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2646         (~set_batch_flag_and_restore_page_info): New
2647         (make_cleanup_restore_uinteger): Remove.
2648         (make_cleanup_restore_integer): Remove.
2649         (struct restore_integer_closure): Remove.
2650         (restore_integer): Remove.
2651         * utils.h (struct set_batch_flag_and_restore_page_info): New
2652         class.
2653         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2654         (make_cleanup_restore_page_info): Remove.
2655         (make_cleanup_restore_uinteger) Remove.
2656         (make_cleanup_restore_integer) Remove.
2657
2658 2017-10-03  Tom Tromey  <tom@tromey.com>
2659
2660         * record-full.h (record_full_gdb_operation_disable_set): Return
2661         scoped_restore_tmpl<int>.
2662         * infrun.c (adjust_pc_after_break): Update.
2663         (handle_signal_stop): Update.
2664         * record-full.c (record_full_gdb_operation_disable_set): Return
2665         scoped_restore_tmpl<int>.
2666         (record_full_wait_1, record_full_insert_breakpoint)
2667         (record_full_remove_breakpoint, record_full_save)
2668         (record_full_goto_insn): Update.
2669
2670 2017-10-02  Tom Tromey  <tom@tromey.com>
2671
2672         PR rust/22236:
2673         * rust-lang.c (rust_val_print_str): New function.
2674         (val_print_struct): Call it.
2675         (rust_subscript): Preserve name of slice type.
2676
2677 2017-10-02  Tom Tromey  <tom@tromey.com>
2678
2679         * rust-lang.c (rust_subscript): Handle slices in
2680         EVAL_AVOID_SIDE_EFFECTS case.
2681
2682 2017-10-02  Tom Tromey  <tom@tromey.com>
2683
2684         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2685
2686 2017-10-02  Tom Tromey  <tom@tromey.com>
2687
2688         * rust-lang.h (rust_slice_type): Add "extern".
2689
2690 2017-10-02  Tom Tromey  <tom@tromey.com>
2691             Pedro Alves  <palves@redhat.com>
2692
2693         * ada-lang.h (ada_exc_info::operator<): Make const.
2694         (ada_exc_info::operator==): Make const.
2695         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2696         Make const.
2697
2698 2017-09-29  Tom Tromey  <tom@tromey.com>
2699
2700         * target.c (read_whatever_is_readable): Change type of "result".
2701         Update.
2702         (free_memory_read_result_vector): Remove.
2703         (read_memory_robust): Change return type.  Update.
2704         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
2705         bin2hex, std::string.
2706         * target.h (memory_read_result_s): Remove typedef.
2707         (free_memory_read_result_vector): Remove.
2708         (read_memory_robust): Return std::vector.
2709
2710 2017-09-29  Tom Tromey  <tom@tromey.com>
2711
2712         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2713
2714 2017-09-29  Tom Tromey  <tom@tromey.com>
2715
2716         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2717         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
2718         operator< and operator==.
2719         (ada_exceptions_list): Return a std::vector.
2720         * ada-lang.c (ada_exc_info::operator<): Rename from
2721         compare_ada_exception_info.
2722         (ada_exc_info::operator==): New.
2723         (sort_remove_dups_ada_exceptions_list): Change type of
2724         "exceptions".
2725         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2726         (ada_add_global_exceptions): Likewise.
2727         (ada_exceptions_list_1): Return a std::vector.
2728         (ada_exceptions_list): Likewise.
2729
2730 2017-09-29  Tom Tromey  <tom@tromey.com>
2731
2732         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2733         'std::set *'.
2734         (print_one_inferior): Update.
2735         (free_vector_of_ints): Remove.
2736         (list_available_thread_groups): Change "ids" to std::set.
2737         (mi_cmd_list_thread_groups): Update.
2738         (struct collect_cores_data) <core>: Now a std::set.
2739         (collect_cores): Update.
2740         (unique): Remove.
2741         (print_one_inferior): Update.
2742
2743 2017-09-29  Tom Tromey  <tom@tromey.com>
2744
2745         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2746         (mi_execute_async_cli_command): Likewise.
2747         (mi_cmd_trace_frame_collected): Use field_fmt.
2748
2749 2017-09-29  Tom Tromey  <tom@tromey.com>
2750
2751         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2752         gdb::byte_vector.
2753
2754 2017-09-29  Tom Tromey  <tom@tromey.com>
2755
2756         * mi/mi-parse.c (mi_parse): Remove unused declaration.
2757
2758 2017-09-29  Tom Tromey  <tom@tromey.com>
2759
2760         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2761
2762 2017-09-29  Tom Tromey  <tom@tromey.com>
2763
2764         * varobj.h (varobj_gen_name): Return std::string.
2765         * varobj.c (varobj_gen_name): Return std::string.
2766         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2767         (mi_cmd_var_delete): Don't copy "name".
2768
2769 2017-09-29  Tom Tromey  <tom@tromey.com>
2770
2771         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2772         (mi_cmd_break_insert_1): Update.
2773
2774 2017-09-29  Tom Tromey  <tom@tromey.com>
2775
2776         * target.h (make_scoped_defer_target_commit_resume): Update.
2777         * target.c (make_scoped_defer_target_commit_resume): Rename from
2778         make_cleanup_defer_target_commit_resume.  Return a
2779         scoped_restore.
2780         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2781
2782 2017-09-29  Tom Tromey  <tom@tromey.com>
2783
2784         * main.c (captured_main_1): Remove unused declaration.
2785         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2786
2787 2017-09-29  Tom Tromey  <tom@tromey.com>
2788
2789         * symtab.c (search_symbols): Remove unused outer cleanup.
2790         (make_source_files_completion_list): Remove unused declaration.
2791
2792 2017-09-29  Tom Tromey  <tom@tromey.com>
2793
2794         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2795
2796 2017-09-29  Tom Tromey  <tom@tromey.com>
2797
2798         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2799         gdb::byte_vector.
2800
2801 2017-09-29  Tom Tromey  <tom@tromey.com>
2802
2803         * complaints.c (vcomplaint): Use std::string.
2804
2805 2017-09-29  Tom Tromey  <tom@tromey.com>
2806
2807         * tracepoint.c (trace_variable_command): Use std::string.
2808         (encode_actions_1): Remove unused declarations.
2809         (create_tsv_from_upload): Use std::string.
2810
2811 2017-09-29  Tom Tromey  <tom@tromey.com>
2812
2813         * cp-support.c (gdb_demangle): Use std::string.
2814
2815 2017-09-29  Tom Tromey  <tom@tromey.com>
2816
2817         * stack.c (parse_frame_specification): Use std::string
2818         (info_frame_command): Use gdb::unique_xmalloc_ptr.
2819
2820 2017-09-29  Tom Tromey  <tom@tromey.com>
2821
2822         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2823
2824 2017-09-29  Tom Tromey  <tom@tromey.com>
2825
2826         * utils.c (vfprintf_maybe_filtered): Use std::string.
2827         (vfprintf_unfiltered): Likewise.
2828
2829 2017-09-29  Tom Tromey  <tom@tromey.com>
2830
2831         * event-top.c (top_level_prompt): Return std::string.
2832         (display_gdb_prompt): Update.
2833
2834 2017-09-29  Tom Tromey  <tom@tromey.com>
2835
2836         * unittests/common-utils-selftests.c (format): New function.
2837         (string_vprintf_tests): New function.
2838         (_initialize_common_utils_selftests): Register new tests.
2839         * common/common-utils.c (string_vprintf): New function.
2840         * common/common-utils.h (string_vprintf): Declare.
2841
2842 2017-09-29  Pedro Alves  <palves@redhat.com>
2843
2844         * common/rsp-low.c (unpack_varlen_hex): Constify.
2845         * common/rsp-low.h (unpack_varlen_hex): Constify.
2846         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2847         Constify.
2848         * remote.c (remote_set_permissions, read_ptid)
2849         (remote_current_thread, remote_get_threads_with_qthreadinfo)
2850         (remote_static_tracepoint_marker_at)
2851         (remote_static_tracepoint_markers_by_strid)
2852         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2853         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2854         (parse_tracepoint_definition, parse_tsv_definition)
2855         (parse_static_tracepoint_marker_definition): Constify.
2856         * tracepoint.h (parse_static_tracepoint_marker_definition)
2857         (parse_trace_status, parse_tracepoint_status)
2858         (parse_tracepoint_definition, parse_tsv_definition): Constify.
2859
2860 2017-09-29  Pedro Alves  <palves@redhat.com>
2861
2862         * remote.c (target_buf, target_buf_size): Delete.
2863         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2864         Use the connection's packet buffer instead.
2865         All callers adjusted.
2866         (_initialize_remote): Remove references to target_buf and
2867         target_buf_size.
2868
2869 2017-09-28  Pedro Alves  <palves@redhat.com>
2870
2871         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2872         unittests/common-utils-selftests.c.
2873         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2874         (COMMON_OBS): Remove utils-selftests.o.
2875         * utils-selftests.c: Move to ...
2876         * unittests/common-utils-selftests.c: ... here and rename self
2877         test to "string_printf".
2878
2879 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2880
2881         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2882         having NULL cus or tus.
2883
2884 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2885
2886         * arm-tdep.c: (convert_from_extended): Remove.
2887         (convert_to_extended): Likewise.
2888         (arm_extract_return_value): Use convert_typed_floating.
2889         (arm_store_return_value): Likewise.
2890
2891         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2892         * sh-tdep.c: Do not include "floatformat.h".
2893         (sh_littlebyte_bigword_type): New function.
2894         (sh_register_convert_to_virtual): Use convert_typed_floating.
2895         (sh_register_convert_to_raw): Likewise.
2896         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2897         (sh64_littlebyte_bigword_type): New function.
2898         (sh64_extract_return_value): Use convert_typed_floating.
2899         (sh64_register_convert_to_virtual): Likewise.
2900         (sh64_register_convert_to_raw): Likewise.
2901
2902 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2903
2904         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2905         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2906
2907         * gdbtypes.h (union type_specific): Make field floatformat hold
2908         just a single struct floatformat, not an array.
2909         (floatformat_from_type): Move here.
2910         * gdbtypes.c (floatformat_from_type): Move here.  Update to
2911         changed TYPE_FLOATFORMAT definition.
2912         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2913         (recursive_dump_type): Likewise.
2914         (init_float_type): Install correct floatformat for byte order.
2915         (arch_float_type): Likewise.
2916
2917 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2918
2919         * gdbtypes.c (init_type): Change incoming argument from
2920         length-in-bytes to length-in-bits.  Assert length is a
2921         multiple of TARGET_CHAR_BITS.
2922         (arch_type, arch_flags_type): Likewise.
2923         (init_integer_type): Update call to init_type.
2924         (init_character_type): Likewise.
2925         (init_boolean_type): Likewise.
2926         (init_float_type): Likewise.
2927         (init_decfloat_type): Likewise.
2928         (init_complex_type): Likewise.
2929         (init_pointer_type): Likewise.
2930         (objfile_type): Likewise.
2931         (arch_integer_type): Update call to arch_type.
2932         (arch_character_type): Likewise.
2933         (arch_boolean_type): Likewise.
2934         (arch_float_type): Likewise.
2935         (arch_decfloat_type): Likewise.
2936         (arch_complex_type): Likewise.
2937         (arch_pointer_type): Likewise.
2938         (gdbtypes_post_init): Likewise.
2939
2940         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2941         (read_base_type): Likewise.
2942         * mdebugread.c (basic_type): Likewise.
2943         * stabsread.c (dbx_init_float_type): Likewise.
2944         (rs6000_builtin_type): Likewise.
2945         (read_range_type): Likewise.  Also, fix call to init_integer_type
2946         with erroneous length argument.
2947
2948         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2949         * d-lang.c (build_d_types): Likewise.
2950         * f-lang.c (build_fortran_types): Likewise.
2951         * go-lang.c (build_go_types): Likewise.
2952         * opencl-lang.c (build_opencl_types): Likewise.
2953         * jit.c (finalize_symtab): Likewise.
2954         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2955         (build_std_type_info_type): Likewise.
2956         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
2957         update call to arch_flags_type.
2958
2959         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2960         arch_type.
2961         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2962         * windows-tdep.c (windows_get_tlb_type): Likewise.
2963
2964         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2965         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2966         * m32c-tdep.c (make_types): Likewise.
2967         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2968         (rl78_psw_type): Update call to arch_flags_type.
2969         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2970         * rx-tdep.c (rx_psw_type): Likewise.
2971         (rx_fpsw_type): Likewise.
2972         * sparc-tdep.c (sparc_psr_type): Likewise.
2973         (sparc_fsr_type): Likewise.
2974         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2975         (sparc64_ccr_type): Likewise.
2976         (sparc64_fsr_type): Likewise.
2977         (sparc64_fprs_type): Likewise.
2978
2979 2017-09-27  Tom Tromey  <tom@tromey.com>
2980
2981         * findcmd.c (find_command): Constify.
2982
2983 2017-09-27  Tom Tromey  <tom@tromey.com>
2984
2985         * ada-tasks.c (task_command_1, task_command): Constify.
2986
2987 2017-09-27  Tom Tromey  <tom@tromey.com>
2988
2989         * symtab.c (maintenance_print_symbol_cache)
2990         (maintenance_flush_symbol_cache)
2991         (maintenance_print_symbol_cache_statistics): Constify.
2992
2993 2017-09-27  Tom Tromey  <tom@tromey.com>
2994
2995         * inferior.c (detach_inferior_command, kill_inferior_command)
2996         (inferior_command): Constify.
2997
2998 2017-09-27  Tom Tromey  <tom@tromey.com>
2999
3000         * regcache.c (regcache_print, maintenance_print_registers)
3001         (maintenance_print_raw_registers)
3002         (maintenance_print_cooked_registers)
3003         (maintenance_print_register_groups)
3004         (maintenance_print_remote_registers): Constify.
3005
3006 2017-09-27  Tom Tromey  <tom@tromey.com>
3007
3008         * printcmd.c (map_display_numbers, undisplay_command)
3009         (enable_disable_display_command, enable_display_command)
3010         (disable_display_command): Constify.
3011
3012 2017-09-27  Tom Tromey  <tom@tromey.com>
3013
3014         * breakpoint.h (delete_command): Don't declare.
3015         * breakpoint.c (delete_command, enable_once_command)
3016         (enable_count_command, enable_delete_command, breakpoint_1)
3017         (maintenance_info_breakpoints, stopin_command, stopat_command)
3018         (delete_command, delete_trace_command, save_breakpoints)
3019         (save_breakpoints_command, save_tracepoints_command): Constify.
3020
3021 2017-09-27  Tom Tromey  <tom@tromey.com>
3022
3023         * macrocmd.c (macro_expand_command, macro_expand_once_command)
3024         (skip_ws, extract_identifier, macro_define_command)
3025         (macro_undef_command, macro_list_command): Constify.
3026
3027 2017-09-27  Tom Tromey  <tom@tromey.com>
3028
3029         * infcmd.c (environment_info, set_environment_command)
3030         (unset_environment_command, path_info, info_proc_cmd_1)
3031         (info_proc_cmd_mappings, info_proc_cmd_stat)
3032         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3033         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3034
3035 2017-09-27  Tom Tromey  <tom@tromey.com>
3036
3037         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3038         Constify.
3039
3040 2017-09-27  Tom Tromey  <tom@tromey.com>
3041
3042         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3043
3044 2017-09-27  Tom Tromey  <tom@tromey.com>
3045
3046         * demangle.c (demangle_command): Constify.
3047
3048 2017-09-27  Tom Tromey  <tom@tromey.com>
3049
3050         * progspace.c (maintenance_info_program_spaces_command):
3051         Constify.
3052
3053 2017-09-27  Tom Tromey  <tom@tromey.com>
3054
3055         * compile/compile.c (check_raw_argument, compile_file_command)
3056         (compile_code_command, compile_print_command): Constify.
3057
3058 2017-09-27  Tom Tromey  <tom@tromey.com>
3059
3060         * reggroups.c (maintenance_print_reggroups): Constify.
3061
3062 2017-09-27  Tom Tromey  <tom@tromey.com>
3063
3064         * dwarf2read.c (save_gdb_index_command): Constify.
3065
3066 2017-09-27  Tom Tromey  <tom@tromey.com>
3067
3068         * stap-probe.c (info_probes_stap_command): Constify.
3069
3070 2017-09-27  Tom Tromey  <tom@tromey.com>
3071
3072         * fork-child.c (unset_exec_wrapper_command): Constify.
3073
3074 2017-09-27  Tom Tromey  <tom@tromey.com>
3075
3076         * btrace.c (get_uint, get_context_size, no_chunk)
3077         (maint_btrace_packet_history_cmd)
3078         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3079         (maint_info_btrace_cmd): Constify.
3080
3081 2017-09-27  Tom Tromey  <tom@tromey.com>
3082
3083         * reverse.c (delete_bookmark_command): Constify.
3084
3085 2017-09-27  Tom Tromey  <tom@tromey.com>
3086
3087         * remote.c (set_memory_packet_size)
3088         (set_memory_write_packet_size, show_memory_write_packet_size)
3089         (set_memory_read_packet_size, show_memory_read_packet_size)
3090         (compare_sections_command, packet_command, remote_put_command)
3091         (remote_get_command, remote_delete_command): Constify.
3092
3093 2017-09-27  Tom Tromey  <tom@tromey.com>
3094
3095         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3096         (set_mipsfpu_double_command, set_mipsfpu_none_command)
3097         (set_mipsfpu_auto_command): Constify.
3098
3099 2017-09-27  Tom Tromey  <tom@tromey.com>
3100
3101         * cli/cli-cmds.h (cd_command): Constify.
3102         * cli/cli-cmds.c (cd_command): Constify.
3103
3104 2017-09-27  Tom Tromey  <tom@tromey.com>
3105
3106         * thread.c (thread_name_command, thread_find_command): Constify.
3107
3108 2017-09-27  Tom Tromey  <tom@tromey.com>
3109
3110         * probe.c (enable_probes_command, disable_probes_command):
3111         Constify.
3112
3113 2017-09-27  Tom Tromey  <tom@tromey.com>
3114
3115         * symfile.c (symbol_file_command): Constify.
3116         * gdbcore.h (deprecated_file_changed_hook): Constify.
3117         * exec.c (deprecated_file_changed_hook, exec_file_command)
3118         (file_command): Constify.
3119         * defs.h (symbol_file_command): Constify.
3120
3121 2017-09-27  Tom Tromey  <tom@tromey.com>
3122
3123         * remote-fileio.c (set_system_call_allowed)
3124         (show_system_call_allowed): Constify.
3125
3126 2017-09-27  Tom Tromey  <tom@tromey.com>
3127
3128         * tracepoint.c (delete_trace_variable_command)
3129         (tfind_end_command, tfind_start_command, tfind_pc_command)
3130         (tfind_tracepoint_command, tfind_line_command)
3131         (tfind_range_command, tfind_outside_command): Constify.
3132
3133 2017-09-27  Tom Tromey  <tom@tromey.com>
3134
3135         * ax-gdb.c (maint_agent_printf_command, agent_command)
3136         (agent_eval_command): Constify.
3137
3138 2017-09-27  Tom Tromey  <tom@tromey.com>
3139
3140         * tracepoint.c (info_scope_command): Constify.
3141         * python/python.c (gdbpy_decode_line): Constify.
3142         * python/py-breakpoint.c (bppy_init): Constify.
3143         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
3144         * location.h: (new_linespec_location)
3145         (string_to_event_location_basic, string_to_event_location):
3146         Constify.
3147         * location.c (new_linespec_location)
3148         (string_to_event_location_basic, string_to_event_location):
3149         Constify.
3150         * linespec.h (decode_line_with_current_source)
3151         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
3152         * linespec.c (linespec_lex_to_end)
3153         (decode_line_with_current_source)
3154         (decode_line_with_last_displayed): Constify.
3155         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
3156         Constify.
3157         * cli/cli-cmds.c (edit_command, list_command): Constify.
3158         * breakpoint.h (until_break_command, watch_command_wrapper)
3159         (awatch_command_wrapper, rwatch_command_wrapper)
3160         (init_ada_exception_breakpoint): Constify.
3161         * breakpoint.c (break_command_1, dprintf_command)
3162         (break_range_command, watch_command_wrapper)
3163         (rwatch_command_wrapper, awatch_command_wrapper)
3164         (until_break_command, init_ada_exception_breakpoint)
3165         (strace_marker_create_sals_from_location, trace_command)
3166         (ftrace_command, strace_command, struct tracepoint): Constify.
3167         * ax-gdb.c (agent_command_1): Constify.
3168         * ada-lang.c (ada_exception_sal): Constify.
3169
3170 2017-09-27  Tom Tromey  <tom@tromey.com>
3171
3172         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
3173         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
3174         (get_context_size, no_chunk, get_insn_history_modifiers)
3175         (cmd_record_insn_history, get_call_history_modifiers)
3176         (cmd_record_call_history): Constify.
3177
3178 2017-09-27  Tom Tromey  <tom@tromey.com>
3179
3180         * source.c (show_substitute_path_command)
3181         (unset_substitute_path_command, set_substitute_path_command):
3182         Constify.
3183
3184 2017-09-27  Tom Tromey  <tom@tromey.com>
3185
3186         * typeprint.c (maintenance_print_type): Constify.
3187         * maint.c (maintenance_dump_me, maintenance_demangle)
3188         (maintenance_time_display, maintenance_info_sections)
3189         (maintenance_print_statistics, maintenance_deprecate)
3190         (maintenance_undeprecate): Constify.
3191         (maintenance_do_deprecate): Constify.  Use std::string.
3192         (maintenance_selftest): Constify.
3193         * gdbtypes.h (maintenance_print_type): Constify.
3194
3195 2017-09-27  Tom Tromey  <tom@tromey.com>
3196
3197         * hppa-tdep.c (unwind_command): Constify.
3198
3199 2017-09-27  Tom Tromey  <tom@tromey.com>
3200
3201         * target-descriptions.c (unset_tdesc_filename_cmd)
3202         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
3203         Constify.
3204
3205 2017-09-27  Tom Tromey  <tom@tromey.com>
3206
3207         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
3208
3209 2017-09-27  Tom Tromey  <tom@tromey.com>
3210
3211         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
3212
3213 2017-09-27  Tom Tromey  <tom@tromey.com>
3214
3215         * tui/tui-regs.c (tui_reg_command): Constify.
3216
3217 2017-09-27  Tom Tromey  <tom@tromey.com>
3218
3219         * skip.c (skip_file_command, skip_function_command)
3220         (skip_enable_command, skip_disable_command, skip_delete_command):
3221         Constify.
3222
3223 2017-09-27  Tom Tromey  <tom@tromey.com>
3224
3225         * record-btrace.c (cmd_record_btrace_bts_start)
3226         (cmd_record_btrace_pt_start): Constify.
3227
3228 2017-09-27  Tom Tromey  <tom@tromey.com>
3229
3230         * symmisc.c (maintenance_print_symbols)
3231         (maintenance_print_msymbols, maintenance_print_objfiles)
3232         (maintenance_info_symtabs, maintenance_check_symtabs)
3233         (maintenance_expand_symtabs, maintenance_info_line_tables):
3234         Constify.
3235
3236 2017-09-27  Tom Tromey  <tom@tromey.com>
3237
3238         * top.c (new_ui_command): Constify.
3239
3240 2017-09-27  Tom Tromey  <tom@tromey.com>
3241
3242         * symfile.c (add_symbol_file_command)
3243         (remove_symbol_file_command, list_overlays_command)
3244         (map_overlay_command, unmap_overlay_command)
3245         (overlay_auto_command, overlay_manual_command)
3246         (overlay_off_command, overlay_load_command): Constify.
3247
3248 2017-09-27  Tom Tromey  <tom@tromey.com>
3249
3250         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
3251         (info_spu_mailbox_command, info_spu_dma_command)
3252         (info_spu_proxydma_command): Constify.
3253
3254 2017-09-27  Tom Tromey  <tom@tromey.com>
3255
3256         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
3257
3258 2017-09-27  Tom Tromey  <tom@tromey.com>
3259
3260         * cli/cli-script.c (user_defined_command): Constify.
3261
3262 2017-09-27  Tom Tromey  <tom@tromey.com>
3263
3264         * cli/cli-dump.c (dump_memory_command, dump_value_command)
3265         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
3266         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
3267         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
3268         (dump_binary_value, append_binary_memory, append_binary_value):
3269         Constify.
3270         (struct dump_context) <func>: Constify.
3271         (add_dump_command): Update.
3272
3273 2017-09-27  Tom Tromey  <tom@tromey.com>
3274
3275         * cli/cli-cmds.c (show_version, show_configuration)
3276         (source_command, show_user): Constify.
3277
3278 2017-09-27  Tom Tromey  <tom@tromey.com>
3279
3280         * target.c (maintenance_print_target_stack): Constify.
3281
3282 2017-09-27  Tom Tromey  <tom@tromey.com>
3283
3284         * interps.c (interpreter_exec_cmd): Constify.
3285
3286 2017-09-27  Tom Tromey  <tom@tromey.com>
3287
3288         * record-full.c (cmd_record_full_restore): Constify.
3289
3290 2017-09-27  Tom Tromey  <tom@tromey.com>
3291
3292         * memattr.c (enable_mem_command, disable_mem_command)
3293         (delete_mem_command): Constify.
3294
3295 2017-09-27  Tom Tromey  <tom@tromey.com>
3296
3297         * value.c (show_convenience): Constify.
3298
3299 2017-09-27  Tom Tromey  <tom@tromey.com>
3300
3301         * gdbcore.h (core_file_command): Update.
3302         * corefile.c (core_file_command): Constify.
3303
3304 2017-09-27  Tom Tromey  <tom@tromey.com>
3305
3306         * user-regs.c (maintenance_print_user_registers): Constify.
3307
3308 2017-09-27  Tom Tromey  <tom@tromey.com>
3309
3310         * cp-namespace.c (maintenance_cplus_namespace): Constify.
3311
3312 2017-09-27  Tom Tromey  <tom@tromey.com>
3313
3314         * cp-support.c (first_component_command): Constify.
3315
3316 2017-09-27  Tom Tromey  <tom@tromey.com>
3317
3318         * psymtab.c (maintenance_print_psymbols)
3319         (maintenance_info_psymtabs, maintenance_check_psymtabs):
3320         Constify.
3321
3322 2017-09-27  Tom Tromey  <tom@tromey.com>
3323
3324         * windows-tdep.c (display_tib): Constify.
3325
3326 2017-09-27  Tom Tromey  <tom@tromey.com>
3327
3328         * linux-fork.c (delete_checkpoint_command)
3329         (detach_checkpoint_command): Constify.
3330
3331 2017-09-27  Tom Tromey  <tom@tromey.com>
3332
3333         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
3334
3335 2017-09-27  Tom Tromey  <tom@tromey.com>
3336
3337         * arc-tdep.c (dump_arc_instruction_command): Constify.
3338
3339 2017-09-27  Tom Tromey  <tom@tromey.com>
3340
3341         * valprint.c (set_radix, show_radix): Constify.
3342
3343 2017-09-27  Tom Tromey  <tom@tromey.com>
3344
3345         * dtrace-probe.c (info_probes_dtrace_command): Constify.
3346
3347 2017-09-27  Tom Tromey  <tom@tromey.com>
3348
3349         * command.h (not_just_help_class_command): Update.
3350         * cli/cli-decode.h (not_just_help_class_command): Update.
3351         * cli/cli-decode.c (not_just_help_class_command): Constify.
3352
3353 2017-09-27  Tom Tromey  <tom@tromey.com>
3354
3355         * gdb_bfd.c (maintenance_info_bfds): Constify.
3356
3357 2017-09-27  Tom Tromey  <tom@tromey.com>
3358
3359         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
3360         overloads.
3361         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
3362         (do_const_cfunc): New function.
3363         (cmd_cfunc_eq): New overload.
3364         (cli_user_command_p): Check do_const_cfunc.
3365         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
3366         const_cfunc.
3367         * command.h (add_cmd): Add const overload and no-function
3368         overload.
3369         (set_cmd_cfunc): Add const overload.
3370         (cmd_const_cfunc_ftype): Declare.
3371         (cmd_cfunc_eq): Add const overload.
3372         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
3373         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
3374         overload.
3375
3376 2017-09-27  Tom Tromey  <tom@tromey.com>
3377
3378         * macroexp.c (get_next_token_for_substitution): New function.
3379         (substitute_args): Call it.  Check for __VA_OPT__.
3380
3381 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3382             Pedro Alves <palves@redhat.com>
3383
3384         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
3385         producer_is_icc_lt_14.
3386         (producer_is_icc_lt_14): New function.
3387         (check_producer): Add code for checking version of ICC.
3388         (producer_is_icc): Move to producer.c.
3389         (read_structure_type): Restrict ICC workaround to ICC<14.
3390         * producer.c: Include selftest.h.
3391         (producer_is_icc, producer_parsing_tests, _initialize_producer):
3392         New functions.
3393         * producer.h (producer_is_icc): New declaration.
3394
3395 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3396
3397         * Makefile.in (SFILES): Add producer.c.
3398         (COMMON_OBS): Add producer.o
3399         * amd64-tdep.c (producer.h): Add new include.
3400         * dwarf2read.c (producer.h): Add new include.
3401         * producer.c: New file.
3402         * producer.h: New file.
3403         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
3404         producer.c.
3405         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
3406         producer.h.
3407
3408 2017-09-26  Matthias Klose  <doko@ubuntu.com>
3409
3410         * configure.ac: Search ncursesw before ncurses.
3411         Check ncursesw/ncurses.h before ncurses/ncurses.h.
3412         * gdb_curses.h: Include <ncursesw/ncurses.h>
3413         * config.in, configure: Regenerate.
3414
3415 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3416
3417         PR gdb/22185
3418         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
3419         obsolete.
3420         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
3421         Remove i386sol2 support.
3422         * configure.nat <i386sol2>: Remove.
3423         <sol2-64>: Fold into ...
3424         <sol2>: ... this.
3425         Move common settings to default section.
3426         Add sol-thread.o.
3427         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
3428         x86_64-*-solaris2.1[0-9]*>: Rename to ...
3429         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
3430         <i[34567]86-*-solaris*>: Remove.
3431         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
3432
3433         * configure.ac: Remove wctype in libw check.
3434         (_MSE_INT_H): Don't define on Solaris 7-9.
3435         <solaris*>: Remove libthread_db.so.1 check.
3436         * configure: Regenerate.
3437         * config.in: Regenerate.
3438
3439         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
3440         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
3441         (gdb_ps_size_t): Remove.
3442         Use base types in users.
3443         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
3444
3445         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
3446
3447 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3448
3449         PR build/22206
3450         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
3451         (adi_is_addr_mapped): Likewise.
3452         (PSR_ICC): Don't redefine.
3453         (PSR_IMPL): Likewise.
3454
3455 2017-09-25  Tom Tromey  <tom@tromey.com>
3456
3457         * regcache.c (regcache::dump): Use string_printf.
3458
3459 2017-09-25  Tom Tromey  <tom@tromey.com>
3460
3461         * regcache.c (class regcache_invalidator): New.
3462         (struct register_to_invalidate): Remove.
3463         (make_cleanup_regcache_invalidate): Remove.
3464         (regcache::raw_write): Use regcache_invalidator.
3465
3466 2017-09-25  Tom Tromey  <tom@tromey.com>
3467
3468         * spu-tdep.c (spu2ppu_sniffer): Update.
3469         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
3470         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
3471         Remove.
3472         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
3473         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
3474         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
3475         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
3476         (frame_pop): Update.
3477
3478 2017-09-25  Tom Tromey  <tom@tromey.com>
3479
3480         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
3481         * regcache.h (regcache_xfree): Don't declare.
3482         * regcache.c (regcache_xfree): Remove.
3483         (do_regcache_xfree): Use delete.
3484         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
3485         * linux-fork.c (free_fork): Use delete.
3486         (fork_save_infrun_state): Likewise.
3487         * jit.c (jit_dealloc_cache): Use delete.
3488         * infrun.c (discard_infcall_suspend_state): Use delete.
3489
3490 2017-09-25  Tom Tromey  <tom@tromey.com>
3491
3492         * regcache.h (regcache_xmalloc): Don't declare.
3493         (regcache_raw_set_cached_value): Update comment.
3494         * regcache.c (regcache_xmalloc): Remove.
3495         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
3496         * jit.c (jit_frame_sniffer): Use new.
3497         * frame.c (frame_save_as_regcache): Use new.
3498
3499 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3500
3501         * NEWS: Advertise support for guarded-storage registers on IBM z.
3502
3503 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3504
3505         * s390-linux-nat.c (have_regset_gs): New static variable.
3506         (s390_linux_fetch_inferior_registers): Handle guarded-storage
3507         control block and guarded-storage broadcast control regsets.
3508         (s390_read_description): Detect whether the target has
3509         guarded-storage support, return appropriate tdesc.
3510         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
3511         (features/s390x-gs-linux64.c): Likewise.
3512         (struct gdbarch_tdep) <have_gs>: New field.
3513         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
3514         (s390_gsbc_regset): New variables.
3515         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
3516         and s390_gsbc_regset, if applicable.
3517         (s390_core_read_description): Check whether core file was from a
3518         target with guarded-storage support; include appropriate regsets.
3519         (s390_gdbarch_init): Add registers for guarded-storage support.
3520         (_initialize_s390_tdep): Initialize new target descriptions that
3521         include registers for guarded-storage support.
3522         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
3523         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
3524         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
3525         (S390_NUM_REGS): Adjust macro definition.
3526         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
3527         (tdesc_s390x_gs_linux64): New declarations.
3528
3529 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3530
3531         * features/s390-gs-linux64.xml: New file.
3532         * features/s390-gs.xml: New file.
3533         * features/s390-gsbc.xml: New file.
3534         * features/s390x-gs-linux64.xml: New file.
3535         * features/Makefile (WHICH): Add s390-gs-linux64 and
3536         s390x-gs-linux64.
3537         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
3538         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
3539         * features/s390-gs-linux64.c: New generated file.
3540         * features/s390x-gs-linux64.c: New file.
3541         * regformats/s390-gs-linux64.dat: New file.
3542         * regformats/s390x-gs-linux64.dat: New file.
3543
3544 2017-09-23  Tom Tromey  <tom@tromey.com>
3545
3546         * defs.h (make_cleanup_override_quit_handler): Don't declare.
3547
3548 2017-09-22  Tom Tromey  <tom@tromey.com>
3549
3550         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
3551         type to scoped_restore_tmpl.
3552         <scoped_input_handler>: Initialize m_quit_handler directly.
3553
3554 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3555
3556         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
3557         (cd_command): Likewise.  Free "current_directory" before
3558         assigning to it.
3559         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
3560         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
3561         * top.c (gdb_dirbuf): Remove global declaration.
3562         * top.h (gdb_dirbuf): Likewise.
3563
3564 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3565
3566         * gnulib/aclocal.m4: Regenerate.
3567         * gnulib/config.in: Regenerate.
3568         * gnulib/configure: Regenerate.
3569         * gnulib/import/Makefile.am: Regenerate.
3570         * gnulib/import/Makefile.in: Regenerate.
3571         * gnulib/import/assure.h: New file.
3572         * gnulib/import/at-func.c: Likewise
3573         * gnulib/import/chdir-long.c: New file.
3574         * gnulib/import/chdir-long.h: New file.
3575         * gnulib/import/cloexec.c: New file.
3576         * gnulib/import/cloexec.h: New file.
3577         * gnulib/import/close.c: New file.
3578         * gnulib/import/closedir.c: New file.
3579         * gnulib/import/dirent-private.h: New file.
3580         * gnulib/import/dup-safer.c: New file.
3581         * gnulib/import/dup.c: New file.
3582         * gnulib/import/dup2.c: New file.
3583         * gnulib/import/error.c: New file.
3584         * gnulib/import/error.h: New file.
3585         * gnulib/import/exitfail.c: New file.
3586         * gnulib/import/exitfail.h: New file.
3587         * gnulib/import/fchdir.c: New file.
3588         * gnulib/import/fcntl.c: New file.
3589         * gnulib/import/fcntl.in.h: New file.
3590         * gnulib/import/fd-hook.c: New file.
3591         * gnulib/import/fd-hook.h: New file.
3592         * gnulib/import/fd-safer.c: New file.
3593         * gnulib/import/fdopendir.c: New file.
3594         * gnulib/import/filename.h: New file.
3595         * gnulib/import/filenamecat-lgpl.c: New file.
3596         * gnulib/import/filenamecat.h: New file.
3597         * gnulib/import/fstat.c: New file.
3598         * gnulib/import/fstatat.c: New file.
3599         * gnulib/import/getcwd-lgpl.c: New file.
3600         * gnulib/import/getcwd.c: New file.
3601         * gnulib/import/getdtablesize.c: New file.
3602         * gnulib/import/getlogin_r.c: New file.
3603         * gnulib/import/getprogname.c: New file.
3604         * gnulib/import/getprogname.h: New file.
3605         * gnulib/import/gettext.h: New file.
3606         * gnulib/import/glob-libc.h: New file.
3607         * gnulib/import/glob.c: New file.
3608         * gnulib/import/glob.in.h: New file.
3609         * gnulib/import/intprops.h: New file.
3610         * gnulib/import/m4/chdir-long.m4: New file.
3611         * gnulib/import/m4/close.m4: New file.
3612         * gnulib/import/m4/closedir.m4: New file.
3613         * gnulib/import/m4/d-ino.m4: New file.
3614         * gnulib/import/m4/d-type.m4: New file.
3615         * gnulib/import/m4/dup.m4: New file.
3616         * gnulib/import/m4/dup2.m4: New file.
3617         * gnulib/import/m4/error.m4: New file.
3618         * gnulib/import/m4/fchdir.m4: New file.
3619         * gnulib/import/m4/fcntl.m4: New file.
3620         * gnulib/import/m4/fcntl_h.m4: New file.
3621         * gnulib/import/m4/fdopendir.m4: New file.
3622         * gnulib/import/m4/filenamecat.m4: New file.
3623         * gnulib/import/m4/fstat.m4: New file.
3624         * gnulib/import/m4/fstatat.m4: New file.
3625         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3626         * gnulib/import/m4/getcwd-path-max.m4: New file.
3627         * gnulib/import/m4/getcwd.m4: New file.
3628         * gnulib/import/m4/getdtablesize.m4: New file.
3629         * gnulib/import/m4/getlogin_r.m4: New file.
3630         * gnulib/import/m4/getprogname.m4: New file.
3631         * gnulib/import/m4/glob.m4: New file.
3632         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3633         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3634         * gnulib/import/m4/mempcpy.m4: New file.
3635         * gnulib/import/m4/memrchr.m4: New file.
3636         * gnulib/import/m4/mode_t.m4: New file.
3637         * gnulib/import/m4/msvc-inval.m4: New file.
3638         * gnulib/import/m4/msvc-nothrow.m4: New file.
3639         * gnulib/import/m4/open.m4: New file.
3640         * gnulib/import/m4/openat.m4: New file.
3641         * gnulib/import/m4/opendir.m4: New file.
3642         * gnulib/import/m4/readdir.m4: New file.
3643         * gnulib/import/m4/realloc.m4: New file.
3644         * gnulib/import/m4/rewinddir.m4: New file.
3645         * gnulib/import/m4/save-cwd.m4: New file.
3646         * gnulib/import/m4/strdup.m4: New file.
3647         * gnulib/import/m4/strerror.m4: New file.
3648         * gnulib/import/m4/unistd-safer.m4: New file.
3649         * gnulib/import/mempcpy.c: New file.
3650         * gnulib/import/memrchr.c: New file.
3651         * gnulib/import/msvc-inval.c: New file.
3652         * gnulib/import/msvc-inval.h: New file.
3653         * gnulib/import/msvc-nothrow.c: New file.
3654         * gnulib/import/msvc-nothrow.h: New file.
3655         * gnulib/import/open.c: New file.
3656         * gnulib/import/openat-die.c: New file.
3657         * gnulib/import/openat-priv.h: New file.
3658         * gnulib/import/openat-proc.c: New file.
3659         * gnulib/import/openat.c: New file.
3660         * gnulib/import/openat.h: New file.
3661         * gnulib/import/opendir.c: New file.
3662         * gnulib/import/pipe-safer.c: New file.
3663         * gnulib/import/readdir.c: New file.
3664         * gnulib/import/realloc.c: New file.
3665         * gnulib/import/rewinddir.c: New file.
3666         * gnulib/import/save-cwd.c: New file.
3667         * gnulib/import/save-cwd.h: New file.
3668         * gnulib/import/strdup.c: New file.
3669         * gnulib/import/strerror-override.c: New file.
3670         * gnulib/import/strerror-override.h: New file.
3671         * gnulib/import/strerror.c: New file.
3672         * gnulib/import/unistd--.h: New file.
3673         * gnulib/import/unistd-safer.h: New file.
3674         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3675         "getcwd" and "glob".
3676         * ser-tcp.c: Undefine "close" before redefining it.
3677
3678 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3679
3680         * guile/scm-value.c (gdbscm_value_address): Initialize address,
3681         get rid of res_val.
3682
3683 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3684
3685         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3686         <sol2,sparc>: Likewise.
3687         <sol2-64,i386>: Likewise.
3688
3689         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3690         -Wdeprecated-declarations on *-*-solaris*.
3691         * configure: Regenerate.
3692
3693         * procfs.c: Include "nat/inferior.h".
3694         (procfs_info_proc): Fix typo.
3695
3696 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3697
3698         * remote.c (vector): Include.
3699         (struct private_thread_info): Add field, thread_handle.
3700         (free_private_thread_info): Deallocate storage associated with
3701         thread handle.
3702         (get_private_info_thread): Initialize `thread_handle' field.
3703         (struct thread_item): Add field, thread_handle.
3704         (clear_threads_listing_context): Deallocate storage associated
3705         with thread handle.
3706         (start_thread): Add support for "handle" attribute.
3707         (thread_attributes): Add "handle".
3708         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3709         field.
3710         (remote_update_thread_list): Update thread_handle.
3711         (remote_thread_handle_to_thread_info): New function.
3712         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3713
3714 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3715
3716         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3717         function.
3718         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3719         * python/python-internal.h (thread_object_type): Declare.
3720
3721 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3722
3723         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3724         (target_thread_handle_to_thread_info): Declare.
3725         * target.c (target_thread_handle_to_thread_info): New function.
3726         * target-delegates.c: Regenerate.
3727         * gdbthread.h (find_thread_by_handle): Declare.
3728         * thread.c (find_thread_by_handle): New function.
3729         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3730         function.
3731         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3732
3733 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3734
3735         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3736
3737 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3738
3739         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3740
3741 2017-09-21  Yao Qi  <yao.qi@linaro.org>
3742
3743         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3744         to gdb_target_obs.
3745
3746 2017-09-20  Tom Tromey  <tom@tromey.com>
3747
3748         * breakpoint.c (struct counted_command_line): Remove.
3749         (breakpoint_commands): Update.
3750         (alloc_counted_command_line, incref_counted_command_line)
3751         (decref_counted_command_line, do_cleanup_counted_command_line)
3752         (make_cleanup_decref_counted_command_line): Remove.
3753         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3754         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3755         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3756         (save_breakpoints): Update.
3757         * breakpoint.h (counted_command_line): Now a typedef to
3758         shared_ptr.
3759         (struct breakpoint) <commands>: Now a counted_command_line.
3760         (struct bpstats) <command>: Likewise.
3761
3762 2017-09-20  Tom Tromey  <tom@tromey.com>
3763
3764         * breakpoint.c (struct commands_info, do_map_commands_command):
3765         Remove.
3766         (commands_command_1): Update.
3767         (iterate_over_related_breakpoints): Take a function_view.
3768         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3769         (delete_command): Update.
3770         (map_breakpoint_numbers): Take a function_view.
3771         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3772         (disable_command): Update.
3773         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3774         (enable_command): Update.
3775         (struct disp_data, do_enable_breakpoint_disp)
3776         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3777         (do_map_enable_delete_breakpoint): Remove.
3778         (enable_once_command, enable_count_command, enable_delete_command)
3779         (delete_trace_variable_command): Update.
3780
3781 2017-09-20  Tom Tromey  <tom@tromey.com>
3782
3783         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
3784         (bpstat_clear): Use delete.
3785         (bpstats): New constructors.
3786         (bpstat_copy, bpstat_stop_status): Use new.
3787         (dprintf_after_condition_true): Update.
3788         * breakpoint.h (bpstats::bpstats): Add constructors.
3789         (bpstats::~bpstats): Add destructor.
3790
3791 2017-09-20  Pedro Alves  <palves@redhat.com>
3792
3793         * eval.c (make_params): Delete, refactored as ...
3794         (class fake_method): ... this new type's ctor.
3795         (fake_method::~fake_method): New.
3796         (evaluate_subexp_standard): Use 'fake_method'.
3797
3798 2017-09-20  Tom Tromey  <tom@tromey.com>
3799
3800         * windows-nat.c (get_windows_debug_event, windows_wait)
3801         (do_initial_windows_stuff, windows_attach): Update.
3802         * utils.c (vwarning, internal_vproblem): Update.
3803         (ui_unregister_input_event_handler_cleanup)
3804         (prepare_to_handle_input): Remove.
3805         (class scoped_input_handler): New.
3806         (defaulted_query, prompt_for_continue): Update.
3807         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3808         Update.
3809         * top.c (undo_terminal_modifications_before_exit): Update.
3810         * target/target.h (target_terminal_init, target_terminal_inferior)
3811         (target_terminal_ours): Don't declare.
3812         (class target_terminal): New.
3813         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3814         (target_terminal_ours_for_output)
3815         (make_cleanup_restore_target_terminal): Don't declare.
3816         (target_terminal_info): Remove.
3817         * target.c (enum terminal_state, terminal_state): Remove.
3818         (target_terminal::terminal_state): Define.
3819         (target_terminal::init): Rename from target_terminal_init.
3820         (target_terminal::inferior): Rename from
3821         target_terminal_inferior.
3822         (target_terminal::ours): Rename from target_terminal_ours.
3823         (target_terminal::ours_for_output): Rename from
3824         target_terminal_ours_for_output.
3825         (target_terminal::info): New method.
3826         (cleanup_restore_target_terminal)
3827         (make_cleanup_restore_target_terminal): Remove.
3828         * solib.c (handle_solib_event): Update.
3829         * remote.c (remote_serial_quit_handler): Update.
3830         (remote_terminal_inferior, remote_wait_as): Update.
3831         * record-full.c (record_full_wait_1): Update.
3832         * nto-procfs.c (procfs_create_inferior): Update.
3833         * nat/fork-inferior.c (startup_inferior): Update.
3834         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3835         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3836         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3837         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3838         (mi_breakpoint_created, mi_breakpoint_deleted)
3839         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3840         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3841         (mi_user_selected_context_changed, report_initial_inferior):
3842         Update.
3843         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3844         (linux_nat_terminal_inferior): Update.
3845         * infrun.c (follow_fork_inferior)
3846         (handle_vfork_child_exec_or_exit, do_target_resume)
3847         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3848         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3849         Update.
3850         * inflow.c (child_terminal_init, info_terminal_command): Update.
3851         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3852         (attach_command): Update.
3853         * infcall.c (call_thread_fsm_should_stop): Update.
3854         * gnu-nat.c (gnu_attach): Update.
3855         * extension.c (struct active_ext_lang_state)
3856         (restore_active_ext_lang): Update.
3857         * exceptions.c (print_flush): Update.
3858         * event-top.c (async_enable_stdin, default_quit_handler): Update.
3859         (struct quit_handler_cleanup_data, restore_quit_handler)
3860         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3861         Remove.
3862         * cp-support.c (gdb_demangle): Update.
3863         * breakpoint.c (update_inserted_breakpoint_locations)
3864         (insert_breakpoint_locations, handle_jit_event)
3865         (disable_breakpoints_in_unloaded_shlib): Update.
3866         * annotate.c (annotate_breakpoints_invalid)
3867         (annotate_frames_invalid): Update.
3868
3869 2017-09-20  Tom Tromey  <tom@tromey.com>
3870
3871         * main.c (catch_command_errors): Rename from
3872         catch_command_errors_const.
3873         (captured_main_1): Update.
3874
3875 2017-09-20  Pedro Alves  <palves@redhat.com>
3876
3877         * cli/cli-cmds.c (list_command): Use print_sal_location.
3878         (print_sal_location): New function.
3879         (ambiguous_line_spec): Use print_sal_location.
3880         * linespec.c (symbol_to_sal): Record the symbol in the sal.
3881         * symtab.c (find_function_start_sal): Likewise.
3882         * symtab.h (symtab_and_line::symbol): New field.
3883
3884 2017-09-20  Pedro Alves  <palves@redhat.com>
3885
3886         * linespec.c (minsym_found): Handle non-text minsyms.
3887         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3888
3889 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3890
3891         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3892         backslash.
3893
3894 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3895
3896         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3897         vmovups instead vmovaps.
3898         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3899
3900 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
3901
3902         * NEWS (Changes since GDB 8.0): Add starti.
3903         * infcmd.c (enum run_break): New.
3904         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3905         case.
3906         (run_command): Use enum run_how.
3907         (start_command): Likewise.
3908         (starti_command): New function.
3909         (RUN_ARGS_HELP): New macro.
3910         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3911         commands.  Add starti command.
3912
3913 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3914
3915         * Makefile.in (monitor.o): Remove the rule.
3916
3917 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3918
3919         * annotate.h (struct annotate_arg_emitter): Use
3920         DISABLE_COPY_AND_ASSIGN.
3921         * common/refcounted-object.h (refcounted_object): Likewise.
3922         * completer.h (struct completion_result): Likewise.
3923         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3924         * filename-seen-cache.h (filename_seen_cache): Likewise.
3925         * gdbcore.h (thread_section_name): Likewise.
3926         * gdb_regex.h (compiled_regex): Likewise.
3927         * gdbthread.h (scoped_restore_current_thread): Likewise.
3928         * inferior.h (scoped_restore_current_inferior): Likewise.
3929         * jit.c (jit_reader): Likewise.
3930         * linespec.h (struct linespec_result): Likewise.
3931         * mi/mi-parse.h (struct mi_parse): Likewise.
3932         * nat/fork-inferior.c (execv_argv): Likewise.
3933         * progspace.h (scoped_restore_current_program_space): Likewise.
3934         * python/python-internal.h (class gdbpy_enter): Likewise.
3935         * regcache.h (regcache): Likewise.
3936         * target-descriptions.c (struct tdesc_reg): Likewise.
3937         (struct tdesc_type): Likewise.
3938         (struct tdesc_feature): Likewise.
3939         * ui-out.h (ui_out_emit_type): Likewise.
3940
3941 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3942
3943         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3944         label abort_expression.
3945
3946 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3947
3948         * common/buffer.c (buffer_xml_printf): Adjust.
3949         * common/xml-utils.c (xml_escape_text): Change return type to
3950         std::string, update code accordingly.
3951         * common/xml-utils.h (xml_escape_text): Change return type to
3952         std::string.
3953         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3954         * windows-tdep.c (windows_xfer_shared_library): Adjust.
3955         * unittests/xml-utils-selftests.c (test_xml_escape_text):
3956         Adjust.
3957
3958 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3959
3960         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3961         (SUBDIR_UNITTESTS_OBS): Add new object file.
3962         * unittests/xml-utils-selftests.c: New file.
3963
3964 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3965
3966         * common/selftest.h (selftest): New struct/interface.
3967         (register_test): Add name parameter, add new overload.
3968         (run_tests): Add filter parameter.
3969         (for_each_selftest_ftype): New typedef.
3970         (for_each_selftest): New declaration.
3971         * common/selftest.c (tests): Change type to
3972         map<string, unique_ptr<selftest>>.
3973         (simple_selftest): New struct.
3974         (register_test): New function.
3975         (register_test): Add name parameter and use it.
3976         (run_tests): Add filter parameter and use it.  Add prints.
3977         Adjust to vector -> map change.
3978         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3979         registering selftests.
3980         * arm-tdep.c (_initialize_arm_tdep): Likewise.
3981         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3982         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3983         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
3984         * findvar.c (_initialize_findvar): Likewise.
3985         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
3986         * maint.c (maintenance_selftest): Update call to run_tests.
3987         (maintenance_info_selftests): New function.
3988         (_initialize_maint_cmds): Register "maintenance info selftests"
3989         command.  Update "maintenance selftest" doc.
3990         * regcache.c (_initialize_regcache): Add names when registering
3991         selftests.
3992         * rust-exp.y (_initialize_rust_exp): Likewise.
3993         * selftest-arch.c (gdbarch_selftest): New struct.
3994         (gdbarch_tests): Remove.
3995         (register_test_foreach_arch): Add name parameter.  Call
3996         register_test.
3997         (tests_with_arch): Remove, move most content to
3998         gdbarch_selftest::operator().
3999         (_initialize_selftests_foreach_arch): Remove.
4000         * selftest-arch.h (register_test_foreach_arch): Add name
4001         parameter.
4002         (run_tests_with_arch): New declaration.
4003         * utils-selftests.c (_initialize_utils_selftests): Add names
4004         when registering selftests.
4005         * utils.c (_initialize_utils): Likewise.
4006         * unittests/array-view-selftests.c
4007         (_initialize_array_view_selftests): Likewise.
4008         * unittests/environ-selftests.c (_initialize_environ_selftests):
4009         Likewise.
4010         * unittests/function-view-selftests.c
4011         (_initialize_function_view_selftests): Likewise.
4012         * unittests/offset-type-selftests.c
4013         (_initialize_offset_type_selftests): Likewise.
4014         * unittests/optional-selftests.c
4015         (_initialize_optional_selftests): Likewise.
4016         * unittests/scoped_restore-selftests.c
4017         (_initialize_scoped_restore_selftests): Likewise.
4018         * NEWS: Document "maintenance selftest" and "maint info
4019         selftests".
4020
4021 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4022
4023         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
4024         scoped_restore.
4025
4026 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
4027
4028         * mi/mi-main.c (mi_load_progress): Make uiout variable
4029         a unique_ptr.
4030
4031 2017-09-15  Pedro Alves  <palves@redhat.com>
4032
4033         * compile/compile-c-types.c (convert_enum, convert_int)
4034         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4035
4036 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
4037
4038         * dwarf2read.c (copy_string): Remove.
4039         (parse_macro_definition): Replace copy_string with savestring.
4040
4041 2017-09-15  Yao Qi  <yao.qi@linaro.org>
4042
4043         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4044         gdb_target_obs.
4045         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4046         Likewise.
4047         (i[34567]86-*-linux*): Likewise.
4048
4049 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4050
4051         * dwarf2expr.h (dwarf_stack_value): Add constructor.
4052         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4053         <stack>: Change type to std::vector.
4054         <stack_len, stack_allocated>: Remove.
4055         <grow_stack>: Remove.
4056         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4057         (dwarf_expr_context::~dwarf_expr_context): Remove.
4058         (dwarf_expr_context::grow_stack): Remove.
4059         (dwarf_expr_context::push): Adjust.
4060         (dwarf_expr_context::pop): Adjust.
4061         (dwarf_expr_context::fetch): Adjust.
4062         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4063         (dwarf_expr_context::stack_empty_p): Adjust.
4064         (dwarf_expr_context::execute_stack_op): Adjust.
4065
4066 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4067
4068         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4069         return type to bool.
4070         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4071
4072 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4073
4074         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4075         Change type to bool.
4076         (dwarf_stack_value) <in_stack_memory>: Likewise.
4077         (dwarf_expr_context) <push_address>: Change parameter type to
4078         bool.
4079         <fetch_in_stack_memory>: Change return type to bool.
4080         <push>: Change parameter type to bool.
4081         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4082         to bool.
4083         (dwarf_expr_context::push_address): Likewise.
4084         (dwarf_expr_context::fetch_in_stack_memory): Change return type
4085         to bool.
4086         (dwarf_expr_context::execute_stack_op): Adjust.
4087         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4088
4089 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4090
4091         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4092         (struct dwarf_expr_context) <n_pieces>: Remove.
4093         <pieces>: Change type to std::vector.
4094         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4095         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4096         pieces.
4097         (dwarf_expr_context::add_piece): Adjust.
4098         * dwarf2loc.c (struct piece_closure): Initialize fields.
4099         <n_pieces>: Remove.
4100         <pieces>: Change type to std::vector.
4101         (allocate_piece_closure): Adjust, change parameter to
4102         std::vector rvalue and std::move it to piece_closure.
4103         (rw_pieced_value): Adjust.
4104         (check_pieced_synthetic_pointer): Adjust.
4105         (indirect_synthetic_pointer): Adjust.
4106         (coerce_pieced_ref): Adjust.
4107         (free_pieced_value_closure):  Adjust.  Use delete to free
4108         piece_closure.
4109         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
4110         to allocate_piece_closure.
4111         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4112
4113 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4114
4115         * probe.h (probe_ops_cp): Remove typedef.
4116         (DEF_VEC_P (probe_ops_cp)): Remove.
4117         (all_probe_ops): Change type to std::vector.
4118         * probe.c (info_probes_for_ops): Adjust to vector change.
4119         (probe_linespec_to_ops): Likewise.
4120         (all_probe_ops): Change type to std::vector.
4121         (_initialize_probe): Adjust to vector change.
4122         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
4123         * elfread.c (elf_get_probes): Likewise.
4124         * stap-probe.c (_initialize_stap_probe): Likewise.
4125
4126 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4127
4128         * probe.h (struct bound_probe): Define constructors.
4129         * probe.c (bound_probe_s): Remove typedef.
4130         (DEF_VEC_O (bound_probe_s)): Remove VEC.
4131         (collect_probes): Change return type to std::vector, remove
4132         cleanup.
4133         (compare_probes): Return bool, change parameter type.  Change
4134         semantic to "less than".
4135         (gen_ui_out_table_header_info): Change parameter to std::vector
4136         and update.
4137         (exists_probe_with_pops): Likewise.
4138         (info_probes_for_ops): Update to std::vector change.
4139         (enable_probes_command): Likewise.
4140         (disable_probes_command): Likewise.
4141
4142 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4143
4144         * probe.h (struct probe_ops) <get_probes>: Change parameter from
4145         vec to std::vector.
4146         * probe.c (parse_probes_in_pspace): Update.
4147         (find_probes_in_objfile): Update.
4148         (find_probe_by_pc): Update.
4149         (collect_probes): Update.
4150         (probe_any_get_probes): Update.
4151         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
4152         return type to reference to std::vector.
4153         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
4154         std::vector and update.
4155         (dtrace_process_dof): Likewise.
4156         (dtrace_get_probes): Likewise.
4157         * elfread.c (elf_get_probes): Change return type to std::vector,
4158         store an std::vector in bfd_data.
4159         (probe_key_free): Update to std::vector.
4160         * stap-probe.c (handle_stap_probe): Change parameter to
4161         std::vector and update.
4162         (stap_get_probes): Likewise.
4163         * symfile-debug.c (debug_sym_get_probes): Change return type to
4164         std::vector and update.
4165
4166 2017-09-11  Tom Tromey  <tom@tromey.com>
4167
4168         * breakpoint.c (program_breakpoint_here_p): Update.
4169         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
4170         from make_show_memory_breakpoints_cleanup.  Return a
4171         scoped_restore_tmpl<int>.
4172         (restore_show_memory_breakpoints): Remove.
4173         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
4174         * mem-break.c (memory_validate_breakpoint): Update.
4175         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
4176         (ia64_memory_remove_breakpoint): Update.
4177         (ia64_breakpoint_from_pc): Update.
4178         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
4179         from make_show_memory_breakpoints_cleanup.
4180
4181 2017-09-11  Tom Tromey  <tom@tromey.com>
4182
4183         * d-namespace.c (d_lookup_symbol): Use std::string.
4184         (find_symbol_in_baseclass): Likewise.
4185
4186 2017-09-11  Tom Tromey  <tom@tromey.com>
4187
4188         * ctf.c (ctf_start): Use std::string.
4189
4190 2017-09-11  Tom Tromey  <tom@tromey.com>
4191
4192         * ada-lang.c (is_known_support_routine): Update.
4193         (ada_unhandled_exception_name_addr_from_raise): Update.
4194         * guile/scm-frame.c (gdbscm_frame_name): Update.
4195         * python/py-frame.c (frapy_name): Update.
4196         (frapy_function): Update.
4197         * stack.h (find_frame_funname): Update.
4198         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
4199         (print_frame): Update.
4200
4201 2017-09-11  Tom Tromey  <tom@tromey.com>
4202
4203         * findcmd.c (put_bits): Take a gdb::byte_vector.
4204         (parse_find_args): Return gdb::byte_vector.  "args" now const.
4205         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
4206         cleanups.
4207         (find_command): Update.
4208
4209 2017-09-11  Tom Tromey  <tom@tromey.com>
4210
4211         * cli/cli-script.c (class scoped_restore_hook_in): New.
4212         (clear_hook_in_cleanup): Remove.
4213         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
4214         scoped_restore_hook_in.
4215
4216 2017-09-11  Tom Tromey  <tom@tromey.com>
4217
4218         * cli/cli-script.c (restore_interp): Remove.
4219         (read_command_lines): Use scoped_restore_interp.
4220         * interps.c (scoped_restore_interp::set_temp): Rename from
4221         interp_set_temp.
4222         * interps.h (class scoped_restore_interp): New.
4223         (interp_set_temp): Remove.
4224
4225 2017-09-11  Tom Tromey  <tom@tromey.com>
4226
4227         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4228         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
4229         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
4230         scoped_restore.
4231         (mi_cmd_break_insert_1): Update.
4232         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
4233         scoped_restore.
4234
4235 2017-09-11  Tom Tromey  <tom@tromey.com>
4236
4237         * demangle.c (demangle_command): Update.
4238         * breakpoint.c (disable_command): Update.
4239         (enable_command): Update.
4240         (find_location_by_number): Make "number" const.  Use
4241         get_number_trailer.
4242         * cli/cli-utils.c (extract_arg): Return std::string.
4243         * probe.c (parse_probe_linespec): Update.  Change types.
4244         (collect_probes): Take string arguments.
4245         (parse_probe_linespec): Likewise.
4246         (info_probes_for_ops): Update.
4247         (enable_probes_command): Update.
4248         (disable_probes_command): Update.
4249         * break-catch-sig.c (catch_signal_split_args): Update.
4250         * mi/mi-parse.c (mi_parse): Update.
4251
4252 2017-09-11  Tom Tromey  <tom@tromey.com>
4253
4254         * language.h (language_enum): Make argument const.
4255         * language.c (language_enum): Make argument const.
4256
4257 2017-09-11  Tom Tromey  <tom@tromey.com>
4258
4259         * common/common-utils.h (skip_to_space): Remove macro, redeclare
4260         as function.
4261         (skip_to_space): Rename from skip_to_space_const.
4262         * common/common-utils.c (skip_to_space): New function.
4263         (skip_to_space): Rename from skip_to_space_const.
4264         * cli/cli-utils.h (get_number): Rename from get_number_const.
4265         (extract_arg): Rename from extract_arg_const.
4266         * cli/cli-utils.c (get_number): Rename from get_number_const.
4267         (extract_arg): Rename from extract_arg_const.
4268         (number_or_range_parser::get_number): Use ::get_number.
4269         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
4270         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
4271         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
4272         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
4273         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
4274         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
4275         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
4276         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
4277
4278 2017-09-11  Tom Tromey  <tom@tromey.com>
4279
4280         * python/python.c (do_start_initialization): Use
4281         py-event-types.def to initialize types.
4282         Define all object type structures.
4283         * python/python-internal.h: Don't declare event initialization
4284         functions.
4285         * python/py-threadevent.c (thread_event_object_type): Don't
4286         define.
4287         * python/py-stopevent.c (stop_event_object_type): Don't define.
4288         * python/py-signalevent.c (signal_event_object_type): Don't
4289         declare or define.
4290         * python/py-newobjfileevent.c (new_objfile_event_object_type)
4291         (clear_objfiles_event_object_type): Don't declare or define.
4292         * python/py-infevents.c (inferior_call_pre_event_object_type)
4293         (inferior_call_post_event_object_type)
4294         (register_changed_event_object_type)
4295         (memory_changed_event_object_type): Don't declare or define.
4296         * python/py-inferior.c (new_thread_event_object_type)
4297         (new_inferior_event_object_type)
4298         (inferior_deleted_event_object_type): Don't declare or define.
4299         * python/py-exitedevent.c (exited_event_object_type): Don't
4300         declare or define.
4301         * python/py-evts.c (gdbpy_initialize_py_events): Use
4302         py-all-events.def.
4303         * python/py-events.h (thread_event_object_type): Don't declare.
4304         (events_object): Use py-all-events.def.
4305         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
4306         py-event-types.def.
4307         * python/py-event-types.def: New file.
4308         * python/py-continueevent.c (create_continue_event_object): Don't
4309         declare or define.
4310         * python/py-bpevent.c (breakpoint_event_object_type): Don't
4311         declare or define.
4312         * python/py-all-events.def: New file.
4313
4314 2017-09-11  Tom Tromey  <tom@tromey.com>
4315
4316         * python/py-threadevent.c (create_thread_event_object): Return
4317         gdbpy_ref.
4318         * python/py-stopevent.h (create_stop_event_object)
4319         (create_breakpoint_event_object, create_signal_event_object):
4320         Update.
4321         * python/py-stopevent.c (create_stop_event_object): Return
4322         gdbpy_ref.
4323         (emit_stop_event): Update.
4324         * python/py-signalevent.c (create_signal_event_object): Return
4325         gdbpy_ref.
4326         * python/py-infevents.c (create_inferior_call_event_object):
4327         Update.
4328         * python/py-event.h (create_event_object)
4329         (create_thread_event_object): Update.
4330         * python/py-event.c (create_event_object): Return gdbpy_ref.
4331         * python/py-continueevent.c: Return gdbpy_ref.
4332         * python/py-bpevent.c (create_breakpoint_event_object): Return
4333         gdbpy_ref.
4334
4335 2017-09-11  Tom Tromey  <tom@tromey.com>
4336
4337         PR python/15622:
4338         * NEWS: Add entry.
4339         * python/python.c (do_start_initialization): Initialize new event
4340         types.
4341         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
4342         (gdbpy_initialize_inferior_deleted_event)
4343         (gdbpy_initialize_new_thread_event): Declare.
4344         * python/py-threadevent.c (create_thread_event_object): Add option
4345         "thread" parameter.
4346         * python/py-inferior.c (new_thread_event_object_type)
4347         (new_inferior_event_object_type)
4348         (inferior_deleted_event_object_type): Declare.
4349         (python_new_inferior, python_inferior_deleted): New functions.
4350         (add_thread_object): Emit new_thread event.
4351         (gdbpy_initialize_inferior): Attach new functions to corresponding
4352         observers.
4353         (new_thread, new_inferior, inferior_deleted): Define new event
4354         types.
4355         * python/py-evts.c (gdbpy_initialize_py_events): Add new
4356         registries.
4357         * python/py-events.h (events_object) <new_inferior,
4358         inferior_deleted, new_thread>: New fields.
4359         * python/py-event.h (create_thread_event_breakpoint): Add optional
4360         "thread" parameter.
4361
4362 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4363
4364         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
4365         check current_ui instead.
4366         (internal_vproblem): Likewise.
4367
4368 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
4369
4370         * thread.c (print_thread_info_1): Remove unnecessary calls to
4371         uiout->is_mi_like_p.
4372
4373 2017-09-09  Tom Tromey  <tom@tromey.com>
4374
4375         * namespace.h (add_using_directive): Update.
4376         * namespace.c (add_using_directive): Change type of excludes to
4377         std::vector.
4378         * dwarf2read.c (read_import_statement): Use std::vector.
4379         (read_namespace): Update.
4380         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4381
4382 2017-09-09  Tom Tromey  <tom@tromey.com>
4383
4384         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
4385
4386 2017-09-09  Tom Tromey  <tom@tromey.com>
4387
4388         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
4389
4390 2017-09-09  Tom Tromey  <tom@tromey.com>
4391
4392         * stack.c (func_command): Use gdb::def_vector.
4393
4394 2017-09-09  Tom Tromey  <tom@tromey.com>
4395
4396         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
4397         ui_out_emit_list, ui_out_emit_tuple.
4398         (mi_cmd_var_update): Likewise.
4399
4400 2017-09-09  Tom Tromey  <tom@tromey.com>
4401
4402         * mi/mi-interp.c (mi_user_selected_context_changed): Use
4403         ui_out_redirect_pop.
4404         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
4405         ui_out_redirect_pop.
4406         * utils.c (do_ui_out_redirect_pop)
4407         (make_cleanup_ui_out_redirect_pop): Remove.
4408         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
4409         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
4410         * ui-out.h (ui_out_redirect_pop): New class.
4411
4412 2017-09-09  Tom Tromey  <tom@tromey.com>
4413
4414         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
4415         (list_available_thread_groups, mi_cmd_list_thread_groups)
4416         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
4417         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
4418         Likewise.
4419
4420 2017-09-09  Tom Tromey  <tom@tromey.com>
4421
4422         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
4423         ui_out_emit_tuple.
4424
4425 2017-09-09  Tom Tromey  <tom@tromey.com>
4426
4427         * target.c (flash_erase_command): Use ui_out_emit_tuple.
4428         * stack.c (print_frame): Use ui_out_emit_tuple.
4429         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
4430         (info_spu_mailbox_command, info_spu_dma_command)
4431         (info_spu_proxydma_command): Likewise.
4432         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
4433         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
4434         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
4435         ui_out_emit_tuple.
4436         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
4437
4438 2017-09-09  Tom Tromey  <tom@tromey.com>
4439
4440         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
4441         (class ui_out_emit_table): Update comment.
4442         * ui-out.c (do_cleanup_table_end)
4443         (make_cleanup_ui_out_table_begin_end): Remove.
4444         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
4445         (info_spu_dma_cmdlist): Likewise.
4446         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
4447         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
4448         ui_out_emit_table.
4449
4450 2017-09-09  Tom Tromey  <tom@tromey.com>
4451
4452         * thread.c (print_thread_info_1): Use ui_out_emit_table,
4453         ui_out_emit_list, gdb::optional.
4454
4455 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
4456
4457         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
4458         prototype.
4459         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
4460         prototype.
4461         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
4462         prototype.
4463         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
4464         * ada-exp.y: Remove _initialize_ada_exp prototype.
4465         * ada-lang.c: Remove _initialize_ada_language prototype.
4466         * ada-tasks.c: Remove _initialize_tasks prototype.
4467         * addrmap.c: Remove _initialize_addrmap prototype.
4468         * agent.c: Remove _initialize_agent prototype.
4469         * aix-thread.c: Remove _initialize_aix_thread prototype.
4470         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
4471         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
4472         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
4473         prototype.
4474         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
4475         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
4476         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
4477         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
4478         prototype.
4479         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
4480         prototype.
4481         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
4482         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
4483         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
4484         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
4485         prototype.
4486         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
4487         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
4488         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
4489         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
4490         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4491         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
4492         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
4493         prototype.
4494         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
4495         prototype.
4496         * annotate.c: Remove _initialize_annotate prototype.
4497         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
4498         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
4499         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
4500         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
4501         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
4502         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
4503         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
4504         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
4505         prototype.
4506         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
4507         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
4508         * auto-load.c: Remove _initialize_auto_load prototype.
4509         * auxv.c: Remove _initialize_auxv prototype.
4510         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
4511         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
4512         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
4513         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
4514         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
4515         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
4516         prototype.
4517         * break-catch-throw.c: Remove _initialize_break_catch_throw
4518         prototype.
4519         * breakpoint.c: Remove _initialize_breakpoint prototype.
4520         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
4521         * btrace.c: Remove _initialize_btrace prototype.
4522         * charset.c: Remove _initialize_charset prototype.
4523         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
4524         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
4525         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
4526         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
4527         * cli/cli-script.c: Remove _initialize_cli_script prototype.
4528         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
4529         * coffread.c: Remove _initialize_coffread prototype.
4530         * compile/compile.c: Remove _initialize_compile prototype.
4531         * complaints.c: Remove _initialize_complaints prototype.
4532         * completer.c: Remove _initialize_completer prototype.
4533         * copying.awk: Remove _initialize_copying prototype.
4534         * copying.c: Regenerate.
4535         * core-regset.c: Remove _initialize_core_regset prototype.
4536         * corefile.c: Remove _initialize_core prototype.
4537         * corelow.c: Remove _initialize_corelow prototype.
4538         * cp-abi.c: Remove _initialize_cp_abi prototype.
4539         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
4540         * cp-support.c: Remove _initialize_cp_support prototype.
4541         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
4542         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
4543         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
4544         * ctf.c: Remove _initialize_ctf prototype.
4545         * d-lang.c: Remove _initialize_d_language prototype.
4546         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
4547         prototype.
4548         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
4549         * dbxread.c: Remove _initialize_dbxread prototype.
4550         * dcache.c: Remove _initialize_dcache prototype.
4551         * demangle.c: Remove _initialize_demangler prototype.
4552         * disasm-selftests.c: Remove _initialize_disasm_selftests
4553         prototype.
4554         * disasm.c: Remove _initialize_disasm prototype.
4555         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
4556         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
4557         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
4558         prototype.
4559         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
4560         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
4561         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
4562         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
4563         * elfread.c: Remove _initialize_elfread prototype.
4564         * exec.c: Remove _initialize_exec prototype.
4565         * extension.c: Remove _initialize_extension prototype.
4566         * f-lang.c: Remove _initialize_f_language prototype.
4567         * f-valprint.c: Remove _initialize_f_valprint prototype.
4568         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
4569         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
4570         * filesystem.c: Remove _initialize_filesystem prototype.
4571         * findcmd.c: Remove _initialize_mem_search prototype.
4572         * fork-child.c: Remove _initialize_fork_child prototype.
4573         * frame-base.c: Remove _initialize_frame_base prototype.
4574         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
4575         * frame.c: Remove _initialize_frame prototype.
4576         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
4577         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
4578         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
4579         * gcore.c: Remove _initialize_gcore prototype.
4580         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
4581         * gdbarch.c: Regenerate.
4582         * gdbarch.sh: Remove _initialize_gdbarch prototype.
4583         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
4584         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
4585         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
4586         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
4587         * go-lang.c: Remove _initialize_go_language prototype.
4588         * go32-nat.c: Remove _initialize_go32_nat prototype.
4589         * guile/guile.c: Remove _initialize_guile prototype.
4590         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4591         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4592         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4593         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4594         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4595         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4596         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4597         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4598         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
4599         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
4600         prototype.
4601         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
4602         prototype.
4603         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
4604         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
4605         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
4606         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
4607         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4608         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4609         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4610         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4611         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4612         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4613         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4614         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4615         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4616         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4617         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4618         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4619         prototype.
4620         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4621         prototype.
4622         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4623         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4624         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4625         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4626         * infcall.c: Remove _initialize_infcall prototype.
4627         * infcmd.c: Remove _initialize_infcmd prototype.
4628         * inferior.c: Remove _initialize_inferiors prototype.
4629         * inflow.c: Remove _initialize_inflow prototype.
4630         * infrun.c: Remove _initialize_infrun prototype.
4631         * interps.c: Remove _initialize_interpreter prototype.
4632         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4633         * jit.c: Remove _initialize_jit prototype.
4634         * language.c: Remove _initialize_language prototype.
4635         * linux-fork.c: Remove _initialize_linux_fork prototype.
4636         * linux-nat.c: Remove _initialize_linux_nat prototype.
4637         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4638         * linux-thread-db.c: Remove _initialize_thread_db prototype.
4639         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4640         * m2-lang.c: Remove _initialize_m2_language prototype.
4641         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4642         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4643         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4644         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4645         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4646         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4647         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4648         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4649         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4650         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4651         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4652         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4653         * machoread.c: Remove _initialize_machoread prototype.
4654         * macrocmd.c: Remove _initialize_macrocmd prototype.
4655         * macroscope.c: Remove _initialize_macroscope prototype.
4656         * maint.c: Remove _initialize_maint_cmds prototype.
4657         * mdebugread.c: Remove _initialize_mdebugread prototype.
4658         * memattr.c: Remove _initialize_mem prototype.
4659         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4660         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4661         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4662         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4663         * mi/mi-main.c: Remove _initialize_mi_main prototype.
4664         * microblaze-linux-tdep.c: Remove
4665         _initialize_microblaze_linux_tdep prototype.
4666         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4667         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4668         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4669         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4670         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4671         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4672         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4673         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4674         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4675         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4676         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4677         prototype.
4678         * mipsread.c: Remove _initialize_mipsread prototype.
4679         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4680         prototype.
4681         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4682         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4683         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4684         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4685         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4686         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4687         prototype.
4688         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4689         * nto-procfs.c: Remove _initialize_procfs prototype.
4690         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4691         * objc-lang.c: Remove _initialize_objc_language prototype.
4692         * objfiles.c: Remove _initialize_objfiles prototype.
4693         * observer.c: Remove observer_test_first_notification_function,
4694         observer_test_second_notification_function,
4695         observer_test_third_notification_function, and
4696         _initialize_observer prototypes.
4697         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4698         * osabi.c: Remove _initialize_gdb_osabi prototype.
4699         * osdata.c: Remove _initialize_osdata prototype.
4700         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4701         * parse.c: Remove _initialize_parse prototype.
4702         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4703         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4704         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4705         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4706         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4707         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4708         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4709         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4710         * printcmd.c: Remove _initialize_printcmd prototype.
4711         * probe.c: Remove _initialize_probe prototype.
4712         * proc-api.c: Remove _initialize_proc_api prototype.
4713         * proc-events.c: Remove _initialize_proc_events prototype.
4714         * proc-service.c: Remove _initialize_proc_service prototype.
4715         * procfs.c: Remove _initialize_procfs prototype.
4716         * psymtab.c: Remove _initialize_psymtab prototype.
4717         * python/python.c: Remove _initialize_python prototype.
4718         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4719         * record-btrace.c: Remove _initialize_record_btrace prototype.
4720         * record-full.c: Remove _initialize_record_full prototype.
4721         * record.c: Remove _initialize_record prototype.
4722         * regcache.c: Remove _initialize_regcache prototype.
4723         * reggroups.c: Remove _initialize_reggroup prototype.
4724         * remote-notif.c: Remove _initialize_notif prototype.
4725         * remote-sim.c: Remove _initialize_remote_sim prototype.
4726         * remote.c: Remove _initialize_remote prototype.
4727         * reverse.c: Remove _initialize_reverse prototype.
4728         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4729         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4730         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4731         prototype.
4732         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4733         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4734         * rust-exp.y: Remove _initialize_rust_exp prototype.
4735         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4736         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4737         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4738         * score-tdep.c: Remove _initialize_score_tdep prototype.
4739         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4740         prototype.
4741         * ser-go32.c: Remove _initialize_ser_dos prototype.
4742         * ser-mingw.c: Remove _initialize_ser_windows prototype.
4743         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4744         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4745         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4746         * serial.c: Remove _initialize_serial prototype.
4747         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4748         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4749         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4750         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4751         * skip.c: Remove _initialize_step_skip prototype.
4752         * sol-thread.c: Remove _initialize_sol_thread prototype.
4753         * solib-aix.c: Remove _initialize_solib_aix prototype.
4754         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4755         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4756         * solib-frv.c: Remove _initialize_frv_solib prototype.
4757         * solib-spu.c: Remove _initialize_spu_solib prototype.
4758         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4759         * solib-target.c: Remove _initialize_solib_target prototype.
4760         * solib.c: Remove _initialize_solib prototype.
4761         * source.c: Remove _initialize_source prototype.
4762         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4763         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4764         prototype.
4765         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4766         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4767         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4768         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4769         prototype.
4770         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4771         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4772         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4773         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4774         prototype.
4775         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4776         prototype.
4777         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4778         prototype.
4779         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4780         prototype.
4781         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4782         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4783         prototype.
4784         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4785         prototype.
4786         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4787         prototype.
4788         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4789         prototype.
4790         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4791         prototype.
4792         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4793         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4794         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4795         * stabsread.c: Remove _initialize_stabsread prototype.
4796         * stack.c: Remove _initialize_stack prototype.
4797         * stap-probe.c: Remove _initialize_stap_probe prototype.
4798         * std-regs.c: Remove _initialize_frame_reg prototype.
4799         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4800         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4801         * symfile.c: Remove _initialize_symfile prototype.
4802         * symmisc.c: Remove _initialize_symmisc prototype.
4803         * symtab.c: Remove _initialize_symtab prototype.
4804         * target-dcache.c: Remove _initialize_target_dcache prototype.
4805         * target-descriptions.c: Remove _initialize_target_descriptions
4806         prototype.
4807         * thread.c: Remove _initialize_thread prototype.
4808         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4809         prototype.
4810         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4811         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4812         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4813         prototype.
4814         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4815         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4816         * tracefile.c: Remove _initialize_tracefile prototype.
4817         * tracepoint.c: Remove _initialize_tracepoint prototype.
4818         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4819         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4820         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4821         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4822         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4823         * tui/tui-win.c: Remove _initialize_tui_win prototype.
4824         * tui/tui.c: Remove _initialize_tui prototype.
4825         * typeprint.c: Remove _initialize_typeprint prototype.
4826         * user-regs.c: Remove _initialize_user_regs prototype.
4827         * utils.c: Remove _initialize_utils prototype.
4828         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4829         * valarith.c: Remove _initialize_valarith prototype.
4830         * valops.c: Remove _initialize_valops prototype.
4831         * valprint.c: Remove _initialize_valprint prototype.
4832         * value.c: Remove _initialize_values prototype.
4833         * varobj.c: Remove _initialize_varobj prototype.
4834         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4835         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4836         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4837         * windows-nat.c: Remove _initialize_windows_nat,
4838         _initialize_check_for_gdb_ini, and _initialize_loadable
4839         prototypes.
4840         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4841         * xcoffread.c: Remove _initialize_xcoffread prototype.
4842         * xml-support.c: Remove _initialize_xml_support prototype.
4843         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4844         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4845         prototype.
4846         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4847         prototype.
4848         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4849
4850 2017-09-08  Keith Seitz  <keiths@redhat.com>
4851
4852         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4853         field.
4854
4855 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
4856
4857         * f-valprint.c (f_val_print): Remove check for one byte
4858         sized integers. Remove printing of character type.
4859
4860 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
4861             Christoph Weinmann  <christoph.t.weinmann@intel.com>
4862             Bernhard Heckel  <bernhard.heckel@intel.com>
4863
4864         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4865         to maintain proper indentation when printing pointers/refs.
4866
4867 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4868
4869         GDB 8.0.1 released.
4870
4871 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4872
4873         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4874
4875 2017-09-05  Tom Tromey  <tom@tromey.com>
4876
4877         * parse.c (funcall_chain): Now a std::vector.
4878         (start_arglist, end_arglist): Simplify.
4879         (free_funcalls): Remove.
4880         (parse_exp_in_context_1): Remove cleanup.
4881
4882 2017-09-05  Tom Tromey  <tom@tromey.com>
4883
4884         * go-exp.y (go_parse): Don't create a cleanup.
4885
4886 2017-09-05  Tom Tromey  <tom@tromey.com>
4887
4888         * d-exp.y (PrimaryExpression): Use std::string.
4889         (d_parse): Don't create a cleanup.
4890
4891 2017-09-05  Tom Tromey  <tom@tromey.com>
4892
4893         * utils.c (do_clear_parser_state): Remove.
4894         (make_cleanup_clear_parser_state): Remove.
4895         * p-exp.y (pascal_parse): Use scoped_restore.
4896         * m2-exp.y (m2_parse): Use scoped_restore.
4897         * f-exp.y (f_parse): Use scoped_restore.
4898         * d-exp.y (d_parse): Use scoped_restore.
4899         * c-exp.y (c_parse): Use scoped_restore.
4900         * ada-exp.y (ada_parse): Use scoped_restore.
4901         * utils.h (make_cleanup_clear_parser_state): Remove.
4902
4903 2017-09-06  Keith Seitz  <keiths@redhat.com>
4904
4905         * dwarf2read.c (dw2_linkage_name_attr): New function.
4906         (dw2_linkage_name): New function.
4907         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4908         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4909         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4910
4911 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4912
4913         * config/djgpp/djconfig.sh: Correct shell portability issue.
4914
4915 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4916
4917         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4918
4919 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4920
4921         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4922         * NEWS: Mention new FreeBSD/mips native configuration.
4923         * configure.host: Add aarch64*-*-freebsd*.
4924         * configure.nat: Likewise.
4925         * aarch64-fbsd-nat.c: New file.
4926
4927 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4928
4929         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4930         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4931         * NEWS: Mention new FreeBSD/aarch64 target.
4932         * configure.tgt: Add aarch64*-*-freebsd*.
4933         * aarch64-fbsd-tdep.c: New file.
4934         * aarch64-fbsd-tdep.h: New file.
4935
4936 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4937
4938         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4939
4940 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
4941
4942         * parse.c (find_minsym_type_and_address): Don't relocate addresses
4943         of TLS symbols.
4944
4945 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4946
4947         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4948         call.
4949
4950 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4951
4952         * infrun.c (follow_exec): Call add_thread after
4953         target_find_description.
4954
4955 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4956
4957         * infrun.c (handle_inferior_event_1): When exec'ing, read
4958         stop_pc after follow_exec.
4959
4960 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4961
4962         * remote.c (process_g_packet): Update error message.
4963
4964 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4965
4966         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4967         targets.
4968
4969 2017-09-05  Pedro Alves  <palves@redhat.com>
4970
4971         * eval.c (eval_call, evaluate_funcall): New functions, factored
4972         out from ...
4973         (evaluate_subexp_standard): ... this.
4974
4975 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4976
4977         * amd64-tdep.c (amd64_target_description): Create target
4978         descriptions.
4979         (_initialize_amd64_tdep): Don't call functions
4980         initialize_tdesc_amd64_*.  Add self tests.
4981         * arch/amd64.c (amd64_create_target_description): Add parameter
4982         is_linux.  Call set_tdesc_osabi if is_linux is true.
4983         * arch/amd64.h (amd64_create_target_description): Update the
4984         declaration.
4985         * arch/i386.c (i386_create_target_description): Add parameter
4986         is_linux.  Call set_tdesc_osabi if is_linux is true.
4987         * arch/i386.h (i386_create_target_description): Update
4988         declaration.
4989         * configure.tgt: Add i386.o to gdb_target_obs.
4990         * features/Makefile (XMLTOC): Remove i386/*.xml.
4991         * features/i386/amd64-avx-avx512.c: Remove.
4992         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
4993         * features/i386/amd64-avx-mpx.c: Remove.
4994         * features/i386/amd64-avx.c: Remove.
4995         * features/i386/amd64-mpx.c: Remove.
4996         * features/i386/amd64.c: Remove.
4997         * features/i386/i386-avx-avx512.c: Remove.
4998         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
4999         * features/i386/i386-avx-mpx.c: Remove.
5000         * features/i386/i386-avx.c: Remove.
5001         * features/i386/i386-mmx.c: Remove.
5002         * features/i386/i386-mpx.c: Remove.
5003         * features/i386/i386.c: Remove.
5004         * i386-tdep.c: Don't include features/i386/i386*.c., include
5005         target-descriptions.h and arch/i386.h.
5006         (i386_target_description): Create target descriptions.
5007         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
5008         functions.  Do self tests.
5009
5010 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5011
5012         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
5013         * features/i386/amd64-avx-avx512-linux.c: Removed.
5014         * features/i386/amd64-avx-linux.c: Removed.
5015         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
5016         * features/i386/amd64-avx-mpx-linux.c: Removed.
5017         * features/i386/amd64-linux.c: Removed.
5018         * features/i386/amd64-mpx-linux.c: Removed.
5019         * features/i386/x32-avx-avx512-linux.c: Removed.
5020         * features/i386/x32-avx-linux.c: Removed.
5021         * features/i386/x32-linux.c: Removed.
5022
5023 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5024
5025         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
5026         features/i386/*.c.
5027         (amd64_linux_read_description): Call
5028         amd64_create_target_description.
5029         * arch/amd64.c: New file.
5030         * arch/amd64.h: New file.
5031         * configure.tgt (x86_64-*-linux*): Append amd64.o.
5032         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5033
5034 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5035
5036         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5037         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
5038         (amd64_linux_read_description): Create target descriptions.
5039         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5040         functions.  Add unit tests.
5041         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5042         x32-core.xml.
5043         * features/i386/64bit-avx.c: Generated.
5044         * features/i386/64bit-avx512.c: Generated.
5045         * features/i386/64bit-core.c: Generated.
5046         * features/i386/64bit-linux.c: Generated.
5047         * features/i386/64bit-mpx.c: Generated.
5048         * features/i386/64bit-pkeys.c: Generated.
5049         * features/i386/64bit-segments.c: Generated.
5050         * features/i386/64bit-sse.c: Generated.
5051         * features/i386/x32-core.c: Generated.
5052         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5053         c files for amd64-linux and x32-linux.
5054
5055 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5056
5057         * amd64-linux-tdep.c (amd64_linux_read_description): New
5058         function.
5059         (amd64_linux_core_read_description): Call
5060         amd64_linux_read_description.
5061         (amd64_linux_init_abi): Likewise.
5062         (amd64_x32_linux_init_abi): Likewise.
5063         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5064         * x86-linux-nat.c (x86_linux_read_description): Call
5065         amd64_linux_read_description.
5066
5067 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5068
5069         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5070         comments.
5071
5072 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5073
5074         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5075         * features/i386/i386-avx-avx512-linux.c: Remove.
5076         * features/i386/i386-avx-linux.c: Remove.
5077         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5078         * features/i386/i386-avx-mpx-linux.c: Remove.
5079         * features/i386/i386-linux.c: Remove.
5080         * features/i386/i386-mmx-linux.c: Remove.
5081         * features/i386/i386-mpx-linux.c: Remove.
5082
5083 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5084
5085         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5086         (SFILES): Add arch/i386.c.
5087         (HFILES_NO_SRCDIR): Add arch/i386.h.
5088         * arch/i386.c: New file.
5089         * arch/i386.h: New file.
5090         * arch/tdesc.h (allocate_target_description): Declare.
5091         (set_tdesc_architecture): Declare.
5092         (set_tdesc_osabi): Declare.
5093         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5094         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5095         include arch/i386.h.
5096         (i386_linux_read_description): Remove code and call
5097         i386_create_target_description.
5098         (set_tdesc_architecture): New function.
5099         (set_tdesc_osabi): New function.
5100         * target-descriptions.h (allocate_target_description): Remove.
5101
5102 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5103
5104         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5105         * target-descriptions.c (tdesc_create_feature): Likewise, and
5106         adjust code.
5107         * features/i386/32bit-avx.c: Re-generated.
5108         * features/i386/32bit-avx512.c: Re-generated.
5109         * features/i386/32bit-core.c: Re-generated.
5110         * features/i386/32bit-linux.c: Re-generated.
5111         * features/i386/32bit-mpx.c: Re-generated.
5112         * features/i386/32bit-pkeys.c: Re-generated.
5113         * features/i386/32bit-sse.c: Re-generated.
5114
5115 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5116
5117         * regformats/regdef.h (struct reg): Override operator == and !=.
5118
5119 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5120
5121         * arch/tdesc.h: New file.
5122         * regformats/regdat.sh: Generate code using tdesc_create_reg.
5123         * target-descriptions.c: Update comments.
5124         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
5125         declarations.
5126         * features/i386/32bit-avx.c: Re-generated.
5127         * features/i386/32bit-avx512.c: Re-generated.
5128         * features/i386/32bit-core.c: Re-generated.
5129         * features/i386/32bit-linux.c: Re-generated.
5130         * features/i386/32bit-mpx.c: Re-generated.
5131         * features/i386/32bit-pkeys.c: Re-generated.
5132         * features/i386/32bit-sse.c: Re-generated.
5133
5134 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5135
5136         * regformats/regdat.sh: Update generated code.
5137
5138 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5139
5140         * regformats/regdat.sh: Adjust code order.
5141
5142 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5143
5144         * expprint.c (dump_subexp_body_standard): Use constant format
5145         string in fprintf_filtered call.
5146
5147 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5148
5149         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
5150         NetBSD/i386.
5151         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
5152
5153 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5154
5155         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
5156
5157 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5158
5159         * bsd-kvm.o: Define _KMEMUSER.
5160         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
5161         * configure: Regenerate.
5162
5163 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5164
5165         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
5166         * i386-fbsd-nat.c: Likewise.
5167
5168 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5169
5170         * unittests/array-view-selftests.c: Add include of <array>.
5171
5172 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5173
5174         * spu-tdep.c (flush_ea_cache): Add missing argument to
5175         call_function_by_hand.
5176
5177 2017-09-04  Pedro Alves  <palves@redhat.com>
5178
5179         * NEWS (Safer support for debugging with no debug info): New.
5180
5181 2017-09-04  Pedro Alves  <palves@redhat.com>
5182
5183         * c-exp.y (function_method, function_method_void): Add current
5184         instance flags to TYPE_INSTANCE.
5185         * dwarf2read.c (check_modifier): New.
5186         (compute_delayed_physnames): Assert that only C++ adds delayed
5187         physnames.  Mark fn_fields as const/volatile depending on
5188         physname.
5189         * eval.c (make_params): New type_instance_flags parameter.  Use
5190         it as the new type's instance flags.
5191         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
5192         flags element and pass it to make_params.
5193         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
5194         instance flags element.
5195         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
5196         * gdbtypes.h: Include "enum-flags.h".
5197         (type_instance_flags): New enum-flags type.
5198         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
5199         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
5200         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
5201         (follow_type_instance_flags): New function.
5202         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
5203         * parser-defs.h (follow_type_instance_flags): Declare.
5204         * valops.c (value_struct_elt_for_reference): const/volatile must
5205         match too.
5206
5207 2017-09-04  Pedro Alves  <palves@redhat.com>
5208
5209         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
5210         function/method scopes; lookup the nested name as a function local
5211         static variable.
5212
5213 2017-09-04  Pedro Alves  <palves@redhat.com>
5214
5215         (%type <voidval>): Add function_method.
5216         * c-exp.y (exp): New production for calls with no arguments.
5217         (function_method, function_method_void_or_typelist): New
5218         productions.
5219         (exp): New production for "method()::static_var".
5220         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
5221         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5222         Handle OP_FUNC_STATIC_VAR.
5223         * parse.c (operator_length_standard):
5224         Handle OP_FUNC_STATIC_VAR.
5225
5226 2017-09-04  Pedro Alves  <palves@redhat.com>
5227
5228         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
5229         handling.
5230         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5231         Ditto.
5232         * parse.c (operator_length_standard, operator_check_standard):
5233         Ditto.
5234         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
5235
5236 2017-09-04  Pedro Alves  <palves@redhat.com>
5237
5238         * ax-gdb.c: Include "typeprint.h".
5239         (gen_expr_for_cast): New function.
5240         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
5241         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
5242         type is unknown.
5243         * dwarf2read.c (new_symbol_full): Fallback to int instead of
5244         nodebug_data_symbol.
5245         * eval.c: Include "typeprint.h".
5246         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
5247         Error out if symbol has unknown type.
5248         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
5249         evaluate_subexp_for_cast.
5250         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
5251         OP_VAR_MSYM_VALUE.
5252         (evaluate_subexp_for_cast): New function.
5253         * gdbtypes.c (init_nodebug_var_type): New function.
5254         (objfile_type): Use it to initialize types of variables with no
5255         debug info.
5256         * typeprint.c (error_unknown_type): New.
5257         * typeprint.h (error_unknown_type): New declaration.
5258         * compile/compile-c-types.c (convert_type_basic): Handle
5259         TYPE_CODE_ERROR; warn and fallback to int for variables with
5260         unknown type.
5261
5262 2017-09-04  Pedro Alves  <palves@redhat.com>
5263
5264         * eval.c (evaluate_var_value): New function, factored out from ...
5265         (evaluate_subexp_standard): ... here.
5266
5267 2017-09-04  Pedro Alves  <palves@redhat.com>
5268
5269         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
5270         Remove useless assignments to 'op'.
5271
5272 2017-09-04  Pedro Alves  <palves@redhat.com>
5273
5274         * eval.c (eval_skip_value): New function.
5275         (evaluate_subexp_standard): Use it.
5276
5277 2017-09-04  Pedro Alves  <palves@redhat.com>
5278
5279         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
5280         function name from symbol/minsym and pass it to
5281         error_call_unknown_return_type.
5282
5283 2017-09-04  Pedro Alves  <palves@redhat.com>
5284
5285         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
5286         * ax-gdb.c (gen_msym_var_ref): New function.
5287         (gen_expr): Handle OP_VAR_MSYM_VALUE.
5288         * eval.c (evaluate_var_msym_value): New function.
5289         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
5290         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
5291         to call_function_by_hand.
5292         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5293         Handle OP_VAR_MSYM_VALUE.
5294         (union exp_element) <msymbol>: New field.
5295         * minsyms.h (struct type): Forward declare.
5296         (find_minsym_type_and_address): Declare.
5297         * parse.c (write_exp_elt_msym): New function.
5298         (write_exp_msymbol): Delete, refactored as ...
5299         (find_minsym_type_and_address): ... this new function.
5300         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
5301         (operator_length_standard, operator_check_standard): Handle
5302         OP_VAR_MSYM_VALUE.
5303         * std-operator.def (OP_VAR_MSYM_VALUE): New.
5304
5305 2017-09-04  Pedro Alves  <palves@redhat.com>
5306
5307         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
5308         TYPE_GNU_IFUNC specially here.  Throw error if return type is
5309         unknown.
5310         * ada-typeprint.c (print_func_type): Handle functions with unknown
5311         return type.
5312         * c-typeprint.c (c_type_print_base): Handle functions and methods
5313         with unknown return type.
5314         * compile/compile-c-symbols.c (convert_symbol_bmsym)
5315         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
5316         * compile/compile-c-types.c: Include "objfiles.h".
5317         (convert_func): For functions with unknown return type, warn and
5318         default to int.
5319         * compile/compile-object-run.c (compile_object_run): Adjust call
5320         to call_function_by_hand_dummy.
5321         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
5322         call_function_by_hand.
5323         * eval.c (evaluate_subexp_standard): Adjust calls to
5324         call_function_by_hand.  Handle functions and methods with unknown
5325         return type.  Pass expect_type to call_function_by_hand.
5326         * f-typeprint.c (f_type_print_base): Handle functions with unknown
5327         return type.
5328         * gcore.c (call_target_sbrk): Adjust call to
5329         call_function_by_hand.
5330         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
5331         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
5332         an integer address type instead of nodebug.
5333         * guile/scm-value.c (gdbscm_value_call): Adjust call to
5334         call_function_by_hand.
5335         * infcall.c (error_call_unknown_return_type): New function.
5336         (call_function_by_hand): New "default_return_type" parameter.
5337         Pass it down.
5338         (call_function_by_hand_dummy): New "default_return_type"
5339         parameter.  Use it instead of defaulting to int.  If there's no
5340         default and the return type is unknown, throw an error.  If
5341         there's a default return type, and the called function has no
5342         debug info, then assume the function is prototyped.
5343         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
5344         New "default_return_type" parameter.
5345         (error_call_unknown_return_type): New declaration.
5346         * linux-fork.c (call_lseek): Cast return type of lseek.
5347         (inferior_call_waitpid, checkpoint_command): Adjust calls to
5348         call_function_by_hand.
5349         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
5350         calls to call_function_by_hand.
5351         * m2-typeprint.c (m2_procedure): Handle functions with unknown
5352         return type.
5353         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5354         (value_nsstring, print_object_command): Adjust calls to
5355         call_function_by_hand.
5356         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
5357         functions with unknown return type.
5358         (pascal_type_print_func_varspec_suffix): New function.
5359         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
5360         TYPE_CODE_METHOD>: Use it.
5361         * python/py-value.c (valpy_call): Adjust call to
5362         call_function_by_hand.
5363         * rust-lang.c (rust_evaluate_funcall): Adjust call to
5364         call_function_by_hand.
5365         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
5366         call_function_by_hand.
5367         * valops.c (value_allocate_space_in_inferior): Adjust call to
5368         call_function_by_hand.
5369         * typeprint.c (type_print_unknown_return_type): New function.
5370         * typeprint.h (type_print_unknown_return_type): New declaration.
5371
5372 2017-09-04  Pedro Alves  <palves@redhat.com>
5373
5374         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
5375         types with more than one parameter as prototyped.
5376
5377 2017-09-04  Pedro Alves  <palves@redhat.com>
5378
5379         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
5380         (disassemble_command): Use gdb_disassembly_flags instead of bare
5381         int.
5382         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
5383         (dump_insns, do_mixed_source_and_assembly_deprecated)
5384         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
5385         Use gdb_disassembly_flags instead of bare int.
5386         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
5387         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
5388         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
5389         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
5390         (enum gdb_disassembly_flag): ... values of this new enumeration.
5391         (gdb_disassembly_flags): Define.
5392         (gdb_disassembly)
5393         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
5394         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
5395         gdb_disassembly_flags instead of bare int.
5396         * record-btrace.c (btrace_insn_history)
5397         (record_btrace_insn_history, record_btrace_insn_history_range)
5398         (record_btrace_insn_history_from): Use gdb_disassembly_flags
5399         instead of bare int.
5400         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
5401         Use gdb_disassembly_flags instead of bare int.
5402         * target-debug.h (target_debug_print_gdb_disassembly_flags):
5403         Define.
5404         * target-delegates.c: Regenerate.
5405         * target.c (target_insn_history, target_insn_history_from)
5406         (target_insn_history_range): Use gdb_disassembly_flags instead of
5407         bare int.
5408         * target.h: Include "disasm.h".
5409         (struct target_ops) <to_insn_history, to_insn_history_from,
5410         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
5411         int.
5412         (target_insn_history, target_insn_history_from)
5413         (target_insn_history_range): Use gdb_disassembly_flags instead of
5414         bare int.
5415
5416 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5417
5418         * cli/cli-script.c (build_command_line): For if/while commands,
5419         check whether args is empty.
5420
5421 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5422
5423         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
5424         (enum command_control_type): Likewise.
5425         (struct command_line): Likewise.
5426         (free_command_lines): Likewise.
5427         (struct command_lines_deleter): Likewise.
5428         (command_line_up): Likewise.
5429         (read_command_lines): Likewise.
5430         (read_command_lines_1): Likewise.
5431         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
5432         (enum command_control_type): Likewise.
5433         (struct command_line): Likewise.
5434         (free_command_lines): Likewise.
5435         (struct command_lines_deleter): Likewise.
5436         (command_line_up): Likewise.
5437         (read_command_lines): Likewise.
5438         (read_command_lines_1): Likewise.
5439         * breakpoint.h: Include cli/cli-script.h.
5440         * extension-priv.h: Likewise.
5441         * gdbcmd.h: Likewise.
5442
5443 2017-09-04  Pedro Alves  <palves@redhat.com>
5444
5445         * ada-lang.c (is_known_support_routine): Move sal declaration to
5446         where it is initialized.
5447         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
5448         (parse_breakpoint_sals, decode_static_tracepoint_spec)
5449         (clear_command, update_static_tracepoint): Remove init_sal
5450         references.  Move declarations closer to initializations.
5451         * cli/cli-cmds.c (list_command): Move sal declarations closer to
5452         initializations.
5453         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
5454         references.  Move sal declarations closer to initializations.
5455         * frame.c (find_frame_sal): Return a symtab_and_line via function
5456         return instead of output parameter.  Remove init_sal references.
5457         * frame.h (find_frame_sal): Return a symtab_and_line via function
5458         return instead of output parameter.
5459         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
5460         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
5461         instead of memset.
5462         (gdbscm_find_pc_line): Remove init_sal reference.
5463         * infcall.c (call_function_by_hand_dummy): Remove init_sal
5464         references.  Move declarations closer to initializations.
5465         * infcmd.c (set_step_frame): Update.  Move declarations closer to
5466         initializations.
5467         (finish_backward): Remove init_sal references.  Move declarations
5468         closer to initializations.
5469         * infrun.c (process_event_stop_test, handle_step_into_function)
5470         (insert_hp_step_resume_breakpoint_at_frame)
5471         (insert_step_resume_breakpoint_at_caller): Likewise.
5472         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
5473         (symbol_to_sal): Likewise.
5474         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
5475         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
5476         to its initialization.
5477         * reverse.c (save_bookmark_command): Use new/delete.  Remove
5478         init_sal references.  Move declarations closer to initializations.
5479         * source.c (get_current_source_symtab_and_line): Remove brace
5480         initialization.
5481         (set_current_source_symtab_and_line): Now takes the sal by const
5482         reference.  Remove brace initialization.
5483         (line_info): Remove init_sal reference.
5484         * source.h (set_current_source_symtab_and_line): Now takes a
5485         symtab_and_line via const reference.
5486         * stack.c (set_current_sal_from_frame): Adjust.
5487         (print_frame_info): Adjust.
5488         (get_last_displayed_sal): Return the sal via function return
5489         instead of via output parameter.  Simplify.
5490         (frame_info): Adjust.
5491         * stack.h (get_last_displayed_sal): Return the sal via function
5492         return instead of via output parameter.
5493         * symtab.c (init_sal): Delete.
5494         (find_pc_sect_line): Remove init_sal references.  Move
5495         declarations closer to initializations.
5496         (find_function_start_sal): Remove init_sal references.  Move
5497         declarations closer to initializations.
5498         * symtab.h (struct symtab_and_line): In-class initialize all
5499         fields.
5500         * tracepoint.c (set_traceframe_context)
5501         (print_one_static_tracepoint_marker): Remove init_sal references.
5502         Move declarations closer to initializations.
5503         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
5504         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
5505         declarations closer to initializations.
5506         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
5507         init_sal references.  Adjust.
5508
5509 2017-09-04  Pedro Alves  <palves@redhat.com>
5510
5511         * ax-gdb.c (agent_command_1): Use range-for.
5512         * break-catch-throw.c (re_set_exception_catchpoint): Update.
5513         * breakpoint.c: Include "common/array-view.h".
5514         (init_breakpoint_sal, create_breakpoint_sal): Change sals
5515         parameter from struct symtabs_and_lines to
5516         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
5517         (breakpoint_sals_to_pc): Change sals parameter from struct
5518         symtabs_and_lines to std::vector reference.
5519         (check_fast_tracepoint_sals): Change sals parameter from struct
5520         symtabs_and_lines to std::array_view.  Use range-for.
5521         (decode_static_tracepoint_spec): Return a std::vector instead of
5522         symtabs_and_lines.  Update.
5523         (create_breakpoint): Update.
5524         (break_range_command, until_break_command, clear_command): Update.
5525         (base_breakpoint_decode_location, bkpt_decode_location)
5526         (bkpt_probe_create_sals_from_location)
5527         (bkpt_probe_decode_location, tracepoint_decode_location)
5528         (tracepoint_probe_decode_location)
5529         (strace_marker_create_sals_from_location): Return a std::vector
5530         instead of symtabs_and_lines.
5531         (strace_marker_create_breakpoints_sal): Update.
5532         (strace_marker_decode_location): Return a std::vector instead of
5533         symtabs_and_lines.  Update.
5534         (update_breakpoint_locations): Change struct symtabs_and_lines
5535         parameters to gdb::array_view.  Adjust.
5536         (location_to_sals): Return a std::vector instead of
5537         symtabs_and_lines.  Update.
5538         (breakpoint_re_set_default): Use std::vector instead of struct
5539         symtabs_and_lines.
5540         (decode_location_default): Return a std::vector instead of
5541         symtabs_and_lines.  Update.
5542         * breakpoint.h: Include "common/array-view.h".
5543         (struct breakpoint_ops) <decode_location>: Now returns a
5544         std::vector instead of returning a symtabs_and_lines via output
5545         parameter.
5546         (update_breakpoint_locations): Change sals parameters to use
5547         gdb::array_view.
5548         * cli/cli-cmds.c (edit_command, list_command): Update to use
5549         std::vector and gdb::array_view.
5550         (ambiguous_line_spec): Adjust to use gdb::array_view and
5551         range-for.
5552         (compare_symtabs): Rename to ...
5553         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
5554         const reference and adjust.
5555         (filter_sals): Rewrite using std::vector and standard algorithms.
5556         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
5557         (jump_command): Update to use std::vector.
5558         * linespec.c (struct linespec_state) <canonical_names>: Update
5559         comment.
5560         (add_sal_to_sals_basic): Delete.
5561         (add_sal_to_sals, filter_results, convert_results_to_lsals)
5562         (decode_line_2, create_sals_line_offset)
5563         (convert_address_location_to_sals, convert_linespec_to_sals)
5564         (convert_explicit_location_to_sals, parse_linespec)
5565         (event_location_to_sals, decode_line_full, decode_line_1)
5566         (decode_line_with_current_source)
5567         (decode_line_with_last_displayed, decode_objc)
5568         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
5569         (linespec_result::~linespec_result): Adjust to use std::vector
5570         instead of symtabs_and_lines.
5571         * linespec.h (linespec_sals::sals): Now a std::vector.
5572         (struct linespec_result): Use std::vector, bool, and in-class
5573         initialization.
5574         (decode_line_1, decode_line_with_current_source)
5575         (decode_line_with_last_displayed): Return std::vector.
5576         * macrocmd.c (info_macros_command): Use std::vector.
5577         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
5578         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
5579         std::vector.
5580         * probe.h (parse_probes): Return a std::vector.
5581         * python/python.c (gdbpy_decode_line): Use std::vector and
5582         gdb::array_view.
5583         * source.c (select_source_symtab, line_info): Use std::vector.
5584         * stack.c (func_command): Use std::vector.
5585         * symtab.h (struct symtabs_and_lines): Delete.
5586         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
5587
5588 2017-09-04  Pedro Alves  <palves@redhat.com>
5589
5590         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5591         unittests/array-view-selftests.c.
5592         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5593         * common/array-view.h: New file.
5594         * unittests/array-view-selftests.c: New file.
5595
5596 2017-09-04  Pedro Alves  <palves@redhat.com>
5597
5598         * cli/cli-cmds.c (edit_command): Pass message to
5599         ambiguous_line_spec.
5600         (list_command): Pass message to ambiguous_line_spec.  Say
5601         "first"/"last" instead of "start" and "end" to be consistent with
5602         the manual.
5603         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
5604         them to print formatted message.
5605
5606 2017-09-04  Pedro Alves  <palves@redhat.com>
5607
5608         * btrace.c (ftrace_add_pt): Pass btrace_insn to
5609         ftrace_update_insns by reference instead of pointer.
5610
5611 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5612
5613         * i386-go32-tdep.c: Include x86-xstate.h.
5614         (i386_go32_init_abi): Call i386_target_description.
5615         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5616         if xcr0 is X86_XSTATE_X87_MASK.
5617         * i386-tdep.h (tdesc_i386): Remove the declaration.
5618         (tdesc_i386_mmx): Likewise.
5619
5620 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5621
5622         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5623         X86_XSTATE_SSE_MASK instead of 0.
5624
5625 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5626
5627         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5628         i386_target_description.
5629         * i386-fbsd-nat.c (i386fbsd_read_description): Call
5630         i386_target_description.
5631         * i386-tdep.c (i386_gdbarch_init): Likewise.
5632
5633 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5634
5635         * amd64-darwin-tdep.c: Include "x86-xstate.h".
5636         (x86_darwin_init_abi_64): Call amd64_target_description.
5637         * amd64-dicos-tdep.c: Likewise.
5638         * amd64-fbsd-nat.c: Likewise.
5639         * amd64-fbsd-tdep.c: Likewise.
5640         * amd64-nbsd-tdep.c: Likewise.
5641         * amd64-obsd-tdep.c: Likewise.
5642         * amd64-sol2-tdep.c: Likewise.
5643         * amd64-windows-tdep.c: Likewise.
5644         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5645
5646 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5647
5648         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5649         (btrace_function) <insn>: Change type to use std::vector.
5650         * btrace.c (ftrace_debug, ftrace_call_num_insn,
5651         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5652         ftrace_update_insns, ftrace_compute_global_level_offset,
5653         btrace_stitch_bts, btrace_clear, btrace_insn_get,
5654         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5655         change to std::vector.
5656         (ftrace_update_insns): Adjust to change to std::vector, change
5657         type of INSN parameter.
5658         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5659         * record-btrace.c (btrace_call_history_insn_range,
5660         btrace_compute_src_line_range,
5661         record_btrace_frame_prev_register): Adjust to change to
5662         std::vector.
5663         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5664         to change to std::vector.
5665
5666 2017-09-03  Tom Tromey  <tom@tromey.com>
5667
5668         * corefile.c (reopen_exec_file): Use std::string.
5669
5670 2017-09-03  Tom Tromey  <tom@tromey.com>
5671
5672         * compile/compile.c (compile_register_name_mangled): Return
5673         std::string.
5674         * compile/compile-loc2c.c (pushf_register_address): Update.
5675         (pushf_register): Update.
5676         * compile/compile-c-types.c (convert_array): Update.
5677         * compile/compile-c-symbols.c (generate_vla_size): Update.
5678         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5679         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5680         (convert_one_symbol): Update.
5681         (generate_c_for_for_one_variable): Update.
5682         * compile/compile-c-support.c (c_get_range_decl_name): Return a
5683         std::string.
5684         (generate_register_struct): Update.
5685         * compile/compile-internal.h (c_get_range_decl_name): Return a
5686         std::string.
5687         (compile_register_name_mangled): Return std::string.
5688
5689 2017-09-03  Tom Tromey  <tom@tromey.com>
5690
5691         * utils.c (perror_string): Return a std::string.
5692         (throw_perror_with_name, perror_warning_with_name): Update.
5693
5694 2017-09-03  Tom Tromey  <tom@tromey.com>
5695
5696         * demangle.c (demangle_command): Use std::string,
5697         unique_xmalloc_ptr.
5698
5699 2017-09-03  Tom Tromey  <tom@tromey.com>
5700
5701         * cli/cli-setshow.c (do_set_command): Use std::string.
5702
5703 2017-09-03  Tom Tromey  <tom@tromey.com>
5704
5705         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5706
5707 2017-09-03  Tom Tromey  <tom@tromey.com>
5708
5709         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5710
5711 2017-09-03  Tom Tromey  <tom@tromey.com>
5712
5713         * mi/mi-cmd-env.c (env_execute_cli_command): Use
5714         gdb::unique_xmalloc_ptr.
5715
5716 2017-09-03  Tom Tromey  <tom@tromey.com>
5717
5718         * thread.c (print_thread_info_1): Use string_printf.
5719         (thread_apply_command, thread_apply_all_command): Use
5720         std::string.
5721
5722 2017-09-03  Tom Tromey  <tom@tromey.com>
5723
5724         * valprint.c (val_print_string): Update.
5725         * gdbcore.h (memory_error_message): Return std::string.
5726         * corefile.c (memory_error_message): Return std::string.
5727         (memory_error): Update.
5728         * breakpoint.c (insert_bp_location): Update.
5729
5730 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
5731
5732         * target/waitstatus.h (target_waitstatus_to_string): Change
5733         return type to std::string.
5734         * target/waitstatus.c (target_waitstatus_to_string): Return
5735         std::string.
5736         * target.h (target_waitstatus_to_string): Remove declaration.
5737         * infrun.c (resume, clear_proceed_status_thread,
5738         print_target_wait_results, do_target_wait, save_waitstatus,
5739         stop_all_threads): Adjust.
5740         * record-btrace.c (record_btrace_wait): Adjust.
5741         * target-debug.h
5742         (target_debug_print_struct_target_waitstatus_p): Adjust.
5743
5744 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
5745
5746         PR gdb/22046
5747         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5748         detection.
5749
5750 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
5751
5752         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5753         for setting/unsetting environment variables on the remote target.
5754         (New remote packets): Add entries for QEnvironmentHexEncoded,
5755         QEnvironmentUnset and QEnvironmentReset.
5756         * common/environ.c (gdb_environ::operator=): Extend method to
5757         handle m_user_set_env_list and m_user_unset_env_list.
5758         (gdb_environ::clear): Likewise.
5759         (match_var_in_string): Change type of first parameter from 'char
5760         *' to 'const char *'.
5761         (gdb_environ::set): Extend method to handle
5762         m_user_set_env_list and m_user_unset_env_list.
5763         (gdb_environ::unset): Likewise.
5764         (gdb_environ::clear_user_set_env): New method.
5765         (gdb_environ::user_set_envp): Likewise.
5766         (gdb_environ::user_unset_envp): Likewise.
5767         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5768         m_user_unset_env_list on move constructor/assignment.
5769         (unset): Add new default parameter 'update_unset_list = true'.
5770         (clear_user_set_env): New method.
5771         (user_set_envp): Likewise.
5772         (user_unset_envp): Likewise.
5773         (m_user_set_env_list): New std::set.
5774         (m_user_unset_env_list): Likewise.
5775         * common/rsp-low.c (hex2str): New function.
5776         (bin2hex): New overload for bin2hex function.
5777         * common/rsp-low.c (hex2str): New prototype.
5778         (str2hex): New overload prototype.
5779         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5780         QEnvironmentUnset and QEnvironmentReset.
5781         (remote_protocol_features): Add QEnvironmentHexEncoded,
5782         QEnvironmentUnset and QEnvironmentReset packets.
5783         (send_environment_packet): New function.
5784         (extended_remote_environment_support): Likewise.
5785         (extended_remote_create_inferior): Call
5786         extended_remote_environment_support.
5787         (_initialize_remote): Add QEnvironmentHexEncoded,
5788         QEnvironmentUnset and QEnvironmentReset packet configs.
5789         * unittests/environ-selftests.c (gdb_selftest_env_var):
5790         New variable.
5791         (test_vector_initialization): New function.
5792         (test_init_from_host_environ): Likewise.
5793         (test_reinit_from_host_environ): Likewise.
5794         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5795         Likewise.
5796         (test_unset_set_empty_vector): Likewise.
5797         (test_vector_clear): Likewise.
5798         (test_std_move): Likewise.
5799         (test_move_constructor):
5800         (test_self_move): Likewise.
5801         (test_set_unset_reset): Likewise.
5802         (run_tests): Rewrite in terms of the functions above.
5803
5804 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
5805
5806         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5807         (adi_available): Use a temp variable of type CORE_ADDR as argument
5808         3 when calling target_auxv_search.
5809         (adi_normalize_address): Use masks and xor operators to calculate
5810         normalized address.
5811         (adi_read_versions, adi_write_versions, adi_print_versions)
5812         (do_examine, do_assign): Use paddress.
5813
5814 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
5815
5816         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5817         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5818         out of loop and add supply of FIR.
5819         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5820         add collect of FIR.
5821
5822 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
5823
5824         PR gdb/21827
5825         * cli/cli-script.c (define_command): Don't convert command name
5826         to lower case.
5827
5828 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
5829
5830         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5831         Update all callers accordingly. Remove all code blocks handling
5832         the case where DISPP is not NULL.
5833
5834 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5835
5836         PR symtab/22003
5837         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5838         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5839         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5840
5841 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5842
5843         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5844         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5845         (read_comp_units_from_section): New parameter abbrev_section, use
5846         read_and_check_comp_unit_head, allocate signatured_type if needed.
5847         (create_all_comp_units): Update read_comp_units_from_section caller.
5848
5849 2017-08-23  Pedro Alves  <palves@redhat.com>
5850
5851         PR remote/21852
5852         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5853         to null_ptid and switch to thread without reading the registers
5854         after adding the inferior.
5855
5856 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5857
5858         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5859         compile-gcc.
5860         * compile/compile.c (compile_gcc, show_compile_gcc): New.
5861         (compile_to_object): Implement compile_gcc.
5862         (_initialize_compile): Install "set compile-gcc".  Initialize
5863         compile_gcc.
5864
5865 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5866
5867         * compile/compile.c (compile_to_object): Conditionally call
5868         set_verbose.  Conditionally call compile or compile_v0.
5869
5870 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
5871
5872         * sparc64-tdep.h: (adi_normalize_address): New export.
5873         * sparc-nat.h: (open_adi_tag_fd): New export.
5874         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5875         * sparc64-linux-tdep.c:
5876         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5877         (sparc64_linux_handle_segmentation_fault): New function.
5878         (sparc64_linux_init_abi): Register
5879         sparc64_linux_handle_segmentation_fault
5880         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5881         (sparc64_addr_bits_remove): New function.
5882         (sparc64_init_abi): Register sparc64_addr_bits_remove.
5883         (MAX_PROC_NAME_SIZE): New macro.
5884         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5885         (sparc64adilist): New variable.
5886         (adi_proc_list): New variable.
5887         (find_adi_info): New function.
5888         (add_adi_info): New function.
5889         (get_adi_info_proc): New function.
5890         (get_adi_info): New function.
5891         (info_adi_command): New function.
5892         (read_maps_entry): New function.
5893         (adi_available): New function.
5894         (adi_normalize_address): New function.
5895         (adi_align_address): New function.
5896         (adi_convert_byte_count): New function.
5897         (adi_tag_fd): New function.
5898         (adi_is_addr_mapped): New function.
5899         (adi_read_versions): New function.
5900         (adi_write_versions): New function.
5901         (adi_print_versions): New function.
5902         (do_examine): New function.
5903         (do_assign): New function.
5904         (adi_examine_command): New function.
5905         (adi_assign_command): New function.
5906         (_initialize_sparc64_adi_tdep): New function.
5907
5908 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
5909
5910         * breakpoint.c (breakpoints_info): Rename to ...
5911         (info_breakpoints_command): ... this.
5912         (watchpoints_info): Rename to ...
5913         (info_watchpoints_command): ... this.
5914         (tracepoints_info): Rename to ...
5915         (info_tracepoints_command): ... this.
5916         (_initialize_breakpoint): Adjust.
5917         * dcache.c (dcache_info): Rename to ...
5918         (info_display_command): ... this.
5919         (_initialize_dcache): Adjust.
5920         * frame.h (args_info): Rename to ...
5921         (info_args_command): ... this.
5922         (locals_info): Rename to ...
5923         (info_locals_command): ... this.
5924         * infcmd.c (nofp_registers_info): Rename to ...
5925         (info_registers_command): ... this.
5926         (float_info): Rename to ...
5927         (info_float_command): ... this.
5928         (program_info): Rename to ...
5929         (info_program_command): ... this.
5930         (all_registers_info): Rename to ...
5931         (info_all_registers_command): ... this.
5932         (vector_info): Rename to ...
5933         (info_vector_command): ... this.
5934         (float_info): Rename to ...
5935         (info_float_command): ... this.
5936         (_initialize_infcmd): Adjust.
5937         * inferior.h (term_info): Rename to ...
5938         (info_terminal_command): ... this.
5939         * inflow.c (term_info): Rename to ...
5940         (info_terminal_command): ... this.
5941         (_initialize_inflow): Adjust.
5942         * infrun.c (signals_info): Rename to ...
5943         (info_signals_command): ... this.
5944         (_initialize_infrun): Adjust.
5945         * objc-lang.c (classes_info): Rename to ...
5946         (info_classes_command): ... this.
5947         (selectors_info): Rename to ...
5948         (info_selectors_command): ... this.
5949         (_initialize_objc_language): Adjust.
5950         * printcmd.c (sym_info): Rename to ...
5951         (info_symbol_command): ... this.
5952         (address_info): Rename to ...
5953         (info_address_command): ... this.
5954         (display_info): Rename to ...
5955         (info_display_command): ... this.
5956         (_initialize_printcmd): Adjust.
5957         * reverse.c (bookmarks_info): Rename to ...
5958         (info_breakpoints_command): ... this.
5959         (_initialize_reverse): Adjust.
5960         * ser-go32.c (dos_info): Rename to ...
5961         (info_serial_command): ... this.
5962         (_initialize_ser_dos): Adjust.
5963         * skip.c (skip_info): Rename to ...
5964         (info_skip_command): ... this.
5965         (_initialize_step_skip): Adjust.
5966         * source.c (line_info): Rename to ...
5967         (info_line_command): ... this.
5968         (source_info): Rename to ...
5969         (info_source_command)
5970         * stack.c (frame_info): Rename to ...
5971         (info_frame_command): ... this.
5972         (locals_info): Rename to ...
5973         (info_locals_command): ... this.
5974         (args_info): Rename to ...
5975         (info_args_command): ... this.
5976         (_initialize_stack): Adjust.
5977         * symtab.c (sources_info): Rename to ...
5978         (info_sources_command): ... this.
5979         (variables_info): Rename to ...
5980         (info_variables_command): ... this.
5981         (functions_info): Rename to ...
5982         (info_functions_command): ... this.
5983         (types_info): Rename to ...
5984         (info_types_command): ... this.
5985         (_initialize_symtab): Adjust.
5986         * target.c (target_info): Rename to ...
5987         (info_target_command): ... this.
5988         (initialize_targets): Adjust.
5989         * tracepoint.c (tvariables_info): Rename to ...
5990         (info_tvariables_command): ... this.
5991         (scope_info): Rename to ...
5992         (info_scope_command): ... this.
5993         (trace_dump_actions): Adjust.
5994         (_initialize_tracepoint): Adjust.
5995
5996 2017-08-22  Tom Tromey  <tom@tromey.com>
5997
5998         * breakpoint.h (install_breakpoint): Update.
5999         * breakpoint.c (add_solib_catchpoint): Update.
6000         (install_breakpoint): Change argument to a std::unique_ptr.
6001         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
6002         (create_breakpoint_sal, create_breakpoint): Update.
6003         (watch_command_1, catch_exec_command_1)
6004         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
6005         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
6006         Return the breakpoint.
6007         (set_raw_breakpoint_without_location, set_raw_breakpoint)
6008         (new_single_step_breakpoint): Update.
6009         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
6010         std::unique_ptr.
6011         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6012         std::unique_ptr.
6013         * break-catch-sig.c (create_signal_catchpoint): Use
6014         std::unique_ptr.
6015         * ada-lang.c (create_ada_exception_catchpoint): Use
6016         std::unique_ptr.
6017
6018 2017-08-22  Tom Tromey  <tom@tromey.com>
6019
6020         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
6021
6022 2017-08-22  Tom Tromey  <tom@tromey.com>
6023
6024         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
6025         (lookup_partial_symbol): Update.
6026
6027 2017-08-22  Tom Tromey  <tom@tromey.com>
6028
6029         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
6030         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
6031         (find_and_open_source, symtab_to_fullname): Update.
6032         * psymtab.c (psymtab_to_fullname): Update.
6033
6034 2017-08-22  Tom Tromey  <tom@tromey.com>
6035
6036         * exec.c (exec_file_attach): Update.
6037         * linux-thread-db.c (try_thread_db_load): Update.
6038         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6039         * utils.c (gdb_realpath): Change return type.
6040         (gdb_realpath_keepfile): Update.
6041         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6042         (_initialize_utils): Register the new self test.
6043         * source.c (openp): Update.
6044         (find_and_open_source): Update.
6045         * nto-tdep.c (nto_find_and_open_solib): Update.
6046         * main.c (set_gdb_data_directory): Update.
6047         (captured_main_1): Update.
6048         * dwarf2read.c (dwarf2_get_dwz_file): Update
6049         (dw2_map_symbol_filenames): Update.
6050         * auto-load.c (auto_load_safe_path_vec_update): Update.
6051         (filename_is_in_auto_load_safe_path_vec): Change type of
6052         "filename_realp".
6053         (auto_load_objfile_script): Update.
6054         (file_is_auto_load_safe): Update.  Use std::string.
6055         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6056
6057 2017-08-22  Tom Tromey  <tom@tromey.com>
6058
6059         * utils.c (gdb_realpath_keepfile): Return a
6060         gdb::unique_xmalloc_ptr.
6061         * exec.c (exec_file_attach): Update.
6062         * utils.h (gdb_realpath_keepfile): Return a
6063         gdb::unique_xmalloc_ptr.
6064
6065 2017-08-22  Tom Tromey  <tom@tromey.com>
6066
6067         * compile/compile.c (compile_file_command): Use
6068         gdb::unique_xmalloc_ptr, std::string.
6069         * utils.c (gdb_abspath): Change return type.
6070         * source.c (openp): Update.
6071         * objfiles.c (allocate_objfile): Update.
6072         * main.c (set_gdb_data_directory): Update.
6073         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6074
6075 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
6076
6077         * cli-cmds.c (list_commands): List actual code around more than
6078         one location.
6079
6080 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
6081
6082         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6083
6084 2017-08-21  Pedro Alves  <palves@redhat.com>
6085
6086         PR gdb/19487
6087         * c-exp.y (variable production): Handle function aliases.
6088         * minsyms.c (msymbol_is_text): New function.
6089         * minsyms.h (msymbol_is_text): Declare.
6090         * symtab.c (find_function_alias_target): New function.
6091         * symtab.h (find_function_alias_target): Declare.
6092
6093 2017-08-21  Pedro Alves  <palves@redhat.com>
6094
6095         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6096         typedefs.
6097         * typeprint.c (whatis_exp): If handling "whatis", and expression
6098         is OP_TYPE, strip one typedef level.  Otherwise don't strip
6099         typedefs here.
6100         * valops.c (value_cast): Save "to" type before resolving
6101         stubs/typedefs.  Use that type as resulting value's type.
6102
6103 2017-08-18  Tom Tromey  <tom@tromey.com>
6104             Pedro Alves  <palves@redhat.com>
6105
6106         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6107         * sol-thread.c (sol_thread_resume, sol_thread_wait)
6108         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6109         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6110         * proc-service.c (ps_xfer_memory): Use scoped_restore.
6111         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6112         (linux_get_siginfo_data): Add "thread" argument.  Use
6113         scoped_restore.
6114         * linux-nat.c (linux_child_follow_fork)
6115         (check_stopped_by_watchpoint): Use scoped_restore.
6116         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
6117         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
6118         (restore_inferior_ptid, save_inferior_ptid): Remove.
6119         * btrace.c (btrace_fetch): Use scoped_restore.
6120         * bsd-uthread.c (bsd_uthread_fetch_registers)
6121         (bsd_uthread_store_registers): Use scoped_restore.
6122         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
6123         scoped_restore.
6124         * aix-thread.c (aix_thread_resume, aix_thread_wait)
6125         (aix_thread_xfer_partial): Use scoped_restore.
6126         * inferior.h (save_inferior_ptid): Remove.
6127
6128 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6129
6130         PR tdep/21818
6131         * arm-tdep.c (gdb_print_insn_arm): Mark
6132         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
6133
6134 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6135
6136         * NEWS: Mention GDBserver's new option "--selftest".
6137         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
6138         * selftest.c: Move it to common/selftest.c.
6139         * selftest.h: Move it to common/selftest.h.
6140         * selftest-arch.c (reset): New function.
6141         (tests_with_arch): Call reset.
6142
6143 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6144
6145         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
6146         instead of exception_fprintf and printf_filtered.
6147
6148 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6149
6150         * selftest.c (register_self_test): Rename it to
6151         selftests::register_test.
6152         (run_self_tests): selftest::run_tests.
6153         * selftest.h: Update declarations.
6154         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
6155         selftests::register_test_foreach_arch.
6156         * selftest-arch.h: Update declaration.
6157         * aarch64-tdep.c: Update.
6158         * arm-tdep.c: Likewise.
6159         * disasm-selftests.c: Likewise.
6160         * dwarf2loc.c: Likewise.
6161         * dwarf2-frame.c: Likewise.
6162         * findvar.c: Likewise.
6163         * gdbarch-selftests.c: Likewise.
6164         * maint.c (maintenance_selftest): Likewise.
6165         * regcache.c: Likewise.
6166         * rust-exp.y: Likewise.
6167         * selftest-arch.c: Likewise.
6168         * unittests/environ-selftests.c: Likewise.
6169         * unittests/function-view-selftests.c: Likewise.
6170         * unittests/offset-type-selftests.c: Likewise.
6171         * unittests/optional-selftests.c: Likewise.
6172         * unittests/scoped_restore-selftests.c: Likewise.
6173         * utils-selftests.c: Likewise.
6174
6175 2017-08-17  Pedro Alves  <palves@redhat.com>
6176
6177         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
6178         local.
6179
6180 2017-08-17  Pedro Alves  <palves@redhat.com>
6181
6182         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
6183         field.
6184         (reset_die_in_process): Delete, replaced by ...
6185         (process_die_scope): ... this new class.  Make it responsible for
6186         freeing cu->line_header too.
6187         (process_die): Use process_die_scope.
6188         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
6189         cu->line_header_die_owner.  Don't release the line header if it's
6190         owned by the CU.
6191         (setup_type_unit_groups): Make the CU/DIE own the line header.
6192         Don't release the line header here.
6193
6194 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
6195
6196         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
6197
6198 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6199
6200         * NEWS: Mention new shortcuts for nexti and stepi in TUI
6201         Single-Key mode
6202
6203 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6204
6205         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
6206         mode command list.
6207
6208 2017-08-15  Stafford Horne  <shorne@gmail.com>
6209
6210         * MAINTAINERS (Write After Approval): Add Stafford Horne.
6211
6212 2017-08-15  Stafford Horne  <shorne@gmail.com>
6213
6214         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
6215
6216 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
6217
6218         PR gdb/21954
6219         * infcmd.c (unset_environment_command): Use the 'clear' method on
6220         the environment instead of resetting it.
6221
6222 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
6223
6224         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
6225         platforms.
6226
6227 2017-08-14  Tom Tromey  <tom@tromey.com>
6228
6229         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
6230         (print_binary_chars): Likewise.
6231         (BITS_IN_BYTES): Remove.
6232
6233 2017-08-14  Tom Tromey  <tom@tromey.com>
6234
6235         PR gdb/21675
6236         * valprint.c (LOW_ZERO): Change value to 034.
6237         (print_octal_chars): Add static_asserts for octal constants.
6238         * printcmd.c (print_scalar_formatted): Add 'd' case.
6239
6240 2017-08-11  Tom Tromey  <tom@tromey.com>
6241
6242         * symfile.c (add_symbol_file_command): Use std::vector.
6243
6244 2017-08-14  Tom Tromey  <tom@tromey.com>
6245
6246         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
6247         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6248         std::move.
6249         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
6250
6251 2017-08-11  Pedro Alves  <palves@redhat.com>
6252
6253         * infrun.c (process_event_stop_test): Adjust
6254         function_name_is_marked_for_skip call.
6255         * skip.c: Include <list>.
6256         (skiplist_entry): Make it a class with private fields, and
6257         getters/setters.
6258         (skiplist_entry_chain): Delete.
6259         (skiplist_entries): New.
6260         (skiplist_entry_count): Delete.
6261         (highest_skiplist_entry_num): New.
6262         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
6263         (add_skiplist_entry): Delete.
6264         (skiplist_entry::skiplist_entry): New.
6265         (skiplist_entry::add_entry): New.
6266         (skip_file_command, skip_function): Adjust.
6267         (compile_skip_regexp): Delete.
6268         (skip_command): Don't compile regexp here.  Adjust to use
6269         skiplist_entry::add_entry.
6270         (skip_info): Adjust to use range-for and getters.
6271         (skip_enable_command, skip_disable_command): Adjust to use
6272         range-for and setters.
6273         (skip_delete_command): Adjust to use std::list.
6274         (add_skiplist_entry): Delete.
6275         (skip_file_p): Delete, refactored as ...
6276         (skiplist_entry::do_skip_file_p): ... this new method.
6277         (skip_gfile_p): Delete, refactored as ...
6278         (skiplist_entry::do_gskip_file_p): ... this new method.
6279         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
6280         (skiplist_entry::skip_function_p): ... this new method.
6281         (function_name_is_marked_for_skip): Now returns bool, and takes
6282         the function sal by const reference.  Adjust to use range-for and
6283         skiplist_entry methods.
6284         (_initialize_step_skip): Remove references to
6285         skiplist_entry_chain, skiplist_entry_count.
6286         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
6287         takes the function sal by const reference.
6288
6289 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6290
6291         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
6292         (dwarf2_frame_cache): Remove reset_cache_cleanup.
6293         (dwarf2_frame_cache):
6294         * frame-unwind.c (frame_unwind_try_unwinder): Catch
6295         RETURN_MASK_ALL and set *this_case to NULL.
6296         * frame-unwind.h: Update comments.
6297
6298 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6299
6300         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
6301         (dwarf2_frame_state_copy_regs): Remove.
6302         (dwarf2_frame_state_free_regs): Remove.
6303         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
6304         (dwarf2_restore_rule): Call method .alloc_regs instead of
6305         dwarf2_frame_state_alloc_regs.
6306         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
6307         constructor.  Call std::move.
6308         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
6309         (dwarf2_frame_cache): Likewise.
6310
6311         [GDB_SELF_TEST]: Include selftest.h and
6312         selftest-arch.h.
6313         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
6314         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
6315         execute_cfa_program_test.
6316
6317         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
6318         copy ctor, assignment operator, move assignment.
6319         <alloc_regs>: New method.
6320         <swap>: New method.
6321         (struct dwarf2_frame_state): Delete dtor.
6322         (dwarf2_frame_state_alloc_regs): Remove declaration.
6323         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
6324         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
6325
6326 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6327
6328         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
6329         (dwarf2_frame_state::dwarf2_frame_state): New.
6330         (dwarf2_frame_state::~dwarf2_frame_state): New.
6331         (dwarf2_fetch_cfa_info): Update.
6332         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
6333         rather than a pointer.  Update code.
6334         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
6335         dtor.
6336         <data_align, code_align, retaddr_column>: Change them to const.
6337         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
6338         to bool.
6339
6340 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6341
6342         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
6343         <loc.exp>: New field.
6344         * dwarf2-frame.c (execute_cfa_program): Update.
6345         (dwarf2_frame_prev_register): Update.
6346
6347 2017-08-10  Pedro Alves  <palves@redhat.com>
6348
6349         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
6350
6351 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6352
6353         * fbsd-nat.c (struct fbsd_fork_info): Remove.
6354         (fbsd_pending_children): Use std::list.
6355         (fbsd_remember_child): Likewise.
6356         (fbsd_is_child_pending): Likewise.
6357         (fbsd_pending_vfork_done): Use std::forward_list.
6358         (fbsd_add_vfork_done): Likewise.
6359         (fbsd_is_vfork_done_pending): Likewise.
6360         (fbsd_next_vfork_done): Likewise.
6361
6362 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6363
6364         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
6365         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
6366         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
6367         for `mapfilename'.
6368         (fbsd_xfer_partial): Use gdb::byte_vector.
6369         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
6370
6371 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6372
6373         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
6374         "filestuff.h".
6375         (fbsd_find_memory_regions): Fix `mapfile' initialization.
6376
6377 2017-08-09  Tom Tromey  <tom@tromey.com>
6378
6379         * skip.c (skiplist_entry): New constructor.
6380         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
6381         (skiplist_entry::file_is_glob): Now bool.
6382         (skiplist_entry::file, skiplist_entry::function): Now
6383         std::string.
6384         (make_skip_entry): Return a unique_ptr.  Use new.
6385         (free_skiplist_entry, free_skiplist_entry_cleanup)
6386         (make_free_skiplist_entry_cleanup): Remove.
6387         (skip_command, skip_disable_command, add_skiplist_entry)
6388         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
6389         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
6390         (function_name_is_marked_for_skip): Update.
6391         (skip_delete_command): Update.  Use delete.
6392
6393 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
6394
6395         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
6396         (aarch64_linux_core_read_description): New function.
6397         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
6398
6399 2017-08-09  Pedro Alves  <palves@redhat.com>
6400
6401         * cp-name-parser.y (cp_comp_to_string): Return a
6402         gdb::unique_xmalloc_ptr<char>.
6403         * cp-support.c (replace_typedefs_qualified_name)
6404         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
6405         (cp_canonicalize_string_full): Use op= instead of explicit
6406         convertion.
6407         (cp_class_name_from_physname, method_name_from_physname)
6408         (cp_func_name, cp_remove_params): Adjust to use
6409         gdb::unique_xmalloc_ptr<char>.
6410         * cp-support.h (cp_comp_to_string): Return a
6411         gdb::unique_xmalloc_ptr<char>.
6412         * python/py-type.c (typy_lookup_type): Adjust to use
6413         gdb::unique_xmalloc_ptr<char>.
6414
6415 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
6416
6417         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
6418
6419 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
6420             Yao Qi  <yao.qi@linaro.org>
6421
6422         * cp-support.c (cp_canonicalize_string_full): Use
6423         gdb::unique_xmalloc_ptr<char>.
6424         (cp_canonicalize_string): Likewise.
6425
6426 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6427
6428         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
6429         * regformats/i386/amd64-avx-avx512.dat: Remove.
6430         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
6431         * regformats/i386/amd64-avx-mpx.dat:Remove.
6432         * regformats/i386/amd64-avx.dat: Remove.
6433         * regformats/i386/amd64-mpx.dat: Remove.
6434         * regformats/i386/i386-avx-avx512.dat: Remove.
6435         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
6436         * regformats/i386/i386-avx-mpx.dat: Remove.
6437         * regformats/i386/i386-mmx.dat: Remove.
6438         * regformats/i386/i386-mpx.dat: Remove.
6439
6440 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6441
6442         * amd64-tdep.h (tdesc_x32): Remove the declaration.
6443         * amd64-tdep.c: Don't include features/i386/x32*.c.
6444         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
6445         functions.
6446         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
6447         and i386/x32-avx-avx512.
6448         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
6449         and i386/x32.xml.
6450         * features/i386/x32-avx-avx512.c: Removed.
6451         * features/i386/x32-avx-avx512.xml: Removed.
6452         * features/i386/x32-avx.c: Removed.
6453         * features/i386/x32-avx.xml: Removed.
6454         * features/i386/x32.c: Removed.
6455         * features/i386/x32.xml: Removed.
6456         * regformats/i386/x32-avx-avx512.dat: Removed.
6457         * regformats/i386/x32-avx.dat: Removed.
6458         * regformats/i386/x32.dat: Removed.
6459
6460 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6461
6462         PR breakpoints/21886
6463         * mem-break.c (default_memory_insert_breakpoint): Use
6464         `->placed_address' rather than `->reqstd_address' for the
6465         breakpoint location.
6466
6467 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6468
6469         * arch-utils.c (default_print_insn): Remove arch/mach/endian
6470         assertions.
6471
6472 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6473
6474         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
6475         a union of `tdep_info', `tdesc_data' and `id'.
6476         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
6477         rather than `info.tdep_info'.
6478         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
6479         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6480         * i386-tdep.c (i386_gdbarch_init): Likewise.
6481         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
6482         * mips-tdep.c (mips_gdbarch_init): Likewise.
6483         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6484         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6485         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
6486         `info.tdep_info'.
6487         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
6488         `info.tdep_info'.
6489         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6490         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
6491         `info.tdep_info'.
6492         * spu-tdep.c (spu_gdbarch_init): Likewise.
6493         * gdbarch.h: Regenerate.
6494
6495 2017-08-07  Leszek Swirski  <leszeks@google.com>
6496
6497         PR symtab/20899
6498         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
6499
6500 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
6501
6502         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
6503         (gdbsim_open): Rename gdb_argv args object to argv.
6504
6505 2017-08-05  Tom Tromey  <tom@tromey.com>
6506
6507         * compile/compile-object-load.c (compile_object_load): Use
6508         gdb::unique_xmalloc_ptr.
6509         * cli/cli-dump.c (scan_filename): Rename from
6510         scan_filename_with_cleanup.  Change return type.
6511         (scan_expression): Rename from scan_expression_with_cleanup.
6512         Change return type.
6513         (dump_memory_to_file, dump_value_to_file, restore_command):
6514         Use gdb::unique_xmalloc_ptr.  Update.
6515         * cli/cli-cmds.c (find_and_open_script): Use
6516         gdb::unique_xmalloc_ptr.
6517         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
6518         * symmisc.c (maintenance_print_symbols)
6519         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
6520         * symfile.c (symfile_bfd_open, generic_load)
6521         (add_symbol_file_command, remove_symbol_file_command): Use
6522         gdb::unique_xmalloc_ptr.
6523         * source.c (openp): Use gdb::unique_xmalloc_ptr.
6524         * psymtab.c (maintenance_print_psymbols): Use
6525         gdb::unique_xmalloc_ptr.
6526         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
6527         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
6528         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
6529         (reload_shared_libraries_1): Likewise.
6530
6531 2017-08-05  Tom Tromey  <tom@tromey.com>
6532
6533         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
6534         (rust_op_vector, rust_set_vector): New typedefs.
6535         (current_parser): New global.
6536         (work_obstack): Change to pointer type.  Update all users.
6537         (rust_ast, pstate): Remove globals.
6538         (struct rust_parser): New.
6539         (%union) <params, field_inits>: Change type.
6540         (start, tuple_expr, unit_expr, struct_expr_list, literal)
6541         (field_expr, expr_list, maybe_expr_list, type_list): Update.
6542         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
6543         (convert_params_to_types, convert_params_to_expression): Change
6544         type of "params".
6545         (ast_string): Change type of "fields".
6546         (rust_parse): Make a rust_parser.  Remove cleanups.
6547         (rust_lex_tests): Make and install an auto_obstack.
6548
6549 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6550
6551         * configure.srv (ipa_x32_linux_regobj): New.
6552         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
6553         instead of X86_TDESC_AVX512.
6554         (initialize_low_tracepoint): Call
6555         init_registers_x32_avx_avx512_linux.
6556
6557 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6558
6559         * utils.h (gdb_argv): Add namespace std for nullptr_t.
6560
6561 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6562
6563         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
6564
6565 2017-08-03  Tom Tromey  <tom@tromey.com>
6566
6567         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
6568         Remove.
6569         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
6570
6571 2017-08-03  Tom Tromey  <tom@tromey.com>
6572
6573         * python/py-param.c (compute_enum_values): Use gdb_argv.
6574
6575 2017-08-03  Tom Tromey  <tom@tromey.com>
6576
6577         * utils.h (struct gdb_argv_deleter): New.
6578         (gdb_argv): New class.
6579         * utils.c (gdb_argv::reset): New method.
6580         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
6581         * tracefile.c (tsave_command): Use gdb_argv.
6582         * top.c (new_ui_command): Use gdb_argv.
6583         * symmisc.c (maintenance_print_symbols)
6584         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
6585         * symfile.c (symbol_file_command, generic_load)
6586         (remove_symbol_file_command): Use gdb_argv.
6587         * stack.c (backtrace_command): Use gdb_argv.
6588         * source.c (add_path, show_substitute_path_command)
6589         (unset_substitute_path_command, set_substitute_path_command):
6590         Use gdb_argv.
6591         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
6592         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6593         * remote.c (extended_remote_run, remote_put_command)
6594         (remote_get_command, remote_delete_command): Use gdb_argv.
6595         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6596         (gdbsim_open): Use gdb_argv.
6597         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6598         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
6599         * procfs.c (procfs_info_proc): Use gdb_argv.
6600         * interps.c (interpreter_exec_cmd): Use gdb_argv.
6601         * infrun.c (handle_command): Use gdb_argv.
6602         * inferior.c (add_inferior_command, clone_inferior_command):
6603         Use gdb_argv.
6604         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
6605         * exec.c (exec_file_command): Use gdb_argv.
6606         * cli/cli-cmds.c (alias_command): Use gdb_argv.
6607         * compile/compile.c (build_argc_argv): Use gdb_argv.
6608
6609 2017-08-03  Tom Tromey  <tom@tromey.com>
6610
6611         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6612
6613 2017-08-03  Tom Tromey  <tom@tromey.com>
6614
6615         * python/python.c (compute_python_string): Return std::string.
6616         (gdbpy_eval_from_control_command): Update.
6617         (do_start_initialization): Use std::string.
6618         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6619         xstrprintf.
6620         * python/py-breakpoint.c (local_setattro): Use string_printf, not
6621         xstrprintf.
6622
6623 2017-08-03  Tom Tromey  <tom@tromey.com>
6624
6625         * top.h (do_restore_instream_cleanup): Remove.
6626         * top.c (do_restore_instream_cleanup): Remove.
6627         (read_command_file): Use scoped_restore.
6628         * cli/cli-script.c (execute_user_command): Use scoped_restore.
6629
6630 2017-08-03  Tom Tromey  <tom@tromey.com>
6631
6632         * cli/cli-script.c (execute_user_command)
6633         (execute_control_command): Use scoped_restore.
6634
6635 2017-08-03  Tom Tromey  <tom@tromey.com>
6636
6637         * cli/cli-script.c (do_restore_user_call_depth): Remove.
6638         (execute_user_command): Remove user_call_depth; use
6639         user_args_stack's size instead.
6640
6641 2017-08-03  Tom Tromey  <tom@tromey.com>
6642
6643         * top.h (in_user_command): Remove.
6644         * top.c (in_user_command): Remove.
6645         * cli/cli-script.c (do_restore_user_call_depth)
6646         (execute_user_command): Update.
6647
6648 2017-08-03  Tom Tromey  <tom@tromey.com>
6649
6650         * valops.c (search_struct_method): Use gdb::byte_vector.
6651         * valarith.c (value_concat): Use std::vector.
6652         * target.c (memory_xfer_partial): Use gdb::byte_vector.
6653         (simple_search_memory): Likewise.
6654         * printcmd.c (find_string_backward): Use gdb::byte_vector.
6655         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6656         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6657         * elfread.c (elf_rel_plt_read): Use std::string.
6658         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6659         * cli/cli-dump.c (restore_section_callback): Use
6660         gdb::byte_vector.
6661
6662 2017-08-03  Tom Tromey  <tom@tromey.com>
6663
6664         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6665
6666 2017-08-03  Tom Tromey  <tom@tromey.com>
6667
6668         * tui/tui-regs.c (tui_restore_gdbout): Remove.
6669         (tui_register_format): Use scoped_restore.
6670
6671 2017-08-03  Tom Tromey  <tom@tromey.com>
6672
6673         * reverse.c (exec_direction_default): Remove.
6674         (exec_reverse_once): Use scoped_restore.
6675         * remote.c (restore_remote_timeout): Remove.
6676         (remote_flash_erase, remote_flash_write, remote_flash_done)
6677         (readchar, remote_serial_write): Use scoped_restore.
6678         * cli/cli-script.c (struct source_cleanup_lines_args)
6679         (source_cleanup_lines): Remove.
6680         (script_from_file): Use scoped_restore.
6681         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6682         (source_command): Use scoped_restore.
6683
6684 2017-08-03  Tom Tromey  <tom@tromey.com>
6685
6686         * utils.h (make_cleanup_free_so): Remove.
6687         * utils.c (do_free_so, make_cleanup_free_so): Remove.
6688         * solist.h (struct so_deleter): New.
6689         (so_list_up): New typedef.
6690         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6691
6692 2017-08-03  Tom Tromey  <tom@tromey.com>
6693
6694         * utils.h (make_cleanup_restore_current_language): Remove.
6695         * utils.c (do_restore_current_language)
6696         (make_cleanup_restore_current_language): Remove.
6697         * parse.c (parse_exp_in_context_1)
6698         (parse_expression_with_language): Use
6699         scoped_restore_current_language.
6700         * mi/mi-main.c (mi_cmd_execute): Use
6701         scoped_restore_current_language.
6702         * language.h (scoped_restore_current_language): New class.
6703
6704 2017-08-03  Tom Tromey  <tom@tromey.com>
6705
6706         * compile/compile.c (cleanup_unlink_file): Remove.
6707         (compile_to_object): Use gdb::unlinker.
6708         (eval_compile_command): Likewise.
6709
6710 2017-08-03  Tom Tromey  <tom@tromey.com>
6711
6712         * utils.h (make_cleanup_fclose): Remove.
6713         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6714
6715 2017-08-03  Tom Tromey  <tom@tromey.com>
6716
6717         * top.c (open_terminal_stream): Return gdb_file_up.
6718         (new_ui_command): Update.
6719
6720 2017-08-03  Tom Tromey  <tom@tromey.com>
6721
6722         * source.c (print_source_lines_base, forward_search_command)
6723         (reverse_search_command): Use gdb_file_up.
6724
6725 2017-08-03  Tom Tromey  <tom@tromey.com>
6726
6727         * fbsd-nat.c (fbsd_find_memory_regions): Update.
6728
6729 2017-08-03  Tom Tromey  <tom@tromey.com>
6730
6731         * cli/cli-cmds.c (find_and_open_script): Change return type.
6732         Remove "streamp" and "full_path" parameters.
6733         (source_script_with_search): Update.
6734         * auto-load.c (source_script_file): Update.
6735         * cli/cli-cmds.h (find_and_open_script): Change type.
6736         (open_script): New struct.
6737
6738 2017-08-03  Tom Tromey  <tom@tromey.com>
6739
6740         * xml-support.c (xml_fetch_content_from_file): Update.
6741         * ui-file.c (stdio_file::open): Update.
6742         * tracefile-tfile.c (tfile_start): Update.
6743         * remote.c (remote_file_put, remote_file_get): Update.
6744         * nat/linux-procfs.c (linux_proc_get_int)
6745         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6746         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6747         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6748         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6749         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6750         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6751         * linux-nat.c (linux_proc_pending_signals): Update.
6752         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6753         (file_closer): Remove.
6754         * compile/compile.c (compile_to_object): Update.
6755         * common/filestuff.h (struct gdb_file_deleter): New.
6756         (gdb_file_up): New typedef.
6757         (gdb_fopen_cloexec): Change return type.
6758         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6759         * cli/cli-dump.c (fopen_with_cleanup): Remove.
6760         (dump_binary_file, restore_binary_file): Update.
6761         * auto-load.c (auto_load_objfile_script_1): Update.
6762
6763 2017-08-03  Tom Tromey  <tom@tromey.com>
6764
6765         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6766         (info_static_tracepoint_markers_command): Likewise.
6767         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6768         * skip.c (skip_info): Use ui_out_emit_table.
6769         * progspace.c (print_program_space): Use ui_out_emit_table.
6770         * osdata.c (info_osdata): Use ui_out_emit_table.
6771         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6772         ui_out_emit_table.
6773         * linux-thread-db.c (info_auto_load_libthread_db): Use
6774         ui_out_emit_table.
6775         * inferior.c (print_inferior): Use ui_out_emit_table.
6776         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6777         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6778         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6779         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6780         * ui-out.h (class ui_out_emit_table): New.
6781
6782 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
6783
6784         * mips-tdep.c (mips_fpu_type_str): New function.
6785         (mips_dump_tdep): Call it.
6786
6787 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
6788
6789         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6790         `->mips_fpu_type'.
6791
6792 2017-07-31  Xavier Roirand  <roirand@adacore.com>
6793
6794         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6795
6796 2017-07-27  Xavier Roirand  <roirand@adacore.com>
6797
6798         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6799
6800 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6801
6802         * cli/cli-cmds.c (maintenancechecklist): New variable.
6803         * gdbcmd.h (maintenancechecklist): Declare it.
6804         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6805         Call i386_linux_read_description with different masks.
6806         * maint.c (maintenance_check_command): New function.
6807         (_initialize_maint_cmds): Call add_prefix_cmd.
6808         * target-descriptions.c (tdesc_reg): override operator != and ==.
6809         (tdesc_type): Likewise.
6810         (tdesc_feature): Likewise.
6811         (target_desc): Likewise.
6812         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6813         (maintenance_check_xml_descriptions): New function.
6814         (_initialize_target_descriptions) Add command "xml-descriptions".
6815         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6816
6817 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6818
6819         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6820         Include features/i386/32bit-*.c.
6821         (i386_linux_read_description): Generate target description if it
6822         doesn't exist.
6823         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6824         functions.
6825         * features/i386/32bit-linux.c: Re-generated.
6826         * features/i386/32bit-sse.c: Likewise.
6827         * target-descriptions.c (print_c_feature::visit): Print code to
6828         set register number if needed.
6829         (print_c_feature) <m_next_regnum>: New field.
6830
6831 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6832
6833         * features/Makefile (CFILES): Rename with TDESC_CFILES.
6834         (FEATURE_XMLFILES): New.
6835         (FEATURE_CFILES): New.
6836         New rules.
6837         (clean-cfiles): Remove generated c files.
6838         * features/i386/32bit-avx.c: Generated.
6839         * features/i386/32bit-avx512.c: Generated.
6840         * features/i386/32bit-core.c: Generated.
6841         * features/i386/32bit-linux.c: Generated.
6842         * features/i386/32bit-mpx.c: Generated.
6843         * features/i386/32bit-pkeys.c: Generated.
6844         * features/i386/32bit-sse.c: Generated.
6845         * target-descriptions.c: Include algorithm.
6846         (tdesc_element_visitor): Add method visit_end.
6847         (print_c_tdesc): Implement visit_end.
6848         (print_c_tdesc:: m_filename_after_features): Move it to
6849         protected.
6850         (print_c_feature): New class.
6851         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6852         name starts with "i386/32bit-".
6853
6854 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6855
6856         * target-descriptions.c (tdesc_element_visitor): New class.
6857         (tdesc_element): New class.
6858         (tdesc_reg): Inherit from tdesc_element.
6859         (tdesc_reg::accept): New function.
6860         (tdesc_type): Inherit from tdesc_element.
6861         (tdesc_type::accept): New function.
6862         (tdesc_feature): Inherit from tdesc_element.
6863         (tdesc_feature::accept): New function.
6864         (target_desc): Inherit from tdesc_element.
6865         (target_desc::target_desc): New.
6866         (target_desc::~target_desc): New.
6867         (target_desc::accept): New.
6868         (allocate_target_description): Use new.
6869         (free_target_description): Use delete.
6870         (print_c_tdesc): New class.
6871         (maint_print_c_tdesc_cmd): Adjust.
6872
6873         * features/aarch64.c: Re-generated.
6874         * features/arc-arcompact.c: Re-generated.
6875         * features/arc-v2.c: Re-generated.
6876         * features/arm/arm-with-iwmmxt.c: Re-generated.
6877         * features/arm/arm-with-m.c: Re-generated.
6878         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6879         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6880         * features/arm/arm-with-neon.c: Re-generated.
6881         * features/arm/arm-with-vfpv2.c: Re-generated.
6882         * features/arm/arm-with-vfpv3.c: Re-generated.
6883         * features/i386/amd64-avx-avx512.c: Re-generated.
6884         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6885         * features/i386/amd64-avx.c: Re-generated.
6886         * features/i386/amd64-avx-linux.c: Re-generated.
6887         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6888         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6889         * features/i386/amd64-avx-mpx.c: Re-generated.
6890         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6891         * features/i386/amd64.c: Re-generated.
6892         * features/i386/amd64-linux.c: Re-generated.
6893         * features/i386/amd64-mpx.c: Re-generated.
6894         * features/i386/amd64-mpx-linux.c: Re-generated.
6895         * features/i386/i386-avx-avx512.c: Re-generated.
6896         * features/i386/i386-avx-avx512-linux.c: Re-generated.
6897         * features/i386/i386-avx.c: Re-generated.
6898         * features/i386/i386-avx-linux.c: Re-generated.
6899         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6900         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6901         * features/i386/i386-avx-mpx.c: Re-generated.
6902         * features/i386/i386-avx-mpx-linux.c: Re-generated.
6903         * features/i386/i386.c: Re-generated.
6904         * features/i386/i386-linux.c: Re-generated.
6905         * features/i386/i386-mmx.c: Re-generated.
6906         * features/i386/i386-mmx-linux.c: Re-generated.
6907         * features/i386/i386-mpx.c: Re-generated.
6908         * features/i386/i386-mpx-linux.c: Re-generated.
6909         * features/i386/x32-avx-avx512.c: Re-generated.
6910         * features/i386/x32-avx-avx512-linux.c: Re-generated.
6911         * features/i386/x32-avx.c: Re-generated.
6912         * features/i386/x32-avx-linux.c: Re-generated.
6913         * features/i386/x32.c: Re-generated.
6914         * features/i386/x32-linux.c: Re-generated.
6915         * features/microblaze.c: Re-generated.
6916         * features/microblaze-with-stack-protect.c: Re-generated.
6917         * features/mips64-dsp-linux.c: Re-generated.
6918         * features/mips64-linux.c: Re-generated.
6919         * features/mips-dsp-linux.c: Re-generated.
6920         * features/mips-linux.c: Re-generated.
6921         * features/nds32.c: Re-generated.
6922         * features/nios2.c: Re-generated.
6923         * features/nios2-linux.c: Re-generated.
6924         * features/rs6000/powerpc-32.c: Re-generated.
6925         * features/rs6000/powerpc-32l.c: Re-generated.
6926         * features/rs6000/powerpc-403.c: Re-generated.
6927         * features/rs6000/powerpc-403gc.c : Re-generated.
6928         * features/rs6000/powerpc-405.c: Re-generated.
6929         * features/rs6000/powerpc-505.c: Re-generated.
6930         * features/rs6000/powerpc-601.c: Re-generated.
6931         * features/rs6000/powerpc-602.c: Re-generated.
6932         * features/rs6000/powerpc-603.c: Re-generated.
6933         * features/rs6000/powerpc-604.c: Re-generated.
6934         * features/rs6000/powerpc-64.c: Re-generated.
6935         * features/rs6000/powerpc-64l.c: Re-generated.
6936         * features/rs6000/powerpc-7400.c: Re-generated.
6937         * features/rs6000/powerpc-750.c: Re-generated.
6938         * features/rs6000/powerpc-860.c: Re-generated.
6939         * features/rs6000/powerpc-altivec32.c: Re-generated.
6940         * features/rs6000/powerpc-altivec32l.c: Re-generated.
6941         * features/rs6000/powerpc-altivec64.c: Re-generated.
6942         * features/rs6000/powerpc-altivec64l.c: Re-generated.
6943         * features/rs6000/powerpc-cell32l.c: Re-generated.
6944         * features/rs6000/powerpc-cell64l.c: Re-generated.
6945         * features/rs6000/powerpc-e500.c: Re-generated.
6946         * features/rs6000/powerpc-e500l.c: Re-generated.
6947         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6948         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6949         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6950         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6951         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6952         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6953         * features/rs6000/powerpc-vsx32.c: Re-generated.
6954         * features/rs6000/powerpc-vsx32l.c: Re-generated.
6955         * features/rs6000/powerpc-vsx64.c: Re-generated.
6956         * features/rs6000/powerpc-vsx64l.c: Re-generated.
6957         * features/rs6000/rs6000.c: Re-generated.
6958         * features/s390-linux32.c: Re-generated.
6959         * features/s390-linux32v1.c: Re-generated.
6960         * features/s390-linux32v2.c: Re-generated.
6961         * features/s390-linux64.c: Re-generated.
6962         * features/s390-linux64v1.c: Re-generated.
6963         * features/s390-linux64v2.c: Re-generated.
6964         * features/s390-te-linux64.c: Re-generated.
6965         * features/s390-tevx-linux64.c: Re-generated.
6966         * features/s390-vx-linux64.c: Re-generated.
6967         * features/s390x-linux64.c: Re-generated.
6968         * features/s390x-linux64v1.c: Re-generated.
6969         * features/s390x-linux64v2.c: Re-generated.
6970         * features/s390x-te-linux64.c: Re-generated.
6971         * features/s390x-tevx-linux64.c: Re-generated.
6972         * features/s390x-vx-linux64.c: Re-generated.
6973         * features/sparc/sparc32-solaris.c: Re-generated.
6974         * features/sparc/sparc64-solaris.c: Re-generated.
6975         * features/tic6x-c62x.c: Re-generated.
6976         * features/tic6x-c62x-linux.c: Re-generated.
6977         * features/tic6x-c64x.c: Re-generated.
6978         * features/tic6x-c64x-linux.c: Re-generated.
6979         * features/tic6x-c64xp.c: Re-generated.
6980         * features/tic6x-c64xp-linux.c: Re-generated.
6981
6982 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6983
6984         * i386-linux-tdep.c (i386_linux_read_description): New function.
6985         (i386_linux_core_read_description): Call
6986         i386_linux_read_description.
6987         * i386-linux-tdep.h (i386_linux_read_description): Declare.
6988         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
6989         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
6990         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
6991         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
6992         * x86-linux-nat.c (x86_linux_read_description): Call
6993         i386_linux_read_description.
6994
6995 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6996
6997         * NEWS: Mention it.
6998         * features/Makefile (%.c: %.xml): Pass the xml file name to
6999         command "maint print c-tdesc".
7000         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
7001         name from 'arg'.
7002
7003 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7004
7005         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
7006         in-class initialization.
7007         (tdesc_create_feature): Call new instead of XCNEW.
7008         (free_target_description): Ue delete.
7009
7010 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
7011
7012         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
7013
7014 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7015
7016         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
7017         constant.
7018         (amd64_x32_init_abi): Likewise.
7019         * amd64-tdep.h (amd64_init_abi): Update declaration.
7020         (amd64_x32_init_abi): Likewise.
7021
7022 2017-07-25  Yao Qi  <yao.qi@linaro.org>
7023
7024         PR tdep/21717
7025         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
7026         condition for FPSCR.
7027         (arm_linux_store_inferior_registers): Likewise.
7028
7029 2017-07-22  Tom Tromey  <tom@tromey.com>
7030
7031         * break-catch-syscall.c (struct catch_syscall_inferior_data)
7032         <syscalls_counts>: Now a std::vector.
7033         (get_catch_syscall_inferior_data): Use "new".
7034         (catch_syscall_inferior_data_cleanup): Use "delete".
7035         (insert_catch_syscall, remove_catch_syscall)
7036         (clear_syscall_counts): Update.
7037
7038 2017-07-22  Tom Tromey  <tom@tromey.com>
7039
7040         * break-catch-syscall.c (syscall_catchpoint)
7041         <syscalls_to_be_caught>: Now a std::vector<int>
7042         (~syscall_catchpoint): Remove.
7043         (insert_catch_syscall, remove_catch_syscall)
7044         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7045         (print_mention_catch_syscall, print_recreate_catch_syscall):
7046         Update.
7047         (create_syscall_event_catchpoint): Change type of "filter"
7048         parameter.
7049         (catch_syscall_split_args): Return a std::vector.
7050         (catch_syscall_command_1, catching_syscall_number_1): Update.
7051
7052 2017-07-22  Tom Tromey  <tom@tromey.com>
7053
7054         * break-catch-throw.c (struct exception_catchpoint)
7055         <exception_rx>: Now a std::string.
7056         (~exception_catchpoint): Remove.
7057         (print_one_detail_exception_catchpoint): Update.
7058         (handle_gnu_v3_exceptions): Change type of except_rx.
7059         (extract_exception_regexp): Return a std::string.
7060         (catch_exception_command_1): Update.
7061
7062 2017-07-22  Tom Tromey  <tom@tromey.com>
7063
7064         * break-catch-sig.c (gdb_signal_type): Remove typedef.
7065         (struct signal_catchpoint) <signals_to_be_caught>: Now a
7066         std::vector.
7067         <catch_all>: Now a bool.
7068         (~signal_catchpoint): Remove.
7069         (signal_catchpoint_insert_location)
7070         (signal_catchpoint_remove_location)
7071         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7072         (signal_catchpoint_print_mention)
7073         (signal_catchpoint_print_recreate)
7074         (signal_catchpoint_explains_signal): Update.
7075         (create_signal_catchpoint): Change type of "filter" and
7076         "catch_all".
7077         (catch_signal_split_args): Return a std::vector.  Change type of
7078         "catch_all".
7079         (catch_signal_command): Update.
7080
7081 2017-07-20  Pedro Alves  <palves@redhat.com>
7082
7083         * ada-lang.c (ada_language_defn): Make extern.
7084         (_initialize_ada_language): Remove add_language call.
7085         * c-lang.c (c_language_defn, cplus_language_defn)
7086         (asm_language_defn, minimal_language_defn): Make extern.
7087         (_initialize_c_language): Delete.
7088         * completer.c (compare_cstrings): Delete, moved to utils.h.
7089         * d-lang.c (d_language_defn): Make extern.
7090         (_initialize_d_language): Remove add_language calls.
7091         * defs.h (enum language): Add comment.
7092         * f-lang.c (f_language_defn): Make extern.
7093         (_initialize_f_language): Remove add_language call.
7094         * go-lang.c (go_language_defn): Make extern.
7095         (_initialize_go_language): Remove add_language call.
7096         * language.c: Include <algorithm>.
7097         (languages): Redefine as const array.
7098         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7099         (set_language_command): Handle "local".  Use for-range loop.
7100         (set_language): Remove loop.
7101         (language_enum): Rewrite.
7102         (language_def, language_str): Remove loops.
7103         (add_language): Delete.
7104         (add_set_language_command): New, based on add_languages.
7105         (skip_language_trampoline): Adjust.
7106         (local_language_defn): Delete.
7107         (language_gdbarch_post_init): Adjust.
7108         (_initialize_language): Remove add_language calls.  Call
7109         add_set_language_command.
7110         * language.h (add_language): Delete.
7111         (auto_language_defn)
7112         (unknown_language_defn, minimal_language_defn, ada_language_defn)
7113         (asm_language_defn, c_language_defn, cplus_language_defn)
7114         (d_language_defn, f_language_defn, go_language_defn)
7115         (m2_language_defn, objc_language_defn, opencl_language_defn)
7116         (pascal_language_defn, rust_language_defn): Declare.
7117         * m2-lang.c (m2_language_defn): Make extern.
7118         (_initialize_m2_language): Remove add_language call.
7119         * objc-lang.c (objc_language_defn): Make extern.
7120         (_initialize_objc_language): Remove add_language call.
7121         * opencl-lang.c (opencl_language_defn): Make extern.
7122         (_initialize_opencl_language): Remove add_language call.
7123         * p-lang.c (pascal_language_defn): Make extern.
7124         (_initialize_pascal_language): Delete.
7125         * rust-lang.c (rust_language_defn): Make extern.
7126         (_initialize_rust_language): Delete.
7127         * utils.h (compare_cstrings): New static inline function.
7128
7129 2017-07-20  Pedro Alves  <palves@redhat.com>
7130
7131         * ada-lang.c (ada_to_fixed_type_1): Adjust.
7132         (get_var_value): Constify parameters.
7133         (get_int_var_value): Change prototype.
7134         (to_fixed_range_type): Adjust.
7135         * ada-lang.h (get_int_var_value): Change prototype.
7136
7137 2017-07-20  Pedro Alves  <palves@redhat.com>
7138
7139         * dwarf2read.c (dw2_lookup_symbol): Use
7140         SYMBOL_MATCHES_SEARCH_NAME.
7141         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
7142
7143 2017-07-20  Pedro Alves  <palves@redhat.com>
7144
7145         * block.c (block_iter_name_step, block_iter_name_first)
7146         (block_iter_name_next): Delete.
7147         (block_lookup_symbol_primary): Adjust to use
7148         dict_iter_match_first/dict_iter_match_next.
7149         * block.h (block_iter_name_first, block_iter_name_next): Delete
7150         declarations.
7151         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
7152         dict_iter_match_first/dict_iter_match_next.
7153
7154 2017-07-20  Pedro Alves  <palves@redhat.com>
7155
7156         * cp-support.c (cp_find_first_component_aux): Add missing case for
7157         end of string.
7158
7159 2017-07-18  David Blaikie  <dblaikie@gmail.com>
7160
7161         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
7162         of dwo_cu's dwo_file.
7163
7164 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7165
7166         * remote.c (store_registers_using_G): Remove one line comment.
7167
7168 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7169
7170         * regcache.c (regcache_cpy): Simplify it.
7171         (regcache::cpy_no_passthrough): Remove it.
7172         * regcache.h (cpy_no_passthrough): Remove it.
7173         (regcache_dup, regcache_cpy): Update comments.
7174
7175 2017-07-18  Pedro Alves  <palves@redhat.com>
7176
7177         * remote-sim.c (sim_command_completer): Adjust to work with a
7178         completion_tracker instead of a VEC.
7179
7180 2017-07-17  Pedro Alves  <palves@redhat.com>
7181
7182         * completer.c (complete_source_filenames): New function.
7183         (complete_address_and_linespec_locations): New function.
7184         (location_completer): Use complete_address_and_linespec_locations.
7185         (completion_tracker::build_completion_result): Honor the tracker's
7186         request to suppress append.
7187         * completer.h (completion_tracker::suppress_append_ws)
7188         (completion_tracker::set_suppress_append_ws): New methods.
7189         (completion_tracker::m_suppress_append_ws): New field.
7190         (complete_source_filenames): New declaration.
7191         * linespec.c (linespec_complete_what): New.
7192         (struct ls_parser) <complete_what, completion_word,
7193         completion_quote_char, completion_quote_end, completion_tracker>:
7194         New fields.
7195         (string_find_incomplete_keyword_at_end): New.
7196         (linespec_lexer_lex_string): Record quote char.  If in completion
7197         mode, don't throw.
7198         (linespec_lexer_consume_token): Advance the completion word point.
7199         (linespec_lexer_peek_token): Save/restore completion info.
7200         (save_stream_and_consume_token): New.
7201         (set_completion_after_number): New.
7202         (linespec_parse_basic): Set what to complete next depending on
7203         token.  Handle function and label completions specially.
7204         (parse_linespec): Disable objc shortcut in completion mode.  Set
7205         what to complete next depending on token type.  Skip keyword if in
7206         completion mode.
7207         (complete_linespec_component, linespec_complete): New.
7208         * linespec.h (linespec_complete): Declare.
7209
7210 2017-07-17  Pedro Alves  <palves@redhat.com>
7211
7212         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
7213         Handle 'operator<' / 'operator<<'.
7214
7215 2017-07-17  Pedro Alves  <palves@redhat.com>
7216
7217         * completer.c (collect_explicit_location_matches): Handle
7218         MATCH_LABEL.
7219         (convert_explicit_location_to_linespec): New, factored out from
7220         ...
7221         (convert_explicit_location_to_sals): ... this.
7222         (complete_label): New.
7223         (linespec_complete_label, find_label_symbols_in_block): New.
7224         (find_label_symbols): Add completion_mode parameter and adjust to
7225         call find_label_symbols_in_block.
7226         * linespec.h (linespec_complete_label): Declare.
7227
7228 2017-07-17  Pedro Alves  <palves@redhat.com>
7229
7230         * ada-lang.c (ada_collect_symbol_completion_matches): Add
7231         complete_symbol_mode parameter.
7232         * cli/cli-cmds.c (complete_command): Get the completion result out
7233         of the handle_brkchars tracker if used a custom word point.
7234         * completer.c: Include "linespec.h".
7235         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
7236         (advance_to_expression_complete_word_point): New.
7237         (completion_tracker::completes_to_completion_word): New.
7238         (complete_files_symbols): Pass down
7239         complete_symbol_mode::EXPRESSION.
7240         (explicit_options, probe_options): New.
7241         (collect_explicit_location_matches): Complete on the
7242         explictit_loc->foo instead of word.  Use
7243         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
7244         keyword and options completions.
7245         (backup_text_ptr): Delete.
7246         (skip_keyword): New.
7247         (complete_explicit_location): Remove 'word' parameter.  Add
7248         language, quoted_arg_start and quoted_arg_end parameters.
7249         Rewrite, parsing left to right.
7250         (location_completer): Rewrite.
7251         (location_completer_handle_brkchars): New function.
7252         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
7253         (enum complete_line_internal_reason): Adjust comments.
7254         (completion_tracker::discard_completions): New.
7255         (completer_handle_brkchars_func_for_completer): Handle
7256         location_completer.
7257         (gdb_custom_word_point_brkchars)
7258         (gdb_org_rl_basic_quote_characters): New.
7259         (gdb_completion_word_break_characters_throw)
7260         (completion_find_completion_word): Handle trackers that use a
7261         custom word point.
7262         (completion_tracker::advance_custom_word_point_by): New.
7263         (completion_tracker::build_completion_result): Don't rely on
7264         readline appending the quote char.
7265         (gdb_rl_attempted_completion_function_throw): Handle trackers that
7266         use a custom word point.
7267         (gdb_rl_attempted_completion_function): Restore
7268         rl_basic_quote_characters.
7269         * completer.h (class completion_tracker): Extend intro comment.
7270         (completion_tracker::set_quote_char)
7271         (completion_tracker::quote_char)
7272         (completion_tracker::set_use_custom_word_point)
7273         (completion_tracker::use_custom_word_point)
7274         (completion_tracker::custom_word_point)
7275         (completion_tracker::set_custom_word_point)
7276         (completion_tracker::advance_custom_word_point_by)
7277         (completion_tracker::completes_to_completion_word)
7278         (completion_tracker::discard_completions): New methods.
7279         (completion_tracker::m_quote_char)
7280         (completion_tracker::m_use_custom_word_point)
7281         (completion_tracker::m_custom_word_point): New fields.
7282         (advance_to_expression_complete_word_point): Declare.
7283         * f-lang.c (f_collect_symbol_completion_matches): Add
7284         complete_symbol_mode parameter.
7285         * language.h (struct language_defn)
7286         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
7287         parameter.
7288         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
7289         (linespec_complete_function): New function.
7290         (linespec_lexer_lex_keyword): Adjust.
7291         * linespec.h (linespec_keywords, linespec_complete_function): New
7292         declarations.
7293         * location.c (find_end_quote): New function.
7294         (explicit_location_lex_one): Add explicit_completion_info
7295         parameter.  Save quoting info.  Don't throw if being called for
7296         completion.  Don't handle Ada operators here.
7297         (is_cp_operator, skip_op_false_positives, first_of)
7298         (explicit_location_lex_one_function): New function.
7299         (string_to_explicit_location): Replace 'dont_throw' parameter with
7300         an explicit_completion_info pointer parameter.  Handle it.  Don't
7301         use explicit_location_lex_one to lex function names.  Use
7302         explicit_location_lex_one_function instead.
7303         * location.h (struct explicit_completion_info): New.
7304         (string_to_explicit_location): Replace 'dont_throw' parameter with
7305         an explicit_completion_info pointer parameter.
7306         * symtab.c (default_collect_symbol_completion_matches_break_on):
7307         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
7308         (default_collect_symbol_completion_matches)
7309         (collect_symbol_completion_matches): Add complete_symbol_mode
7310         parameter.
7311         (collect_symbol_completion_matches_type): Pass down
7312         complete_symbol_mode::EXPRESSION.
7313         (collect_file_symbol_completion_matches): Add complete_symbol_mode
7314         parameter.  Handle LINESPEC mode.
7315         * symtab.h (complete_symbol_mode): New.
7316         (default_collect_symbol_completion_matches_break_on)
7317         (default_collect_symbol_completion_matches)
7318         (collect_symbol_completion_matches)
7319         (collect_file_symbol_completion_matches): Add complete_symbol_mode
7320         parameter.
7321
7322 2017-07-17  Pedro Alves  <palves@redhat.com>
7323
7324         * utils.c (enum class strncmp_iw_mode): New.
7325         (strcmp_iw): Rename to ...
7326         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
7327         parameters.  Handle them.
7328         (strncmp_iw): New.
7329         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
7330         * utils.h (strncmp_iw): Declare.
7331         (strcmp_iw): Move describing comments here.
7332
7333 2017-07-17  Pedro Alves  <palves@redhat.com>
7334
7335         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
7336         CP_OPERATOR_STR.
7337         * c-typeprint.c (is_type_conversion_operator): Use
7338         CP_OPERATOR_STR.
7339         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
7340         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
7341         CP_OPERATOR_LEN.
7342         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
7343         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
7344         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
7345         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
7346         CP_OPERATOR_STR.
7347         * location.c: Include "cp-support.h".
7348         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
7349         CP_OPERATOR_STR.
7350         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
7351         CP_OPERATOR_LEN.
7352
7353 2017-07-17  Pedro Alves  <palves@redhat.com>
7354
7355         * cli/cli-cmds.c (complete_command): Use a completion tracker
7356         along with completion_find_completion_word for handle_brkchars
7357         phase.
7358         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
7359         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
7360         (struct gdb_rl_completion_word_info): New.
7361         (gdb_rl_find_completion_word): New.
7362         (completion_find_completion_word): New.
7363         * completer.h (completion_find_completion_word): Declare.
7364
7365 2017-07-17  Pedro Alves  <palves@redhat.com>
7366
7367         * ada-lang.c (symbol_completion_match): Adjust comments.
7368         (symbol_completion_add): Replace vector parameter with
7369         completion_tracker parameter.  Use it.
7370         (ada_make_symbol_completion_list): Rename to...
7371         (ada_collect_symbol_completion_matches): ... this.  Add
7372         completion_tracker parameter and use it.
7373         (ada_language_defn): Adjust.
7374         * break-catch-syscall.c (catch_syscall_completer): Adjust
7375         prototype and work with completion_tracker instead of VEC.
7376         * breakpoint.c (condition_completer): Adjust prototype and work
7377         with completion_tracker instead of VEC.
7378         * c-lang.c (c_language_defn, cplus_language_defn)
7379         (asm_language_defn, minimal_language_defn): Adjust to renames.
7380         * cli/cli-cmds.c (complete_command): Rework using
7381         completion_tracker.  Catch exceptions when completing.
7382         * cli/cli-decode.c (integer_unlimited_completer)
7383         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
7384         with completion_tracker instead of VEC.
7385         * command.h (struct completion_tracker): Forward declare.
7386         (completer_ftype, completer_handle_brkchars_ftype): Change
7387         types.
7388         (complete_on_cmdlist, complete_on_enum): Adjust.
7389         * completer.c: Include <algorithm>.
7390         (struct gdb_completer_state): New.
7391         (current_completion): New global.
7392         (readline_line_completion_function): Delete.
7393         (noop_completer, filename_completer)
7394         (filename_completer_handle_brkchars, complete_files_symbols)
7395         (linespec_location_completer): Adjust to work with a
7396         completion_tracker instead of a VEC.
7397         (string_or_empty): New.
7398         (collect_explicit_location_matches): Adjust to work with a
7399         completion_tracker instead of a VEC.
7400         (explicit_location_completer): Rename to ...
7401         (complete_explicit_location): ... this and adjust to work with a
7402         completion_tracker instead of a VEC.
7403         (location_completer): Adjust to work with a completion_tracker
7404         instead of a VEC.
7405         (add_struct_fields): Adjust to work with a completion_list instead
7406         of VEC.
7407         (expression_completer): Rename to ...
7408         (complete_expression): ... this and adjust to work with a
7409         completion_tracker instead of a VEC.  Use complete_files_symbols.
7410         (expression_completer): Reimplement on top of complete_expression.
7411         (symbol_completer): Adjust to work with a completion_tracker
7412         instead of a VEC.
7413         (enum complete_line_internal_reason): Add describing comments.
7414         (complete_line_internal_normal_command): Adjust to work with a
7415         completion_tracker instead of a VEC.
7416         (complete_line_internal): Rename to ...
7417         (complete_line_internal_1): ... this and adjust to work with a
7418         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
7419         handle_brkchars phase.
7420         (new_completion_tracker): Delete.
7421         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
7422         complete_line_internal_1.
7423         (free_completion_tracker): Delete.
7424         (INITIAL_COMPLETION_HTAB_SIZE): New.
7425         (completion_tracker::completion_tracker)
7426         (completion_tracker::~completion_tracker): New.
7427         (maybe_add_completion): Delete.
7428         (completion_tracker::maybe_add_completion)
7429         (completion_tracker::add_completion)
7430         (completion_tracker::add_completions): New.
7431         (throw_max_completions_reached_error): Delete.
7432         (complete_line): Adjust to work with a completion_tracker instead
7433         of a VEC.  Don't create a completion_tracker_t or check for max
7434         completions here.
7435         (command_completer, command_completer_handle_brkchars)
7436         (signal_completer, reg_or_group_completer_1)
7437         (reg_or_group_completer, default_completer_handle_brkchars):
7438         Adjust to work with a completion_tracker.
7439         (gdb_completion_word_break_characters_throw): New.
7440         (gdb_completion_word_break_characters): Reimplement.
7441         (line_completion_function): Delete.
7442         (completion_tracker::recompute_lowest_common_denominator)
7443         (expand_preserving_ws)
7444         (completion_tracker::build_completion_result)
7445         (completion_result::completion_result)
7446         (completion_result::completion_result)
7447         (completion_result::~completion_result)
7448         (completion_result::completion_result)
7449         (completion_result::release_match_list, compare_cstrings)
7450         (completion_result::sort_match_list)
7451         (completion_result::reset_match_list)
7452         (gdb_rl_attempted_completion_function_throw)
7453         (gdb_rl_attempted_completion_function): New.
7454         * completer.h (completion_list, struct completion_result)
7455         (class completion_tracker): New.
7456         (complete_line): Add completion_tracker parameter.
7457         (readline_line_completion_function): Delete.
7458         (gdb_rl_attempted_completion_function): New.
7459         (noop_completer, filename_completer, expression_completer)
7460         (location_completer, symbol_completer, command_completer)
7461         (signal_completer, reg_or_group_completer): Update prototypes.
7462         (completion_tracker_t, new_completion_tracker)
7463         (make_cleanup_free_completion_tracker): Delete.
7464         (enum maybe_add_completion_enum): Delete.
7465         (maybe_add_completion): Delete.
7466         (throw_max_completions_reached_error): Delete.
7467         * corefile.c (complete_set_gnutarget): Adjust to work with a
7468         completion_tracker instead of a VEC.
7469         * cp-abi.c (cp_abi_completer): Adjust to work with a
7470         completion_tracker instead of a VEC.
7471         * d-lang.c (d_language_defn): Adjust.
7472         * disasm.c (disassembler_options_completer): Adjust to work with a
7473         completion_tracker instead of a VEC.
7474         * f-lang.c (f_make_symbol_completion_list): Rename to ...
7475         (f_collect_symbol_completion_matches): ... this.  Adjust to work
7476         with a completion_tracker instead of a VEC.
7477         (f_language_defn): Adjust.
7478         * go-lang.c (go_language_defn): Adjust.
7479         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
7480         Adjust to work with a completion_tracker instead of a VEC.
7481         * infrun.c (handle_completer): Likewise.
7482         * interps.c (interpreter_completer): Likewise.
7483         * interps.h (interpreter_completer): Likewise.
7484         * language.c (unknown_language_defn, auto_language_defn)
7485         (local_language_defn): Adjust.
7486         * language.h (language_defn::la_make_symbol_completion_list):
7487         Rename to ...
7488         (language_defn::la_collect_symbol_completion_matches): ... this
7489         and adjust to work with a completion_tracker instead of a VEC.
7490         * m2-lang.c (m2_language_defn): Adjust.
7491         * objc-lang.c (objc_language_defn): Adjust.
7492         * opencl-lang.c (opencl_language_defn): Adjust.
7493         * p-lang.c (pascal_language_defn): Adjust.
7494         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
7495         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
7496         with a completion_tracker.
7497         * rust-lang.c (rust_language_defn): Adjust.
7498         * symtab.c (free_completion_list, do_free_completion_list)
7499         (return_val, completion_tracker): Delete.
7500         (completion_list_add_name, completion_list_add_symbol)
7501         (completion_list_add_msymbol, completion_list_objc_symbol)
7502         (completion_list_add_fields, add_symtab_completions): Add
7503         completion_tracker parameter and use it.
7504         (default_make_symbol_completion_list_break_on_1): Rename to...
7505         (default_collect_symbol_completion_matches_break_on): ... this.
7506         Add completion_tracker parameter and use it instead of allocating
7507         a completion tracker here.
7508         (default_make_symbol_completion_list_break_on): Delete old
7509         implementation.
7510         (default_make_symbol_completion_list): Delete.
7511         (default_collect_symbol_completion_matches): New.
7512         (make_symbol_completion_list): Delete.
7513         (collect_symbol_completion_matches): New.
7514         (make_symbol_completion_type): Rename to ...
7515         (collect_symbol_completion_matches_type): ... this.  Add
7516         completion_tracker parameter and use it instead of VEC.
7517         (make_file_symbol_completion_list_1): Rename to...
7518         (collect_file_symbol_completion_matches): ... this.  Add
7519         completion_tracker parameter and use it instead of VEC.
7520         (make_file_symbol_completion_list): Delete.
7521         (add_filename_to_list): Use completion_list instead of a VEC.
7522         (add_partial_filename_data::list): Now a completion_list.
7523         (make_source_files_completion_list): Work with a completion_list
7524         instead of a VEC.
7525         * symtab.h: Include "completer.h".
7526         (default_make_symbol_completion_list_break_on)
7527         (default_make_symbol_completion_list, make_symbol_completion_list)
7528         (make_symbol_completion_type, make_file_symbol_completion_list)
7529         (make_source_files_completion_list): Delete.
7530         (default_collect_symbol_completion_matches_break_on)
7531         (default_collect_symbol_completion_matches)
7532         (collect_symbol_completion_matches)
7533         (collect_symbol_completion_matches_type)
7534         (collect_file_symbol_completion_matches)
7535         (make_source_files_completion_list): New.
7536         * top.c (init_main): Don't install a rl_completion_entry_function
7537         hook.  Install a rl_attempted_completion_function hook instead.
7538         * tui/tui-layout.c (layout_completer): Adjust to work with a
7539         completion_tracker.
7540         * tui/tui-regs.c (tui_reggroup_completer):
7541         * tui/tui-win.c (window_name_completer, focus_completer)
7542         (winheight_completer): Adjust to work with a completion_tracker.
7543         * value.c: Include "completer.h".
7544         (complete_internalvar): Adjust to work with a completion_tracker.
7545         * value.h (complete_internalvar): Likewise.
7546
7547 2017-07-17  Pedro Alves  <palves@redhat.com>
7548
7549         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
7550         renames.
7551         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
7552         comments to completer_ftype's declaration.
7553         <completer_handle_brkchars>: Change type to
7554         completer_handle_brkchars_ftype.
7555         * command.h (completer_ftype): Add describing comment and give
7556         names to parameters.
7557         (completer_ftype_void): Rename to ...
7558         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
7559         (set_cmd_completer_handle_brkchars): Adjust.
7560         * completer.c (filename_completer_handle_brkchars): New function.
7561         (complete_line_internal_normal_command): New function, factored
7562         out from ...
7563         (complete_line_internal): ... here.
7564         (command_completer_handle_brkchars)
7565         (default_completer_handle_brkchars)
7566         (completer_handle_brkchars_func_for_completer): New functions.
7567         * completer.h (set_gdb_completion_word_break_characters): Delete
7568         declaration.
7569         (completer_handle_brkchars_func_for_completer): New declaration.
7570         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
7571         completer_handle_brkchars_func_for_completer.
7572
7573 2017-07-17  Pedro Alves  <palves@redhat.com>
7574
7575         * completer.c (symbol_completer): New function, based on
7576         make_symbol_completion_list_fn.
7577         * completer.h (symbol_completer): New declaration.
7578         * guile/scm-cmd.c (cmdscm_completers): Adjust.
7579         * python/py-cmd.c (completers): Adjust.
7580         * symtab.c (make_symbol_completion_list_fn): Delete.
7581         * symtab.h (make_symbol_completion_list_fn): Delete.
7582         * cli/cli-decode.c (add_cmd): Adjust.
7583
7584 2017-07-17  Pedro Alves  <palves@redhat.com>
7585
7586         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
7587         * dwarf2read.c: Include "filename-seen-cache.h".
7588         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
7589         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
7590         * filename-seen-cache.c: New file.
7591         * filename-seen-cache.h: New file.
7592         * symtab.c: Include "filename-seen-cache.h".
7593         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7594         (create_filename_seen_cache, clear_filename_seen_cache)
7595         (delete_filename_seen_cache, filename_seen): Delete, parts moved
7596         to filename-seen-cache.h/filename-seen-cache.c.
7597         (output_source_filename, sources_info)
7598         (maybe_add_partial_symtab_filename)
7599         (make_source_files_completion_list): Adjust to use
7600         filename_seen_cache.
7601
7602 2017-07-17  Pedro Alves  <palves@redhat.com>
7603
7604         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
7605         fields.
7606         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
7607         dwarf2_debug_sections*)): New.
7608         (dwarf2_per_objfile::dwarf2_per_objfile(const
7609         dwarf2_per_objfile&)): Declare as deleted.
7610         (dwarf2_per_objfile::operator=): Declare as deleted.
7611         (dwarf2_per_objfile::dwarf2_per_objfile)
7612         (dwarf2_per_objfile::~dwarf2_per_objfile)
7613         (dwarf2_per_objfile::free_cached_comp_units): New.
7614         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7615         ctor.  Call dwarf2_per_objfile's ctor manually.
7616         (dwarf2_locate_sections): Deleted/refactored as ...
7617         (dwarf2_per_objfile::locate_sections): ... this new method.
7618         (free_cached_comp_units): Defer to
7619         dwarf2_per_objfile::free_cached_comp_units.
7620         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7621
7622 2017-07-14  Tom Tromey  <tom@tromey.com>
7623
7624         PR rust/21764:
7625         * rust-exp.y (convert_ast_to_expression): Add "want_type"
7626         parameter.
7627         <UNOP_SIZEOF>: Split into separate case.
7628         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
7629
7630 2017-07-14  Tom Tromey  <tom@tromey.com>
7631
7632         PR rust/21763:
7633         * symtab.c (symbol_matches_domain): Add language_rust to special
7634         case.
7635         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7636         treat LOC_TYPEDEF symbols as variables.
7637
7638 2017-07-14  Pedro Alves  <palves@redhat.com>
7639
7640         * symtab.c (make_file_symbol_completion_list_1): Iterate over
7641         symtabs matching all symtabs with SRCFILE as file name instead of
7642         only considering the first hit, with lookup_symtab.
7643
7644 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7645
7646         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7647         operator_name parameters.
7648         (gen_expr): Update function call.
7649
7650 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7651
7652         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7653         parameter.
7654         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7655         Likewise.
7656         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7657         parameter, use agent_expr::gdbarch instead, update function
7658         calls.
7659         (locexpr_tracepoint_var_ref): Likewise.
7660         (loclist_tracepoint_var_ref): Likewise.
7661         * ax-gdb.c (gen_trace_static_fields): Likewise.
7662         (gen_traced_pop): Likewise.
7663         (gen_frame_args_address): Likewise.
7664         (gen_frame_locals_address): Likewise.
7665         (gen_var_ref): Likewise.
7666         (gen_struct_ref_recursive): Likewise.
7667         (gen_static_field): Likewise.
7668         (gen_maybe_namespace_elt): Likewise.
7669         (gen_expr): Likewise.
7670         (gen_trace_for_var): Likewise.
7671         (gen_trace_for_expr): Likewise.
7672         (gen_trace_for_return_address): Likewise.
7673
7674 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7675
7676         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7677         parameter.
7678         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7679
7680 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7681
7682         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7683         from ax, update calls.
7684         (gen_usual_arithmetic): Likewise.
7685         (gen_integral_promotions): Likewise.
7686         (gen_bitfield_ref): Likewise.
7687         (gen_primitive_field): Likewise.
7688         (gen_struct_ref_recursive): Likewise.
7689         (gen_struct_ref): Likewise.
7690         (gen_maybe_namespace_elt): Likewise.
7691         (gen_struct_elt_for_reference): Likewise.
7692         (gen_namespace_elt): Likewise.
7693         (gen_aggregate_elt_ref): Likewise.
7694         (gen_expr): Get gdbarch from ax, update calls.
7695         (gen_expr_binop_rest): Likewise.
7696
7697 2017-07-13  Pedro Alves  <palves@redhat.com>
7698
7699         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7700         as default tdesc.
7701         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7702         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7703         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7704         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
7705         tdep.
7706         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7707         Get final tdesc from the tdep.
7708         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7709         default tdesc.
7710         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7711         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7712         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7713         Use it as default tdesc.
7714         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7715         down to amd_init_abi.  No longer handle fallback tdesc here.
7716         * amd64-tdep.h (tdesc_x32): Declare.
7717         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7718         parameter.
7719         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7720         as default tdesc.
7721
7722 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7723
7724         * s390-linux-tdep.c (s390_process_record): Add support for
7725         instructions new in arch12.
7726
7727 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7728
7729         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7730         PT_GETFSBASE and PT_GETGSBASE.
7731         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7732         PT_SETGSBASE.
7733
7734 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7735
7736         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7737         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7738         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7739         those rules.
7740         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7741         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7742         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7743         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7744         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7745         * features/i386/amd64.xml: Add 64bit-segments.xml.
7746         * features/i386/amd64-avx-avx512.c: Regenerated.
7747         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7748         * features/i386/amd64-avx-mpx.c: Regenerated.
7749         * features/i386/amd64-avx.c: Regenerated.
7750         * features/i386/amd64-mpx.c: Regenerated.
7751         * features/i386/amd64.c: Regenerated.
7752         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7753         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7754         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7755         * regformats/i386/amd64-avx.dat: Regenerated.
7756         * regformats/i386/amd64-mpx.dat: Regenerated.
7757         * regformats/i386/amd64.dat: Regenerated.
7758
7759 2017-07-10  Yao Qi  <yao.qi@linaro.org>
7760
7761         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7762         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7763
7764 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
7765
7766         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7767         unsetenv.
7768         * gnulib/aclocal.m4: Regenerate.
7769         * gnulib/config.in: Regenerate.
7770         * gnulib/configure: Regenerate.
7771         * gnulib/import/Makefile.am: Regenerate.
7772         * gnulib/import/Makefile.in: Regenerate.
7773         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7774         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7775         * gnulib/import/m4/environ.m4: New file.
7776         * gnulib/import/m4/setenv.m4: New file.
7777         * gnulib/import/setenv.c: New file.
7778         * gnulib/import/unsetenv.c: New file.
7779
7780 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
7781
7782         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7783         address when op is DW_OP_addr.
7784
7785 2017-07-09  Tom Tromey  <tom@tromey.com>
7786
7787         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7788         check and apply to outer type.
7789
7790 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7791
7792         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7793         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7794         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7795         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7796
7797 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7798
7799         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7800
7801 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7802
7803         * corelow.c (get_core_siginfo): Remove.
7804         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7805         instead of get_core_siginfo.
7806         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7807         * gdbarch.h: Re-generate.
7808         * gdbarch.c: Re-generate.
7809         * linux-tdep.c (linux_core_xfer_siginfo): New.
7810         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7811
7812 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7813
7814         * corelow.c (thread_section_name): Move to ...
7815         * gdbcore.h (thread_section_name): ... here.
7816
7817 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7818
7819         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7820         (struct siginfo32): New.
7821         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7822         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7823         via ptrace(PT_LWPINFO).
7824
7825 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7826
7827         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7828         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7829         (fbsd_get_siginfo_type): New.
7830         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7831         (_initialize_fbsd_tdep): New.
7832
7833 2017-07-06  David Blaikie  <dblaikie@gmail.com>
7834
7835         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7836         a singular dwo_unit*) to support multiple CUs in the same way that
7837         multiple TUs are supported.
7838         (create_cus_hash_table): Replace create_dwo_cu with a function for
7839         parsing multiple CUs from a DWO file.
7840         (open_and_init_dwo_file): Use create_cus_hash_table rather than
7841         create_dwo_cu.
7842         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7843         htab_find, rather than comparing the signature to a singleton CU in
7844         the dwo_file.
7845
7846 2017-07-06  Pedro Alves  <palves@redhat.com>
7847
7848         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7849
7850 2017-07-04  Pedro Alves  <palves@redhat.com>
7851
7852         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7853         * gdbtypes.h (TYPE_STATIC): Delete.
7854         (struct fn_field) <is_public, is_abstract, is_static, is_final,
7855         is_synchronized, is_native>: Delete.
7856         <dummy>: Bump.
7857         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7858         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7859         (TYPE_FN_FIELD_ABSTRACT): Delete.
7860
7861 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
7862
7863         * buffer.h (buffer_finish): Fix spelling mistakes.
7864
7865 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
7866
7867         * .dir-locals.el: Automatically switch to C-style comments in
7868         versions of Emacs that support the feature.
7869
7870 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7871             Pedro Alves  <palves@redhat.com>
7872
7873         PR cli/21688
7874         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7875         (process_next_line): New variable 'inline_cmd'.
7876         Adjust 'if' clauses for "python", "compile" and "guile" to use
7877         'command_name_equals' and check for '!inline_cmd'.
7878
7879 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7880
7881         PR cli/21688
7882         * cli/cli-script.c (command_name_equals_not_inline): New function.
7883         (process_next_line): Adjust 'if' clauses for "python", "compile"
7884         and "guile" to use command_name_equals_not_inline.
7885
7886 2017-06-29  Pedro Alves  <palves@redhat.com>
7887
7888         * completer.c (expression_completer): Call
7889         linespec_location_completer instead of location_completer.
7890
7891 2017-06-29  Pedro Alves  <palves@redhat.com>
7892
7893         * completer.c (expression_completer): Remove code that recomputes
7894         'text' from 'word'.
7895
7896 2017-06-29  Yao Qi  <yao.qi@linaro.org>
7897
7898         * regformats/regdat.sh: Generate code with
7899         "ifndef IN_PROCESS_AGENT".
7900
7901 2017-06-28  Pedro Alves  <palves@redhat.com>
7902
7903         * command.h: Include "common/scoped_restore.h".
7904
7905 2017-06-28  Yao Qi  <yao.qi@linaro.org>
7906
7907         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7908         instead of obstack_grow.
7909
7910 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
7911
7912         PR gdb/21337
7913         * symfile.c (reread_symbols): Call objfiles_changed just before
7914         read_symbols.
7915
7916 2017-06-27  Pedro Alves  <palves@redhat.com>
7917
7918         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7919         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7920         (completion_list_add_symbol, completion_list_add_msymbol):
7921         ... these new functions.
7922         (add_symtab_completions)
7923         (default_make_symbol_completion_list_break_on_1): Adjust.
7924
7925 2017-06-27  Pedro Alves  <palves@redhat.com>
7926
7927         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7928         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
7929         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7930         dtor.
7931         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
7932         'storage_obstack' field an auto_obstack.  In-class initialize all
7933         non-bitfield fields.  Make minsyms_read bool.
7934         * symfile.c (read_symbols): Adjust.
7935
7936 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
7937
7938         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7939         (gdbsim_store_register): Likewise.
7940
7941 2017-06-27  Pedro Alves  <palves@redhat.com>
7942
7943         * c-exp.y (name_obstack): Now an auto_obstack.
7944         (yylex): Use auto_obstack::clear.
7945         (c_parse): Use auto_obstack::clear instead of reinitializing and
7946         freeing the obstack.
7947         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7948         * d-exp.y (name_obstack): Now an auto_obstack.
7949         (yylex): Use auto_obstack::clear.
7950         (d_parse): Use auto_obstack::clear instead of reinitializing and
7951         freeing the obstack.
7952         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7953         auto_obstack.
7954         * dwarf2read.c (create_addrmap_from_index)
7955         (dwarf2_build_psymtabs_hard)
7956         (update_enumeration_type_from_children): Likewise.
7957         * gdb_obstack.h (auto_obstack): New type.
7958         * go-exp.y (name_obstack): Now an auto_obstack.
7959         (build_packaged_name): Use auto_obstack::clear.
7960         (go_parse): Use auto_obstack::clear instead of reinitializing and
7961         freeing the obstack.
7962         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7963         auto_obstack.
7964         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7965         * rust-exp.y (work_obstack): Now an auto_obstack.
7966         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7967         reinitializing and freeing the obstack.
7968         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7969         (host_char_to_target): Use auto_obstack.
7970         * utils.h (make_cleanup_obstack_free): Delete declaration.
7971         * valprint.c (generic_emit_char, generic_printstr): Use
7972         auto_obstack.
7973
7974 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7975
7976         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7977         thread.
7978         (darwin_init_thread_list): Don't update dummy thread.
7979         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7980
7981 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7982
7983         * record-full.c (netorder16): Remove.
7984
7985 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7986
7987         * common/diagnostics.h: Define macros for GCC.
7988         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
7989         * common/vec.h: Include diagnostics.h.
7990         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
7991         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
7992         warning.
7993
7994 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7995
7996         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
7997         New macro.
7998         * ada-lex.l: Ignore deprecated register warnings.
7999
8000 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8001
8002         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
8003         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
8004
8005 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8006
8007         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
8008         its own line.
8009
8010 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
8011
8012         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
8013
8014 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
8015
8016         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
8017         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
8018         (xtensa_register_read_masked): Likewise.
8019
8020 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
8021
8022         * common/environ.c (gdb_environ::unset): Update comment.
8023
8024 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8025
8026         * python/py-unwind.c (pyuw_sniffer): Allocate space for
8027         registers.
8028
8029 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8030
8031         * record-full.c (record_full_exec_insn): Use byte_vector.
8032
8033 2017-06-22  Yao Qi  <yao.qi@linaro.org>
8034
8035         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8036         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8037
8038 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8039
8040         * remote.c (cached_reg): Move from here...
8041         * regcache.h (cached_reg): ...to here.
8042         * python/py-unwind.c (struct reg_info): Remove.
8043         (cached_frame_info): Use cached_reg_t.
8044         (pyuw_prev_register): Likewise.
8045         (pyuw_sniffer): Use cached_reg_t and allocate registers.
8046         (pyuw_dealloc_cache): Free all registers.
8047
8048 2017-06-22  Pedro Alves  <palves@redhat.com>
8049             Simon Marchi  <simon.marchi@ericsson.com>
8050
8051         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8052         warning.
8053         * common/diagnostics.h: New file.
8054
8055 2017-06-22  Pedro Alves  <palves@redhat.com>
8056
8057         * common/agent.h: Add include guards.
8058
8059 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
8060
8061         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8062         talk about addressable units instead of bytes.
8063
8064 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8065
8066         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8067         of '::const_iterator'.
8068
8069 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8070
8071         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8072         'unittests/environ-selftests.c'.
8073         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8074         * charset.c (find_charset_names): Declare object 'iconv_env'.
8075         Update code to use 'iconv_env' object.  Remove call to
8076         'free_environ'.
8077         * common/environ.c: Include <utility>.
8078         (make_environ): Delete function.
8079         (free_environ): Delete function.
8080         (gdb_environ::clear): New function.
8081         (gdb_environ::operator=): New function.
8082         (gdb_environ::get): Likewise.
8083         (environ_vector): Delete function.
8084         (set_in_environ): Delete function.
8085         (gdb_environ::set): New function.
8086         (unset_in_environ): Delete function.
8087         (gdb_environ::unset): New function.
8088         (gdb_environ::envp): Likewise.
8089         * common/environ.h: Include <vector>.
8090         (struct gdb_environ): Delete; transform into...
8091         (class gdb_environ): ... this class.
8092         (free_environ): Delete prototype.
8093         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8094         environ_vector): Likewise.
8095         * infcmd.c (run_command_1): Update code to call
8096         'envp' from 'gdb_environ' class.
8097         (environment_info): Update code to call methods from 'gdb_environ'
8098         class.
8099         (unset_environment_command): Likewise.
8100         (path_info): Likewise.
8101         (path_command): Likewise.
8102         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8103         (inferior::inferior): Initialize 'environment' using the host's
8104         information.
8105         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8106         Include "environ.h".
8107         (class inferior) <environment>: Change type from 'struct
8108         gdb_environ' to 'gdb_environ'.
8109         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8110         methods from 'gdb_environ' class.
8111         * solib.c (solib_find_1): Likewise
8112         * unittests/environ-selftests.c: New file.
8113
8114 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8115
8116         * features/i386/i386-linux.xml: Exchange the order of including
8117         32bit-linux.xml and 32bit-sse.xml.
8118         * features/i386/i386-linux.c: Regenerated.
8119
8120 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8121
8122         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
8123         Delete copy ctor and assignment operator.
8124         (tdesc_type): Likewise.
8125         (tdesc_feature): Likewise.
8126         (tdesc_free_reg): Remove.
8127         (tdesc_create_reg): Use new.
8128         (tdesc_free_type): Remove.
8129         (tdesc_create_vector): Use new.
8130         (tdesc_create_union): Likewise.
8131         (tdesc_create_flags): Likewise.
8132         (tdesc_create_enum): Likewise.
8133         (tdesc_free_feature): Delete.
8134         (free_target_description): Use delete.
8135
8136 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
8137
8138         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
8139         registers.
8140
8141 2017-06-19  Pedro Alves  <palves@redhat.com>
8142
8143         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
8144         after gdb::unlinker.
8145
8146 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
8147
8148         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
8149         gdb_environ to access an environment variable.
8150
8151 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
8152
8153         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
8154         gdb_byte*.
8155
8156 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8157
8158         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
8159
8160 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8161
8162         * configure: Re-generate.
8163         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
8164
8165 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8166
8167         * configure: Re-generate.
8168         * warning.m4: Pass -Werror to compiler when checking for
8169         supported warning flags.
8170
8171 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8172
8173         * Makefile.in (COMPILE.pre): Add "-x c++".
8174
8175 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
8176             Pedro Alves  <palves@redhat.com>
8177             Yao Qi  <yao.qi@linaro.org>
8178
8179         * defs.h (RequireLongest): New.
8180         (extract_integer): Declare function template.
8181         (extract_signed_integer): Remove the declaration, but define it
8182         static inline.
8183         (extract_unsigned_integer): Likewise.
8184         (store_integer): Declare function template.
8185         (store_signed_integer): Remove the declaration, but define it
8186         static inline.
8187         (store_unsigned_integer): Likewise.
8188         * findvar.c (extract_integer): New function template.
8189         (extract_signed_integer): Remove.
8190         (extract_unsigned_integer): Remove.
8191         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
8192         instantiations.
8193         (store_integer): New function template.
8194         (store_signed_integer): Remove.
8195         (store_unsigned_integer): Remove.
8196         (store_integer): Explicit instantiations.
8197         * regcache.c (regcache_raw_read_signed): Update.
8198         (regcache::raw_read): New function.
8199         (regcache::raw_read_signed): Remove.
8200         (regcache::raw_read_unsigned): Remove.
8201         (regcache_raw_read_unsigned): Update.
8202         (regcache_raw_write_unsigned): Update.
8203         (regcache::raw_write_signed): Remove.
8204         (regcache::raw_write): New function.
8205         (regcache_cooked_read_signed): Update.
8206         (regcache::raw_write_unsigned): Remove.
8207         (regcache::cooked_read_signed): Remove.
8208         (regcache_cooked_read_unsigned): Update.
8209         (regcache::cooked_read_unsigned): Remove.
8210         (regcache_cooked_write_signed): Update.
8211         (regcache_cooked_write_unsigned): Update.
8212         * regcache.h (regcache) <raw_read_signed>: Remove.
8213         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
8214         <raw_read, raw_write>: New.
8215         <cooked_read_signed, cooked_write_signed>: Remove.
8216         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
8217         <cooked_read, cooked_write>: New.
8218         * sh64-tdep.c (sh64_pseudo_register_read): Update.
8219         (sh64_pseudo_register_write): Update.
8220
8221 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
8222
8223         * arc-tdep.c (arc_disassembler_options): New variable.
8224         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
8225         of default_print_insn.
8226         (arc_delayed_print_insn): Set info->section when needed,
8227         use default_print_insn to retrieve a disassembler.
8228
8229 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
8230
8231         PR gdb/21574
8232         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
8233         to mention $SHELL and startup-with-shell.
8234
8235 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
8236
8237         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
8238
8239 2017-06-14  Yao Qi  <yao.qi@linaro.org>
8240
8241         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
8242         default_print_insn instead of print_insn_aarch64.
8243         * arm-tdep.c (gdb_print_insn_arm): Call
8244         default_print_insn instead of print_insn_big_arm
8245         and print_insn_little_arm.
8246         * i386-tdep.c (i386_print_insn): Call default_print_insn
8247         instead of print_insn_i386.
8248         * ia64-tdep.c (ia64_print_insn): Call
8249         default_print_insn instead of print_insn_ia64.
8250         * mips-tdep.c (gdb_print_insn_mips): Call
8251         default_print_insn instead of print_insn_big_mips
8252         and print_insn_little_mips.
8253         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
8254         instead of print_insn_spu.
8255
8256 2017-06-14  Pedro Alves  <palves@redhat.com>
8257
8258         * ada-lang.c: Include "common/byte-vector.h".
8259         (ada_value_primitive_packed_val): Use gdb::byte_vector.
8260         * charset.c (wchar_iterator::iterate): Resize the vector instead
8261         of reserving it.
8262         * common/byte-vector.h: Include "common/def-vector.h".
8263         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
8264         * cli/cli-dump.c: Include "common/byte-vector.h".
8265         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
8266         * common/byte-vector.h: New file.
8267         * common/def-vector.h: New file.
8268         * common/default-init-alloc.h: New file.
8269         * dwarf2loc.c: Include "common/byte-vector.h".
8270         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
8271         instead of reserving it.
8272         * dwarf2read.c: Include "common/byte-vector.h".
8273         (data_buf::m_vec): Now a gdb::byte_vector.
8274         * gdb_regex.c: Include "common/def-vector.h".
8275         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
8276         * mi/mi-main.c: Include "common/byte-vector.h".
8277         (mi_cmd_data_read_memory): Use gdb::byte_vector.
8278         * printcmd.c: Include "common/byte-vector.h".
8279         (print_scalar_formatted): Use gdb::byte_vector.
8280         * valprint.c: Include "common/byte-vector.h".
8281         (maybe_negate_by_bytes, print_decimal_chars): Use
8282         gdb::byte_vector.
8283
8284 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8285
8286         * darwin-nat.c: Include "nat/fork-inferior.h".
8287
8288 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8289
8290         * configure.nat: Factor out Darwin bits that are not
8291         architecture-specific.  Add fork-inferior.o.
8292
8293 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8294
8295         * configure.nat: Factor out AIX bits that are not
8296         architecture-specific.  Add fork-inferior.o.
8297
8298 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8299
8300         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
8301         (read_pieced_value, write_pieced_value): ...here.  Reduce to
8302         wrappers that just call rw_pieced_value.
8303
8304 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8305
8306         * dwarf2loc.c (write_pieced_value): When writing the data for a
8307         memory piece, use write_memory_with_notification instead of
8308         write_memory.
8309
8310 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8311
8312         * valops.c (read_value_memory): Change embedded_offset to
8313         represent a bit offset instead of a byte offset.
8314         * value.h (read_value_memory): Adjust comment.
8315
8316 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8317
8318         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
8319         dest_offset_bits and source_offset_bits.
8320         (write_pieced_value): Likewise.
8321
8322 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8323
8324         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
8325         given by DW_OP_bit_piece.
8326         (write_pieced_value): Likewise.
8327
8328 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8329
8330         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
8331         some other preparations to the places where sufficient information
8332         is available.
8333         (write_pieced_value): Likewise.
8334
8335 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8336
8337         * dwarf2loc.c (bits_to_bytes): New function.
8338         (read_pieced_value): Fix offset calculations for register pieces
8339         on big-endian targets.
8340         (write_pieced_value): Likewise.
8341
8342 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8343
8344         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
8345         (write_pieced_value): Likewise.
8346
8347 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8348
8349         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
8350         transfer the source value's least significant bits, instead of its
8351         lowest-addressed ones.  Rename type_len to max_offset.
8352         (read_pieced_value): Mirror above changes to write_pieced_value as
8353         applicable.
8354
8355 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8356
8357         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
8358         truncate full bytes from dest_offset_bits before using it as an
8359         offset into the buffer.
8360
8361 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8362
8363         * dwarf2loc.c (write_pieced_value): Include transfer size in
8364         byte-wise check.
8365
8366 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8367
8368         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
8369         calculation of this_size.
8370
8371 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8372
8373         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
8374         when targeting a bit-field.
8375         (write_pieced_value): Likewise.
8376
8377 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8378
8379         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
8380         (allocate_piece_closure): Drop addr_size parameter.
8381         (dwarf2_evaluate_loc_desc_full): Adjust call to
8382         allocate_piece_closure.
8383
8384 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8385
8386         PR gdb/21226
8387         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
8388         the LSB end, independent of endianness.
8389
8390 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8391
8392         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
8393         size capping.
8394
8395 2017-06-13  Yao Qi  <yao.qi@linaro.org>
8396
8397         * mips-linux-nat.c: Move include features/mips*-linux.c to
8398         mips-linux-tdep.c.
8399         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
8400         to mips-linux-tdep.c.
8401         * mips-linux-tdep.c: Include features/mips*-linux.c
8402         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
8403         functions.
8404         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
8405         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
8406         (tdesc_mips64_dsp_linux): Declare.
8407
8408 2017-06-12  Tom Tromey  <tom@tromey.com>
8409
8410         * valprint.h (val_print_type_code_int): Remove.
8411         * valprint.c (generic_val_print_int): Always call
8412         val_print_scalar_formatted.
8413         (val_print_type_code_int): Remove.
8414         * printcmd.c (print_scalar_formatted): Handle options->format==0.
8415         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
8416         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
8417         * ada-valprint.c (ada_val_print_num): Use
8418         val_print_scalar_formatted.
8419
8420 2017-06-12  Tom Tromey  <tom@tromey.com>
8421
8422         * printcmd.c (print_scalar_formatted): Unify the two switches.
8423         Don't convert scalars to LONGEST.
8424
8425 2017-06-12  Tom Tromey  <tom@tromey.com>
8426
8427         PR exp/16225:
8428         * valprint.h (print_decimal_chars): Update.
8429         * valprint.c (maybe_negate_by_bytes): New function.
8430         (print_decimal_chars): Add "is_signed" argument.
8431         * printcmd.c (print_scalar_formatted): Update.
8432
8433 2017-06-12  Tom Tromey  <tom@tromey.com>
8434
8435         PR exp/16225:
8436         * valprint.h (print_binary_chars, print_hex_chars): Update.
8437         * valprint.c (val_print_type_code_int): Update.
8438         (print_binary_chars): Add "zero_pad" argument.
8439         (emit_octal_digit): New function.
8440         (print_octal_chars): Don't zero-pad.
8441         (print_decimal_chars): Likewise.
8442         (print_hex_chars): Add "zero_pad" argument.
8443         * sh64-tdep.c (sh64_do_fp_register): Update.
8444         * regcache.c (regcache::dump): Update.
8445         * printcmd.c (print_scalar_formatted): Update.
8446         * infcmd.c (default_print_one_register_info): Update.
8447
8448 2017-06-12  Pedro Alves  <palves@redhat.com>
8449             Alan Hayward  <alan.hayward@arm.com>
8450
8451         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
8452         (mips_eabi_push_dummy_call): Rename local 'regsize' to
8453         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
8454         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
8455         Assert that abi_regsize bytes fit in 'ref_valbuf'.
8456
8457 2017-06-12  Pedro Alves  <palves@redhat.com>
8458
8459         * dwarf2read.c (mapped_symtab::data): Now a vector of
8460         symtab_index_entry instead of vector of
8461         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
8462         whether an element's name is NULL instead of checking whether the
8463         element itself is NULL.
8464         (find_slot): Change return type.  Adjust.
8465         (hash_expand, , add_index_entry, uniquify_cu_indices)
8466         (write_hash_table): Adjust.
8467
8468 2017-06-12  Pedro Alves  <palves@redhat.com>
8469
8470         * dwarf2read.c (recursively_count_psymbols): New function.
8471         (write_psymtabs_to_index): Call it to compute number of psyms and
8472         pass estimate size of psyms_seen to unordered_set's ctor.
8473
8474 2017-06-12  Pedro Alves  <palves@redhat.com>
8475
8476         * dwarf2read.c (write_hash_table): Check if key already exists
8477         before emplacing.
8478
8479 2017-06-12  Pedro Alves  <palves@redhat.com>
8480
8481         * dwarf2read.c (data_buf::append_space): Rename to...
8482         (data_buf::grow): ... this, and make private.  Adjust all callers.
8483         (data_buf::append_uint): New method.
8484         (add_address_entry, write_one_signatured_type)
8485         (write_psymtabs_to_index): Use it.
8486
8487 2017-06-12  Pedro Alves  <palves@redhat.com>
8488
8489         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
8490         (file_write (FILE *, const std::vector<Elem>&)): Delete.
8491         (data_buf::file_write): Call ::fwrite directly.
8492
8493 2017-06-12  Pedro Alves  <palves@redhat.com>
8494
8495         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
8496         std::vector::erase.
8497
8498 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8499
8500         Code cleanup: C++ify .gdb_index producer.
8501         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
8502         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
8503         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
8504         (create_strtab, add_string): Remove.
8505         (file_write, data_buf): New.
8506         (struct symtab_index_entry): Use std::vector for cu_indices.
8507         (struct mapped_symtab): Use std::vector for data.
8508         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
8509         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
8510         Remove.
8511         (find_slot): Change return type.  Update it to the new data structures.
8512         (hash_expand, add_index_entry): Update it to the new data structures.
8513         (offset_type_compare): Remove.
8514         (uniquify_cu_indices): Update it to the new data structures.
8515         (c_str_view, c_str_view_hasher, vector_hasher): New.
8516         (add_indices_to_cpool): Remove.
8517         (write_hash_table): Update it to the new data structures.
8518         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
8519         (eq_psymtab_cu_index): Remove.
8520         (psym_index_map): New typedef.
8521         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
8522         reference and std::unordered_map for cu_index_htab.
8523         (add_address_entry, add_address_entry_worker, write_address_map)
8524         (write_psymbols): Update it to the new data structures.
8525         (write_obstack): Remove.
8526         (struct signatured_type_index_data): Change types_list to a data_buf
8527         reference and psyms_seen to a std::unordered_set reference.
8528         (write_one_signatured_type, recursively_write_psymbols)
8529         (write_psymtabs_to_index): Update it to the new data structures.
8530
8531 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
8532
8533         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
8534         separate-debug-file commands.
8535         * symfile.h (separate_debug_file_debug): New global.
8536         * symfile.c (separate_debug_file_debug): New global.
8537         (separate_debug_file_exists, find_separate_debug_file): Add
8538         debug output.
8539         (_initialize_symfile): Add "set debug separate-debug-file"
8540         command.
8541         * build-id.c (build_id_to_debug_bfd,
8542         find_separate_debug_file_by_buildid): Add debug output.
8543
8544 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8545
8546         * gdbarch.sh (displaced_step_free_closure): Remove.
8547         * gdbarch.h, gdbarch.c: Re-generate.
8548         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
8549         displaced_step_free_closure.
8550         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
8551         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
8552         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8553         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8554         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8555         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8556         * arch-utils.h (simple_displaced_step_free_closure): Remove.
8557         * arch-utils.c (simple_displaced_step_free_closure): Remove.
8558         * infrun.c (displaced_step_clear): Call xfree instead of
8559         gdbarch_displaced_step_free_closure.
8560
8561 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
8562
8563         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
8564         NULL".
8565
8566 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
8567
8568         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
8569         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
8570         (mn10300_push_dummy_call): Likewise.
8571
8572 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8573
8574         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
8575
8576 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8577
8578         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
8579
8580 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8581
8582         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
8583         able to start inferiors using a shell.
8584         (New remote packets): Announce new packet "QStartupWithShell".
8585         * remote.c: Add PACKET_QStartupWithShell.
8586         (extended_remote_create_inferior): Handle new
8587         PACKET_QStartupWithShell.
8588         (remote_protocol_features) <QStartupWithShell>: New entry for
8589         PACKET_QStartupWithShell.
8590         (_initialize_remote): Call "add_packet_config_cmd" for
8591         QStartupShell.
8592
8593 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8594             Pedro Alves  <palves@redhat.com>
8595
8596         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8597         and "nat/fork-inferior.h".
8598         * common/common-inferior.h: New file, with contents from
8599         "gdb/inferior.h".
8600         * commom/common-utils.c: Include "common-utils.h".
8601         (stringify_argv): New function.
8602         * common/common-utils.h (stringify_argv): New prototype.
8603         * configure.nat: Add "fork-inferior.o" as a dependency for
8604         "*linux*", "fbsd*" and "nbsd*" hosts.
8605         * corefile.c (get_exec_file): Update comment.
8606         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
8607         instead of "startup_inferior".
8608         (darwin_create_inferior): Call "add_thread_silent" after
8609         "fork_inferior".
8610         * fork-child.c: Cleanup unnecessary includes.
8611         (SHELL_FILE): Move to "common/common-fork-child.c".
8612         (environ): Likewise.
8613         (exec_wrapper): Initialize.
8614         (get_exec_wrapper): New function.
8615         (breakup_args): Move to "common/common-fork-child.c"; rename to
8616         "breakup_args_for_exec".
8617         (escape_bang_in_quoted_argument): Move to
8618         "common/common-fork-child.c".
8619         (saved_ui): New variable.
8620         (prefork_hook): New function.
8621         (postfork_hook): Likewise.
8622         (postfork_child_hook): Likewise.
8623         (gdb_startup_inferior): Likewise.
8624         (fork_inferior): Move to "common/common-fork-child.c".  Update
8625         function to support gdbserver.
8626         (startup_inferior): Likewise.
8627         * gdbcore.h (get_exec_file): Remove declaration.
8628         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8629         instead of "startup_inferior".  Call "add_thread_silent" after
8630         "fork_inferior".
8631         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8632         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8633         instead of "startup_inferior".  Call "add_thread_silent" after
8634         "fork_inferior".
8635         * inferior.h: Include "common-inferior.h".
8636         (trace_start_error): Move to "common/common-utils.h".
8637         (trace_start_error_with_name): Likewise.
8638         (fork_inferior): Move prototype to "nat/fork-inferior.h".
8639         (startup_inferior): Likewise.
8640         (gdb_startup_inferior): New prototype.
8641         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8642         * nat/fork-inferior.h: New file.
8643         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8644         instead of "startup_inferior".  Call "add_thread_silent" after
8645         "fork_inferior".
8646         * target.h (target_terminal_init): Move prototype to
8647         "target/target.h".
8648         (target_terminal_inferior): Likewise.
8649         (target_terminal_ours): Likewise.
8650         * target/target.h (target_terminal_init): New prototype, moved
8651         from "target.h".
8652         (target_terminal_inferior): Likewise.
8653         (target_terminal_ours): Likewise.
8654         * utils.c (gdb_flush_out_err): New function.
8655
8656 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8657
8658         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8659         * common/common-gdbthread.h: New file, with parts from
8660         "gdb/gdbthread.h".
8661         * gdbthread.h: Include "common-gdbthread.h".
8662         (switch_to_thread): Moved to "common/common-gdbthread.h".
8663
8664 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8665
8666         * Makefile.in (SFILES): Add "common/job-control.c".
8667         (HFILES_NO_SRCDIR): Add "common/job-control.h".
8668         (COMMON_OBS): Add "job-control.o".
8669         * common/job-control.c: New file, with contents from
8670         "gdb/inflow.c".
8671         * common/job-control.h: New file, with contents from "terminal.h".
8672         * fork-child.c: Include "job-control.h".
8673         * inflow.c: Include "job-control.h".
8674         (gdb_setpgid): Move to "common/common-inflow.c".
8675         (_initialize_inflow): Move setting of "job_control" to
8676         "handle_job_control".
8677         * terminal.h (job_control): Moved to "common/common-terminal.h".
8678         (gdb_setpgid): Likewise.
8679         * top.c: Include "job_control.h".
8680         * utils.c: Likewise.
8681         (job_control): Moved to "job-control.c".
8682
8683 2017-06-07  Pedro Alves  <palves@redhat.com>
8684
8685         * Makefile.in (SFILES): Add gdb_regex.c.
8686         (COMMON_OBS): Add gdb_regex.o.
8687         * ada-lang.c (ada_add_standard_exceptions)
8688         (ada_add_exceptions_from_frame, name_matches_regex)
8689         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8690         parameter type to compiled_regex.  Adjust.
8691         (ada_exceptions_list): Use compiled_regex.
8692         * break-catch-throw.c (exception_catchpoint::pattern): Now a
8693         std::unique_ptr<compiled_regex>.
8694         (exception_catchpoint::~exception_catchpoint): Remove regfree
8695         call.
8696         (check_status_exception_catchpoint): Adjust to use compiled_regex.
8697         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8698         * breakpoint.c (solib_catchpoint::compiled): Now a
8699         std::unique_ptr<compiled_regex>.
8700         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8701         (check_status_catch_solib): Adjust to use compiled_regex.
8702         (add_solib_catchpoint): Adjust to use compiled_regex.
8703         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8704         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8705         compiled_regex reference.  Adjust to use it.
8706         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8707         declaration.  Include "gdb_regex.h".
8708         (apropos_cmd): Change regex parameter to compiled_regex reference.
8709         * gdb_regex.c: New file.
8710         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8711         declarations.
8712         (class compiled_regex): New.
8713         * linux-tdep.c: Include "common/gdb_optional.h".
8714         (struct mapping_regexes): New, factored out from
8715         mapping_is_anonymous_p, and adjusted to use compiled_regex.
8716         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8717         gdb::optional and remove cleanups.  Adjust to compiled_regex.
8718         * probe.c: Include "common/gdb_optional.h".
8719         (collect_probes): Use compiled_regex and gdb::optional and remove
8720         cleanups.
8721         * skip.c: Include "common/gdb_optional.h".
8722         (skiplist_entry::compiled_function_regexp): Now a
8723         gdb::optional<compiled_regex>.
8724         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8725         (free_skiplist_entry): Remove regfree call.
8726         (compile_skip_regexp, skip_rfunction_p): Adjust to use
8727         compiled_regex and gdb::optional.
8728         * symtab.c: Include "common/gdb_optional.h".
8729         (search_symbols): Use compiled_regex and gdb::optional.
8730         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8731         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
8732         to gdb_regex.c.
8733
8734 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8735
8736         * regcache.c (regcache::save): Avoid buffer use.
8737         (regcache::dump): Likewise.
8738
8739 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8740
8741         * sh-tdep.c (sh_pseudo_register_read): Remove
8742         MAX_REGISTER_SIZE.
8743         (sh_pseudo_register_write): Likewise.
8744         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8745         (sh64_pseudo_register_write): Likewise
8746
8747 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8748
8749         * aarch64-tdep.c (aarch64_store_return_value): Use
8750         V_REGISTER_SIZE.
8751         (aarch64_pseudo_read_value): Likewise.
8752         (aarch64_pseudo_write): Likewise.
8753
8754 2017-06-06  Yao Qi  <yao.qi@linaro.org>
8755
8756         * regformats/regdef.h (set_register_cache): Remove the
8757         declaration.
8758
8759 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
8760
8761         * frame.c (frame_unwind_register_signed): Use
8762         frame_unwind_register_value.
8763
8764 2017-06-06  Pedro Alves  <palves@redhat.com>
8765
8766         PR breakpoints/21553
8767         * breakpoint.c (create_breakpoints_sal_default)
8768         (init_breakpoint_sal, create_breakpoint_sal): Use
8769         gdb::unique_xmalloc_ptr for string parameters.
8770         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8771         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
8772         (base_breakpoint_create_breakpoints_sal)
8773         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8774         (strace_marker_create_breakpoints_sal)
8775         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8776         string parameters.
8777         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8778         gdb::unique_xmalloc_ptr for string parameters.
8779         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8780         parameters.
8781
8782 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8783
8784         * alpha-tdep.c (alpha_register_to_value): Use
8785         get_frame_register_value.
8786         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8787
8788 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8789
8790         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8791         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8792         (ia64_value_to_register): Likewise.
8793         (ia64_extract_return_value): Likewise.
8794         (ia64_store_return_value): Likewise.
8795         (ia64_push_dummy_call): Likewise.
8796
8797 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
8798
8799         GDB 8.0 released.
8800
8801 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
8802
8803         * x86-linux-nat.c (struct arch_lwp_info): Remove.
8804
8805 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
8806
8807         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8808         parameter.
8809         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8810
8811 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8812
8813         * event-loop.c (poll_timers): Unallocate timer using delete
8814         instead of xfree.
8815
8816 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8817
8818         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8819         (struct breakpoint) <~breakpoint>: New.
8820         (struct watchpoint): Inherit from breakpoint.
8821         <~watchpoint>: New.
8822         <base>: Remove.
8823         (struct tracepoint): Inherit from breakpoint.
8824         <base>: Remove.
8825         * breakpoint.c (longjmp_breakpoint_ops): Remove.
8826         (struct longjmp_breakpoint): Inherit from breakpoint.
8827         <~longjmp_breakpoint>: New.
8828         <base>: Remove.
8829         (new_breakpoint_from_type): Remove casts.
8830         (watchpoint_in_thread_scope): Remove reference to base field.
8831         (watchpoint_del_at_next_stop): Likewise.
8832         (update_watchpoint): Likewise.
8833         (watchpoint_check): Likewise.
8834         (bpstat_check_watchpoint): Likewise.
8835         (set_longjmp_breakpoint): Likewise.
8836         (struct fork_catchpoint): Inherit from breakpoint.
8837         <base>: Remove.
8838         (struct solib_catchpoint): Inherit from breakpoint.
8839         <~solib_catchpoint>: New.
8840         <base>: Remove.
8841         (dtor_catch_solib): Change to ...
8842         (solib_catchpoint::~solib_catchpoint): ... this.
8843         (breakpoint_hit_catch_solib): Remove reference to base field.
8844         (add_solib_catchpoint): Likewise.
8845         (create_fork_vfork_event_catchpoint): Likewise.
8846         (struct exec_catchpoint): Inherit from breakpoint.
8847         <~exec_catchpoint>: New.
8848         <base>: Remove.
8849         (dtor_catch_exec): Change to ...
8850         (exec_catchpoint::~exec_catchpoint): ... this.
8851         (dtor_watchpoint): Change to ...
8852         (watchpoint::~watchpoint): ... this.
8853         (watch_command_1): Remove reference to base field.
8854         (catch_exec_command_1): Likewise.
8855         (base_breakpoint_dtor): Change to ...
8856         (breakpoint::~breakpoint): ... this.
8857         (base_breakpoint_ops): Remove dtor field value.
8858         (longjmp_bkpt_dtor): Change to ...
8859         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8860         (strace_marker_create_breakpoints_sal): Remove reference to base
8861         field.
8862         (delete_breakpoint): Don't manually call breakpoint destructor.
8863         (create_tracepoint_from_upload): Remove reference to base field.
8864         (trace_pass_set_count): Likewise.
8865         (initialize_breakpoint_ops): Don't initialize
8866         momentary_breakpoint_ops, don't set dtors.
8867         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8868         <~ada_catchpoint>: New.
8869         <base>: Remove.
8870         (create_excep_cond_exprs): Remove reference to base field.
8871         (dtor_exception): Change to ...
8872         (ada_catchpoint::~ada_catchpoint): ... this.
8873         (dtor_catch_exception): Remove.
8874         (dtor_catch_exception_unhandled): Remove.
8875         (dtor_catch_assert): Remove.
8876         (create_ada_exception_catchpoint): Remove reference to base
8877         field.
8878         (initialize_ada_catchpoint_ops): Don't set dtors.
8879         * break-catch-sig.c (struct signal_catchpoint): Inherit from
8880         breakpoint.
8881         <~signal_catchpoint>: New.
8882         <base>: Remove.
8883         (signal_catchpoint_dtor): Change to ...
8884         (signal_catchpoint::~signal_catchpoint): ... this.
8885         (create_signal_catchpoint): Remove reference to base field.
8886         (initialize_signal_catchpoint_ops): Don't set dtor.
8887         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8888         from breakpoint.
8889         <~syscall_catchpoint>: New.
8890         <base>: Remove.
8891         (dtor_catch_syscall): Change to ...
8892         (syscall_catchpoint::~syscall_catchpoint): ... this.
8893         (create_syscall_event_catchpoint): Remove reference to base
8894         field.
8895         (initialize_syscall_catchpoint_ops): Don't set dtor.
8896         * break-catch-throw.c (struct exception_catchpoint): Inherit
8897         from breakpoint.
8898         <~exception_catchpoint>: New.
8899         <base>: Remove.
8900         (dtor_exception_catchpoint): Change to ...
8901         (exception_catchpoint::~exception_catchpoint): ... this.
8902         (handle_gnu_v3_exceptions): Remove reference to base field.
8903         (initialize_throw_catchpoint_ops): Don't set dtor.
8904         * ctf.c (ctf_get_traceframe_address): Remove reference to base
8905         field.
8906         * remote.c (remote_get_tracepoint_status): Likewise.
8907         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8908         * tracefile.c (tracefile_fetch_registers): Likewise.
8909         * tracepoint.c (actions_command): Likewise.
8910         (validate_actionline): Likewise.
8911         (tfind_1): Likewise.
8912         (get_traceframe_location): Likewise.
8913         (find_matching_tracepoint_location): Likewise.
8914         (parse_tracepoint_status): Likewise.
8915         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8916
8917 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8918
8919         * breakpoint.c (struct longjmp_breakpoint): New struct.
8920         (is_tracepoint_type): Change return type to bool.
8921         (is_longjmp_type): New function.
8922         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8923         (set_raw_breakpoint_without_location): Use
8924         new_breakpoint_from_type.
8925         (set_raw_breakpoint): Likewise.
8926
8927 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8928
8929         * breakpoint.c (new_breakpoint_from_type): New function.
8930         (create_breakpoint_sal): Use new_breakpoint_from_type and
8931         unique_ptr.
8932         (create_breakpoint): Likewise.
8933
8934 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
8935
8936         * memattr.c (mem_info_command): Rename to ...
8937         (info_mem_command): ... this.
8938         (mem_enable_command): Rename to ...
8939         (enable_mem_command): ... this.
8940         (mem_disable_command): Rename to ...
8941         (disable_mem_command): ... this.
8942         (mem_delete_command): Rename to ...
8943         (delete_mem_command): ... this.
8944         (_initialize_mem): Adjust function names.
8945
8946 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8947
8948         * btrace.c (handle_pt_insn_events): New.
8949         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
8950         STATUS.  Split into this and ...
8951         (handle_pt_insn_event_flags): ... this.
8952
8953 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8954
8955         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8956         and struct pt_insn.resynced.
8957         * configure: Regenerated.
8958         * config.in: Regenerated.
8959
8960 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8961
8962         * btrace.c (ftrace_find_call_by_number): New function.
8963         (ftrace_new_function): Store objects, not pointers.
8964         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8965         ftrace_new_gap, ftrace_update_function,
8966         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8967         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8968         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8969         btrace_ends_with_single_insn, btrace_call_get): Account for
8970         btrace_thread_info::functions now storing objects.
8971         * btrace.h (struct btrace_thread_info): Add constructor.
8972         (struct btrace_thread_info) <functions>: Make std::vector.
8973         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8974         Initialize with default values.
8975         * record-btrace.c (record_btrace_frame_sniffer): Account for
8976         btrace_thread_info::functions now storing objects.
8977
8978 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8979
8980         * btrace.c: Remove typedef bfun_s.
8981         (ftrace_new_gap): Directly add gaps to the list of gaps.
8982         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8983         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
8984         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
8985         instead of gdb VEC.
8986
8987 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8988
8989         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
8990         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
8991         with btrace_thread_info::next_segment and
8992         btrace_thread_info::prev_segment.
8993         * btrace.h: Remove struct btrace_func_link.
8994         (struct btrace_function): Replace pair of function segment pointers
8995         with pair of indices.
8996         * python/py-record-btrace.c (btpy_call_prev_sibling,
8997         btpy_call_next_sibling): Replace references to
8998         btrace_thread_info::segment with btrace_thread_info::next_segment and
8999         btrace_thread_info::prev_segment.
9000         * record-btrace.c (record_btrace_frame_this_id): Use
9001         btrace_find_call_by_number.
9002
9003 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9004
9005         * btrace.c (ftrace_new_function, ftrace_fixup_level,
9006         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
9007         btrace_insn_next, btrace_insn_prev): Remove references to
9008         btrace_thread_info::flow.
9009         * btrace.h (struct btrace_function): Remove FLOW.
9010
9011 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9012
9013         * btrace.c (ftrace_find_call_by_number): New function.
9014         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
9015         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
9016         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
9017         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
9018         index.
9019         * btrace.h (struct btrace_function): Turn UP into an index.
9020         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
9021         as an index.
9022         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
9023         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
9024         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
9025
9026 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9027
9028         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9029         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9030         ftrace_update_function, ftrace_compute_global_level_offset,
9031         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9032         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9033         btrace_insn_end, btrace_is_empty): Remove references to
9034         btrace_thread_info::begin and btrace_thread_info::end.
9035         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9036         (struct btrace_thread_info) <functions>: Adjust comment.
9037         * record-btrace.c (record_btrace_start_replaying): Remove reference to
9038         btrace_thread_info::begin.
9039
9040 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9041
9042         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9043         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9044         ftrace_update_function): Remove arguments that implicitly were always
9045         BTINFO->END.
9046         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9047         Don't pass BTINFO->END.
9048
9049 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9050
9051         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9052         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9053         btrace_find_insn_by_number): Replace function segment pointer with
9054         index.
9055         (btrace_insn_cmp): Simplify.
9056         * btrace.h: (struct btrace_insn_iterator) Rename index to
9057         insn_index.  Replace function segment pointer with index into function
9058         segment vector.
9059         * record-btrace.c (record_btrace_call_history): Replace function
9060         segment pointer use with index.
9061         (record_btrace_frame_sniffer): Retrieve function call segment through
9062         vector.
9063         (record_btrace_set_replay): Remove defunc't safety check.
9064
9065 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9066
9067         * btrace.c (btrace_ends_with_single_insn): New function.
9068         (btrace_call_get, btrace_call_number, btrace_call_begin,
9069         btrace_call_end, btrace_call_next, btrace_call_prev,
9070         btrace_find_call_by_number): Use index into call segment vector
9071         instead of pointer.
9072         (btrace_call_cmp): Simplify.
9073         * btrace.h (struct btrace_call_iterator): Replace function call segment
9074         pointer with index into vector.
9075         * record-btrace.c (record_btrace_call_history): Use index instead of
9076         pointer.
9077
9078 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9079
9080         * btrace.c (btrace_insn_begin, btrace_insn_end,
9081         btrace_find_insn_by_number): Add btinfo to iterator.
9082         * btrace.h (struct btrace_insn_iterator): Add btinfo.
9083
9084 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9085
9086         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9087         and save pointers directly.
9088         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9089         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9090         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
9091         changed signature of functions.
9092         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9093         (btrace_fetch): Remove code that adds btrace_function pointers to
9094         vector of btrace_functions.
9095         (btrace_clear): Simplify freeing vector of btrace_functions.
9096
9097 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9098
9099         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9100         Replace VEC_* with std::vector functions.
9101         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9102         (struct btrace_thread_info)<functions>: Change type to std::vector.
9103
9104 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9105
9106         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
9107         "Removed targets and native configurations" up.  Merge duplicate
9108         "New commands" sub-sections.  Add "New options" sub-sections.
9109
9110 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
9111
9112         * defs.h (copy_integer_to_size): New declaration.
9113         * findvar.c (copy_integer_to_size): New function.
9114         (do_cint_test): New selftest function.
9115         (copy_integer_to_size_test): Likewise.
9116         (_initialize_findvar): Likewise.
9117         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
9118         (mips_fbsd_collect_reg): Use raw_collect_integer.
9119         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
9120         (mips64_fill_gregset): Use raw_collect_integer
9121         (mips64_fill_fpregset): Use raw_supply_integer.
9122         * regcache.c (regcache::raw_supply_integer): New function.
9123         (regcache::raw_collect_integer): Likewise.
9124         * regcache.h: (regcache::raw_supply_integer): New declaration.
9125         (regcache::raw_collect_integer): Likewise.
9126
9127 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9128
9129         * Makefile.in (SFILES): Add gdbarch-selftests.c.
9130         (COMMON_OBS): Add gdbarch-selftests.o.
9131         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
9132         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
9133         * gdbarch-selftests.c: New file.
9134         * regcache.h (regcache) <~regcache>: Mark it virtual if
9135         GDB_SELF_TEST.
9136         <raw_write>: Likewise.
9137
9138 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9139
9140         * regcache.c (current_regcache): Change it to
9141         regcache::current_regcache.
9142         (regcache_observer_target_changed): Update.
9143         (regcache_thread_ptid_changed): Make it a regcache static
9144         method.
9145         (regcache_thread_ptid_changed): Update.
9146         (class regcache_access): New.
9147         (current_regcache_test): Update.
9148         (_initialize_regcache): Update.
9149         * regcache.h: Include forward_list.
9150         (regcache): Declare regcache_thread_ptid_changed and declare
9151         registers_changed_ptid as friend.
9152
9153 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9154
9155         * i387-tdep.c (i387_register_to_value): Use register_size
9156         instead of TYPE_LENGTH.
9157         * m68k-tdep.c (m68k_register_to_value): Likewise.
9158
9159 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9160
9161         * i387-tdep.c (i387_convert_register_p): Return false if type
9162         code isn't TYPE_CODE_FLT.
9163
9164 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9165
9166         * alpha-tdep.c (alpha_convert_register_p): Return true if type
9167         length is 4.
9168         (alpha_register_to_value): Remove type length check.
9169         (alpha_value_to_register): Likewise.
9170
9171 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9172
9173         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
9174         TYPE_CODE_FLT.
9175
9176 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9177
9178         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
9179         TYPE_CODE_FLT or not.
9180
9181 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9182
9183         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
9184         * avr-tdep.c (avr_gdbarch_init): Likewise.
9185         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9186         * cris-tdep.c (cris_gdbarch_init): Likewise.
9187         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9188         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9189         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9190         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
9191         * mep-tdep.c (mep_gdbarch_init): Likewise.
9192         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9193         * mips-tdep.c (mips_gdbarch_init): Likewise.
9194         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9195         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9196         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9197         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9198         * v850-tdep.c (v850_gdbarch_init): Likewise.
9199
9200 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9201
9202         * selftest-arch.c (tests_with_arch): Call registers_changed
9203         and reinit_frame_cache.
9204         * selftest.c (run_self_tests): Likewise.
9205
9206 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9207
9208         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
9209         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
9210
9211 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9212
9213         * rl78-tdep.c (rl78_gdbarch_init): Don't call
9214         set_gdbarch_print_insn.
9215
9216 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9217
9218         * h8300-tdep.c (h8300_gdbarch_init): Don't call
9219         set_gdbarch_print_insn.
9220
9221 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9222
9223         * alpha-tdep.c (alpha_gdbarch_init): Don't call
9224         set_gdbarch_print_insn.
9225         * arc-tdep.c (arc_gdbarch_init): Likewise.
9226         * arch-utils.c: include dis-asm.h.
9227         (default_print_insn): New function.
9228         * arch-utils.h (default_print_insn): Declare.
9229         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
9230         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9231         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
9232         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
9233         * frv-tdep.c (frv_gdbarch_init): Likewise.
9234         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9235         * gdbarch.sh (print_insn): Use default_print_insn.
9236         * gdbarch.c: Regenerated.
9237         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
9238         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
9239         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9240         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
9241         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9242         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
9243         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
9244         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
9245         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
9246         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9247         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9248         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9249         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9250         * mt-tdep.c (mt_gdbarch_init): Likewise.
9251         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9252         * nios2-tdep.c (nios2_print_insn): Remove.
9253         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
9254         * rx-tdep.c (rx_gdbarch_init): Likewise.
9255         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9256         * score-tdep.c (score_print_insn): Remove.
9257         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
9258         * sh-tdep.c (sh_gdbarch_init): Likewise.
9259         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9260         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9261         * tic6x-tdep.c (tic6x_print_insn): Remove.
9262         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
9263         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
9264         * v850-tdep.c (v850_gdbarch_init): Likewise.
9265         * vax-tdep.c (vax_gdbarch_init): Likewise.
9266         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9267         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
9268
9269 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
9270
9271         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
9272         (MIPS_FP0_REGNUM): Remove.
9273         (MIPS_FSR_REGNUM): Remove.
9274         (mips_fbsd_supply_fpregs): Use mips_regnum.
9275         (mips_fbsd_supply_gregs): Likewise.
9276         (mips_fbsd_collect_fpregs): Likewise.
9277         (mips_fbsd_collect_gregs): Likewise.
9278
9279 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
9280
9281         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
9282         (getpfpregs_supplies): New function.
9283         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
9284         getfpregs_supplies.
9285         (mips_fbsd_store_inferior_registers): Likewise.
9286
9287 2017-05-22  Pedro Alves <palves@redhat.com>
9288
9289         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
9290         maintainer.
9291
9292 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
9293
9294         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
9295         (store_register): Likewise.
9296         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
9297         (get_decimal_float_return_value): Likewise.
9298         (do_ppc_sysv_return_value): Likewise.
9299         (ppc64_sysv_abi_push_integer): Likewise.
9300         (ppc64_sysv_abi_push_freg): Likewise.
9301         (ppc64_sysv_abi_return_value_base): Likewise.
9302         (ppc64_sysv_abi_return_value): Likewise.
9303         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
9304         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
9305         * rs6000-nat.c: Likewise.
9306         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
9307         (rs6000_value_to_register): Likewise.
9308         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
9309
9310 2017-05-21  Tom Tromey  <tom@tromey.com>
9311
9312         PR rust/21466:
9313         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
9314         arrays as "[T]", not "[T; ]".
9315
9316 2017-05-19  Tom Tromey  <tom@tromey.com>
9317
9318         PR rust/21484:
9319         * rust-lang.c (exp_descriptor_rust): New function.
9320         (rust_language_defn): Use it.
9321         * p-lang.c (pascal_language_defn): Update.
9322         * opencl-lang.c (opencl_language_defn): Update.
9323         * objc-lang.c (objc_language_defn): Update.
9324         * m2-lang.c (m2_language_defn): Update.
9325         * language.h (struct language_defn)
9326         <la_watch_location_expression>: New member.
9327         * language.c (unknown_language_defn, auto_language_defn)
9328         (local_language_defn): Update.
9329         * go-lang.c (go_language_defn): Update.
9330         * f-lang.c (f_language_defn): Update.
9331         * d-lang.c (d_language_defn): Update.
9332         * c-lang.h (c_watch_location_expression): Declare.
9333         * c-lang.c (c_watch_location_expression): New function.
9334         (c_language_defn, cplus_language_defn, asm_language_defn)
9335         (minimal_language_defn): Use it.
9336         * breakpoint.c (watch_command_1): Call
9337         la_watch_location_expression.
9338         * ada-lang.c (ada_language_defn): Update.
9339
9340 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9341
9342         PR tui/21482
9343         * gdb_curses.h (NOMACROS): Define.
9344         (NCURSES_NOMACROS): Define.
9345
9346 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9347
9348         PR tui/21482
9349         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
9350         arg to char *.
9351         * tui/tui-wingeneral.c (box_win): Likewise.
9352         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
9353         (tui_show_source_line): Likewise.
9354         (tui_show_exec_info_content): Likewise.
9355
9356 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
9357
9358         * sparc-tdep.c (sparc_structure_return_p)
9359         (sparc_arg_on_registers_p): New functions.
9360         (sparc32_store_arguments): Use them.
9361         * sparc64-tdep.c (sparc64_16_byte_align_p)
9362         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
9363         Handle TYPE_CODE_ARRAY.
9364
9365 2017-05-17  Yao Qi  <yao.qi@linaro.org>
9366
9367         * cli/cli-decode.c (add_alias_cmd): New function.
9368         * command.h (add_alias_cmd): Declare.
9369         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
9370         instead call add_alias_cmd.
9371
9372 2017-05-17  Pedro Alves  <palves@redhat.com>
9373
9374         * Makefile.in (nat_extra_makefile_frag): Rename to ...
9375         (nat_makefile_frag): ... this.  All references updated.
9376         * configure.ac: Likewise.
9377         * configure.nat: Likewise.  Enhance comments.
9378         * configure: Regenerate.
9379
9380 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9381
9382         * procfs.c (procfs_create_inferior): Change prototype to match
9383         definition.
9384
9385 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
9386
9387         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
9388         C++ compiler warning.
9389
9390 2017-05-12  Tom Tromey  <tom@tromey.com>
9391
9392         PR rust/21483:
9393         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
9394         recurse, just call value_struct_elt directly.
9395
9396 2017-05-12  Tom Tromey  <tom@tromey.com>
9397
9398         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
9399         OP_RUST_ARRAY>: Fix.
9400
9401 2017-05-12  Tom Tromey  <tom@tromey.com>
9402
9403         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
9404
9405 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9406
9407         * regcache.c: Include <forward_list>.
9408         (struct regcache_list): Remove.
9409         (current_regcache): Update.
9410         (get_thread_arch_aspace_regcache): Update for std::forward_list.
9411         (regcache_thread_ptid_changed): Likewise.
9412         (registers_changed_ptid): Likewise.
9413         (current_regcache_size): Likewise.
9414
9415 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9416
9417         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
9418         (current_regcache_size): New function.
9419         (current_regcache_test): New function.
9420         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
9421
9422 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9423
9424         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
9425         (print_gp_register_row): Use get_frame_register_value.
9426
9427 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9428
9429         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
9430         (mips_supply_fpregset): Likewise.
9431         (mips64_supply_gregset): Likewise.
9432
9433 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9434
9435         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
9436         regcache->raw_supply_zeroed.
9437
9438 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9439
9440         * configure.nat: Rearrange 'case' statements to match
9441         host before cpu.
9442
9443 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9444
9445         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
9446         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
9447         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
9448         "@nat_extra_makefile_frag@".
9449         (Makefile): Remove dependency on "@frags@".
9450         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
9451         (data-directory/Makefile): Likewise.
9452         * config/aarch64/linux.mh: Deleted; moved contents to
9453         "gdb/configure.nat".
9454         * config/alpha/alpha-linux.mh: Likewise.
9455         * config/alpha/nbsd.mh: Likewise.
9456         * config/arm/linux.mh: Likewise.
9457         * config/arm/nbsdelf.mh: Likewise.
9458         * config/i386/cygwin.mh: Likewise.
9459         * config/i386/cygwin64.mh: Likewise.
9460         * config/i386/darwin.mh: Likewise.
9461         * config/i386/fbsd.mh: Likewise.
9462         * config/i386/fbsd64.mh: Likewise.
9463         * config/i386/go32.mh: Likewise.
9464         * config/i386/i386gnu.mh: Likewise.
9465         * config/i386/i386sol2.mh: Likewise.
9466         * config/i386/linux.mh: Likewise.
9467         * config/i386/linux64.mh: Likewise.
9468         * config/i386/mingw.mh: Likewise.
9469         * config/i386/mingw64.mh: Likewise.
9470         * config/i386/nbsd64.mh: Likewise.
9471         * config/i386/nbsdelf.mh: Likewise.
9472         * config/i386/nto.mh: Likewise.
9473         * config/i386/obsd.mh: Likewise.
9474         * config/i386/obsd64.mh: Likewise.
9475         * config/i386/sol2-64.mh: Likewise.
9476         * config/ia64/linux.mh: Likewise.
9477         * config/m32r/linux.mh: Likewise.
9478         * config/m68k/linux.mh: Likewise.
9479         * config/m68k/nbsdelf.mh: Likewise.
9480         * config/m68k/obsd.mh: Likewise.
9481         * config/m88k/obsd.mh: Likewise.
9482         * config/mips/fbsd.mh: Likewise.
9483         * config/mips/linux.mh: Likewise.
9484         * config/mips/nbsd.mh: Likewise.
9485         * config/mips/obsd64.mh: Likewise.
9486         * config/pa/linux.mh: Likewise.
9487         * config/pa/nbsd.mh: Likewise.
9488         * config/pa/obsd.mh: Likewise.
9489         * config/powerpc/aix.mh: Likewise.
9490         * config/powerpc/fbsd.mh: Likewise.
9491         * config/powerpc/linux.mh: Likewise.
9492         * config/powerpc/nbsd.mh: Likewise.
9493         * config/powerpc/obsd.mh: Likewise.
9494         * config/powerpc/ppc64-linux.mh: Likewise.
9495         * config/powerpc/spu-linux.mh: Likewise.
9496         * config/s390/linux.mh: Likewise.
9497         * config/sh/nbsd.mh: Likewise.
9498         * config/sparc/fbsd.mh: Likewise.
9499         * config/sparc/linux.mh: Likewise.
9500         * config/sparc/linux64.mh: Likewise.
9501         * config/sparc/nbsd64.mh: Likewise.
9502         * config/sparc/nbsdelf.mh: Likewise.
9503         * config/sparc/obsd64.mh: Likewise.
9504         * config/sparc/sol2.mh: Likewise.
9505         * config/tilegx/linux.mh: Likewise.
9506         * config/vax/nbsdelf.mh: Likewise.
9507         * config/vax/obsd.mh: Likewise.
9508         * config/xtensa/linux.mh: Likewise.
9509         * config/i386/i386gnu.mn: New file, with excerpts from
9510         "config/i386/i386gnu.mh".
9511         * configure: Regenerate.
9512         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
9513         *.mh files under "gdb/config".
9514         * configure.nat: New file, with contents from the
9515         "gdb/config/*/*.mh" files.
9516
9517 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
9518
9519         * btrace.c (btrace_clear): Free insn vector.
9520
9521 2017-05-05  Pedro Alves  <palves@redhat.com>
9522
9523         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
9524         * configure: Regenerate.
9525
9526 2017-05-04  Pedro Alves  <palves@redhat.com>
9527
9528         * Makefile.in (SFILES): Add progspace-and-thread.c.
9529         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
9530         (COMMON_OBS): Add progspace-and-thread.o.
9531         * breakpoint.c: Include "progspace-and-thread.h".
9532         (update_inserted_breakpoint_locations)
9533         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
9534         Use scoped_restore_current_pspace_and_thread.
9535         (create_std_terminate_master_breakpoint): Use
9536         scoped_restore_current_program_space.
9537         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
9538         (print_breakpoint_location): Use
9539         scoped_restore_current_program_space.
9540         (bp_loc_is_permanent): Use
9541         scoped_restore_current_pspace_and_thread.
9542         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
9543         (download_tracepoint_locations): Use
9544         scoped_restore_current_pspace_and_thread.
9545         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
9546         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
9547         (enum step_over_calls_kind): Moved from inferior.h.
9548         (class scoped_restore_current_thread): New class.
9549         * gdbthread.h (make_cleanup_restore_current_thread): Delete
9550         declaration.
9551         (scoped_restore_current_thread): New class.
9552         * infcmd.c: Include "common/gdb_optional.h".
9553         (continue_1, proceed_after_attach): Use
9554         scoped_restore_current_thread.
9555         (notice_new_inferior): Use scoped_restore_current_thread.
9556         * inferior.c: Include "progspace-and-thread.h".
9557         (restore_inferior, save_current_inferior): Delete.
9558         (add_inferior_command, clone_inferior_command): Use
9559         scoped_restore_current_pspace_and_thread.
9560         * inferior.h (scoped_restore_current_inferior): New class.
9561         * infrun.c: Include "progspace-and-thread.h" and
9562         "common/gdb_optional.h".
9563         (follow_fork_inferior): Use
9564         scoped_restore_current_pspace_and_thread.
9565         (scoped_restore_exited_inferior): New class.
9566         (handle_vfork_child_exec_or_exit): Use
9567         scoped_restore_exited_inferior,
9568         scoped_restore_current_pspace_and_thread,
9569         scoped_restore_current_thread and scoped_restore.
9570         (fetch_inferior_event): Use scoped_restore_current_thread.
9571         * linespec.c (decode_line_full, decode_line_1): Use
9572         scoped_restore_current_program_space.
9573         * mi/mi-main.c: Include "progspace-and-thread.h".
9574         (exec_continue): Use scoped_restore_current_thread.
9575         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
9576         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
9577         * proc-service.c (ps_pglobal_lookup): Use
9578         scoped_restore_current_program_space.
9579         * progspace-and-thread.c: New file.
9580         * progspace-and-thread.h: New file.
9581         * progspace.c (release_program_space, clone_program_space): Use
9582         scoped_restore_current_program_space.
9583         (restore_program_space, save_current_program_space)
9584         (save_current_space_and_thread): Delete.
9585         (switch_to_program_space_and_thread): Moved to
9586         progspace-and-thread.c.
9587         * progspace.h (save_current_program_space)
9588         (save_current_space_and_thread): Delete declarations.
9589         (scoped_restore_current_program_space): New class.
9590         * remote.c (remote_btrace_maybe_reopen): Use
9591         scoped_restore_current_thread.
9592         * symtab.c: Include "progspace-and-thread.h".
9593         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9594         * thread.c (print_thread_info_1): Use
9595         scoped_restore_current_thread.
9596         (struct current_thread_cleanup): Delete.
9597         (do_restore_current_thread_cleanup)
9598         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
9599         (scoped_restore_current_thread::~scoped_restore_current_thread):
9600         ... this new dtor.
9601         (make_cleanup_restore_current_thread): Rename/convert to ...
9602         (scoped_restore_current_thread::scoped_restore_current_thread):
9603         ... this new ctor.
9604         (thread_apply_all_command): Use scoped_restore_current_thread.
9605         (thread_apply_command): Use scoped_restore_current_thread.
9606         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
9607         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9608
9609 2017-05-04  Pedro Alves  <palves@redhat.com>
9610
9611         * thread.c (make_cleanup_restore_current_thread): Move
9612         find_thread_ptid call before the is_stopped call.  Assert that the
9613         thread is found.  Replace is_stopped call by checking the thread's
9614         state directly.  Remove unnecessary NULL-thread check.
9615
9616 2017-05-04  Pedro Alves  <palves@redhat.com>
9617
9618         * corelow.c (thread_section_name): New class.
9619         (get_core_register_section, get_core_siginfo): Use it.
9620
9621 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9622
9623         * corelow.c (sniff_core_bfd): Remove extra semicolon.
9624         (get_core_register_section): Remove xfree of NULL pointer.
9625
9626 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
9627
9628         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9629         * regcache.c (regcache::raw_supply_zeroed): New function.
9630         * regcache.h (regcache::raw_supply_zeroed): New declaration.
9631
9632 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9633
9634         * gdbarch.sh: Remove commented out definition of
9635         TARGET_CHAR_BIT.
9636         * gdbarch.h: Re-generate.
9637
9638 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
9639
9640         * configure: Regenerate.
9641
9642 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
9643
9644         * solib-target.c (solib_target_relocate_section_addresses):
9645         Remove num_section_bases, num_bases, segment_bases variables.
9646
9647 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9648
9649         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9650
9651 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9652
9653         * solib-target.c: Include <vector>
9654         (struct lm_info_target) <~lm_info_target>: Remove.
9655         <segment_bases, section_bases>: Change type to
9656         std::vector<CORE_ADDR>.
9657         (library_list_start_segment, library_list_start_section,
9658         library_list_end_library,
9659         solib_target_relocate_section_addresses): Adjust.
9660
9661 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9662
9663         * gdbarch.sh (software_single_step): Change return type to
9664         std::vector<CORE_ADDR>.
9665         * gdbarch.c, gdbarch.h: Re-generate.
9666         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9667         Adjust.
9668         (arm_deal_with_atomic_sequence_raw): Adjust.
9669         (thumb_get_next_pcs_raw): Adjust.
9670         (arm_get_next_pcs_raw): Adjust.
9671         (arm_get_next_pcs): Adjust.
9672         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9673         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9674         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9675         (alpha_software_single_step): Adjust.
9676         * alpha-tdep.h (alpha_software_single_step): Adjust.
9677         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9678         * arm-tdep.c (arm_software_single_step): Adjust.
9679         (arm_breakpoint_kind_from_current_state): Adjust.
9680         * arm-tdep.h (arm_software_single_step): Adjust.
9681         * breakpoint.c (insert_single_step_breakpoint): Adjust.
9682         * cris-tdep.c (cris_software_single_step): Adjust.
9683         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9684         (micromips_deal_with_atomic_sequence): Adjust.
9685         (deal_with_atomic_sequence): Adjust.
9686         (mips_software_single_step): Adjust.
9687         * mips-tdep.h (mips_software_single_step): Adjust.
9688         * moxie-tdep.c (moxie_software_single_step): Adjust.
9689         * nios2-tdep.c (nios2_software_single_step): Adjust.
9690         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9691         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9692         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9693         * s390-linux-tdep.c (s390_software_single_step): Adjust.
9694         * sparc-tdep.c (sparc_software_single_step): Adjust.
9695         * spu-tdep.c (spu_software_single_step): Adjust.
9696         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9697
9698 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9699
9700         * gdbarch.sh: Use semi-colon as field separator instead of colon.
9701         * gdbarch.h: Re-generate.
9702
9703 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9704
9705         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9706         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9707         * python/py-instruction.c, python/py-instruction.h: New file.
9708         * python/py-record.c: Add py-instruction.h include.
9709         (gdbpy_initialize_record): Make gdb.Instruction a super class of
9710         gdb.RecordInstruction.
9711         * python/python-internal.h: Add gdbpy_initialize_instruction
9712         declaration.
9713         * python/python.c (do_start_initialization): Add
9714         gdbpy_initialize_instruction.
9715
9716 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9717
9718         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9719         Remove.
9720         (btrace_func_from_recpy_func): New function.
9721         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9722         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9723         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9724         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9725         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9726         Also, use new helper functions.
9727         (btpy_list_item): Use new helper functions.
9728         (recpy_bt_function_call_history): Use new type name.
9729         (btpy_call_getset): Remove.
9730         (gdbpy_initialize_btrace): Remove code to initialize
9731         gdb.BtraceFunctionCall.
9732         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9733         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9734         recpy_bt_func_prev, recpy_bt_func_next): New export.
9735         * python/py-record.c (recpy_func_type): New static object.
9736         (recpy_func_new, recpy_func_level, recpy_func_symbol,
9737         recpy_func_instructions, recpy_func_up, recpy_func_prev,
9738         recpy_func_next): New function.
9739         (recpy_element_hash, recpy_element_richcompare): Updated comment.
9740         (recpy_func_getset): New static object.
9741         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9742         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9743
9744 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9745
9746         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9747         (btpy_object, btpy_insn_type, btpy_new): Remove.
9748         (btpy_list_object): Use gdb.RecordInstruction type instead of
9749         gdb.BtraceInstruction type.
9750         (btrace_insn_from_recpy_insn): New function.
9751         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9752         btpy_new.
9753         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9754         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9755         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9756         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9757         instead of btpy_object.
9758         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9759         btpy_insn_data, btpy_insn_decode): Rename to ...
9760         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9761         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9762         recpy_bt_insn_decode): This.  Also, use new helper functions.
9763         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9764         recpy_insn_type.
9765         (btpy_insn_getset): Remove.
9766         (gdbpy_initialize_btrace): Remove code to initialize
9767         gdb.BtraceInstruction.  Use recpy_element_object.
9768         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9769         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9770         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9771         * python/py-record.c (recpy_insn_type): New static object.
9772         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9773         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9774         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9775         New function.
9776         (recpy_insn_getset): New static object.
9777         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9778         * python/py-record.h (recpy_element_object): New typedef.
9779         (recpy_insn_type, recpy_insn_new): New export.
9780
9781 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9782
9783         * py-record-btrace.c (btpy_insn_new): Removed.
9784         (btpy_insn_or_gap_new): New function.
9785         (btpy_insn_error): Removed.
9786         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9787         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9788         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9789         btpy_insn_or_gap_new instead of btpy_insn_new.
9790         (btpy_insn_getset): Remove btpy_insn_error.
9791         * py-record.c (recpy_gap_type): New static object.
9792         (recpy_gap_object): New typedef.
9793         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9794         recpy_gap_reason_string): New function.
9795         (recpy_gap_getset): New static object.
9796         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9797         * py-record.h (recpy_gap_new): New export.
9798
9799 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9800
9801         * python/py-record.c (recpy_ptid): Remove.
9802         (recpy_record_getset): Remove recpy_ptid.
9803
9804 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9805
9806         * btrace.c (btrace_fetch): Set inferior_ptid.
9807         * python/py-record-btrace.c: Add "py-record.h" include.
9808         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9809         recpy_bt_end, recpy_bt_instruction_history,
9810         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9811         in gdb.Record object instead of current ptid.
9812         * python/py-record.c: Include new "py-record.h" file.
9813         (recpy_record_object): Moved to py-record.h.
9814         * python/py-record.h: New file.
9815
9816 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9817
9818         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9819         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9820         indentation.
9821
9822 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
9823
9824         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9825         the past maintainers section.
9826
9827 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9828
9829         * infcmd.c (get_return_value): Use regcache ctor, and remove
9830         cleanup.
9831
9832 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9833             Pedro Alves  <palves@redhat.com>
9834
9835         * regcache.c (regcache::regcache): New tag dispatch ctor.
9836         (do_cooked_read): Moved above.
9837         (regcache_dup): Use the tag dispatch ctor..
9838         * regcache.h (regcache): Declare ctor, delete copy ctor and
9839         assignment operator, remove friend regcache_dup.
9840
9841 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9842
9843         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9844         call method save instead of regcache_cpy.
9845         * regcache.h (struct regcache): Make regcache_dup a friend.
9846
9847 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9848
9849         * regcache.c (struct regcache): Move to regcache.h
9850         (regcache::arch): New method.
9851         (regcache_get_ptid): Update.
9852         (get_regcache_arch): Call arch method.
9853         (get_regcache_aspace): Call method aspace.
9854         (register_buffer): Change it to method.
9855         (regcache_save): Change it to regcache::save.
9856         (regcache_restore): Likewise.
9857         (regcache_cpy_no_passthrough): Remove the declaration.
9858         (regcache_cpy): Call methods restore and cpy_no_passthrough.
9859         (regcache_cpy_no_passthrough): Change it to method
9860         cpy_no_passthrough.
9861         (regcache_register_status): Change it to method
9862         get_register_status.
9863         (regcache_invalidate): Change it to method invalidate.
9864         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9865         (regcache_raw_update): Change it to method raw_update.
9866         (regcache_raw_read): Likewise.
9867         (regcache_raw_read_signed): Likewise.
9868         (regcache_raw_read_unsigned): Likewise.
9869         (regcache_raw_write_signed): Likewise.
9870         (regcache_raw_write_unsigned): Likewise.
9871         (regcache_cooked_read): Likewise.
9872         (regcache_cooked_read_value): Likewise.
9873         (regcache_cooked_read_signed): Likewise.
9874         (regcache_cooked_read_unsigned): Likewise.
9875         (regcache_cooked_write_signed): Likewise.
9876         (regcache_cooked_write_unsigned): Likewise.
9877         (regcache_raw_set_cached_value): Likewise.
9878         (regcache_raw_write): Likewise.
9879         (regcache_cooked_write): Likewise.
9880         (regcache_xfer_part): Likewise.
9881         (regcache_raw_read_part): Likewise.
9882         (regcache_raw_write_part): Likewise.
9883         (regcache_cooked_read_part): Likewise.
9884         (regcache_cooked_write_part): Likewise.
9885         (regcache_raw_supply): Likewise.
9886         (regcache_raw_collect): Likewise.
9887         (regcache_transfer_regset): Likewise.
9888         (regcache_supply_regset): Likewise.
9889         (regcache_collect_regset): Likewise.
9890         (regcache_debug_print_register): Likewise.
9891         (enum regcache_dump_what): Move it to regcache.h.
9892         (regcache_dump): Change it to method dump.
9893         * regcache.h (enum regcache_dump_what): New.
9894         (class regcache): New.
9895         * target.c (target_fetch_registers): Call method
9896         debug_print_register.
9897         (target_store_registers): Likewise.
9898
9899 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9900
9901         * windows-nat.c (struct lm_info_windows): Initialize field.
9902         (windows_make_so): Allocate lm_info_windows with new.
9903         (windows_free_so): Free lm_info_windows with delete.
9904
9905 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9906
9907         * solib-darwin.c (struct lm_info_darwin): Initialize field.
9908         (darwin_current_sos): Allocate lm_info_darwin with new, remove
9909         cleanup.
9910         (darwin_free_so): Free lm_info_darwin with delete.
9911
9912 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9913
9914         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9915         <l_addr_p>: Change type to bool.
9916         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9917         (svr4_free_so): Free lm_info_svr4 with delete.
9918         (svr4_copy_library_list): Replace memcpy with call to copy
9919         constructor.
9920         (library_list_start_library, svr4_default_sos): Allocate
9921         lm_info_svr4 with new.
9922
9923 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9924
9925         * solib-target.c (struct lm_info_target): Add destructor,
9926         initialize fields.
9927         <name>: Change type to std::string.
9928         (library_list_start_library): Allocate lm_info_target with new.
9929         (solib_target_free_library_list): Free lm_info_target with
9930         delete.
9931         (solib_target_current_sos): Adapt to std::string.
9932         (solib_target_free_so): Free lm_info_target with delete.
9933
9934 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9935
9936         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9937         fields.
9938         (frv_current_sos): Allocate lm_info_frv with new.
9939         (frv_relocate_main_executable): Free lm_info_frv with delete,
9940         allocate with new.
9941         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9942
9943 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9944
9945         * solib-frv.c (struct lm_info_frv): Fix indentation.
9946
9947 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9948
9949         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9950         map field.
9951         (dsbt_current_sos): Allocate lm_info_dsbt with new.
9952         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9953         and allocate with new.
9954         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9955
9956 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9957
9958         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9959         <filename, member_name>: Change type to std::string.
9960         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9961         (library_list_start_library): Allocate lm_info_aix with new.
9962         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9963         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9964         with copy constructor.
9965
9966 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9967
9968         * solist.h (struct lm_info): Remove.
9969         (struct lm_info_base): New class.
9970         (struct so_list) <lm_info>: Change type to lm_info_base *.
9971         * nto-tdep.c (struct lm_info): Remove.
9972         (lm_addr): Adjust.
9973         * solib-aix.c (struct lm_info): Rename to ...
9974         (struct lm_info_aix): ... this.  Extend lm_info_base.
9975         (lm_info_p): Rename to ...
9976         (lm_info_aix_p): ... this, and adjust.
9977         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9978         solib_aix_parse_libraries, library_list_start_library,
9979         solib_aix_free_library_list, solib_aix_parse_libraries,
9980         solib_aix_get_library_list,
9981         solib_aix_relocate_section_addresses, solib_aix_free_so,
9982         solib_aix_get_section_offsets,
9983         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
9984         Adjust.
9985         (struct solib_aix_inferior_data) <library_list>: Adjust.
9986         * solib-darwin.c (struct lm_info): Rename to ...
9987         (struct lm_info_darwin): ... this.  Extend lm_info_base.
9988         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
9989         * solib-dsbt.c (struct lm_info): Rename to ...
9990         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
9991         (struct dsbt_info) <main_executable_lm_info): Adjust.
9992         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
9993         dsbt_relocate_section_addresses): Adjust.
9994         * solib-frv.c (struct lm_info): Rename to ...
9995         (struct lm_info_frv): ... this.  Extend lm_info_base.
9996         (main_executable_lm_info): Adjust.
9997         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
9998         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
9999         find_canonical_descriptor_in_load_object,
10000         frv_fdpic_find_canonical_descriptor): Adjust.
10001         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
10002         to lm_info_svr4.
10003         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
10004         svr4_clear_so, svr4_copy_library_list,
10005         library_list_start_library, svr4_default_sos, svr4_read_so_list,
10006         svr4_current_sos, svr4_fetch_objfile_link_map,
10007         solist_update_incremental): Adjust.
10008         * solib-svr4.h (struct lm_info_svr4): Move here from
10009         solib-svr4.c.
10010         * solib-target.c (struct lm_info): Rename to ...
10011         (struct lm_info_target): ... this.  Extend lm_info_base.
10012         (lm_info_p): Rename to ...
10013         (lm_info_target_p): ... this.
10014         (solib_target_parse_libraries, library_list_start_segment,
10015         library_list_start_section, library_list_start_library,
10016         library_list_end_library, solib_target_free_library_list,
10017         solib_target_current_sos, solib_target_free_so,
10018         solib_target_relocate_section_addresses): Adjust.
10019         * windows-nat.c (struct lm_info): Rename to ...
10020         (struct lm_info_windows): ... this.  Extend lm_info_base.
10021         (windows_make_so, handle_load_dll, handle_unload_dll,
10022         windows_xfer_shared_libraries): Adjust.
10023
10024 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
10025
10026         * solib-darwin.c (struct darwin_so_list): Remove.
10027         (darwin_current_sos): Allocate an so_list object instead of a
10028         darwin_so_list, separately allocate an lm_info object.
10029         (darwin_free_so): Free lm_info.
10030
10031 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
10032
10033         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10034         with fprintf_filtered.
10035
10036 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10037
10038         * regcache.c (regcache::regcache): New function.
10039         (regcache::~regcache): New function.
10040         (regcache_xmalloc_1): Remove.
10041         (regcache_xmalloc): Call new regcache.
10042         (regcache_xfree): Call delete regcache.
10043         (get_thread_arch_aspace_regcache): Call new regcache.
10044
10045 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10046
10047         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10048         lwp instead of ptid_get_lwp.
10049
10050 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10051
10052         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10053         lwp_info instead of getting from inferior_ptid.
10054
10055 2017-04-27  Keith Seitz  <keiths@redhat.com>
10056
10057         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10058         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10059         (CV_CONVERSION_BADNESS): Define.
10060         (rank_one_type): Remove overly restrictive rvalue reference
10061         rank checks.
10062         Add cv-qualifier checks and subranks for type equality.
10063         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10064         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10065         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10066
10067 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
10068
10069         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10070         count when creating the object.
10071
10072 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
10073             Ulrich Weigand  <uweigand@de.ibm.com>
10074
10075         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10076         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10077         is used in AIX.
10078         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10079         (process_xcoff_symbol): Likewise.
10080         (scan_xcoff_symtab): Likewise.
10081
10082 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10083
10084         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10085         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10086         (ia64_access_reg): Use get_frame_register_unsigned.
10087         (ia64_access_rse_reg): Likewise.
10088         (ia64_libunwind_frame_prev_register): Likewise.
10089
10090 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
10091
10092         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10093         * gdbarch.c: Regenerated.
10094         * gdbarch.h: Regenerated.
10095         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10096         visibility external.
10097         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10098         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10099         (enum cfa_how_kind): Move to ...
10100         (struct dwarf2_frame_state_reg_info): Likewise.
10101         (struct dwarf2_frame_state): Likewise.
10102         * dwarf2-frame.h: ... here.
10103         (dwarf2_frame_state_alloc_regs): New declaration.
10104         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10105         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10106
10107 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10108
10109         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10110         regcache_raw_read_unsigned.
10111         (xtensa_pseudo_register_write): Likewise.
10112
10113 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10114
10115         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
10116         (nds32_pseudo_register_write): Likewise.
10117
10118 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10119
10120         * regcache.c (struct regcache) <readonly_p>: Change its type
10121         to bool.
10122         (regcache_xmalloc_1): Update parameter type and callers update.
10123
10124 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10125
10126         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
10127         set_gdbarch_wchar_bit.
10128         * arm-tdep.c (arm_gdbarch_init): Likewise.
10129
10130 2017-04-25  Pedro Alves  <palves@redhat.com>
10131
10132         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
10133         (BothAreRelocatable, memcopy, memmove): Don't define.
10134         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
10135         macros.
10136
10137 2017-04-25  Pedro Alves  <palves@redhat.com>
10138
10139         * common/common-defs.h: Include "common/poison.h".
10140         * common/function-view.h: (Not, Or, Requires): Move to traits.h
10141         and adjust.
10142         * common/poison.h: New file.
10143         * common/traits.h: Include <type_traits>.
10144         (Not, Or, Requires): New, moved from common/function-view.h.
10145
10146 2017-04-25  Pedro Alves  <palves@redhat.com>
10147
10148         * breakpoint.h (struct breakpoint): In-class initialize all
10149         fields.  Make boolean fields "bool".
10150         * breakpoint.c (init_raw_breakpoint_without_location): Remove
10151         memset call and initializations no longer necessary.
10152
10153 2017-04-25  Pedro Alves  <palves@redhat.com>
10154
10155         * btrace.c (pt_btrace_insn_flags): Change parameter type to
10156         reference.
10157         (pt_btrace_insn): New function.
10158         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
10159
10160 2017-04-25  Pedro Alves  <palves@redhat.com>
10161
10162         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
10163         "base" field and inherit from "bp_location" instead.  Add
10164         non-default ctor.
10165         (allocate_location_exception): Use new non-default ctor.
10166         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
10167         (init_bp_location): Convert to ...
10168         (bp_location::bp_location): ... this new ctor, and remove memset
10169         call.
10170         (base_breakpoint_allocate_location): Use the new non-default ctor.
10171         * breakpoint.h (bp_location): Now a class.  Declare default and
10172         non-default ctors.  In-class initialize all members.
10173         (init_bp_location): Remove declaration.
10174
10175 2017-04-25  Pedro Alves  <palves@redhat.com>
10176
10177         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
10178         assignment operator.
10179
10180 2017-04-24  Yao Qi  <yao.qi@linaro.org>
10181
10182         * doublest.c (convert_doublest_to_floatformat): Call
10183         floatformat_totalsize_bytes.
10184
10185 2017-04-22  Tom Tromey  <tom@tromey.com>
10186
10187         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
10188         ui_out_emit_list.
10189         * stack.c (print_frame): Use ui_out_emit_list.
10190         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10191         ui_out_emit_list.
10192         * mi/mi-main.c (print_one_inferior)
10193         (mi_cmd_data_list_register_names)
10194         (mi_cmd_data_list_register_values, mi_cmd_list_features)
10195         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
10196         ui_out_emit_list.
10197         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
10198         (mi_output_solib_attribs): Use ui_out_emit_list,
10199         ui_out_emit_tuple.
10200         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
10201         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
10202         (mi_cmd_stack_list_args, list_args_or_locals): Use
10203         ui_out_emit_list.
10204         * disasm.c (do_assembly_only): Use ui_out_emit_list.
10205         * breakpoint.c (print_solib_event, output_thread_groups): Use
10206         ui_out_emit_list.
10207
10208 2017-04-22  Tom Tromey  <tom@tromey.com>
10209
10210         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
10211         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
10212         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
10213
10214 2017-04-22  Tom Tromey  <tom@tromey.com>
10215
10216         * tracepoint.c (tvariables_info_1)
10217         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
10218
10219 2017-04-22  Tom Tromey  <tom@tromey.com>
10220
10221         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
10222         annotate_arg_emitter.
10223         * breakpoint.c (print_mention_watchpoint)
10224         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
10225         * annotate.h (struct annotate_arg_emitter): New.
10226
10227 2017-04-22  Tom Tromey  <tom@tromey.com>
10228
10229         * record-btrace.c (record_btrace_insn_history)
10230         (record_btrace_insn_history_range, record_btrace_call_history)
10231         (record_btrace_call_history_range): Use ui_out_emit_tuple.
10232         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
10233         ui_out_emit_tuple.
10234         * stack.c (print_frame_info): Use ui_out_emit_tuple.
10235         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
10236         * skip.c (skip_info): Use ui_out_emit_tuple.
10237         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
10238         * progspace.c (print_program_space): Use ui_out_emit_tuple.
10239         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
10240         * osdata.c (info_osdata): Use ui_out_emit_tuple.
10241         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10242         ui_out_emit_tuple.
10243         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
10244         (output_register, mi_cmd_data_read_memory)
10245         (mi_cmd_data_read_memory_bytes, mi_load_progress)
10246         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
10247         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
10248         Use ui_out_emit_tuple.
10249         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
10250         ui_out_emit_tuple.
10251         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10252         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
10253         * linux-thread-db.c (info_auto_load_libthread_db): Use
10254         ui_out_emit_tuple.
10255         * inferior.c (print_inferior): Use ui_out_emit_tuple.
10256         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
10257         * disasm.c (do_mixed_source_and_assembly_deprecated)
10258         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
10259         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
10260         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
10261         * breakpoint.c (print_one_breakpoint_location)
10262         (print_one_breakpoint): Use ui_out_emit_tuple.
10263         * auto-load.c (print_script, info_auto_load_cmd): Use
10264         ui_out_emit_tuple.
10265         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
10266
10267 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
10268
10269         * thread.c (print_thread_info_1): Remove dead code.
10270
10271 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10272
10273         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
10274         GDB_SELF_TEST.
10275         * arm-tdep.c (selftests::arm_record_test): Likewise.
10276
10277 2017-04-21  Yao Qi  <yao.qi@linaro.org>
10278
10279         * regcache.c (regcache_restore): Remove argument 2.  Replace
10280         argument 3 with regcache.  Get register status from
10281         src->register_status and get register contents from
10282         register_buffer (src, regnum).
10283         (regcache_cpy): Update.
10284
10285 2017-04-19  Pedro Alves  <palves@redhat.com>
10286
10287         * gdbthread.h (thread): Add missing closing parenthesis in
10288         comment.
10289
10290 2017-04-19  Pedro Alves  <palves@redhat.com>
10291
10292         * common/refcounted-object.h: New file.
10293         * gdbthread.h: Include "common/refcounted-object.h".
10294         (thread_info): Inherit from refcounted_object and add comments.
10295         (thread_info::incref, thread_info::decref)
10296         (thread_info::m_refcount): Delete.
10297         (thread_info::deletable): Use the refcounted_object::refcount()
10298         method.
10299         * inferior.c (current_inferior_): Add comment.
10300         (set_current_inferior): Increment/decrement refcounts.
10301         (prune_inferiors, remove_inferior_command): Skip inferiors marked
10302         not-deletable instead of comparing with the current inferior.
10303         (initialize_inferiors): Increment the initial inferior's refcount.
10304         * inferior.h (struct inferior): Forward declare.
10305         Include "common/refcounted-object.h".
10306         (current_inferior, set_current_inferior): Move declaration to
10307         before struct inferior's definition, and fix comment.
10308         (inferior): Inherit from refcounted_object.  Add comments.
10309         * thread.c (switch_to_thread_no_regs): Reference the thread's
10310         inferior pointer directly instead of doing a ptid lookup.
10311         (switch_to_no_thread): New function.
10312         (switch_to_thread(thread_info *)): New function, factored out
10313         from ...
10314         (switch_to_thread(ptid_t)): ... this.
10315         (restore_current_thread): Delete.
10316         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
10317         fields, and add 'inf' field.
10318         (do_restore_current_thread_cleanup): Check whether old->inf is
10319         alive instead of looking up an inferior by ptid.  Use
10320         switch_to_thread and switch_to_no_thread.
10321         (restore_current_thread_cleanup_dtor): Use old->inf directly
10322         instead of lookup up an inferior by id.  Decref the inferior.
10323         Don't restore 'removable'.
10324         (make_cleanup_restore_current_thread): Same the inferior pointer
10325         in old, instead of the inferior number.  Incref the inferior.
10326         Don't save/clear 'removable'.
10327
10328 2017-04-19  Pedro Alves  <palves@redhat.com>
10329
10330         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10331         unittests/scoped_restore-selftests.c.
10332         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
10333         * common/scoped_restore.h (scoped_restore_base): Make "class".
10334         (scoped_restore_base::release): New public method.
10335         (scoped_restore_base::scoped_restore_base): New protected ctor.
10336         (scoped_restore_base::m_saved_var): New protected field.
10337         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
10338         scoped_restore_base base class instead of m_saved_var directly.
10339         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
10340         (scoped_restore_tmpl::scoped_restore_tmpl(const
10341         scoped_restore_tmpl<T>&)): Likewise.
10342         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
10343         method.
10344         (scoped_restore_tmpl::saved_var): New method.
10345         (scoped_restore_tmpl::m_saved_var): Delete.
10346         * inferior.h (inferior::detaching): Now a bool.
10347         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
10348         cleanup.
10349         * unittests/scoped_restore-selftests.c: New file.
10350
10351 2017-04-19  Pedro Alves  <palves@redhat.com>
10352
10353         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
10354         Re-sort in alphabetic order.
10355
10356 2017-04-18  Pedro Alves  <palves@redhat.com>
10357
10358         * xml-support.c (obstack_xml_printf): Delete.
10359         * xml-support.h (obstack_xml_printf): Delete.
10360
10361 2017-04-18  Pedro Alves  <palves@redhat.com>
10362
10363         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
10364         vdebug, verror, body_text, start_element, end_element, name,
10365         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
10366         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
10367         is_xinclude>: Make private and add m_ prefix.
10368         (gdb_xml_parser::body_text): New method, based on ...
10369         (gdb_xml_body_text): ... this.  Adjust.
10370         (gdb_xml_parser::vdebug): New method, based on ...
10371         (gdb_xml_debug): ... this.  Adjust.
10372         (gdb_xml_parser::verror): New method, based on ...
10373         (gdb_xml_error): ... this.  Adjust.
10374         (gdb_xml_parser::start_element): New method, based on ...
10375         (gdb_xml_start_element): ... this.  Adjust.
10376         (gdb_xml_start_element_wrapper): Defer to
10377         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
10378         (gdb_xml_parser::end_element): New method, based on ...
10379         (gdb_xml_end_element_wrapper): ... this.  Adjust.
10380         (gdb_xml_parser::~gdb_xml_parser): Adjust.
10381         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
10382         (gdb_xml_parser::use_dtd): New method, based on ...
10383         (gdb_xml_use_dtd): ... this.  Adjust.
10384         (gdb_xml_parser::parse): New method, based on ...
10385         (gdb_xml_parse): ... this.  Adjust.
10386         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
10387         (xinclude_start_include): Adjust to call the parser's name method.
10388         (xml_xinclude_default, xml_xinclude_start_doctype)
10389         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
10390         method.
10391         (xml_process_xincludes): Adjust to call parser methods.
10392         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
10393         declarations.
10394
10395 2017-04-18  Pedro Alves  <palves@redhat.com>
10396
10397         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
10398         gdb::optional<std::string>.
10399         * xml-support.c: Include <string>.
10400         (scope_level::scope_level(scope_level &&))
10401         (scope_level::~scope_level): Delete.
10402         (scope_level::body): Now a std::string.
10403         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
10404         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
10405         parameter.
10406         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
10407         (xinclude_parsing_data::output): Now a std::string reference.
10408         (xinclude_start_include): Adjust.
10409         (xml_xinclude_default): Adjust.
10410         (xml_process_xincludes): Add 'output' parameter, and return bool.
10411         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
10412         and return bool.
10413         * xml-tdesc.c: Include <unordered_map> and <string>.
10414         (tdesc_xml_cache): Delete.
10415         (tdesc_xml_cache_s): Delete.
10416         (xml_cache): Now an std::unordered_map.
10417         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
10418         (target_fetch_description_xml): Change return type to
10419         gdb::optional<std::string>, and adjust.
10420         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
10421         (target_fetch_description_xml): Change return type to
10422         gdb::optional<std::string>.
10423
10424 2017-04-18  Pedro Alves  <palves@redhat.com>
10425
10426         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10427         unittests/optional-selftests.c.
10428         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
10429         * unittests/optional-selftests.c: New file.
10430         * unittests/optional/assignment/1.cc: New file.
10431         * unittests/optional/assignment/2.cc: New file.
10432         * unittests/optional/assignment/3.cc: New file.
10433         * unittests/optional/assignment/4.cc: New file.
10434         * unittests/optional/assignment/5.cc: New file.
10435         * unittests/optional/assignment/6.cc: New file.
10436         * unittests/optional/assignment/7.cc: New file.
10437         * unittests/optional/cons/copy.cc: New file.
10438         * unittests/optional/cons/default.cc: New file.
10439         * unittests/optional/cons/move.cc: New file.
10440         * unittests/optional/cons/value.cc: New file.
10441         * unittests/optional/in_place.cc: New file.
10442         * unittests/optional/observers/1.cc: New file.
10443         * unittests/optional/observers/2.cc: New file.
10444
10445 2017-04-18  Pedro Alves  <palves@redhat.com>
10446
10447         * common/gdb_optional.h: Include common/traits.h.
10448         (in_place_t): New type.
10449         (in_place): New constexpr variable.
10450         (optional::optional): Remove member initialization of
10451         m_instantiated.
10452         (optional::optional(in_place_t...)): New constructor.
10453         (optional::~optional): Use reset.
10454         (optional::optional(const optional&)): New.
10455         (optional::optional(const optional&&)): New.
10456         (optional::optional(T &)): New.
10457         (optional::optional(T &&)): New.
10458         (operator::operator=(const optional &)): New.
10459         (operator::operator=(optional &&)): New.
10460         (operator::operator= (const T &))
10461         (operator::operator= (T &&))
10462         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
10463         (operator::reset): New.
10464         (operator::m_instantiated):: Add in-class initializer.
10465         * common/traits.h: Include <type_traits>.
10466         (struct And): New types.
10467
10468 2017-04-18  Pedro Alves  <palves@redhat.com>
10469
10470         * xml-support.c: Include <vector>.
10471         (scope_level::scope_level(const gdb_xml_element *))
10472         (scope_level::scope_level(scope_level&&)): New.
10473         (scope_level::~scope_level): New.
10474         (scope_level_s): Delete.
10475         (gdb_xml_parser::scopes): Now a std::vector.
10476         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
10477         Use std::vector.
10478         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
10479         scope cleanup code.
10480         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
10481         of the scopes member.  Use std::vector::emplace_back.
10482
10483 2017-04-18  Pedro Alves  <palves@redhat.com>
10484
10485         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
10486         a bool.
10487         (gdb_xml_end_element): Change type of first parameter.
10488         (gdb_xml_cleanup): Rename to ...
10489         (gdb_xml_parser::~gdb_xml_parser): ... this.
10490         (gdb_xml_create_parser_and_cleanup): Delete with ...
10491         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
10492         to this new ctor.
10493         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
10494         using gdb_xml_create_parser_and_cleanup.
10495         (xinclude_parsing_data): Add ctor/dtor.
10496         (xml_xinclude_cleanup): Delete.
10497         (xml_process_xincludes): Create a local xinclude_parsing_data
10498         instead of heap-allocating one.  Create a local gdb_xml_parser
10499         instead of heap-allocating one with
10500         gdb_xml_create_parser_and_cleanup.
10501
10502 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
10503
10504         PR threads/20743
10505         * fbsd-nat.c (resume_one_thread_cb): Remove.
10506         (resume_all_threads_cb): Remove.
10507         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
10508         iterate_over_threads.
10509
10510 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10511
10512         * NEWS: Create a new section for the next release branch.
10513         Rename the section of the current branch, now that it has
10514         been cut.
10515
10516 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10517
10518         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
10519         * version.in: Bump version to 8.0.50.DATE-git.
10520
10521 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
10522
10523         PR gdb/21385
10524         * windows-nat.c (windows_create_inferior): Declare 'allargs'
10525         independently of the host, and fix build breakage on Cygwin.
10526
10527 2017-04-13  Pedro Alves  <palves@redhat.com>
10528
10529         * inferior.c (free_inferior): Convert to ...
10530         (inferior::~inferior): ... this dtor.
10531         (inferior::inferior): New ctor, factored out from ...
10532         (add_inferior_silent): ... here.  Allocate the inferior with a new
10533         expression.
10534         (delete_inferior): Call delete instead of free_inferior.
10535         * inferior.h (gdb_environ, continuation): Forward declare.
10536         (inferior): Now a class.  Add in-class initialization to all
10537         members.  Make boolean fields bool, except 'detaching'.
10538         (inferior::inferior): New explicit ctor.
10539         (inferior::~inferior): New.
10540
10541 2017-04-13  Pedro Alves  <palves@redhat.com>
10542
10543         * inferior.c (init_inferior_list): Delete.
10544         * inferior.h (init_inferior_list): Delete.
10545
10546 2017-04-13  Pedro Alves  <palves@redhat.com>
10547
10548         PR threads/13217
10549         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
10550         (top level): Call it twice, with different thread sets.
10551
10552 2017-04-13  Pedro Alves  <palves@redhat.com>
10553
10554         * thread.c: Include <algorithm>.
10555         (thread_array_cleanup): Delete.
10556         (scoped_inc_dec_ref): New class.
10557         (live_threads_count): New function.
10558         (set_thread_refcount): Delete.
10559         (tp_array_compar_ascending): Now a bool.
10560         (tp_array_compar): Convert to a std::sort comparison function.
10561         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
10562         and live_threads_count.
10563
10564 2017-04-13  Pedro Alves  <palves@redhat.com>
10565
10566         * infrun.c (follow_fork_inferior): Also switch the current
10567         inferior.
10568
10569 2017-04-13  Pedro Alves  <palves@redhat.com>
10570
10571         * breakpoint.c (watch_command_1): Save watchpoint-frame info
10572         before calling create_internal_breakpoint.
10573
10574 2017-04-13  Pedro Alves  <palves@redhat.com>
10575
10576         * fork-child.c (execv_argv): New class.
10577         (breakup_args): Refactored as ...
10578         (execv_argv::init_for_no_shell): .. this method of execv_argv.
10579         Copy arguments to storage and replace separators with NULL
10580         terminators in place.
10581         (escape_bang_in_quoted_argument): Adjust to return bool.
10582         (execv_argv::execv_argv): New ctor.
10583         (execv_argv::init_for_shell): New method, factored out from
10584         fork_inferior.  Don't strdup strings into the vector.
10585         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
10586         Remove free_vector_argv call.
10587
10588 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10589
10590         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10591         tdep->rx_psw_type.
10592
10593 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10594
10595         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10596         * rx-tdep.c (rx_gdbarch_init): Likewise.
10597
10598 2017-04-13  Pedro Alves  <palves@redhat.com>
10599
10600         * breakpoint.h (struct breakpoint): Reindent.
10601
10602 2017-04-13  Pedro Alves  <palves@redhat.com>
10603
10604         * breakpoint.c (bp_location): Rename to ...
10605         (bp_locations): ... this.  All references updated.
10606         (bp_location_count): Rename to ...
10607         (bp_locations_count): ... this.  All references updated.
10608         (bp_location_placed_address_before_address_max): Rename to ...
10609         (bp_locations_placed_address_before_address_max): ... this.  All
10610         references updated.
10611         (bp_location_shadow_len_after_address_max): Rename to ...
10612         (bp_locations_shadow_len_after_address_max): ... this.  All
10613         references updated.
10614         (bp_location_compare_addrs): Rename to ...
10615         (bp_locations_compare_addrs): ... this.  All references updated.
10616         (bp_location_compare):Rename to ...
10617         (bp_locations_compare): ... this.  All references updated.
10618         (bp_location_target_extensions_update): Rename to ...
10619         (bp_locations_target_extensions_update): ... this.  All references
10620         updated.
10621
10622 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10623
10624         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10625         * common/common.m4: Check headers 'termios.h', 'termio.h' and
10626         'sgtty.h'.
10627         * common/gdb_termios.h: New file, with parts of "terminal.h".
10628         * inflow.c: Include "gdb_termios.h".
10629         * ser-unix.c: Include "gdb_termios.h".
10630         * terminal.h: Move terminal-related defines to
10631         "common/gdb_termios.h".
10632
10633 2017-04-12  Tom Tromey  <tom@tromey.com>
10634
10635         * probe.c (parse_probes): Update.
10636         * location.h (delete_event_location): Don't declare.
10637         (event_location_deleter::operator()): Update.
10638         * location.c (event_location_deleter::operator()): Rename from
10639         delete_event_location.
10640         * linespec.h (linespec_result) <location>: Change type to
10641         event_location_up.
10642         * linespec.c (canonicalize_linespec, event_location_to_sals)
10643         (decode_objc): Update.
10644         (linespec_result): Don't call delete_event_location.
10645         * breakpoint.c (create_breakpoints_sal)
10646         (bkpt_probe_create_sals_from_location)
10647         (strace_marker_create_sals_from_location): Update.
10648
10649 2017-04-12  Tom Tromey  <tom@tromey.com>
10650
10651         * linespec.h (struct linespec_result): Add constructor and
10652         destructor.
10653         (init_linespec_result, destroy_linespec_result)
10654         (make_cleanup_destroy_linespec_result): Don't declare.
10655         * linespec.c (init_linespec_result): Remove.
10656         (linespec_result::~linespec_result): Rename from
10657         destroy_linespec_result.  Update.
10658         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10659         Remove.
10660         * breakpoint.c (create_breakpoint, break_range_command)
10661         (decode_location_default): Update.
10662         * ax-gdb.c (agent_command_1): Update.
10663
10664 2017-04-12  Tom Tromey  <tom@tromey.com>
10665
10666         * remote.c (remote_download_tracepoint): Update.
10667         * python/py-breakpoint.c (bppy_get_location): Update.
10668         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10669         (gdbscm_breakpoint_location): Update.
10670         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10671         * breakpoint.h (struct breakpoint) <location, location_range_end>:
10672         Change type to event_location_up.
10673         * breakpoint.c (create_overlay_event_breakpoint)
10674         (create_longjmp_master_breakpoint)
10675         (create_std_terminate_master_breakpoint)
10676         (create_exception_master_breakpoint)
10677         (breakpoint_event_location_empty_p, print_breakpoint_location)
10678         (print_one_breakpoint_location, create_thread_event_breakpoint)
10679         (init_breakpoint_sal, create_breakpoint)
10680         (print_recreate_ranged_breakpoint, break_range_command)
10681         (init_ada_exception_breakpoint, say_where): Update.
10682         (base_breakpoint_dtor): Don't call delete_event_location.
10683         (bkpt_print_recreate, tracepoint_print_recreate)
10684         (dprintf_print_recreate, update_static_tracepoint)
10685         (breakpoint_re_set_default): Update.
10686
10687 2017-04-12  Tom Tromey  <tom@tromey.com>
10688
10689         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10690         type of "to_do".  Update.
10691         (compute_stack_depth): Use std::vector.
10692
10693 2017-04-12  Tom Tromey  <tom@tromey.com>
10694
10695         * printcmd.c (find_instruction_backward): Use std::vector.
10696
10697 2017-04-12  Tom Tromey  <tom@tromey.com>
10698
10699         * symfile.c (objfilep): Remove typedef.
10700         (reread_symbols): Use a std::vector.
10701
10702 2017-04-12  Tom Tromey  <tom@tromey.com>
10703
10704         * mi/mi-main.c (exec_direction_forward): Remove.
10705         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10706         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10707         scoped_restore.
10708         * guile/guile.c (guile_repl_command, guile_command)
10709         (gdbscm_execute_gdb_command): Use scoped_restore.
10710         * go-exp.y (go_parse): Use scoped_restore.
10711         * d-exp.y (d_parse): Use scoped_restore.
10712         * cli/cli-decode.c (cmd_func): Use scoped_restore.
10713         * c-exp.y (c_parse): Use scoped_restore.
10714
10715 2017-04-12  Tom Tromey  <tom@tromey.com>
10716
10717         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10718         (mi_parse): Update return type.
10719         (mi_parse_free): Remove.
10720         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10721         (mi_parse::~mi_parse): Rename from mi_parse_free.
10722         (mi_parse_cleanup): Remove.
10723         (mi_parse): Return a unique_ptr.  Use new.
10724         * mi/mi-main.c (mi_execute_command): Update.
10725
10726 2017-04-12  Tom Tromey  <tom@tromey.com>
10727
10728         * location.c (explicit_location_lex_one): Return a
10729         unique_xmalloc_ptr.
10730         (string_to_explicit_location): Update.  Remove cleanups.
10731
10732 2017-04-12  Tom Tromey  <tom@tromey.com>
10733
10734         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10735         (compare_value_and_voffset): Change type.  Update.
10736         (compute_vtable_size): Change type of "offset_vec".
10737         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
10738         (gnuv3_get_typeid): Remove extraneous declaration.
10739
10740 2017-04-12  Tom Tromey  <tom@tromey.com>
10741
10742         * charset.h (wchar_iterator): Fix comment.
10743
10744 2017-04-12  Tom Tromey  <tom@tromey.com>
10745
10746         * charset.c (iconv_wrapper): New class.
10747         (cleanup_iconv): Remove.
10748         (convert_between_encodings): Use it.
10749
10750 2017-04-12  Tom Tromey  <tom@tromey.com>
10751
10752         * symfile.h (increment_reading_symtab): Update type.
10753         * symfile.c (decrement_reading_symtab): Remove.
10754         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10755         * psymtab.c (psymtab_to_symtab): Update.
10756         * dwarf2read.c (dw2_instantiate_symtab): Update.
10757
10758 2017-04-12  Tom Tromey  <tom@tromey.com>
10759
10760         * jit.c (struct jit_reader): Declare separately.  Add constructor
10761         and destructor.  Change type of "handle".
10762         (loaded_jit_reader): Define separately.
10763         (jit_reader_load): Update.  New "new".
10764         (jit_reader_unload_command): Use "delete".
10765         * gdb-dlfcn.h (struct dlclose_deleter): New.
10766         (gdb_dlhandle_up): New typedef.
10767         (gdb_dlopen, gdb_dlsym): Update types.
10768         (gdb_dlclose): Remove.
10769         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10770         (gdb_dlsym): Change type of "handle".
10771         (make_cleanup_dlclose): Remove.
10772         (dlclose_deleter::operator()): Rename from gdb_dlclose.
10773         * compile/compile-c-support.c (load_libcc): Update.
10774
10775 2017-04-12  Tom Tromey  <tom@tromey.com>
10776
10777         * symtab.h (find_pcs_for_symtab_line): Change return type.
10778         * symtab.c (find_pcs_for_symtab_line): Change return type.
10779         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10780         type of "vec".  Update.
10781         (ltpy_get_pcs_for_line): Update.
10782         * linespec.c (decode_digits_ordinary): Update.
10783
10784 2017-04-12  Tom Tromey  <tom@tromey.com>
10785
10786         * tracepoint.c (actions_command): Update.
10787         * python/python.c (python_command, python_interactive_command):
10788         Update.
10789         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10790         * guile/guile.c (guile_command): Update.
10791         * defs.h (read_command_lines, read_command_lines_1): Return
10792         command_line_up.
10793         (command_lines_deleter): New struct.
10794         (command_line_up): New typedef.
10795         * compile/compile.c (compile_code_command)
10796         (compile_print_command): Update.
10797         * cli/cli-script.h (get_command_line, copy_command_lines): Return
10798         command_line_up.
10799         (make_cleanup_free_command_lines): Remove.
10800         * cli/cli-script.c (get_command_line, read_command_lines_1)
10801         (copy_command_lines): Return command_line_up.
10802         (while_command, if_command, read_command_lines, define_command)
10803         (document_command): Update.
10804         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10805         Remove.
10806         * breakpoint.h (breakpoint_set_commands): Change type of
10807         "commands".
10808         * breakpoint.c (breakpoint_set_commands): Change type of
10809         "commands".  Update.
10810         (do_map_commands_command, update_dprintf_command_list)
10811         (create_tracepoint_from_upload): Update.
10812
10813 2017-04-12  Tom Tromey  <tom@tromey.com>
10814
10815         * tracepoint.c (scope_info): Update.
10816         * spu-tdep.c (spu_catch_start): Update.
10817         * python/python.c (gdbpy_decode_line): Update.
10818         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10819         * python/py-breakpoint.c (bppy_init): Update.
10820         * probe.c (parse_probes): Update.
10821         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10822         * location.h (event_location_deleter): New struct.
10823         (event_location_up): New typedef.
10824         (new_linespec_location, new_address_location, new_probe_location)
10825         (new_explicit_location, copy_event_location)
10826         (string_to_event_location, string_to_event_location_basic)
10827         (string_to_explicit_location): Update return type.
10828         (make_cleanup_delete_event_location): Remove.
10829         * location.c (new_linespec_location, new_address_location)
10830         (new_probe_location, new_explicit_location, copy_event_location):
10831         Return event_location_up.
10832         (delete_event_location_cleanup)
10833         (make_cleanup_delete_event_location): Remove.
10834         (string_to_explicit_location, string_to_event_location_basic)
10835         (string_to_event_location): Return event_location_up.
10836         * linespec.c (canonicalize_linespec, event_location_to_sals)
10837         (decode_line_with_current_source)
10838         (decode_line_with_last_displayed, decode_objc): Update.
10839         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10840         * completer.c (location_completer): Update.
10841         * cli/cli-cmds.c (edit_command, list_command): Update.
10842         * breakpoint.c (create_overlay_event_breakpoint)
10843         (create_longjmp_master_breakpoint)
10844         (create_std_terminate_master_breakpoint)
10845         (create_exception_master_breakpoint)
10846         (create_thread_event_breakpoint): Update.
10847         (init_breakpoint_sal): Update.  Remove some dead code.
10848         (create_breakpoint_sal): Change type of "location".  Update.
10849         (create_breakpoints_sal, create_breakpoint, break_command_1)
10850         (dprintf_command, break_range_command, until_break_command)
10851         (init_ada_exception_breakpoint)
10852         (strace_marker_create_sals_from_location)
10853         (update_static_tracepoint, trace_command, ftrace_command)
10854         (strace_command, create_tracepoint_from_upload): Update.
10855         * break-catch-throw.c (re_set_exception_catchpoint): Update.
10856         * ax-gdb.c (agent_command_1): Update.
10857
10858 2017-04-12  Pedro Alves  <palves@redhat.com>
10859
10860         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10861         * configure.tgt: Handle i[34567]86-*-go32* and
10862         i[34567]86-*-msdosdjgpp*.
10863         * i386-tdep.c (i386_svr4_reg_to_regnum):
10864         Make extern.
10865         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10866         i386-go32-tdep.c.
10867         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10868         * i386-go32-tdep.c: New file.
10869         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10870         declarations.
10871
10872 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
10873
10874         * aix-thread.c (pd_status2str): Change return type to const char *.
10875
10876 2017-04-12  Pedro Alves  <palves@redhat.com>
10877
10878         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10879         calls to set_gdbarch_gnu_triplet_regexp.
10880
10881 2017-04-12  Pedro Alves  <palves@redhat.com>
10882
10883         PR gdb/21323
10884         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10885         New enum value.
10886         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10887         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10888         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10889         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10890         * gdbarch.h, gdbarch.c: Regenerate.
10891         * aarch64-tdep.c (aarch64_gdbarch_init): Override
10892         gdbarch_wchar_bit and gdbarch_wchar_signed.
10893         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10894         * arm-tdep.c (arm_gdbarch_init): Likewise.
10895         * avr-tdep.c (avr_gdbarch_init): Likewise.
10896         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10897         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10898         * i386-tdep.c (i386_go32_init_abi): Likewise.
10899         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10900         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10901         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10902         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10903         * sh-tdep.c (sh_gdbarch_init): Likewise.
10904         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10905         * sparc64-tdep.c (sparc64_init_abi): Likewise.
10906         * windows-tdep.c (windows_init_abi): Likewise.
10907         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10908
10909 2017-04-12  Pedro Alves  <palves@redhat.com>
10910
10911         PR c++/21323
10912         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10913         cplus_primitive_type_char32_t>: New enum values.
10914         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10915         and cplus_primitive_type_char32_t.
10916         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10917         32, use the archtecture's built-in type for char16_t and char32_t,
10918         respectively.  Otherwise, fallback to init_integer_type as before,
10919         but make the type unsigned, and issue a complaint.
10920         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10921
10922 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
10923
10924         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10925         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10926
10927 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10928
10929         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10930         'const char *'.
10931
10932 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10933
10934         * common/common-utils.c (free_vector_argv): New function.
10935         * common/common-utils.h: Include <vector>.
10936         (free_vector_argv): New prototype.
10937         * darwin-nat.c (darwin_create_inferior): Rewrite function
10938         prototype in order to constify "exec_file" and accept a
10939         "std::string" for "allargs".
10940         * fork-child.c: Include <vector>.
10941         (breakup_args): Rewrite function, using C++.
10942         (fork_inferior): Rewrite function header, constify "exec_file_arg"
10943         and accept "std::string" for "allargs".  Update the code to
10944         calculate "argv" based on "allargs".  Update calls to "exec_fun"
10945         and "execvp".
10946         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10947         order to constify "exec_file" and accept a "std::string" for
10948         "allargs".
10949         * go32-nat.c (go32_create_inferior): Likewise.
10950         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10951         * infcmd.c (run_command_1): Constify "exec_file".  Use
10952         "std::string" for inferior arguments.
10953         * inferior.h (fork_inferior): Update prototype.
10954         * linux-nat.c (linux_nat_create_inferior): Rewrite function
10955         prototype in order to constify "exec_file" and accept a
10956         "std::string" for "allargs".
10957         * nto-procfs.c (procfs_create_inferior): Likewise.
10958         * procfs.c (procfs_create_inferior): Likewise.
10959         * remote-sim.c (gdbsim_create_inferior): Likewise.
10960         * remote.c (extended_remote_run): Update code to accept
10961         "std::string" as argument.
10962         (extended_remote_create_inferior): Rewrite function prototype in
10963         order to constify "exec_file" and accept a "std::string" for
10964         "allargs".
10965         * rs6000-nat.c (super_create_inferior): Likewise.
10966         (rs6000_create_inferior): Likewise.
10967         * target.h (struct target_ops) <to_create_inferior>: Likewise.
10968         * windows-nat.c (windows_create_inferior): Likewise.
10969
10970 2017-04-11  Pedro Alves  <palves@redhat.com>
10971
10972         * thread.c: Fix whitespace throughout.
10973
10974 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10975
10976         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10977
10978 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
10979
10980         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10981
10982 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
10983
10984         PR gdb/21364
10985         * osdata.c (info_osdata): Check if 'type' is an empty string
10986         instead of NULL.
10987
10988 2017-04-10  Pedro Alves  <palves@redhat.com>
10989
10990         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
10991         (ptid_to_global_thread_id, in_thread_list)
10992         (do_captured_list_thread_ids, set_resumed, set_running)
10993         (set_executing, set_stop_requested, finish_thread_state)
10994         (validate_registers_access, can_access_registers_ptid)
10995         (print_thread_info_1, switch_to_thread)
10996         (do_restore_current_thread_cleanup)
10997         (make_cleanup_restore_current_thread, thread_command)
10998         (thread_name_command): Use operator== instead of ptid_equal.
10999
11000 2017-04-10  Pedro Alves  <palves@redhat.com>
11001
11002         * thread.c (struct current_thread_cleanup) <next>: Delete field.
11003         (current_thread_cleanup_chain): Delete.
11004         (restore_current_thread_cleanup_dtor)
11005         (make_cleanup_restore_current_thread): Remove references to
11006         current_thread_cleanup_chain.
11007
11008 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
11009
11010         * msp430-tdep.c (msp430_pseudo_register_read): Never return
11011         REG_UNKNOWN.
11012
11013 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11014
11015         PR gdb/19942
11016         * gdbthread.h (thread_info::deletable): New method.
11017         (thread_info::incref): New method.
11018         (thread_info::decref): New method.
11019         (thread_info::refcount): Move it to private.
11020         * infrun.c (save_stop_context): Call inc_refcount.
11021         (release_stop_context_cleanup): Likewise.
11022         * thread.c (set_thread_exited): New function.
11023         (init_thread_list): Delete "tp" only it is deletable, otherwise
11024         call set_thread_exited.
11025         (delete_thread_1): Call set_thread_exited.
11026         (current_thread_cleanup) <inferior_pid>: Remove.
11027         <thread>: New field.
11028         (restore_current_thread_ptid_changed): Removed.
11029         (do_restore_current_thread_cleanup): Adjust.
11030         (restore_current_thread_cleanup_dtor): Don't call
11031         find_thread_ptid.
11032         (set_thread_refcount): Use dec_refcount.
11033         (make_cleanup_restore_current_thread): Adjust.
11034         (thread_apply_all_command): Call inc_refcount.
11035         (_initialize_thread): Don't call
11036         observer_attach_thread_ptid_changed.
11037
11038 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11039
11040         * thread.c (delete_thread_1): Hoist code on marking thread as
11041         exited.
11042
11043 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11044
11045         * windows-nat.c (windows_detach): Initialize ptid with
11046         minus_one_ptid.
11047
11048 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11049
11050         * unittests/ptid-selftests.c: Fix erroneous assert messages.
11051
11052 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
11053
11054         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11055         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11056         (bfin_pseudo_register_write): Likewise
11057
11058 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
11059
11060         * common/ptid.h (struct ptid): Change to...
11061         (class ptid_t): ... this.
11062         <ptid_t>: New constructors.
11063         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11064         matches>: New methods.
11065         <make_null, make_minus_one>: New static methods.
11066         <pid>: Rename to...
11067         <m_pid>: ...this.
11068         <lwp>: Rename to...
11069         <m_lwp>: ...this.
11070         <tid>: Rename to...
11071         <m_tid>: ...this.
11072         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11073         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11074         as references, move comment to class ptid_t.
11075         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11076         ptid_t static methods.
11077         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11078         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11079         Take ptid arguments as references, implement using ptid_t methods.
11080         * unittests/ptid-selftests.c: New file.
11081         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11082         unittests/ptid-selftests.c.
11083         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11084
11085 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11086
11087         * python/python.c (python_run_simple_file): Cast mode literal to
11088         non-const char pointer as expected by PyFile_FromString.
11089
11090 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
11091
11092         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11093         minus_one_ptid and null_ptid.
11094
11095 2017-04-05  Pedro Alves  <palves@redhat.com>
11096
11097         * warning.m4 (build_warnings): Remove -Wno-write-strings.
11098         * configure: Regenerate.
11099
11100 2017-04-05  Pedro Alves  <palves@redhat.com>
11101
11102         * ada-exp.y (yyerror): Constify.
11103         * ada-lang.c (bound_name, get_selections)
11104         (ada_variant_discrim_type)
11105         (ada_variant_discrim_name, ada_value_struct_elt)
11106         (ada_lookup_struct_elt_type, is_unchecked_variant)
11107         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11108         (catch_ada_exception_command_split)
11109         (catch_ada_assert_command_split, catch_assert_command)
11110         (ada_op_name): Constify.
11111         * ada-lang.h (ada_yyerror, get_selections)
11112         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
11113         * arc-tdep.c (arc_print_frame_cache): Constify.
11114         * arm-tdep.c (arm_skip_stub): Constify.
11115         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
11116         (gen_aggregate_elt_ref): Constify.
11117         * bcache.c (print_bcache_statistics): Constify.
11118         * bcache.h (print_bcache_statistics): Constify.
11119         * break-catch-throw.c (catch_exception_command_1):
11120         * breakpoint.c (struct ep_type_description::description):
11121         Constify.
11122         (add_solib_catchpoint): Constify.
11123         (catch_fork_command_1): Add cast.
11124         (add_catch_command): Constify.
11125         * breakpoint.h (add_catch_command, add_solib_catchpoint):
11126         Constify.
11127         * bsd-uthread.c (bsd_uthread_state): Constify.
11128         * buildsym.c (patch_subfile_names): Constify.
11129         * buildsym.h (next_symbol_text_func, patch_subfile_names):
11130         Constify.
11131         * c-exp.y (yyerror): Constify.
11132         (token::oper): Constify.
11133         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
11134         * c-varobj.c (cplus_describe_child): Constify.
11135         * charset.c (find_charset_names): Add cast.
11136         (find_charset_names): Constify array and add const_cast.
11137         * cli/cli-cmds.c (complete_command, cd_command): Constify.
11138         (edit_command): Constify.
11139         * cli/cli-decode.c (lookup_cmd): Constify.
11140         * cli/cli-dump.c (dump_memory_command, dump_value_command):
11141         Constify.
11142         (struct dump_context): Constify.
11143         (add_dump_command, restore_command): Constify.
11144         * cli/cli-script.c (get_command_line): Constify.
11145         * cli/cli-script.h (get_command_line): Constify.
11146         * cli/cli-utils.c (check_for_argument): Constify.
11147         * cli/cli-utils.h (check_for_argument): Constify.
11148         * coff-pe-read.c (struct read_pe_section_data): Constify.
11149         * command.h (lookup_cmd): Constify.
11150         * common/print-utils.c (decimal2str): Constify.
11151         * completer.c (gdb_print_filename): Constify.
11152         * corefile.c (set_gnutarget): Constify.
11153         * cp-name-parser.y (yyerror): Constify.
11154         * cp-valprint.c (cp_print_class_member): Constify.
11155         * cris-tdep.c (cris_register_name, crisv32_register_name):
11156         Constify.
11157         * d-exp.y (yyerror): Constify.
11158         (struct token::oper): Constify.
11159         * d-lang.h (d_yyerror): Constify.
11160         * dbxread.c (struct header_file_location::name): Constify.
11161         (add_old_header_file, add_new_header_file, last_function_name)
11162         (dbx_next_symbol_text, add_bincl_to_list)
11163         (find_corresponding_bincl_psymtab, set_namestring)
11164         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
11165         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
11166         * defs.h (command_line_input, print_address_symbolic)
11167         (deprecated_readline_begin_hook): Constify.
11168         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
11169         Constify.
11170         * event-top.c (handle_line_of_input): Constify and add cast.
11171         * exceptions.c (catch_errors): Constify.
11172         * exceptions.h (catch_errors): Constify.
11173         * expprint.c (print_subexp_standard, op_string, op_name)
11174         (op_name_standard, dump_raw_expression, dump_raw_expression):
11175         * expression.h (op_name, op_string, dump_raw_expression):
11176         Constify.
11177         * f-exp.y (yyerror): Constify.
11178         (struct token::oper): Constify.
11179         (struct f77_boolean_val::name): Constify.
11180         * f-lang.c (f_word_break_characters): Constify.
11181         * f-lang.h (f_yyerror): Constify.
11182         * fork-child.c (fork_inferior): Add cast.
11183         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
11184         (new_variant): Constify.
11185         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
11186         * gdbarch.c: Regenerate.
11187         * gdbcore.h (set_gnutarget): Constify.
11188         * go-exp.y (yyerror): Constify.
11189         (token::oper): Constify.
11190         * go-lang.h (go_yyerror): Constify.
11191         * go32-nat.c (go32_sysinfo): Constify.
11192         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
11193         * guile/scm-cmd.c (cmdscm_function): Constify.
11194         * guile/scm-param.c (pascm_param_value): Constify.
11195         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
11196         (h8300sx_register_name): Constify.
11197         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
11198         Constify.
11199         * ia64-tdep.c (ia64_register_names): Constify.
11200         * infcmd.c (construct_inferior_arguments): Constify.
11201         (path_command, attach_post_wait): Constify.
11202         * language.c (show_range_command, show_case_command)
11203         (unk_lang_error): Constify.
11204         * language.h (language_defn::la_error)
11205         (language_defn::la_name_of_this): Constify.
11206         * linespec.c (decode_line_2): Constify.
11207         * linux-thread-db.c (thread_db_err_str): Constify.
11208         * lm32-tdep.c (lm32_register_name): Constify.
11209         * m2-exp.y (yyerror): Constify.
11210         * m2-lang.h (m2_yyerror): Constify.
11211         * m32r-tdep.c (m32r_register_names): Constify and make static.
11212         * m68hc11-tdep.c (m68hc11_register_names): Constify.
11213         * m88k-tdep.c (m88k_register_name): Constify.
11214         * macroexp.c (appendmem): Constify.
11215         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
11216         (upgrade_type, parse_external, parse_partial_symbols)
11217         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
11218         (new_symbol): Constify.
11219         * memattr.c (mem_info_command): Constify.
11220         * mep-tdep.c (register_name_from_keyword): Constify.
11221         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
11222         Constify.
11223         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
11224         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
11225         * mi/mi-main.c (captured_mi_execute_command): Constify and add
11226         cast.
11227         (mi_execute_async_cli_command): Constify.
11228         * mips-tdep.c (mips_register_name): Constify.
11229         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
11230         (am33_register_name, am33_2_register_name)
11231         * moxie-tdep.c (moxie_register_names): Constify.
11232         * nat/linux-osdata.c (osdata_type): Constify fields.
11233         * nto-tdep.c (nto_parse_redirection): Constify.
11234         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
11235         (lookup_child_selector): Constify.
11236         (objc_methcall::name): Constify.
11237         * objc-lang.h (lookup_objc_class, lookup_child_selector)
11238         (lookup_struct_typedef): Constify.
11239         * objfiles.c (pc_in_section): Constify.
11240         * objfiles.h (pc_in_section): Constify.
11241         * p-exp.y (struct token::oper): Constify.
11242         (yyerror): Constify.
11243         * p-lang.h (pascal_yyerror): Constify.
11244         * parser-defs.h (op_name_standard): Constify.
11245         (op_print::string): Constify.
11246         (exp_descriptor::op_name): Constify.
11247         * printcmd.c (print_address_symbolic): Constify.
11248         * psymtab.c (print_partial_symbols): Constify.
11249         * python/py-breakpoint.c (stop_func): Constify.
11250         (bppy_get_expression): Constify.
11251         * python/py-cmd.c (cmdpy_completer::name): Constify.
11252         (cmdpy_function): Constify.
11253         * python/py-event.c (evpy_add_attribute)
11254         (gdbpy_initialize_event_generic): Constify.
11255         * python/py-event.h (evpy_add_attribute)
11256         (gdbpy_initialize_event_generic): Constify.
11257         * python/py-evts.c (add_new_registry): Constify.
11258         * python/py-finishbreakpoint.c (outofscope_func): Constify.
11259         * python/py-framefilter.c (get_py_iter_from_func): Constify.
11260         * python/py-inferior.c (get_buffer): Add cast.
11261         * python/py-param.c (parm_constant::name): Constify.
11262         * python/py-unwind.c (fprint_frame_id): Constify.
11263         * python/python.c (gdbpy_parameter_value): Constify.
11264         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
11265         * remote.c (memory_packet_config::name): Constify.
11266         (show_packet_config_cmd, remote_write_bytes)
11267         (remote_buffer_add_string):
11268         * reverse.c (exec_reverse_once): Constify.
11269         * rs6000-tdep.c (variant::name, variant::description): Constify.
11270         * rust-exp.y (rustyyerror): Constify.
11271         * rust-lang.c (rust_op_name): Constify.
11272         * rust-lang.h (rustyyerror): Constify.
11273         * serial.h (serial_ops::name): Constify.
11274         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
11275         (sh_sh3e_register_name, sh_sh2e_register_name)
11276         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
11277         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
11278         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
11279         (sh_sh4al_dsp_register_name): Constify.
11280         * sh64-tdep.c (sh64_register_name): Constify.
11281         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
11282         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
11283         * stabsread.c (patch_block_stabs, read_type_number)
11284         (ref_map::stabs, ref_add, process_reference)
11285         (symbol_reference_defined, define_symbol, define_symbol)
11286         (error_type, read_type, read_member_functions, read_cpp_abbrev)
11287         (read_one_struct_field, read_struct_fields, read_baseclasses)
11288         (read_tilde_fields, read_struct_type, read_array_type)
11289         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
11290         (read_huge_number, read_range_type, read_args, common_block_start)
11291         (find_name_end): Constify.
11292         * stabsread.h (common_block_start, define_symbol)
11293         (process_one_symbol, symbol_reference_defined, ref_add):
11294         * symfile.c (get_section_index, add_symbol_file_command):
11295         * symfile.h (get_section_index): Constify.
11296         * target-descriptions.c (tdesc_type::name): Constify.
11297         (tdesc_free_type): Add cast.
11298         * target.c (find_default_run_target):
11299         (add_deprecated_target_alias, find_default_run_target)
11300         (target_announce_detach): Constify.
11301         (do_option): Constify.
11302         * target.h (add_deprecated_target_alias): Constify.
11303         * thread.c (print_thread_info_1): Constify.
11304         * top.c (deprecated_readline_begin_hook, command_line_input):
11305         Constify.
11306         (init_main): Add casts.
11307         * top.h (handle_line_of_input): Constify.
11308         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
11309         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
11310         (tfind_command): Rename to ...
11311         (tfind_command_1): ... this and constify.
11312         (tfind_command): New function.
11313         (tfind_end_command, tfind_start_command): Adjust.
11314         (encode_source_string): Constify.
11315         * tracepoint.h (encode_source_string): Constify.
11316         * tui/tui-data.c (tui_partial_win_by_name): Constify.
11317         * tui/tui-data.h (tui_partial_win_by_name): Constify.
11318         * tui/tui-source.c (tui_set_source_content_nil): Constify.
11319         * tui/tui-source.h (tui_set_source_content_nil): Constify.
11320         * tui/tui-win.c (parse_scrolling_args): Constify.
11321         * tui/tui-windata.c (tui_erase_data_content): Constify.
11322         * tui/tui-windata.h (tui_erase_data_content): Constify.
11323         * tui/tui-winsource.c (tui_erase_source_content): Constify.
11324         * tui/tui.c (tui_enable): Add cast.
11325         * utils.c (defaulted_query): Constify.
11326         (init_page_info): Add cast.
11327         (puts_debug, subset_compare): Constify.
11328         * utils.h (subset_compare): Constify.
11329         * varobj.c (varobj_format_string): Constify.
11330         * varobj.h (varobj_format_string): Constify.
11331         * vax-tdep.c (vax_register_name): Constify.
11332         * windows-nat.c (windows_detach): Constify.
11333         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
11334         * xml-support.c (gdb_xml_end_element): Constify.
11335         * xml-tdesc.c (tdesc_start_reg): Constify.
11336         * xstormy16-tdep.c (xstormy16_register_name): Constify.
11337         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
11338         * xtensa-tdep.h (xtensa_register_t::name): Constify.
11339
11340 2017-04-05  Pedro Alves  <palves@redhat.com>
11341
11342         * proc-api.c (struct trans): Constify.
11343         (procfs_note): Constify.
11344         * proc-events.c (struct trans, syscall_table):
11345         * proc-flags.c (struct trans): Constify.
11346         * proc-utils.h (procfs_note): Constify.
11347         * proc-why.c (struct trans): Constify.
11348         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
11349         (procfs_detach): Constify.
11350         * sol-thread.c (struct string_map): Constify.
11351         (td_err_string, td_state_string): Constify.
11352
11353 2017-04-05  Pedro Alves  <palves@redhat.com>
11354
11355         * proc-api.c (procfs_filename): Don't initialize
11356         procfs_filename.
11357         (prepare_to_trace): Assume procfs_filename is non-NULL.
11358         (_initialize_proc_api): Give procfs_filename a default value here.
11359
11360 2017-04-05  Pedro Alves  <palves@redhat.com>
11361
11362         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
11363         'cond_string' parameter.
11364         (extract_exception_regexp): Constify 'string' parameter.
11365         (catch_exception_command_1): Constify.
11366         * breakpoint.c (init_catchpoint)
11367         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
11368         parameter.
11369         (ep_parse_optional_if_clause, catch_fork_command_1)
11370         (catch_exec_command_1): Constify.
11371         * breakpoint.h (init_catchpoint): Constify 'cond_string'
11372         parameter.
11373         (ep_parse_optional_if_clause): Constify.
11374         * cli/cli-utils.c (remove_trailing_whitespace)
11375         (check_for_argument): Constify.
11376         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
11377         non-const overload.
11378         (check_for_argument): Likewise.
11379
11380 2017-04-05  Pedro Alves  <palves@redhat.com>
11381
11382         * event-top.c (command_line_handler): Add cast to execute_command
11383         call.
11384         * record-btrace.c (cmd_record_btrace_bts_start)
11385         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
11386         (cmd_record_btrace_start): Add cast to execute_command call.
11387         * record-full.c (record_full_goto_insn):
11388         * record.c (record_start, record_stop): Add cast to
11389         execute_command_to_string calls.
11390         (cmd_record_start): Add cast to execute_command calls.
11391
11392 2017-04-05  Pedro Alves  <palves@redhat.com>
11393
11394         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
11395         static inline function.
11396         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
11397         array and use gdb_PyArg_ParseTupleAndKeywords.
11398         * python/py-cmd.c (cmdpy_init): Likewise.
11399         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
11400         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
11401         (infpy_search_memory): Likewise.
11402         * python/py-objfile.c (objfpy_add_separate_debug_file)
11403         (gdbpy_lookup_objfile): Likewise.
11404         * python/py-symbol.c (gdbpy_lookup_symbol)
11405         (gdbpy_lookup_global_symbol): Likewise.
11406         * python/py-type.c (gdbpy_lookup_type): Likewise.
11407         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
11408         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
11409         Likewise.
11410
11411 2017-04-05  Pedro Alves  <palves@redhat.com>
11412
11413         * python/python-internal.h (gdb_PyGetSetDef): New type.
11414         * python/py-block.c (block_object_getset)
11415         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
11416         * python/py-event.c (event_object_getset)
11417         (finish_breakpoint_object_getset): Likewise.
11418         * python/py-inferior.c (inferior_object_getset): Likewise.
11419         * python/py-infthread.c (thread_object_getset): Likewise.
11420         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
11421         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
11422         * python/py-objfile.c (objfile_getset): Likewise.
11423         * python/py-progspace.c (pspace_getset): Likewise.
11424         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
11425         Likewise.
11426         * python/py-record.c (recpy_record_getset): Likewise.
11427         * python/py-symbol.c (symbol_object_getset): Likewise.
11428         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
11429         Likewise.
11430         * python/py-type.c (type_object_getset, field_object_getset):
11431         Likewise.
11432         * python/py-value.c (value_object_getset): Likewise.
11433
11434 2017-04-05  Pedro Alves  <palves@redhat.com>
11435
11436         * python/python-internal.h (gdb_PyObject_CallMethod)
11437         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
11438         New functions.
11439         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
11440         (PySys_GetObject, PySys_SetPath): New macros.
11441
11442 2017-04-05  Pedro Alves  <palves@redhat.com>
11443
11444         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
11445         info_osdata_command.
11446         * osdata.c (info_osdata_command): Rename to ...
11447         (info_osdata): ... this.  Constify 'type' parameter, and remove
11448         the 'from_tty' parameter.  Accept NULL TYPE.
11449         (info_osdata_command): New function.
11450         * osdata.h (info_osdata_command): Remove declaration.
11451         (info_osdata): New declaration.
11452
11453 2017-04-05  Pedro Alves  <palves@redhat.com>
11454
11455         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
11456         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
11457         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
11458         parameter.
11459         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
11460         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
11461         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
11462         parameter.
11463         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
11464         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
11465         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
11466         (mi_cmd_file_list_exec_source_files)
11467         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
11468         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11469         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
11470         parameter.
11471         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
11472         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
11473         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
11474         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
11475         (mi_cmd_stack_info_frame): Constify 'command' parameter.
11476         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
11477         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
11478         'command' parameter.
11479         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
11480         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
11481         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
11482         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
11483         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
11484         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
11485         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
11486         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
11487         (mi_cmd_var_set_update_range): Constify 'command' parameter.
11488         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
11489         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
11490         parameter.
11491         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
11492         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
11493         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
11494         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
11495         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
11496         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
11497         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
11498         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
11499         (mi_cmd_data_list_changed_registers)
11500         (mi_cmd_data_write_register_values)
11501         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
11502         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
11503         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
11504         (mi_cmd_list_features, mi_cmd_list_target_features)
11505         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
11506         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
11507         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
11508         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
11509         (mi_cmd_trace_frame_collected): Constify 'command'
11510         parameter.
11511         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
11512         'command' parameter.
11513
11514 2017-04-05  Pedro Alves  <palves@redhat.com>
11515
11516         * ada-lang.c (ada_completer_word_break_characters): Now a const
11517         array.
11518         (ada_get_gdb_completer_word_break_characters): Constify.
11519         * completer.c (gdb_completer_command_word_break_characters)
11520         (gdb_completer_file_name_break_characters)
11521         (gdb_completer_quote_characters): Now const arrays.
11522         (get_gdb_completer_quote_characters): Constify.
11523         (set_rl_completer_word_break_characters): New function.
11524         (set_gdb_completion_word_break_characters)
11525         (complete_line_internal): Use it.
11526         * completer.h (get_gdb_completer_quote_characters): Constify.
11527         (set_rl_completer_word_break_characters): Declare.
11528         * f-lang.c (f_word_break_characters): Constify.
11529         * language.c (default_word_break_characters): Constify.
11530         * language.h (language_defn::la_word_break_characters): Constify.
11531         (default_word_break_characters): Constify.
11532         * top.c (init_main): Use set_rl_completer_word_break_characters.
11533
11534 2017-04-05  Pedro Alves  <palves@redhat.com>
11535
11536         * aix-thread.c (aix_thread_pid_to_str)
11537         (aix_thread_extra_thread_info): Constify.
11538         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
11539         * bsd-uthread.c (bsd_uthread_extra_thread_info)
11540         (bsd_uthread_pid_to_str): Constify.
11541         * corelow.c (core_pid_to_str): Constify.
11542         * darwin-nat.c (darwin_pid_to_str): Constify.
11543         * fbsd-nat.c (fbsd_pid_to_str): Constify.
11544         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
11545         Constify.
11546         * gnu-nat.c (gnu_pid_to_str): Constify.
11547         * go32-nat.c (go32_pid_to_str): Constify.
11548         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
11549         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
11550         * inferior.c (inferior_pid_to_str): Constify.
11551         * linux-nat.c (linux_nat_pid_to_str): Constify.
11552         * linux-tdep.c (linux_core_pid_to_str): Constify.
11553         * linux-thread-db.c (thread_db_pid_to_str)
11554         (thread_db_extra_thread_info): Constify.
11555         * nto-tdep.c (nto_extra_thread_info): Constify.
11556         * nto-tdep.h (nto_extra_thread_info): Constify.
11557         * obsd-nat.c (obsd_pid_to_str): Constify.
11558         * procfs.c (procfs_pid_to_str): Constify.
11559         * ravenscar-thread.c (ravenscar_extra_thread_info)
11560         (ravenscar_pid_to_str): Constify.
11561         * remote-sim.c (gdbsim_pid_to_str): Constify.
11562         * remote.c (remote_threads_extra_info, remote_pid_to_str):
11563         Constify.
11564         * sol-thread.c (solaris_pid_to_str): Constify.
11565         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
11566         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
11567         * target.c (default_pid_to_str, target_pid_to_str)
11568         (normal_pid_to_str, default_pid_to_str): Constify.
11569         * target.h (target_ops::to_pid_to_str)
11570         (target_ops::to_extra_thread_info): Constify.
11571         (target_pid_to_str, normal_pid_to_str): Constify.
11572         * windows-nat.c (windows_pid_to_str): Constify.
11573         * gdbarch.sh (core_pid_to_str): Constify.
11574         * target-delegates.c: Regenerate.
11575         * gdbarch.h, gdbarch.c: Regenerate.
11576
11577 2017-04-05  Pedro Alves  <palves@redhat.com>
11578
11579         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
11580         the memory of the temporary warning_pre_print override.
11581         * utils.c (warning_pre_print): Constify.
11582         * utils.h (warning_pre_print): Constify.
11583
11584 2017-04-05  Pedro Alves  <palves@redhat.com>
11585
11586         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
11587         (shell_command): New function.
11588         (make_command): Use std::string.
11589         (init_cli_cmds): Register shell_command instead of shell_escape.
11590
11591 2017-04-05  Pedro Alves  <palves@redhat.com>
11592
11593         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11594         * tracepoint.c (default_collect): Don't initialize.
11595
11596 2017-04-05  Pedro Alves  <palves@redhat.com>
11597
11598         * macroexp.c (macro_buffer::shared): Now a bool.
11599         (init_buffer): Update.
11600         (init_shared_buffer): Constify 'addr' parameter.
11601         (substitute_args, expand, macro_expand, macro_expand_next): Remove
11602         casts.
11603
11604 2017-04-05  Pedro Alves  <palves@redhat.com>
11605
11606         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
11607         * disasm.c (set_disassembler_options): Constify local.
11608         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11609
11610 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
11611
11612         PR gdb/21352
11613         * tracefile.c (tsave_command): Fix argument parsing for '-r'
11614         option.
11615
11616 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11617
11618         * frame.c (frame_unwind_register_unsigned): Call
11619         frame_unwind_register_value.
11620
11621 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11622
11623         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11624         Use gdb_test_multiple, and don't match anchor.
11625
11626 2017-04-05  Pedro Alves  <palves@redhat.com>
11627
11628         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11629         (Write After Approval): Remove Simon Marchi.
11630
11631 2017-04-05  Pedro Alves  <palves@redhat.com>
11632
11633         * common/gdb_optional.h (optional::optional): Make constexpr and
11634         initialize m_dummy.
11635
11636 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11637
11638         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11639         (amd64fbsd_jmp_buf_reg_offset): Remove.
11640         (amd64fbsd_supply_uthread): Remove function.
11641         (amd64fbsd_collect_uthread): Remove function.
11642         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11643         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11644         (x86_64-*-freebsd*): Remove bsd-uthread.o.
11645         (fbsd-nat.c): Update comment.
11646         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11647         (i386fbsd_jmp_buf_reg_offset): Remove.
11648         (i386fbsd_supply_uthread): Remove function.
11649         (i386fbsd_collect_uthread): Remove function.
11650         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11651
11652 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11653
11654         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11655         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11656         * NEWS: Mention that support for FreeBSD/alpha was removed.
11657         * alpha-fbsd-tdep.c: Delete file.
11658         * config/alpha/fbsd.mh: Delete file.
11659         * configure.host: Delete alpha*-*-freebsd* and
11660         alpha*-*-kfreebsd*-gnu.
11661         * configure.tgt: Delete alpha*-*-freebsd* and
11662         alpha*-*-kfreebsd*-gnu.
11663
11664 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11665
11666         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11667         amd64bsd_store_inferior_registers): Use ptid from regcache.
11668
11669 2017-04-04  Pedro Alves  <palves@redhat.com>
11670
11671         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
11672         data fields, make them private and add "m_" prefixes.
11673         (lnp_state_machine::lnp_state_machine): New ctor.
11674         (record_line, check_line_address, handle_set_discriminator)
11675         (handle_set_address, handle_advance_pc, handle_special_opcode)
11676         (handle_advance_line, handle_set_file, handle_negate_stmt)
11677         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11678         (end_sequence, advance_line): New methods.
11679         (m_gdbarch, m_record_lines_p): New fields.
11680         (lnp_reader_state): Delete.
11681         (dwarf_record_line): Rename to ...
11682         (lnp_state_machine::record_line): ... adjust.
11683         (init_lnp_state_machine): Delete.
11684         (lnp_state_machine::lnp_state_machine): New.
11685         (check_line_address): Rename to ...
11686         (lnp_state_machine::check_line_address): This.
11687         (dwarf_decode_lines_1): Remove reference to "reader_state".
11688         Adjust lnp_state_machine having a non-default ctor.  Use bool.
11689         State machine internal state manipulation moved to
11690         lnp_state_machine methods.
11691
11692 2017-04-04  Pedro Alves  <palves@redhat.com>
11693
11694         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11695         unittests/offset-type-selftests.c.
11696         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11697         * common/offset-type.h: New file.
11698         * common/preprocessor.h: New file.
11699         * common/traits.h: New file.
11700         * common/valid-expr.h: New file.
11701         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
11702         sect_offset and cu_offset strong typedefs throughout.
11703         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11704         typedefs throughout.
11705         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
11706         sect_offset and cu_offset strong typedefs throughout.
11707         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11708         typedefs throughout.
11709         * gdbtypes.h: Include "common/offset-type.h".
11710         (cu_offset): Now an offset type (strong typedef) instead of a
11711         struct.
11712         (sect_offset): Likewise.
11713         (union call_site_parameter_u): Rename "param_offset" field to
11714         "param_cu_off".
11715         * unittests/offset-type-selftests.c: New file.
11716
11717 2017-04-04  Pedro Alves  <palves@redhat.com>
11718
11719         * common/underlying.h: New file.
11720         * dwarf2read.c: Include "common/gdb_optional.h" and
11721         "common/underlying.h".
11722         (dir_index, file_name_index): New types.
11723         (file_entry): Use them.
11724         (file_entry::include): Use to_underlying.
11725         (line_header::add_file_name): Use dir_index.
11726         (read_formatted_entries): Use gdb::optional.  Read form before
11727         writting to file_entry.
11728         (dwarf_decode_line_header): Use dir_index.
11729         (lnp_state_machine::current_file): Use to_underlying.
11730         (lnp_state_machine::file): Change type to file_name_index.
11731         (dwarf_record_line): Use to_underlying.
11732         (init_lnp_state_machine): Use file_name_index.
11733         (dwarf_decode_lines_1): Use dir_index and file_name_index.
11734
11735 2017-04-04  Pedro Alves  <palves@redhat.com>
11736
11737         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11738         operator bool, has_value and get methods.
11739
11740 2017-04-04  Pedro Alves  <palves@redhat.com>
11741
11742         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11743         fields.
11744         (line_header): Initialize all data fields.  Change type of
11745         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11746         Change type of include_dirs to std::vector<const char *>.  Remove
11747         num_include_dirs, include_dirs_size.  Change type of file_names to
11748         std::vector<file_entry>.  Remove num_file_names, file_names_size.
11749         (line_header::line_header): New.
11750         (line_header::add_include_dir, line_header::add_file_name): New
11751         methods.
11752         (line_header::include_dir_at): Remove NULL check.
11753         (line_header::file_name_at): Add const overload.
11754         (line_header_up): New unique_ptr typedef.
11755         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
11756         std::vector.  Remove free_line_header call.
11757         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
11758         free_line_header call.
11759         (free_cu_line_header): Delete.
11760         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11761         (setup_type_unit_groups): Use line_header_up instead of cleanups.
11762         Adjust to use std::vector.
11763         (free_line_header): Delete.
11764         (free_line_header_voidp): Use delete.
11765         (add_include_dir): Replace with ...
11766         (line_header::add_include_dir): ... this method.  Use std::vector.
11767         (add_file_name): Replace with ...
11768         (line_header::add_file_name): ... this method.  Use std::vector.
11769         (add_include_dir_stub): Delete.
11770         (read_formatted_entries): Remove memset.
11771         (dwarf_decode_line_header): Return a line_header_up instead of a
11772         raw pointer.  Remove cleanup handling.  Pass lambdas to
11773         read_formatted_entries.  Adjust to use line_header methods.
11774         (dwarf_decode_lines_1): Adjust to use line_header methods.
11775         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11776         use std::vector.
11777
11778 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
11779
11780         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11781         instead of struct ptid.
11782
11783 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
11784
11785         * frame.c (get_frame_register_bytes): Unwind using value.
11786         (put_frame_register_bytes): Likewise.
11787
11788 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
11789
11790         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11791         aggregate-like.
11792
11793 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
11794
11795         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11796
11797 2017-03-29  Yao Qi  <yao.qi@linaro.org>
11798
11799         * gdbthread.h (struct thread_info): Declare constructor and
11800         destructor.  Add some in-class member initializers.
11801         * thread.c (free_thread): Remove.
11802         (init_thread_list): Call delete instead of free_thread.
11803         (new_thread): Call thread_info constructor.
11804         (thread_info::thread_info): New function.
11805         (thread_info::~thread_info): New function.
11806         (delete_thread_1): Call delete instead of free_thread.
11807         (make_cleanup_restore_current_thread): Move tp and frame to
11808         inner block.
11809
11810 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11811
11812         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11813         (arc_skip_prologue): Likewise.
11814         (arc_make_frame_cache): Likewise.
11815         (arc_pv_get_operand): New function.
11816         (arc_is_in_prologue): Likewise.
11817         (arc_analyze_prologue): Likewise.
11818         (arc_print_frame_cache): Likewise.
11819         (MAX_PROLOGUE_LENGTH): New constant.
11820
11821 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11822
11823         * configure.tgt: Add arc-insn.o.
11824         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11825         (dump_arc_instruction_command): New function.
11826         (arc_fprintf_disasm): Likewise.
11827         (arc_disassemble_info): Likewise.
11828         (arc_insn_get_operand_value): Likewise.
11829         (arc_insn_get_operand_value_signed): Likewise.
11830         (arc_insn_get_memory_base_reg): Likewise.
11831         (arc_insn_get_memory_offset): Likewise.
11832         (arc_insn_get_branch_target): Likewise.
11833         (arc_insn_dump): Likewise.
11834         (arc_insn_get_linear_next_pc): Likewise.
11835         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11836         (arc_disassemble_info): Likewise.
11837         (arc_insn_get_branch_target): Likewise.
11838         (arc_insn_get_linear_next_pc): Likewise.
11839         * NEWS: Mention new "maint print arc arc-instruction".
11840
11841 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11842
11843         * arc-tdep (maintenance_print_arc_list): New variable.
11844         (maintenance_print_arc_command): New function.
11845
11846 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11847
11848         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11849         Add "limm" and "reserved".
11850         (arc_cannot_fetch_register, arc_cannot_store_register): Add
11851         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11852         * arc-tdep.h (arc_regnum): Likewise.
11853
11854 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11855
11856         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11857         for THREADPTR register.
11858         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11859         register.
11860         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11861         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11862         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11863
11864 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11865
11866         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11867         registers above gdbarch_num_regs (gdbarch) as privileged in
11868         call0 ABI.
11869
11870 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11871
11872         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11873         for a single specified register or for all registers in
11874         a0_base..a0_base + C0_NREGS range.
11875         (supply_gregset_reg): Call regcache_raw_supply for a single
11876         specified register or for all registers in a0_base..a0_base +
11877         C0_NREGS range.
11878
11879 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11880
11881         * arch/xtensa.h (C0_NREGS): Add definition.
11882         * xtensa-tdep.c (C0_NREGS): Remove definition.
11883
11884 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11885
11886         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11887         Drop xtensa_default_isa initialization.
11888         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11889
11890 2017-03-27  Pedro Alves  <palves@redhat.com>
11891
11892         * dwarf2read.c (file_entry) <dir_index>: Add comment.
11893         (file_entry::include_dir): New method.
11894         (line_header::include_dir_at, line_header::file_name_at): New
11895         methods.
11896         (setup_type_unit_groups, setup_type_unit_groups)
11897         (psymtab_include_file_name): Simplify using the new methods.
11898         (lnp_state_machine) <the_line_header>: New field.
11899         <file>: Add comment.
11900         (lnp_state_machine::current_file): New method.
11901         (dwarf_record_line): Simplify using the new methods.
11902         (init_lnp_state_machine): Initialize the "the_line_header" field.
11903         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11904         Simplify using the new methods.
11905
11906 2017-03-27  Pedro Alves  <palves@redhat.com>
11907
11908         * cp-name-parser.y (make_empty): Delete.
11909         (demangler_special, nested_name, ptr_operator, array_indicator)
11910         (direct_declarator, declarator_1): Use fill_comp instead of
11911         make_empty.
11912
11913 2017-03-27  Pedro Alves  <palves@redhat.com>
11914
11915         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11916         to ATTRIBUTE_PRINTF.
11917         * solib-target.c (library_list_start_list): Print "string" not
11918         "version".
11919         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11920         gdb_xml_error call.
11921
11922 2017-03-27  Pedro Alves  <palves@redhat.com>
11923
11924         * dwarf2read.c (struct file_and_directory): New.
11925         (dwarf2_get_dwz_file): Adjust to use std::string.
11926         (dw2_get_file_names_reader): Adjust to use file_and_directory.
11927         (find_file_and_directory): Adjust to return a file_and_directory
11928         object.
11929         (read_file_scope): Adjust to use file_and_directory.  Remove
11930         make_cleanup/do_cleanups calls.
11931         (open_and_init_dwp_file): Adjust to use std::string.  Remove
11932         make_cleanup/do_cleanups calls.
11933         * python/python.c (do_start_initialization): Adjust to ldirname
11934         returning a std::string.
11935         * utils.c (ldirname): Now returns a std::string.
11936         * utils.h (ldirname): Change return type to std::string.
11937         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11938         returning a std::string.
11939         * xml-tdesc.c (file_read_description_xml): Likewise.
11940
11941 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
11942
11943         * regcache.c (regcache_debug_print_register): New function.
11944         * regcache.h (regcache_debug_print_register): New declaration.
11945         * target.c (debug_print_register): Remove.
11946         (target_fetch_registers): Call regcache_debug_print_register.
11947         (target_store_registers): Likewise.
11948
11949 2017-03-24  Pádraig Brady  <pbrady@fb.com>
11950
11951         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11952         reference beyond the 'lh->include_dirs' array before accessing to
11953         it.
11954         (psymtab_include_file_name): Likewise.
11955         (dwarf_decode_lines_1): Likewise.
11956         (dwarf_decode_lines): Likewise.
11957         (file_file_name): Likewise.
11958
11959 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
11960
11961         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11962         inferior_ptid.
11963         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11964         ps_lsetfpregs): Likewise.
11965         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11966         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11967         ps_lsetfpregs): Likewise.
11968         * target.c (target_fetch_registers, target_store_registers):
11969         Remove asserts.
11970
11971 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
11972
11973         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11974
11975 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11976
11977         * aarch64-tdep.c (aarch64_process_record_test): Declare.
11978         (_initialize_aarch64_tdep): Register it.
11979         (aarch64_record_load_store): Handle PRFM instruction.
11980         (aarch64_process_record_test): New function.
11981
11982 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11983
11984         * aarch64-tdep.c (aarch64_record_load_store): Fix code
11985         indentation.
11986
11987 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11988
11989         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
11990
11991 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11992
11993         python/python.c (do_start_initialization): Fix memory leak.
11994
11995 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11996
11997         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
11998         using get_ptrace_pid.
11999         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
12000         inferior_ptid.
12001         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
12002         inferior_ptid instead of pid.
12003
12004 2017-03-22  Yao Qi  <yao.qi@linaro.org>
12005
12006         * aarch64-tdep.c: Wrap locally used classes in anonymous
12007         namespace.
12008         * arm-tdep.c: Likewise.
12009         * linespec.c: Likewise.
12010         * ui-out.c: Likewise.
12011
12012 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
12013
12014         PR gdb/19637
12015         * python/lib/gdb/printer/bound_registers.py: Import sys.
12016
12017 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12018
12019         * windows-nat.c (do_windows_fetch_inferior_registers): Add
12020         windows_thread_info parameter and use it instead of
12021         current_thread.
12022         (windows_fetch_inferior_registers): Don't set current_thread,
12023         pass the thread to do_windows_fetch_inferior_registers.  Use
12024         ptid from regcache instead of inferior_ptid.
12025         (do_windows_store_inferior_registers): Add windows_thread_info
12026         parameter and use it instead of current_thread.
12027         (windows_store_inferior_registers): Don't set current_thread,
12028         pass the thread to do_windows_store_inferior_registers.  Use
12029         ptid from regcache instead of inferior_ptid.
12030
12031 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12032
12033         * ser-mingw.c (ser_windows_raw): Remove reference to
12034         struct serial::current_timeout.
12035
12036 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
12037
12038         PR tdep/20928
12039         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12040         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12041         (sparc64_fsr_type): Fix %fsr decoding.
12042
12043 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
12044
12045         * python/py-record-btrace.c (btpy_insn_data): Change return type
12046         for Python 2.
12047
12048 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12049
12050         * spu-linux-nat.c (spu_fetch_inferior_registers,
12051         spu_store_inferior_registers): Use ptid from regcache, set and
12052         restore inferior_ptid.
12053         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12054         Likewise.
12055
12056 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12057
12058         * i386-linux-nat.c (fetch_register, store_register,
12059         i386_linux_fetch_inferior_registers,
12060         i386_linux_store_inferior_registers): Use ptid from regcache.
12061         * ia64-linux-nat.c (ia64_linux_fetch_register,
12062         ia64_linux_store_register): Likewise.
12063         * inf-ptrace.c (inf_ptrace_fetch_register,
12064         inf_ptrace_store_register): Likewise.
12065         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12066         m32r_linux_store_inferior_registers): Likewise.
12067         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12068         m68kbsd_store_inferior_registers): Likewise.
12069         * m68k-linux-nat.c (fetch_register, store_register,
12070         m68k_linux_fetch_inferior_registers,
12071         m68k_linux_store_inferior_registers): Likewise.
12072         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12073         m88kbsd_store_inferior_registers): Likewise.
12074         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12075         mips_fbsd_store_inferior_registers): Likewise.
12076         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12077         mips64_linux_regsets_store_registers): Likewise.
12078         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12079         mipsnbsd_store_inferior_registers): Likewise.
12080         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12081         mips64obsd_store_inferior_registers): Likewise.
12082         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12083         Likewise.
12084         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12085         ppcfbsd_store_inferior_registers): Likewise.
12086         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12087         ppc_linux_store_inferior_registers): Likewise.
12088         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12089         ppcnbsd_store_inferior_registers): Likewise.
12090         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12091         ppcobsd_store_registers): Likewise.
12092         * procfs.c (procfs_fetch_registers, procfs_store_registers):
12093         Likewise.
12094         * ravenscar-thread.c (ravenscar_fetch_registers,
12095         ravenscar_store_registers, ravenscar_prepare_to_store):
12096         Likewise.
12097         * record-btrace.c (record_btrace_fetch_registers,
12098         record_btrace_store_registers, record_btrace_prepare_to_store):
12099         Likewise.
12100         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12101         Lookup inferior using ptid from regcache, instead of
12102         current_inferior.
12103         * remote.c (remote_fetch_registers, remote_store_registers): Use
12104         ptid from regcache.
12105         * rs6000-nat.c (fetch_register, store_register): Likewise.
12106         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12107         s390_linux_store_inferior_registers): Likewise.
12108         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12109         shnbsd_store_inferior_registers): Likewise.
12110         * sol-thread.c (sol_thread_fetch_registers,
12111         sol_thread_store_registers): Likewise.
12112         * sparc-nat.c (sparc_fetch_inferior_registers,
12113         sparc_store_inferior_registers): Likewise.
12114         * tilegx-linux-nat.c (fetch_inferior_registers,
12115         store_inferior_registers): Likewise.
12116         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
12117         vaxbsd_store_inferior_registers): Likewise.
12118         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
12119         store_xtregs): Likewise.
12120
12121 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12122
12123         PR gdb/14441
12124         * NEWS: Mention support for rvalue references in GDB and python.
12125         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
12126         supports both lvalue and rvalue references.
12127
12128 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12129
12130         PR gdb/14441
12131         * gdbtypes.c (rank_one_type): Implement overloading
12132         resolution rules regarding rvalue references.
12133
12134 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12135
12136         PR gdb/14441
12137         * aarch64-tdep.c (aarch64_type_align)
12138         (aarch64_extract_return_value, aarch64_store_return_value): Change
12139         lvalue reference type checks to general reference type checks.
12140         * amd64-tdep.c (amd64_classify): Likewise.
12141         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
12142         Likewise.
12143         * arm-tdep.c (arm_type_align, arm_extract_return_value)
12144         (arm_store_return_value): Likewise.
12145         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
12146         * c-typeprint.c (c_print_type): Likewise.
12147         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
12148         (cplus_number_of_children, cplus_describe_child): Likewise.
12149         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
12150         * completer.c (expression_completer): Likewise.
12151         * cp-support.c (make_symbol_overload_list_adl_namespace):
12152         Likewise.
12153         * darwin-nat-info.c (info_mach_region_command): Likewise.
12154         * dwarf2loc.c (entry_data_value_coerce_ref)
12155         (value_of_dwarf_reg_entry): Likewise.
12156         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
12157         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
12158         Likewise.
12159         * findvar.c (extract_typed_address, store_typed_address):
12160         Likewise.
12161         * gdbtypes.c (rank_one_type): Likewise.
12162         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
12163         * infcall.c (value_arg_coerce): Likewise.
12164         * language.c (pointer_type): Likewise.
12165         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
12166         Likewise.
12167         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
12168         * mn10300-tdep.c (mn10300_type_align): Likewise.
12169         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
12170         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
12171         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
12172         Likewise.
12173         * printcmd.c (print_formatted, x_command): Likewise.
12174         * python/py-type.c (typy_get_composite, typy_template_argument):
12175         Likewise.
12176         * python/py-value.c (valpy_referenced_value)
12177         (valpy_get_dynamic_type, value_has_field): Likewise.
12178         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
12179         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
12180         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
12181         * spu-tdep.c (spu_scalar_value_p): Likewise.
12182         * symtab.c (lookup_symbol_aux): Likewise.
12183         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
12184         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
12185         Likewise.
12186         * valops.c (value_cast_pointers, value_cast)
12187         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
12188         (value_struct_elt, value_struct_elt_bitpos)
12189         (value_find_oload_method_list, find_overload_match)
12190         (value_rtti_indirect_type): Likewise.
12191         * valprint.c (val_print_scalar_type_p, generic_val_print):
12192         Likewise.
12193         * value.c (value_actual_type, value_as_address, unpack_long)
12194         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
12195         (coerce_ref): Likewise.
12196         * varobj.c (varobj_get_value_type): Likewise.
12197
12198 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12199
12200         PR gdb/14441
12201         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
12202         table of constants.
12203         * python/lib/gdb/command/explore.py: Support exploring values
12204         of rvalue reference types.
12205         * python/lib/gdb/types.py: Implement get_basic_type() for
12206         rvalue reference types.
12207         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
12208         constant.
12209         * python/py-value.c (valpy_getitem): Add an rvalue reference
12210         check.
12211         (valpy_reference_value): Add new parameter "refcode".
12212         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
12213         New wrappers for valpy_reference_value().
12214         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12215         (gdbpy_invoke_xmethod): Likewise.
12216
12217 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12218
12219         PR gdb/14441
12220         * dwarf2read.c (process_die, read_type_die_1): Handle the
12221         DW_TAG_rvalue_reference_type DIE.
12222         (read_tag_reference_type): Add new parameter "refcode".
12223
12224 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12225
12226         PR gdb/14441
12227         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
12228         (c_type_print_modifier, c_type_print_varspec_suffix)
12229         (c_type_print_base): Support printing rvalue reference types.
12230         * c-valprint.c (c_val_print, c_value_print): Support printing
12231         rvalue reference values.
12232
12233 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12234
12235         PR gdb/14441
12236         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
12237         typename.
12238         * cp-support.c (replace_typedefs): Handle
12239         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
12240         * python/py-type.c (typy_lookup_type): Likewise.
12241
12242 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12243
12244         PR gdb/14441
12245         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
12246         * parse.c (insert_type): Change assert statement.
12247         (follow_types): Handle rvalue reference types.
12248         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
12249         constant.
12250
12251 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12252
12253         PR gdb/14441
12254         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
12255         value_ref() interface.
12256         * c-valprint.c (c_value_print): Likewise.
12257         * infcall.c (value_arg_coerce): Likewise.
12258         * python/py-value.c (valpy_reference_value): Likewise.
12259         * valops.c (value_cast, value_reinterpret_cast)
12260         (value_dynamic_cast, typecmp): Likewise.
12261         (value_ref): Parameterize by kind of return value reference type.
12262         * value.h (value_ref): Add new parameter "refcode".
12263
12264 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12265
12266         PR gdb/14441
12267         * dwarf2read.c (read_tag_reference_type): Use
12268         lookup_lvalue_reference_type() instead of lookup_reference_type().
12269         * eval.c (evaluate_subexp_standard): Likewise.
12270         * f-exp.y: Likewise.
12271         * gdbtypes.c (make_reference_type, lookup_reference_type):
12272         Generalize with rvalue reference types.
12273         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
12274         convenience wrappers for lookup_reference_type().
12275         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
12276         reference kind parameter.
12277         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
12278         wrappers for lookup_reference_type().
12279         * guile/scm-type.c (gdbscm_type_reference): Use
12280         lookup_lvalue_reference_type() instead of lookup_reference_type().
12281         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
12282         * parse.c (follow_types): Likewise.
12283         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
12284         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
12285         Likewise.
12286         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12287         (gdbpy_invoke_xmethod): Likewise.
12288         * stabsread.c: Provide extra argument to make_reference_type()
12289         call.
12290         * valops.c (value_ref, value_rtti_indirect_type): Use
12291         lookup_lvalue_reference_type() instead of lookup_reference_type().
12292
12293 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12294
12295         PR gdb/14441
12296         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
12297         (TYPE_IS_REFERENCE): New macro.
12298         (struct type): Add rvalue_reference_type field.
12299         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
12300
12301 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
12302
12303         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
12304         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
12305         New function definition.
12306         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
12307         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
12308         New function declaration.
12309         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
12310         * mi/mi-interp.h: New file.
12311         * solib.c (info_sharedlibrary_command): Replace for loop with
12312         ALL_SO_LIBS macro
12313         * solib.h (update_solib_list): New function declaration.
12314         (so_list_head): Move macro.
12315         * solist.h (ALL_SO_LIBS): New macro.
12316
12317 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
12318
12319         * infcmd.c (post_create_inferior): Remove unused argument in
12320         call to solib_add.
12321         * remote.c (remote_start_remote): Likewise.
12322         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
12323         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
12324         (enable_break): Likewise.
12325         * solib.c (update_solib_list): Remove unused target argument
12326         and its documentation.
12327         (solib_add): Remove unused target argument.  Remove unused
12328         argument in call to update_solib_list.
12329         (info_sharedlibrary_command): Remove unused argument in call
12330         to update_solib_list.
12331         (sharedlibrary_command): Remove unused argument in call to
12332         solib_add.
12333         (handle_solib_event): Likewise.
12334         (reload_shared_libraries): Likewise.
12335         * solib.h (solib_add): Remove unused target argument.
12336
12337 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12338
12339         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
12340         (s390_displaced_step_fixup): Cover relative branches with the
12341         default fixup handling.  This fixes lack of support for some
12342         relative branch instructions.
12343
12344 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12345
12346         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
12347         ptid from regcache.
12348
12349 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12350
12351         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
12352         i386_darwin_store_inferior_registers): Use ptid from regcache.
12353
12354 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12355
12356         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
12357         i386bsd_store_inferior_registers): Use ptid from regcache.
12358
12359 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12360
12361         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
12362         hppaobsd_store_registers): Use ptid from regcache.
12363
12364 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12365
12366         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
12367         hppanbsd_store_registers): Use ptid from regcache.
12368
12369 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12370
12371         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
12372         from regcache.  Use get_ptrace_pid.
12373
12374 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12375
12376         * corelow.c (get_core_register_section): Use ptid from regcache,
12377         update doc.
12378
12379 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12380
12381         * bsd-uthread.c (bsd_uthread_fetch_registers,
12382         bsd_uthread_store_registers): Use ptid from regcache, set and
12383         restore inferior_ptid.
12384
12385 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12386
12387         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
12388         fetch_fp_regs, store_register, store_regs, store_fp_register,
12389         store_fp_regs): Use ptid from regcache.
12390
12391 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12392
12393         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
12394         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
12395         store_vfp_regs): Use ptid from regcache.
12396
12397 2017-03-17  Pedro Alves  <palves@redhat.com>
12398
12399         PR remote/21188
12400         * ser-base.c (ser_base_wait_for): Add comment.
12401         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
12402         version.
12403         * ser-unix.c (hardwire_raw): Remove reference to
12404         scb->current_timeout.
12405         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
12406         (hardwire_ops): Install ser_base_readchar instead of
12407         hardwire_readchar.
12408         * serial.h (struct serial) <current_timeout, timeout_remaining>:
12409         Remove fields.
12410
12411 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
12412
12413         PR gdb/19637
12414         * python/lib/gdb/printer/bound_registers.py: Add support for
12415         Python 3.
12416
12417 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12418
12419         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
12420         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
12421         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
12422         byte_offset to subobj_byte_offset.  Fix the handling of
12423         DWARF_VALUE_STACK on big-endian targets when coming via an
12424         implicit pointer.
12425         (dwarf2_evaluate_loc_desc): Adjust call to
12426         dwarf2_evaluate_loc_desc_full.
12427         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
12428         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
12429
12430 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12431
12432         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
12433         and REVSH instructions.
12434
12435 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12436
12437         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
12438         (arm_record_test): Declare.
12439         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
12440         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
12441         align with the manual.
12442         (thumb_record_misc): Adjust the code order to align with the
12443         manual.
12444         (thumb2_record_decode_insn_handler): Fix instruction matching.
12445         (instruction_reader_thumb): New class.
12446         (arm_record_test): New function.
12447
12448 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12449
12450         * arm-tdep.c (abstract_memory_reader): New class.
12451         (instruction_reader): New class.
12452         (extract_arm_insn): Add argument 'reader'.  Callers updated.
12453         (decode_insn): Likewise.
12454
12455 2017-03-16  Doug Evans  <dje@google.com>
12456
12457         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
12458         member.  Change type of TYPE member to SCM.  All uses updated.
12459         (lsscm_make_lazy_string_smob): Add assert.
12460         (lsscm_make_lazy_string): Flag bad length values.
12461         (lsscm_elt_type): New function.
12462         (gdbscm_lazy_string_to_value): Rewrite to use
12463         lsscm_safe_lazy_string_to_value.
12464         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
12465         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
12466         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
12467         in incoming type.
12468         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12469         * guile/scm-type.c (tyscm_scm_to_type): New function.
12470
12471 2017-03-15  Doug Evans  <dje@google.com>
12472
12473         PR python/17728, python/18439, python/18779
12474         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
12475         member.  Change type of TYPE member to PyObject *.  All uses updated.
12476         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
12477         (gdbpy_create_lazy_string_object): Flag bad length values.
12478         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
12479         Handle typedefs in incoming type.
12480         (stpy_lazy_string_elt_type): New function.
12481         (gdbpy_extract_lazy_string): Call it.
12482         * python/py-value.c (valpy_lazy_string): Flag bad length values.
12483         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
12484         typedefs in incoming type.
12485
12486 2017-03-16  Doug Evans  <dje@google.com>
12487
12488         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12489         * guile/scm-type.c (tyscm_scm_to_type): New function.
12490
12491 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
12492
12493         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
12494         "ULONGEST" for "skip".
12495
12496 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12497
12498         PR gdb/21220
12499         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
12500         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
12501         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
12502         over ptrace peek/poke until end of buffer or error.
12503
12504 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
12505
12506         * parse.c (length_of_subexp): Make static.
12507         * parser-defs.h (length_of_subexp): Remove.
12508
12509 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12510
12511         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
12512         as well.
12513
12514 2017-03-14  Pedro Alves  <palves@redhat.com>
12515
12516         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
12517         (main): Use std::unique_ptr.  Remove calls to
12518         cp_demangled_name_parse_free.
12519
12520 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12521
12522         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
12523         alphabsd_store_inferior_registers): Use regcache->ptid instead
12524         of inferior_ptid.
12525
12526 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12527
12528         * aix-thread.c (aix_thread_fetch_registers,
12529         aix_thread_store_registers): Use regcache->ptid instead of
12530         inferior_ptid.
12531
12532 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12533
12534         * aarch64-linux-nat.c (fetch_gregs_from_thread,
12535         store_gregs_to_thread, fetch_fpregs_from_thread,
12536         store_fpregs_to_thread): Use regcache->ptid instead of
12537         inferior_ptid.
12538
12539 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12540
12541         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
12542         amd64_linux_fetch_inferior_registers): Use regcache->ptid
12543         instead of inferior_ptid.
12544
12545 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12546
12547         * target.c (target_fetch_registers, target_store_registers): Add
12548         assert.
12549
12550 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12551
12552         * regcache.h (regcache_get_ptid): New function.
12553         * regcache.c (regcache_get_ptid): New function.
12554
12555 2017-03-13  Mark Wielaard  <mark@klomp.org>
12556
12557         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
12558
12559 2017-03-10  Keith Seitz  <keiths@redhat.com>
12560
12561         PR c++/8218
12562         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
12563
12564 2017-03-08  Pedro Alves  <palves@redhat.com>
12565
12566         PR gdb/18360
12567         * infrun.c (start_step_over, do_target_resume, resume)
12568         (restart_threads): Assert we're not resuming a thread that is
12569         meant to be stopped.
12570         (infrun_thread_stop_requested_callback): Delete.
12571         (infrun_thread_stop_requested): If the thread is internally
12572         stopped, queue a pending stop event and clear the thread's
12573         inline-frame state.
12574         (handle_stop_requested): New function.
12575         (handle_syscall_event, handle_inferior_event_1): Use
12576         handle_stop_requested.
12577         (handle_stop_requested): New function.
12578         (handle_signal_stop): Set the thread's stop_signal here instead of
12579         at caller.
12580         (finish_step_over): Clear step over info unconditionally.
12581         (handle_signal_stop): If the user had interrupted the event
12582         thread, consider the stop a random signal.
12583         (handle_signal_stop) <signal arrived while stepping over
12584         breakpoint>: Don't restart threads here.
12585         (stop_waiting): Don't clear step-over info here.
12586
12587 2017-03-08  Pedro Alves  <palves@redhat.com>
12588
12589         PR 21206
12590         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12591         goes to argument 2, not 1.
12592
12593 2017-03-08  Pedro Alves  <palves@redhat.com>
12594
12595         PR cli/21218
12596         * top.c (gdb_readline_wrapper): Avoid passing NULL to
12597         display_gdb_prompt.
12598         (command_line_input): Add comment.
12599
12600 2017-03-08  Pedro Alves  <palves@redhat.com>
12601
12602         PR tui/21216
12603         * tui/tui-file.c (tui_file::write): New.
12604         * tui/tui-file.h (tui_file): Override "write".
12605         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
12606         factored out from ...
12607         (tui_puts): ... here.
12608         (tui_putc): Use them.
12609         (tui_write): New function.
12610         * tui/tui-io.h (tui_write): Declare.
12611
12612 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
12613
12614         * Makefile.in (SFILES): Replace "environ.c" with
12615         "common/environ.c".
12616         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12617         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
12618         to...
12619         * common/environ.c: ... here.
12620         * environ.h: Moved to...
12621         * common/environ.h: ... here.
12622
12623 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12624
12625         * gdbarch.sh (pstring_ptr): New static function.
12626         (gdbarch_disassembler_options): Use it.
12627         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12628         not valid_disassembler_option->name.
12629         * gdbarch.c: Regenerate.
12630
12631 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12632
12633         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12634
12635 2017-03-07  Pedro Alves  <palves@redhat.com>
12636
12637         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12638
12639 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12640
12641         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12642         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12643         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
12644         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
12645
12646 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
12647
12648         * xtensa-linux-nat.c (fetch_gregs): Remove const.
12649
12650 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
12651
12652         * remote.c (remote_add_target_side_commands): Use range-based
12653         for loop.
12654
12655 2017-03-03  Yao Qi  <yao.qi@linaro.org>
12656
12657         PR gdb/21165
12658         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12659         value is lazy.
12660         * valprint.c (common_val_print): Likewise.
12661
12662 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
12663
12664         * NEWS: Mention new set/show disassembler-options commands.
12665         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12666         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12667         (prospective_options): New static variable.
12668         (gdb_disassembler::gdb_disassembler): Initialize
12669         m_di.disassembler_options.
12670         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12671         (get_disassembler_options): New function.
12672         (set_disassembler_options): Likewise.
12673         (set_disassembler_options_sfunc): Likewise.
12674         (show_disassembler_options_sfunc): Likewise.
12675         (disassembler_options_completer): Likewise.
12676         (_initialize_disasm): Likewise.
12677         * disasm.h (get_disassembler_options): New prototype.
12678         (set_disassembler_options): Likewise.
12679         * gdbarch.sh (gdbarch_disassembler_options): New variable.
12680         (gdbarch_verify_disassembler_options): Likewise.
12681         * gdbarch.c: Regenerate.
12682         * gdbarch.h: Likewise.
12683         * arm-tdep.c (num_disassembly_options): Delete.
12684         (set_disassembly_style): Likewise.
12685         (arm_disassembler_options): New static variable.
12686         (set_disassembly_style_sfunc): Convert short style name into long
12687         option name.  Call set_disassembler_options.
12688         (show_disassembly_style_sfunc): New function.
12689         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12690         set_gdbarch_verify_disassembler_options.
12691         (_initialize_arm_tdep): Delete regnames variable and update callers.
12692         (arm_disassembler_options): Initialize.
12693         (disasm_options): New variable.
12694         (num_disassembly_options): Rename from this...
12695         (num_disassembly_styles): ...to this.  Compute by scanning through
12696         disasm_options.
12697         (valid_disassembly_styles): Initialize using disasm_options.
12698         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12699         set_arm_regname_option.
12700         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12701         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12702         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12703         set_gdbarch_verify_disassembler_options.
12704         * s390-tdep.c (s390_disassembler_options): New static variable.
12705         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12706         set_gdbarch_verify_disassembler_options.
12707
12708 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12709
12710         * remote.c (remote_add_target_side_condition): Remove "struct"
12711         keyword from range-based for loop.
12712
12713 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12714
12715         * remote.c (remote_add_target_side_condition): Use range-based
12716         for loop.  Update comment.
12717
12718 2017-02-27  Yao Qi  <yao.qi@linaro.org>
12719
12720         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12721
12722 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
12723
12724         * regcache.c (regcache_raw_update): New function.
12725         (regcache_raw_read): Move code to regcache_raw_update.
12726         * regcache.h (regcache_raw_update): New declaration.
12727         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12728
12729 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
12730
12731         * dwarf2read.c (create_debug_type_hash_table): Initialize
12732         header.signature and header.type_offset_in_tu.
12733
12734 2017-02-24  Pedro Alves  <palves@redhat.com>
12735
12736         * symtab.c (make_file_symbol_completion_list_1): Use
12737         add_symtab_completions.
12738
12739 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12740
12741         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12742
12743 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12744
12745         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12746         I386_MAX_REGISTER_SIZE.
12747         (i386_pseudo_register_write): Likewise.
12748         (i386_process_record): Likewise.
12749         * i387-tdep.c (i387_supply_xsave): Likewise.
12750         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12751         (store_register): Likewise.
12752
12753 2017-02-23  Pedro Alves  <palves@redhat.com>
12754
12755         * ada-lang.c: Include "common/function-view.h".
12756         (ada_iterate_over_symbols): Adjust to use function_view as
12757         callback type.
12758         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12759         (ada_make_symbol_completion_list): Use a lambda.
12760         (ada_exc_search_name_matches): Delete.
12761         (name_matches_regex): New.
12762         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12763         * compile/compile-c-support.c: Include "common/function-view.h".
12764         (print_one_macro): Change prototype to accept a ui_file pointer.
12765         (write_macro_definitions): Use a lambda.
12766         * dwarf2read.c: Include "common/function-view.h".
12767         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12768         (dw2_expand_symtabs_matching): Adjust to use function_view as
12769         callback type.
12770         * language.h: Include "common/function-view.h".
12771         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12772         function_view as callback type.
12773         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12774         * linespec.c: Include "common/function-view.h".
12775         (collect_info::add_symbol): New method.
12776         (struct symbol_and_data_callback, iterate_inline_only, struct
12777         symbol_matcher_data, iterate_name_matcher): Delete.
12778         (iterate_over_all_matching_symtabs): Adjust to use function_view
12779         as callback type and lambdas.
12780         (iterate_over_file_blocks): Adjust to use function_view as
12781         callback type.
12782         (decode_compound_collector): Now a class with private fields.
12783         (decode_compound_collector::release_symbols): New method.
12784         (collect_one_symbol): Rename to...
12785         (decode_compound_collector::operator()): ... this and adjust.
12786         (lookup_prefix_sym): decode_compound_collector construction bits
12787         move to decode_compound_collector ctor.  Pass the
12788         decode_compound_collector object directly as callback.  Remove
12789         cleanups and use decode_compound_collector::release_symbols
12790         instead.
12791         (symtab_collector): Now a class with private fields.
12792         (symtab_collector::release_symtabs): New method.
12793         (add_symtabs_to_list): Rename to...
12794         (symtab_collector::operator()): ... this and adjust.
12795         (collect_symtabs_from_filename): symtab_collector construction
12796         bits move to symtab_collector ctor.  Pass the symtab_collector
12797         object directly as callback.  Remove cleanups and use
12798         symtab_collector::release_symtabs instead.
12799         (collect_symbols): Delete.
12800         (add_matching_symbols_to_info): Use lambdas.
12801         * macrocmd.c (print_macro_callback): Delete.
12802         (info_macro_command): Use a lambda.
12803         (info_macros_command): Pass print_macro_definition as callable
12804         directly.
12805         (print_one_macro): Remove 'ignore' parameter.
12806         (macro_list_command): Adjust.
12807         * macrotab.c (macro_for_each_data::fn): Now a function_view.
12808         (macro_for_each_data::user_data): Delete field.
12809         (foreach_macro): Adjust to call the function_view.
12810         (macro_for_each): Adjust to use function_view as callback type.
12811         (foreach_macro_in_scope): Adjust to call the function_view.
12812         (macro_for_each_in_scope): Adjust to use function_view as callback
12813         type.
12814         * macrotab.h: Include "common/function-view.h".
12815         (macro_callback_fn): Declare a prototype instead of a pointer.
12816         Remove "user_data" parameter.
12817         (macro_for_each, macro_for_each_in_scope): Adjust to use
12818         function_view as callback type.
12819         * psymtab.c (partial_map_expand_apply)
12820         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12821         Adjust to use function_view as callback type and to return bool.
12822         (psym_expand_symtabs_matching): Adjust to use function_view as
12823         callback types.
12824         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12825         to use function_view as callback type and to return bool.
12826         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12827         callback types.
12828         * symfile.c (expand_symtabs_matching): Adjust to use function_view
12829         as callback types.
12830         * symfile.h: Include "common/function-view.h".
12831         (expand_symtabs_file_matcher_ftype)
12832         (expand_symtabs_symbol_matcher_ftype)
12833         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12834         return bool.
12835         (quick_symbol_functions::map_symtabs_matching_filename)
12836         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12837         function_view as callback type and return bool.
12838         (expand_symtabs_matching): Adjust to use function_view as callback
12839         type.
12840         (maintenance_expand_name_matcher)
12841         (maintenance_expand_file_matcher): Delete.
12842         (maintenance_expand_symtabs): Use lambdas.
12843         * symtab.c (iterate_over_some_symtabs): Adjust to use
12844         function_view as callback types and return bool.
12845         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
12846         of a cleanup.
12847         (lookup_symtab_callback): Delete.
12848         (lookup_symtab): Use a lambda.
12849         (iterate_over_symbols): Adjust to use function_view as callback
12850         type.
12851         (struct search_symbols_data, search_symbols_file_matches)
12852         (search_symbols_name_matches): Delete.
12853         (search_symbols): Use a pair of lambdas.
12854         (struct add_name_data, add_macro_name, symbol_completion_matcher)
12855         (symtab_expansion_callback): Delete.
12856         (default_make_symbol_completion_list_break_on_1): Use lambdas.
12857         * symtab.h: Include "common/function-view.h".
12858         (iterate_over_some_symtabs): Adjust to use function_view as
12859         callback type and return bool.
12860         (iterate_over_symtabs): Adjust to use function_view as callback
12861         type.
12862         (symbol_found_callback_ftype): Remove 'data' parameter and return
12863         bool.
12864         (iterate_over_symbols): Adjust to use function_view as callback
12865         type.
12866
12867 2017-02-23  Pedro Alves  <palves@redhat.com>
12868
12869         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12870         (%.o) <unittests/%.c>: New pattern.
12871         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12872         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12873         * common/function-view.h: New file.
12874         * unittests/function-view-selftests.c: New file.
12875         * configure: Regenerate.
12876
12877 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
12878
12879         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12880         inferior_ptid.
12881         * go32-nat.c (go32_thread_alive): Likewise.
12882
12883 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12884
12885         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12886         delete.
12887
12888 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12889
12890         * varobj.c (varobj_clear_saved_item): Use delete instead of
12891         xfree.
12892         (update_dynamic_varobj_children): Likewise.
12893
12894 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12895
12896         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12897
12898 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
12899
12900         * common/enum-flags.h (enum_flags::enum_flags): Initialize
12901         m_enum_value to 0 in default constructor.
12902
12903 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
12904
12905         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12906         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12907         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12908         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12909         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12910         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12911         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12912         IS_STORE_CONDITIONAL_INSN.
12913
12914 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12915
12916         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12917
12918 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12919
12920         * NEWS (Changes since GDB 7.12): Add DWARF-5.
12921
12922 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12923
12924         * dwarf2read.c (skip_one_die, read_attribute_value)
12925         (dwarf2_const_value_attr, dump_die_shallow)
12926         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12927         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12928
12929 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12930
12931         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12932         (dwarf_parse_macro_header): Accept DWARF version 5.
12933         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12934
12935 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12936
12937         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12938         DW_AT_GNU_*.
12939         * common/common-exceptions.h (enum errors): Likewise.
12940         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12941         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12942         (dwarf_expr_context::execute_stack_op): Likewise.
12943         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12944         Likewise.
12945         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12946         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12947         (show_entry_values_debug, call_site_to_target_addr)
12948         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12949         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12950         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12951         (value_of_dwarf_block_entry, indirect_pieced_value)
12952         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12953         (disassemble_dwarf_expression): Likewise.
12954         * dwarf2read.c (process_die, inherit_abstract_dies)
12955         (read_call_site_scope): Likewise.
12956         * gdbtypes.h (struct func_type, struct call_site_parameter)
12957         (struct call_site): Likewise.
12958         * stack.c (read_frame_arg): Likewise.
12959         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12960
12961 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12962
12963         * defs.h (read_unsigned_leb128): New declaration.
12964         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12965         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12966         (dwarf2_find_location_expression): Call also
12967         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
12968         * dwarf2loc.h (dwarf2_version): New declaration.
12969         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12970         rnglists.
12971         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12972         .debug_rnglists.
12973         (struct dwop_section_names): Add loclists_dwo.
12974         (dwop_section_names): Add .debug_loclists.dwo.
12975         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12976         (struct dwarf2_per_cu_data): Add dwarf_version.
12977         (struct dwo_sections): Add loclists.
12978         (struct attr_abbrev): Add implicit_const.
12979         (read_indirect_line_string): New declaration.
12980         (read_unsigned_leb128): Delete declaration.
12981         (rcuh_kind): New definition.
12982         (read_and_check_comp_unit_head): Change parameter
12983         is_debug_types_section to section_kind.
12984         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
12985         (read_comp_unit_head): Change parameter abfd to section, add parameter
12986         section_kind.  Handle DWARF-5.
12987         (error_check_comp_unit_head): Accept also DWARF version 5.
12988         (read_and_check_comp_unit_head): Change parameter
12989         is_debug_types_section to section_kind.
12990         (read_and_check_type_unit_head): Delete function.
12991         (read_abbrev_offset): Handle DWARF-5.
12992         (create_debug_type_hash_table): Add parameter section_kind.  Process
12993         only DW_UT_type.  Use signature and type_offset_in_tu from struct
12994         comp_unit_head.
12995         (create_debug_types_hash_table): Update create_debug_type_hash_table
12996         caller.
12997         (create_all_type_units): Call create_debug_type_hash_table.
12998         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
12999         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
13000         caller.
13001         (skip_one_die): Handle DW_FORM_implicit_const.
13002         (dwarf2_rnglists_process): New function.
13003         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
13004         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
13005         (read_attribute_value): Handle DW_FORM_implicit_const,
13006         DW_FORM_line_strp.
13007         (read_attribute): Handle DW_FORM_implicit_const.
13008         (read_indirect_string_at_offset_from): New function from
13009         read_indirect_string_at_offset.
13010         (read_indirect_string_at_offset): Call
13011         read_indirect_string_at_offset_from.
13012         (read_indirect_line_string_at_offset): New function.
13013         (read_indirect_string): New function comment.
13014         (read_indirect_line_string): New function.
13015         (read_unsigned_leb128): Make it global.
13016         (dwarf2_string_attr): Handle DWARF-5.
13017         (add_include_dir_stub, read_formatted_entries): New functions.
13018         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
13019         Handle DWARF-5.
13020         (per_cu_header_read_in): Update read_comp_unit_head caller.
13021         (dwarf2_version): New function.
13022         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
13023         rnglists.
13024         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
13025         fields.
13026
13027 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13028
13029         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
13030
13031 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13032
13033         * dwarf2read.c (dwarf2_ranges_process): New function from
13034         dwarf2_ranges_read.
13035         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13036         dwarf2_ranges_process.
13037
13038 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13039
13040         * dwarf2read.c (create_debug_type_hash_table): New function from
13041         create_debug_types_hash_table.
13042         (create_debug_types_hash_table): Call create_debug_type_hash_table.
13043         (create_all_type_units, open_and_init_dwo_file): Update
13044         create_debug_types_hash_table callers.
13045
13046 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13047
13048         PR gdb/16188
13049         * fork-child.c (trace_start_error): Fix thinko.  va_end should
13050         refer to 'ap', not 'args'.
13051
13052 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13053             Pedro Alves  <palves@redhat.com>
13054
13055         PR gdb/16188
13056         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13057         calls succeeded.
13058         * fork-child.c (trace_start_error): New function.
13059         (trace_start_error_with_name): Likewise.
13060         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13061         * inf-ptrace.c (inf_ptrace_me): Likewise.
13062         * inferior.h (trace_start_error): New prototype.
13063         (trace_start_error_with_name): Likewise.
13064
13065 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
13066
13067         PR gdb/21164
13068         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13069         NULL before using it.
13070         * symmisc.c (maintenance_print_symbols): Likewise.
13071         (maintenance_print_msymbols): Likewise.
13072
13073 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13074
13075         * NEWS: Add record Python bindings entry.
13076
13077 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13078
13079         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13080         py-record-full.o.
13081         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13082         * python/py-record-btrace.c, python/py-record-btrace.h,
13083         python/py-record-full.c, python/py-record-full.h: New file.
13084         * python/py-record.c: Add include for py-record-btrace.h and
13085         py-record-full.h.
13086         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13087         recpy_instruction_history, recpy_function_call_history, recpy_begin,
13088         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13089         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13090         New definition.
13091         (gdbpy_initialize_btrace): New export.
13092         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13093
13094 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13095
13096         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13097         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13098         * python/py-record.c: New file.
13099         * python/python-internal.h (gdbpy_start_recording,
13100         gdbpy_current_recording, gdpy_stop_recording,
13101         gdbpy_initialize_record): New export.
13102         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13103         (python_GdbMethods): Add gdbpy_start_recording,
13104         gdbpy_current_recording and gdbpy_stop_recording.
13105
13106 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13107
13108         * record-btrace.c (record_btrace_record_method): New function.
13109         (init_record_btrace_ops): Initialize to_record_method.
13110         * record-full.c (record_full_record_method): New function.
13111         (init_record_full_ops, init_record_full_core_ops): Add
13112         record_full_record_method.
13113         * record.h (enum record_method): New enum.
13114         * target-debug.h (target_debug_print_enum_record_method: New define.
13115         * target-delegates.c: Regenerate.
13116         * target.c (target_record_method): New function.
13117         * target.h: Include record.h.
13118         (struct target_ops) <to_record_method>: New field.
13119         (target_record_method): New export.
13120
13121 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13122
13123         * record.h (record_start, record_stop): New export.
13124         * record.c (record_start, record_stop): New function.
13125
13126 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13127
13128         * btrace.c (btrace_fetch): Copy function call segments pointer
13129         into a vector.
13130         (btrace_clear): Clear the vector.
13131         (btrace_find_insn_by_number): Use binary search to find the correct
13132         function call segment.
13133         * btrace.h (brace_fun_p): New typedef.
13134         (struct btrace_thread_info) <functions>: New field.
13135
13136 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13137
13138         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
13139         * btrace.c (btrace_decode_error): ... here.  New function.
13140         * btrace.h (btrace_decode_error): New export.
13141
13142 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13143
13144         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
13145         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
13146         btrace_find_insn_by_number): Remove special case for gaps.
13147         * btrace.h (btrace_insn_get_error): New export.
13148         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
13149         * record-btrace.c (btrace_insn_history): Print number for gaps.
13150         (record_btrace_info, record_btrace_goto): Handle gaps.
13151
13152 2017-02-14  Tom Tromey  <tom@tromey.com>
13153
13154         PR python/13598:
13155         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
13156         event.
13157         * python/py-evts.c (gdbpy_initialize_py_events): Add
13158         before_prompt registry.
13159         * python/py-events.h (events_object) <before_prompt>: New field.
13160
13161 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
13162
13163         * btrace.c (ftrace_new_switch): Preserve up link and flags.
13164
13165 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
13166
13167         * symfile (_initialize_symfile): Add usage text to the load command's
13168         help text.
13169
13170 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
13171
13172         * utils.c (defaulted_query): Don't query on secondary UIs.
13173
13174 2017-02-10  Tom Tromey  <tom@tromey.com>
13175
13176         * rust-lang.c (rust_get_disr_info): Remove unused variable.
13177
13178 2017-02-10  Tom Tromey  <tom@tromey.com>
13179
13180         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
13181         "cleanup" local.
13182         * python/py-type.c (typy_legacy_template_argument): Remove
13183         unnecessary "cleanup" local.
13184
13185 2017-02-10  Tom Tromey  <tom@tromey.com>
13186
13187         * python/python.c (do_start_initialization): New function, from
13188         _initialize_python.
13189         (_initialize_python): Call do_start_initialization.
13190         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
13191         goto.
13192
13193 2017-02-10  Tom Tromey  <tom@tromey.com>
13194
13195         * python/py-prettyprint.c (pretty_print_one_value): Use
13196         gdbpy_ref.
13197
13198 2017-02-10  Tom Tromey  <tom@tromey.com>
13199
13200         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
13201         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
13202         gdbpy_ref.
13203         * python/py-type.c (field_new): Use gdbpy_ref.
13204         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
13205         gdbpy_ref.
13206         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
13207         (py_free_pspace): Likewise.
13208         (pspace_to_pspace_object): Likewise.
13209         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
13210         (py_free_objfile): Likewise.
13211         (objfile_to_objfile_object): Likewise.
13212         * python/py-inferior.c (delete_thread_object): Use
13213         gdbpy_ref.
13214         (infpy_read_memory): Likewise.
13215         (py_free_inferior): Likewise.
13216         * python/py-evtregistry.c (create_eventregistry_object): Use
13217         gdbpy_ref.
13218         * python/py-event.c (create_event_object): Use gdbpy_ref.
13219
13220 2017-02-10  Tom Tromey  <tom@tromey.com>
13221
13222         * python/py-ref.h (gdbpy_ref_policy): Now a template.
13223         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
13224         used.
13225         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
13226         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
13227         python/py-exitedevent.c, python/py-finishbreakpoint.c,
13228         python/py-framefilter.c, python/py-function.c,
13229         python/py-inferior.c, python/py-infevents.c,
13230         python/py-linetable.c, python/py-newobjfileevent.c,
13231         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
13232         python/py-signalevent.c, python/py-stopevent.c,
13233         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
13234         python/py-unwind.c, python/py-utils.c, python/py-value.c,
13235         python/py-varobj.c, python/py-xmethods.c, python/python.c,
13236         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
13237
13238 2017-02-10  Tom Tromey  <tom@tromey.com>
13239
13240         * ui-out.h (ui_out_emit_type): New class.
13241         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
13242         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
13243         and ui_out_emit_tuple.
13244         (enumerate_locals): Likewise.
13245         (py_mi_print_variables, py_print_locals, py_print_args): Use
13246         ui_out_emit_list.
13247         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
13248         ui_out_emit_list.
13249         * common/gdb_optional.h: New file.
13250
13251 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
13252
13253         * MAINTAINERS (Write After Approval): Update my e-mail address.
13254
13255 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
13256
13257         PR gdb/21122
13258         * breakpoint.c (_initialize_breakpoint): Update the help description
13259         of the 'commands' command to indicate that it takes a list argument.
13260
13261 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
13262
13263         * interps.c (current_interp_set_logging): Remove "return".
13264
13265 2017-02-09  Gary Benson  <gbenson@redhat.com>
13266
13267         * symtab.c (add_symtab_completions): Prevent NULL pointer
13268         dereference.
13269
13270 2017-02-08  Pedro Alves  <palves@redhat.com>
13271
13272         * interps.c (interp::interp): Remove reference to quiet_p.
13273         (interp_set): Make static.  Remove dead "Switching to" output
13274         code.
13275         (interp_quiet_p, interp_set_quiet): Delete.
13276         (interpreter_exec_cmd): Don't set the interpreter quiet.
13277         * interps.h (interp_quiet_p): Make static.
13278         (class interp) <quiet_p>: Remove field
13279
13280 2017-02-08  Jerome Guitton  <guitton@adacore.com>
13281
13282         * cli/cli-decode.c (find_command_name_length): Make it extern.
13283         * cli/cli-decode.h (find_command_name_length): Declare.
13284         * cli/cli-script.c (command_name_equals, line_first_arg):
13285         New functions.
13286         (process_next_line): Use cli-decode to parse command names.
13287         (build_command_line): Make args a constant pointer.
13288
13289 2017-02-08  Jerome Guitton  <guitton@adacore.com>
13290
13291         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
13292         Remove case-insensitive search.
13293
13294 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13295
13296         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
13297         at the end of the line.  Avoids an ARI warning.
13298
13299 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
13300
13301         * NEWS: Mention support for record/replay of Intel 64 rdrand and
13302         rdseed instructions.
13303         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
13304
13305 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
13306
13307         PR tdep/20936
13308         Provide and use sparc32 and sparc64 target description XML files.
13309         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
13310         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
13311         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
13312         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
13313         * features/sparc/sparc32-solaris.xml: New file.
13314         * features/sparc/sparc64-solaris.xml: New file.
13315         * features/sparc/sparc32-solaris.c: Generated.
13316         * features/sparc/sparc64-solaris.c: Generated.
13317         * sparc-tdep.h: Account for differences in target descriptions.
13318         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
13319         (sparc32_register_type): Use target provided registers.
13320         (validate_tdesc_registers): New function.
13321         (sparc32_gdbarch_init): Use tdesc_has_registers.
13322         Set pseudoregister functions.
13323         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
13324         (sparc64_register_type): Use target provided registers.
13325         (sparc64_init_abi): Set pseudoregister functions.
13326
13327 2017-02-03  Tom Tromey  <tom@tromey.com>
13328
13329         PR rust/21097:
13330         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
13331         with a single member.
13332
13333 2017-02-03  Pedro Alves  <palves@redhat.com>
13334
13335         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
13336         (cli_interp_base::~cli_interp_base): New.
13337         (cli_interp): New struct.
13338         (as_cli_interp): Cast the interp itself to cli_interp.
13339         (cli_interpreter_pre_command_loop): Rename to ...
13340         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
13341         parameter.
13342         (cli_interpreter_init): Rename to ...
13343         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
13344         boolean.  Make extern.
13345         (cli_interpreter_resume): Rename to ...
13346         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
13347         extern.
13348         (cli_interpreter_suspend): Rename to ...
13349         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
13350         extern.
13351         (cli_interpreter_exec): Rename to ...
13352         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
13353         extern.
13354         (cli_interpreter_supports_command_editing): Rename to ...
13355         (cli_interp_base::supports_command_editing): ... this.  Remove
13356         'interp' parameter.  Make extern.
13357         (cli_ui_out): Rename to ...
13358         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
13359         Make extern.
13360         (cli_set_logging): Rename to ...
13361         (cli_interp_base::set_logging): ... this.  Remove 'interp'
13362         parameter.  Make extern.
13363         (cli_interp_procs): Delete.
13364         (cli_interp_factory): Adjust to use "new".
13365         * cli/cli-interp.h: Include "interps.h".
13366         (struct cli_interp_base): New struct.
13367         * interps.c (struct interp): Delete.  Fields moved to interps.h.
13368         (interp_new): Delete.
13369         (interp::interp, interp::~interp): New.
13370         (interp_set): Use bool, and return void.  Assume the interpreter
13371         has suspend, init and resume methods, and that the all return
13372         void.
13373         (set_top_level_interpreter): interp_set returns void.
13374         (interp_ui_out): Adapt.
13375         (current_interp_set_logging): Adapt.
13376         (interp_data): Delete.
13377         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
13378         (interp_exec): Adapt.
13379         (top_level_interpreter_data): Delete.
13380         * interps.h (interp_init_ftype, interp_resume_ftype)
13381         (interp_suspend_ftype, interp_exec_ftype)
13382         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
13383         (class interp): New.
13384         (interp_new): Delete.
13385         (interp_set): Now returns void.  Use bool.
13386         (interp_data, top_level_interpreter_data): Delete.
13387         * mi/mi-common.h: Include interps.h.
13388         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
13389         init, resume, suspect, exec, interp_ui_out, set_logging and
13390         pre_command_loop methods.
13391         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
13392         (mi_interpreter_init): Rename to ...
13393         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
13394         bool, return void and make extern.  Adjust.
13395         (mi_interpreter_resume): ... Rename to ...
13396         (mi_interp::resume): ... this.  Remove the 'data' parameter,
13397         return void and make extern.  Adjust.
13398         (mi_interpreter_suspend): ... Rename to ...
13399         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
13400         return void and make extern.  Adjust.
13401         (mi_interpreter_exec): ... Rename to ...
13402         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
13403         extern.  Adjust.
13404         (mi_interpreter_pre_command_loop): ... Rename to ...
13405         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
13406         parameter and make extern.
13407         (mi_on_normal_stop_1): Adjust.
13408         (mi_ui_out): Rename to ...
13409         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
13410         parameter and make extern.  Adjust.
13411         (mi_set_logging): Rename to ...
13412         (mi_interp::set_logging): ... this.  Remove the 'interp'
13413         parameter and make extern.  Adjust.
13414         (mi_interp_procs): Delete.
13415         (mi_interp_factory): Adjust to use 'new'.
13416         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
13417         (mi_print_exception, mi_execute_command, mi_load_progress):
13418         Adjust.
13419         * tui/tui-interp.c (tui_interp): New class.
13420         (as_tui_interp): Return a tui_interp pointer.
13421         (tui_on_normal_stop, tui_on_signal_received)
13422         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
13423         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
13424         to use interp::interp_ui_out.
13425         (tui_init): Rename to ...
13426         (tui_interp::init): ... this.  Remove the 'self' parameter, use
13427         bool, return void and make extern.  Adjust.
13428         (tui_resume): Rename to ...
13429         (tui_interp::resume): ... this.  Remove the 'data' parameter,
13430         return void and make extern.  Adjust.
13431         (tui_suspend): Rename to ...
13432         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
13433         return void and make extern.  Adjust.
13434         (tui_ui_out): Rename to ...
13435         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
13436         parameter, and make extern.  Adjust.
13437         (tui_exec): Rename to ...
13438         (tui_interp::exec): ... this.  Remove the 'data' parameter and
13439         make extern.
13440         (tui_interp_procs): Delete.
13441         (tui_interp_factory): Use "new".
13442
13443 2017-02-02  Tom Tromey  <tom@tromey.com>
13444
13445         * rust-exp.y (ends_raw_string, space_then_number)
13446         (rust_identifier_start_p): Return bool.
13447         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
13448         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
13449         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
13450         (rust_chartype_p): Return bool.
13451         (val_print_struct, rust_print_struct_def, rust_print_type):
13452         Update.
13453         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
13454         Return bool.
13455
13456 2017-02-02  Tom Tromey  <tom@tromey.com>
13457
13458         * rust-lang.c: Reindent.
13459
13460 2017-02-02  Tom Tromey  <tom@tromey.com>
13461
13462         * rust-lang.h (rust_crate_for_block): Update.
13463         * rust-lang.c (rust_crate_for_block): Return std::string.
13464         (rust_get_disr_info): Use std:;string, not
13465         gdb::unique_xmalloc_ptr.
13466         * rust-exp.y (crate_name): Update.
13467
13468 2017-02-02  Pedro Alves  <palves@redhat.com>
13469
13470         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
13471         field out of gdb_disassembler_test and make it static.
13472
13473 2017-02-02  Pedro Alves  <palves@redhat.com>
13474
13475         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
13476         mi1_interp and mi_interp fields.
13477
13478 2017-02-02  Pedro Alves  <palves@redhat.com>
13479
13480         * cli/cli-interp.c (struct saved_output_files, saved_output):
13481         Moved from cli/cli-logging.c.
13482         (cli_set_logging): New function.
13483         (cli_interp_procs): Install cli_set_logging.
13484         * cli/cli-interp.h (make_logging_output, cli_set_logging):
13485         Declare.
13486         * cli/cli-logging.c (struct saved_output_files, saved_output):
13487         Moved to cli/cli-interp.c.
13488         (pop_output_files): Don't save outputs here.
13489         (make_logging_output): New function.
13490         (handle_redirections): Don't build tee nor save previous outputs
13491         here.
13492         * interps.c (current_interp_set_logging): Change prototype.
13493         Assume there's always a set_logging_proc method installed.
13494         * interps.h (interp_set_logging_ftype): Change prototype.
13495         (current_interp_set_logging): Change prototype and adjust comment.
13496         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
13497         use make_logging_output.
13498         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
13499 2017-02-02  Pedro Alves  <palves@redhat.com>
13500
13501         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
13502         from ...
13503         (set_logging_overwrite): ... here.
13504         (logging_no_redirect_file): Delete.
13505         (set_logging_redirect): Don't handle redirection on the fly.
13506         Instead warn that "logging off" / "logging on" is necessary.
13507         (pop_output_files): Delete references to logging_no_redirect_file.
13508         (show_logging_command): Always speak in terms of what will happen
13509         once logging is reenabled.
13510
13511 2017-02-02  Pedro Alves  <palves@redhat.com>
13512
13513         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
13514
13515 2017-02-02  Pedro Alves  <palves@redhat.com>
13516
13517         * disasm.c (gdb_pretty_print_insn): Rename to ...
13518         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
13519         Remove gdbarch parameter.  Adapt to clear the object's buffers
13520         instead of allocating new buffers, and to print using the object's
13521         gdb_disassembler instead of calling gdb_print_insn.
13522         (dump_insns): Use gdb_pretty_print_disassembler.
13523         * disasm.h (gdb_pretty_print_insn): Delete declaration.
13524         (gdb_pretty_print_disassembler): New class.
13525         * record-btrace.c (btrace_insn_history): Use
13526         gdb_pretty_print_disassembler.
13527
13528 2017-02-02  Pedro Alves  <palves@redhat.com>
13529
13530         * ada-lang.c (type_as_string): Use string_file.
13531         * ada-valprint.c (ada_print_floating): Use string_file.
13532         * ada-varobj.c (ada_varobj_scalar_image)
13533         (ada_varobj_get_value_image): Use string_file.
13534         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
13535         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
13536         * breakpoint.c (update_inserted_breakpoint_locations)
13537         (insert_breakpoint_locations, reattach_breakpoints)
13538         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
13539         (print_it_watchpoint): Use string_file.
13540         (save_breakpoints): Use stdio_file.
13541         * c-exp.y (oper): Use string_file.
13542         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
13543         tee_file.
13544         (pop_output_files): Use delete.
13545         (handle_redirections): Use stdio_file and tee_file.
13546         * cli/cli-setshow.c (do_show_command): Use string_file.
13547         * compile/compile-c-support.c (c_compute_program): Use
13548         string_file.
13549         * compile/compile-c-symbols.c (generate_vla_size): Take a
13550         'string_file &' instead of a 'ui_file *'.
13551         (generate_c_for_for_one_variable): Take a 'string_file &' instead
13552         of a 'ui_file *'.  Use string_file.
13553         (generate_c_for_variable_locations): Take a 'string_file &'
13554         instead of a 'ui_file *'.
13555         * compile/compile-internal.h (generate_c_for_for_one_variable):
13556         Take a 'string_file &' instead of a 'ui_file *'.
13557         * compile/compile-loc2c.c (push, pushf, unary, binary)
13558         (print_label, pushf_register_address, pushf_register)
13559         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
13560         'ui_file *'.  Adjust.
13561         * compile/compile.c (compile_to_object): Use string_file.
13562         * compile/compile.h (compile_dwarf_expr_to_c)
13563         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
13564         'ui_file *'.
13565         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
13566         (replace_typedefs_qualified_name): Use string_file and
13567         obstack_copy0.
13568         * disasm.c (gdb_pretty_print_insn): Use string_file.
13569         (gdb_disassembly): Adjust reference the null_stream global.
13570         (do_ui_file_delete): Delete.
13571         (gdb_insn_length): Use null_stream.
13572         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
13573         * dwarf2loc.c (dwarf2_compile_property_to_c)
13574         (locexpr_generate_c_location, loclist_generate_c_location): Take a
13575         'string_file &' instead of a 'ui_file *'.
13576         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
13577         * dwarf2read.c (do_ui_file_peek_last): Delete.
13578         (dwarf2_compute_name): Use string_file.
13579         * event-top.c (gdb_setup_readline): Use stdio_file.
13580         * gdbarch.sh (verify_gdbarch): Use string_file.
13581         * gdbtypes.c (safe_parse_type): Use null_stream.
13582         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
13583         string_file.
13584         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
13585         'string_file *' instead of a 'ui_file *'.
13586         (gdbscm_arch_disassemble): Use string_file.
13587         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
13588         * guile/scm-ports.c (class ioscm_file_port): Now a class that
13589         inherits from ui_file.
13590         (ioscm_file_port_delete, ioscm_file_port_rewind)
13591         (ioscm_file_port_put): Delete.
13592         (ioscm_file_port_write): Rename to ...
13593         (ioscm_file_port::write): ... this.  Remove file_port_magic
13594         checks.
13595         (ioscm_file_port_new): Delete.
13596         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13597         ui_file_up.
13598         * guile/scm-type.c (tyscm_type_name): Use string_file.
13599         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
13600         Use string_file.
13601         * infcmd.c (print_return_value_1): Use string_file.
13602         * infrun.c (print_target_wait_results): Use string_file.
13603         * language.c (add_language): Use string_file.
13604         * location.c (explicit_to_string_internal): Use string_file.
13605         * main.c (captured_main_1): Use null_file.
13606         * maint.c (maintenance_print_architecture): Use stdio_file.
13607         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13608         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13609         event_channel>: Change type to mi_console_file pointer.
13610         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13611         (mi_console_file_delete): Delete.
13612         (struct mi_console_file): Delete.
13613         (mi_console_file_magic): Delete.
13614         (mi_console_file_new): Delete.
13615         (mi_console_file::mi_console_file): New.
13616         (mi_console_file_delete): Delete.
13617         (mi_console_file_fputs): Delete.
13618         (mi_console_file::write): New.
13619         (mi_console_raw_packet): Delete.
13620         (mi_console_file::flush): New.
13621         (mi_console_file_flush): Delete.
13622         (mi_console_set_raw): Rename to ...
13623         (mi_console_file::set_raw): ... this.
13624         * mi/mi-console.h (class mi_console_file): New class.
13625         (mi_console_file_new, mi_console_set_raw): Delete.
13626         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13627         (mi_set_logging): Use delete and tee_file.  Adjust.
13628         * mi/mi-main.c (output_register): Use string_file.
13629         (mi_cmd_data_evaluate_expression): Use string_file.
13630         (mi_cmd_data_read_memory): Use string_file.
13631         (mi_cmd_execute, print_variable_or_computed): Use string_file.
13632         * mi/mi-out.c (mi_ui_out::main_stream): New.
13633         (mi_ui_out::rewind): Use main_stream and
13634         string_file.
13635         (mi_ui_out::put): Use main_stream and string_file.
13636         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13637         Allocate a 'string_file' instead.
13638         (mi_out_new): Don't allocate a mem_fileopen stream here.
13639         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13640         (mi_ui_out::main_stream): Declare method.
13641         * printcmd.c (eval_command): Use string_file.
13642         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13643         * python/py-arch.c (archpy_disassemble): Use string_file.
13644         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13645         * python/py-frame.c (frapy_str): Use string_file.
13646         * python/py-framefilter.c (py_print_type, py_print_single_arg):
13647         Use string_file.
13648         * python/py-type.c (typy_str): Use string_file.
13649         * python/py-unwind.c (unwind_infopy_str): Use string_file.
13650         * python/py-value.c (valpy_str): Use string_file.
13651         * record-btrace.c (btrace_insn_history): Use string_file.
13652         * regcache.c (regcache_print): Use stdio_file.
13653         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13654         * remote.c (escape_buffer): Use string_file.
13655         * rust-lang.c (rust_get_disr_info): Use string_file.
13656         * serial.c (serial_open_ops_1): Use stdio_file.
13657         (do_serial_close): Use delete.
13658         * stack.c (print_frame_arg): Use string_file.
13659         (print_frame_args): Remove local mem_fileopen stream, not used.
13660         (print_frame): Use string_file.
13661         * symmisc.c (maintenance_print_symbols): Use stdio_file.
13662         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13663         Take a 'string_file *' instead of a 'ui_file *'.
13664         * top.c (new_ui): Use stdio_file and stderr_file.
13665         (free_ui): Use delete.
13666         (execute_command_to_string): Use string_file.
13667         (quit_confirm): Use string_file.
13668         * tracepoint.c (collection_list::append_exp): Use string_file.
13669         * tui/tui-disasm.c (tui_disassemble): Use string_file.
13670         * tui/tui-file.c: Don't include "ui-file.h".
13671         (enum streamtype, struct tui_stream): Delete.
13672         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13673         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13674         (tui_file::tui_file): New method.
13675         (tui_file_fputs): Delete.
13676         (tui_file_get_strbuf): Delete.
13677         (tui_file::puts): New method.
13678         (tui_file_adjust_strbuf): Delete.
13679         (tui_file_flush): Delete.
13680         (tui_file::flush): New method.
13681         * tui/tui-file.h: Tweak intro comment.
13682         Include ui-file.h.
13683         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13684         (tui_file_adjust_strbuf): Delete declarations.
13685         (class tui_file): New class.
13686         * tui/tui-io.c (tui_initialize_io): Use tui_file.
13687         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13688         (tui_register_format): Use string_stream.
13689         * tui/tui-stack.c (tui_make_status_line): Use string_file.
13690         (tui_get_function_from_frame): Use string_file.
13691         * typeprint.c (type_to_string): Use string_file.
13692         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13693         (null_stream): New global.
13694         (ui_file_delete): Delete.
13695         (ui_file::ui_file): New.
13696         (null_file_isatty): Delete.
13697         (ui_file::~ui_file): New.
13698         (null_file_rewind): Delete.
13699         (ui_file::printf): New.
13700         (null_file_put): Delete.
13701         (null_file_flush): Delete.
13702         (ui_file::putstr): New.
13703         (null_file_write): Delete.
13704         (ui_file::putstrn): New.
13705         (null_file_read): Delete.
13706         (ui_file::putc): New.
13707         (null_file_fputs): Delete.
13708         (null_file_write_async_safe): Delete.
13709         (ui_file::vprintf): New.
13710         (null_file_delete): Delete.
13711         (null_file::write): New.
13712         (null_file_fseek): Delete.
13713         (null_file::puts): New.
13714         (ui_file_data): Delete.
13715         (null_file::write_async_safe): New.
13716         (gdb_flush, ui_file_isatty): Adjust.
13717         (ui_file_put, ui_file_rewind): Delete.
13718         (ui_file_write): Adjust.
13719         (ui_file_write_for_put): Delete.
13720         (ui_file_write_async_safe, ui_file_read): Adjust.
13721         (ui_file_fseek): Delete.
13722         (fputs_unfiltered): Adjust.
13723         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13724         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13725         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13726         (set_ui_file_data): Delete.
13727         (string_file::~string_file, string_file::write)
13728         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13729         (do_ui_file_as_string, ui_file_as_string): Delete.
13730         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13731         (struct mem_file): Delete.
13732         (mem_file_new): Delete.
13733         (stdio_file::stdio_file): New.
13734         (mem_file_delete): Delete.
13735         (stdio_file::stdio_file): New.
13736         (mem_fileopen): Delete.
13737         (stdio_file::~stdio_file): New.
13738         (mem_file_rewind): Delete.
13739         (stdio_file::set_stream): New.
13740         (mem_file_put): Delete.
13741         (stdio_file::open): New.
13742         (mem_file_write): Delete.
13743         (stdio_file_magic, struct stdio_file): Delete.
13744         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13745         (stdio_file::flush): New.
13746         (stdio_file_read): Rename to ...
13747         (stdio_file::read): ... this.  Adjust.
13748         (stdio_file_write): Rename to ...
13749         (stdio_file::write): ... this.  Adjust.
13750         (stdio_file_write_async_safe): Rename to ...
13751         (stdio_file::write_async_safe) ... this.  Adjust.
13752         (stdio_file_fputs): Rename to ...
13753         (stdio_file::puts) ... this.  Adjust.
13754         (stdio_file_isatty): Delete.
13755         (stdio_file_fseek): Delete.
13756         (stdio_file::isatty): New.
13757         (stderr_file_write): Rename to ...
13758         (stderr_file::write) ... this.  Adjust.
13759         (stderr_file_fputs): Rename to ...
13760         (stderr_file::puts) ... this.  Adjust.
13761         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13762         (stderr_file::stderr_file): New.
13763         (tee_file_magic): Delete.
13764         (struct tee_file): Delete.
13765         (tee_file::tee_file): New.
13766         (tee_file_new): Delete.
13767         (tee_file::~tee_file): New.
13768         (tee_file_delete): Delete.
13769         (tee_file_flush): Rename to ...
13770         (tee_file::flush): ... this.  Adjust.
13771         (tee_file_write): Rename to ...
13772         (tee_file::write): ... this.  Adjust.
13773         (tee_file::write_async_safe): New.
13774         (tee_file_fputs): Rename to ...
13775         (tee_file::puts): ... this.  Adjust.
13776         (tee_file_isatty): Rename to ...
13777         (tee_file::isatty): ... this.  Adjust.
13778         * ui-file.h (struct obstack, struct ui_file): Don't
13779         forward-declare.
13780         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13781         (ui_file_write_ftype)
13782         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13783         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13784         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13785         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13786         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13787         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13788         (set_ui_file_fseek): Delete.
13789         (ui_file_data, ui_file_delete, ui_file_rewind)
13790         (struct ui_file): New.
13791         (ui_file_up): New.
13792         (class null_file): New.
13793         (null_stream): Declare.
13794         (ui_file_write_for_put, ui_file_put): Delete.
13795         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13796         Delete.
13797         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13798         (gdb_fopen, tee_file_new): Delete.
13799         (struct string_file): New.
13800         (struct stdio_file): New.
13801         (stdio_file_up): New.
13802         (struct stderr_file): New.
13803         (class tee_file): New.
13804         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13805         of a 'ui_file *'.  Adjust.
13806         * ui-out.h (class ui_out) <field_stream>: Likewise.
13807         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13808         (null_stream): Delete.
13809         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13810         Adjust.
13811         * utils.h (struct ui_file): Delete forward declaration..
13812         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13813         (error_stream): Take a 'string_file &' instead of a
13814         'ui_file *'.
13815         * varobj.c (varobj_value_get_print_value): Use string_file.
13816         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13817         * gdbarch.c: Regenerate.
13818
13819 2017-02-02  Pedro Alves  <palves@redhat.com>
13820
13821         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13822         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
13823         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
13824         Adjust to call gdb_print_insn instead of
13825         gdb_disassembler::print_insn.
13826         (dump_insns, do_mixed_source_and_assembly_deprecated)
13827         (do_mixed_source_and_assembly, do_assembly_only): Add back a
13828         'gdbarch' parameter.  Remove gdb_disassembler parameter.
13829         (gdb_disassembly): Don't allocate a gdb_disassembler here.
13830         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13831         declaration.
13832         (gdb_pretty_print_insn): Re-add declaration.
13833         * record-btrace.c (btrace_insn_history): Don't allocate a
13834         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
13835
13836 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
13837
13838         * disasm.h (gdb_disassembly): Remove file_string parameter.
13839         * disasm.c (gdb_disassembly): Likewise.
13840         * cli/cli-cmds.c (print_disassembly): Adapt.
13841         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13842         * stack.c (do_gdb_disassembly): Likewise.
13843
13844 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13845
13846         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13847         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13848         targets.  And if the implicit value is longer than needed, extract
13849         the first bytes instead of the "least significant" ones.
13850
13851 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13852
13853         * btrace.c (btrace_enable): Do not call btrace_add_pc for
13854         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13855         (btrace_fetch): Assert can_access_registers_ptid.
13856         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13857         validate_registers_access.
13858
13859 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13860
13861         * gdbthread.h (can_access_registers_ptid): New.
13862         * thread.c (can_access_registers_ptid): New.
13863
13864 2017-02-01  Pedro Alves  <palves@redhat.com>
13865
13866         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13867
13868 2017-01-31  Pedro Alves  <palves@redhat.com>
13869
13870         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13871         Fix typos.
13872
13873 2017-01-31  Pedro Alves  <palves@redhat.com>
13874
13875         * stack.c (print_frame_args): Remove local mem_fileopen stream,
13876         not used.
13877
13878 2017-01-31  Pedro Alves  <palves@redhat.com>
13879
13880         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13881
13882 2017-01-31  Pedro Alves  <palves@redhat.com>
13883
13884         * common/scoped_restore.h
13885         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13886         change the value's parameter type to T2.
13887         (make_scoped_restore): Likewise.
13888
13889 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13890             Richard Henderson  <rth@redhat.com>
13891
13892         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13893         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13894         GS_BASE for older kernels.
13895         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13896         GS_BASE for older kernels.
13897         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13898         and GS_BASE to the offset table.
13899         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13900         system register group.
13901         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13902         for older kernels.
13903         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13904         amd64 ABI.
13905         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13906         AMD64_GSBASE_REGNUM.
13907         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13908         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13909         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13910         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13911         i386/64bit-segments.xml in those rules.
13912         * features/i386/64bit-segments.xml: New file.
13913         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13914         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13915         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13916         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13917         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13918         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13919         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13920         * features/i386/amd64-avx-linux.c: Regenerated.
13921         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13922         * features/i386/amd64-avx-mpx.c: Regenerated.
13923         * features/i386/amd64-avx512-linux.c: Regenerated.
13924         * features/i386/amd64-linux.c: Regenerated.
13925         * features/i386/amd64-mpx-linux.c: Regenerated.
13926         * features/i386/i386-avx-mpx-linux.c: Regenerated.
13927         * features/i386/i386-avx-mpx.c: Regenerated.
13928         * features/i386/x32-avx-linux.c: Regenerated.
13929         * features/i386/x32-avx512-linux.c: Regenerated.
13930         * regformats/i386/amd64-avx-linux.dat: Regenerated.
13931         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13932         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13933         * regformats/i386/amd64-linux.dat: Regenerated.
13934         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13935         * regformats/i386/x32-avx-linux.dat: Regenerated.
13936         * regformats/i386/x32-avx512-linux.dat: Regenerated.
13937         * regformats/i386/x32-linux.dat: Regenerated.
13938
13939 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13940
13941         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13942         Set to AMD64_NUM_REGS.
13943
13944 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13945
13946         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13947         that checks validity of a register number.
13948
13949 2017-01-27  Kees Cook  <keescook@google.com>
13950
13951         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13952         fetch_fpregs if target has fpa registers.
13953         (arm_linux_store_inferior_registers): Call store_fpregs if target
13954         has fpa registers.
13955
13956 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13957
13958         * cris-tdep.c (cris_gdbarch_init): Remove check for
13959         info.byte_order and force it to BFD_ENDIAN_LITTLE.
13960
13961 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
13962
13963         * corelow.c (get_core_register_section): Check for regset
13964         existence before checking for REGSET_VARIABLE_SIZE.
13965
13966 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13967             Pedro Alves  <palves@redhat.com>
13968
13969         PR gdb/20939
13970         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13971         call memory_error, save memaddr instead.
13972         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13973         negative, cal memory_error.
13974         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13975
13976 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13977
13978         * disasm-selftests.c (memory_error_test): New function.
13979         (_initialize_disasm_selftests): Register memory_error_test.
13980
13981 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13982
13983         * Makefile.in (SFILES): Add disasm-selftests.c and
13984         selftest-arch.c.
13985         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
13986         * disasm-selftests.c: New file.
13987         * selftest-arch.c: New file.
13988         * selftest-arch.h: New file.
13989
13990 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13991
13992         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
13993         to bfd_arch_mep.  Don't return 0 if section is not
13994         found.  Call print_insn_mep.
13995
13996 2017-01-26  Pedro Alves  <palves@redhat.com>
13997             Yao Qi  <yao.qi@linaro.org>
13998
13999         * arm-tdep.c: Include "disasm.h".
14000         (gdb_print_insn_arm): Update code to get gdbarch.
14001         * disasm.c (dis_asm_read_memory): Change it to
14002         gdb_disassembler::dis_asm_read_memory.
14003         (dis_asm_memory_error): Likewise.
14004         (dis_asm_print_address): Likewise.
14005         (gdb_pretty_print_insn): Change it to
14006         gdb_disassembler::pretty_print_insn.
14007         (dump_insns): Add one argument gdb_disassemlber.  All
14008         callers updated.
14009         (do_mixed_source_and_assembly_deprecated): Likewise.
14010         (do_mixed_source_and_assembly): Likewise.
14011         (do_assembly_only): Likewise.
14012         (gdb_disassembler::gdb_disassembler): New.
14013         (gdb_disassembler::print_insn): New.
14014         * disasm.h (class gdb_disassembler): New.
14015         (gdb_pretty_print_insn): Remove declaration.
14016         (gdb_disassemble_info): Likewise.
14017         * guile/scm-disasm.c (class gdbscm_disassembler): New.
14018         (gdbscm_disasm_read_memory_worker): Update.
14019         (gdbscm_disasm_read_memory): Update.
14020         (gdbscm_disasm_memory_error): Remove.
14021         (gdbscm_disasm_print_address): Remove.
14022         (gdbscm_disassembler::gdbscm_disassembler): New.
14023         (gdbscm_print_insn_from_port): Update.
14024         * mips-tdep.c: Include disasm.h.
14025         (gdb_print_insn_mips): Update code to get gdbarch.
14026         * record-btrace.c (btrace_insn_history): Update.
14027         * spu-tdep.c: Include disasm.h.
14028         (struct spu_dis_asm_data): Remove.
14029         (struct spu_dis_asm_info): New.
14030         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
14031         SPU id.
14032         (gdb_print_insn_spu): Cast disassemble_info to
14033         spu_dis_asm_info.
14034
14035 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14036
14037         * disasm.c (do_ui_file_delete): Delete.
14038         (gdb_insn_length): Move code creating stream to ...
14039         * utils.c (null_stream): ... here.  New function.
14040         * utils.h (null_stream): Declare.
14041
14042 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
14043
14044         * python/py-inferior.c (find_thread_object): Return directly
14045         from the loop.  Remove "found" variable.
14046
14047 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
14048
14049         GDB 7.12.1 released.
14050
14051 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14052
14053         * python/py-function.c (fnpy_call): Reorder declarations to have
14054         the gdbpy_enter object declared first.
14055         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14056
14057 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14058
14059         PR python/21068
14060         * python/python-internal.h (PyMem_RawMalloc): Define for
14061         Python < 3.4.
14062         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14063         PyMem_RawMalloc instead of PyMem_Malloc.
14064
14065 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
14066             Luis Machado  <lgustavo@codesourcery.com>
14067
14068         * NEWS (New commands): Mention flash-erase.
14069         (New MI commands): Mention target-flash-erase.
14070         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14071         command.
14072         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14073         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14074         * target.c (flash_erase_command): New function.
14075         (initialize_targets): Add new flash-erase command.
14076         * target.h (flash_erase_command): New declaration.
14077
14078 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
14079
14080         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14081         HAVE_SYS_PROCFS_H is defined.
14082
14083 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14084
14085         * remote.c (struct cached_reg): Change data into a pointer.
14086         * (stop_reply_dtr): Free data pointers before deleting vector.
14087         (process_stop_reply): Likewise.
14088         (remote_parse_stop_reply): Allocate space for data
14089
14090 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14091
14092         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14093         MAX_REGISTER_SIZE.
14094         (amd64_pseudo_register_read_value): Likewise.
14095         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14096         (store_register_using_P): Likewise.
14097         * regcache.c (regcache_xfer_part): Likewise.
14098
14099 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
14100
14101         Split real and pseudo registers.
14102         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14103         (sparc32_pseudo_regnum): New enum.
14104         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14105         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14106         (SPARC32_CP0_REGISTERS): New macro.
14107         (sparc32_pseudo_register_name): New function.
14108         (sparc32_register_name): Use sparc32_pseudo_register_name.
14109         (sparc32_pseudo_register_type): New function.
14110         (sparc32_register_type): Use sparc32_pseudo_register_type.
14111         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14112         pseudo register numbers.
14113         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
14114         (SPARC64_CP0_REGISTERS): New macro.
14115         (sparc64_pseudo_register_name): New function.
14116         (sparc64_register_name): Use sparc64_pseudo_register_name.
14117         (sparc64_pseudo_register_type): New function.
14118         (sparc64_register_type): Use sparc64_pseudo_register_type.
14119         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
14120         pseudo register numbers.
14121         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
14122         sparc64_store_arguments): Handle pseudo register numbers.
14123
14124 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14125
14126         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
14127         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
14128         output.
14129         (getpkt_or_notif_sane_1): Likewise.
14130
14131 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14132
14133         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
14134         of CC.  Pass "-x c++-header" instead of "-x c".
14135
14136 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14137
14138         * remote.c (remote_can_async_p): Update comment.
14139
14140 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14141
14142         * linux-nat.c (linux_nat_can_async_p): Update comment.
14143
14144 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14145
14146         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
14147
14148 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
14149
14150         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
14151
14152 2017-01-10  Tom Tromey  <tom@tromey.com>
14153
14154         * python/py-type.c (typy_legacy_template_argument): Update.
14155         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
14156         ~demangle_parse_info): Declare new members.
14157         (cp_demangled_name_to_comp): Return unique_ptr.
14158         (cp_demangled_name_parse_free)
14159         (make_cleanup_cp_demangled_name_parse_free)
14160         (cp_new_demangle_parse_info): Remove.
14161         * cp-support.c (do_demangled_name_parse_free_cleanup)
14162         (make_cleanup_cp_demangled_name_parse_free): Remove.
14163         (inspect_type, cp_canonicalize_string_full)
14164         (cp_canonicalize_string): Update.
14165         (mangled_name_to_comp): Change return type.
14166         (cp_class_name_from_physname, method_name_from_physname)
14167         (cp_func_name, cp_remove_params): Update.
14168         * cp-name-parser.y (demangle_parse_info): New constructor, from
14169         cp_new_demangle_parse_info.
14170         (~demangle_parse_info): New destructor, from
14171         cp_demangled_name_parse_free.
14172         (cp_merge_demangle_parse_infos): Update.
14173         (cp_demangled_name_to_comp): Change return type.
14174
14175 2017-01-10  Tom Tromey  <tom@tromey.com>
14176
14177         * top.c (prevent_dont_repeat): Change return type.
14178         * python/python.c (execute_gdb_command): Use std::string.
14179         Update.
14180         * guile/guile.c (gdbscm_execute_gdb_command): Update.
14181         * command.h (prevent_dont_repeat): Change return type.
14182         * breakpoint.c (bpstat_do_actions_1): Update.
14183
14184 2017-01-10  Tom Tromey  <tom@tromey.com>
14185
14186         * value.h (scoped_value_mark::~scoped_value_mark): Call
14187         free_to_mark.
14188         (scoped_value_mark::free_to_mark): New method.
14189         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
14190         scoped_value_mark.
14191
14192 2017-01-10  Tom Tromey  <tom@tromey.com>
14193
14194         * python/py-value.c (valpy_dereference, valpy_referenced_value)
14195         (valpy_reference_value, valpy_const_value, valpy_get_address)
14196         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
14197         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
14198         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
14199         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
14200         scoped_value_mark.
14201         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
14202         * value.h (scoped_value_mark): New class.
14203
14204 2017-01-10  Tom Tromey  <tom@tromey.com>
14205
14206         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
14207         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
14208         * psymtab.c (discard_psymtabs_upto): Remove.
14209         (make_cleanup_discard_psymtabs): Remove.
14210         (struct psymtab_state): Remove.
14211
14212 2017-01-10  Tom Tromey  <tom@tromey.com>
14213
14214         * record-full.c (record_full_save_cleanups): Remove.
14215         (record_full_save): Use gdb::unlinker.
14216         * gcore.c (do_bfd_delete_cleanup): Remove.
14217         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
14218         cleanups.
14219         * dwarf2read.c (unlink_if_set): Remove.
14220         (write_psymtabs_to_index): Use gdb::unlinker.
14221         * common/gdb_unlinker.h: New file.
14222
14223 2017-01-10  Tom Tromey  <tom@tromey.com>
14224
14225         * windows-tdep.c (windows_xfer_shared_library): Update.
14226         * windows-nat.c (windows_make_so): Update.
14227         * utils.h (make_cleanup_bfd_unref): Remove.
14228         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
14229         * symfile.h (symfile_bfd_open)
14230         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
14231         * symfile.c (read_symbols, symbol_file_add)
14232         (separate_debug_file_exists): Update.
14233         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
14234         (generic_load, reread_symbols): Update.
14235         * symfile-mem.c (symbol_file_add_from_memory): Update.
14236         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
14237         (spu_symbol_file_add_from_memory): Update.
14238         * solist.h (struct target_so_ops) <bfd_open>: Return
14239         gdb_bfd_ref_ptr.
14240         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
14241         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
14242         gdb_bfd_ref_ptr.
14243         (solib_map_sections, reload_shared_libraries_1): Update.
14244         * solib-svr4.c (enable_break): Update.
14245         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
14246         * solib-frv.c (enable_break2): Update.
14247         * solib-dsbt.c (enable_break): Update.
14248         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
14249         gdb_bfd_ref_ptr.
14250         (darwin_solib_get_all_image_info_addr_at_init): Update.
14251         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
14252         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
14253         * record-full.c (record_full_save): Update.
14254         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
14255         * procfs.c (insert_dbx_link_bpt_in_file): Update.
14256         * minidebug.c (find_separate_debug_file_in_section): Return
14257         gdb_bfd_ref_ptr.
14258         * machoread.c (macho_add_oso_symfile): Change abfd to
14259         gdb_bfd_ref_ptr.
14260         (macho_symfile_read_all_oso): Update.
14261         (macho_check_dsym): Return gdb_bfd_ref_ptr.
14262         (macho_symfile_read): Update.
14263         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
14264         (jit_bfd_try_read_symtab): Update.
14265         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14266         (gdb_bfd_openw, gdb_bfd_openr_iovec)
14267         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14268         gdb_bfd_ref_ptr.
14269         (gdb_bfd_ref_policy): New struct.
14270         (gdb_bfd_ref_ptr): New typedef.
14271         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14272         (gdb_bfd_openw, gdb_bfd_openr_iovec)
14273         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14274         gdb_bfd_ref_ptr.
14275         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14276         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14277         (gcore_command): Update.
14278         * exec.c (exec_file_attach): Update.
14279         * elfread.c (elf_symfile_read): Update.
14280         * dwarf2read.c (dwarf2_get_dwz_file): Update.
14281         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
14282         (open_and_init_dwo_file): Update.
14283         (open_dwp_file): Return gdb_bfd_ref_ptr.
14284         (open_and_init_dwp_file): Update.
14285         * corelow.c (core_open): Update.
14286         * compile/compile-object-load.c (compile_object_load): Update.
14287         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
14288         * coffread.c (coff_symfile_read): Update.
14289         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
14290         gdb_bfd_ref_ptr.  Rename.
14291         (dump_bfd_file, restore_command): Update.
14292         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14293         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14294         (find_separate_debug_file_by_buildid): Update.
14295
14296 2017-01-10  Tom Tromey  <tom@tromey.com>
14297
14298         * common/gdb_ref_ptr.h: New file.
14299         * python/py-ref.h (struct gdbpy_ref_policy): New.
14300         (gdbpy_ref): Now a typedef.
14301
14302 2017-01-10  Tom Tromey  <tom@tromey.com>
14303
14304         * utils.h (make_cleanup_htab_delete): Don't declare.
14305         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
14306         Remove.
14307         * linespec.c (decode_compound_collector): Add constructor,
14308         destructor.
14309         (lookup_prefix_sym): Remove cleanup.
14310         (symtab_collector): Add constructor, destructor.
14311         (collect_symtabs_from_filename): Remove cleanup.
14312         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
14313         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
14314         Use htab_up.
14315         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
14316         * dwarf2read.c (dw2_expand_symtabs_matching)
14317         (dw2_map_symbol_filenames, dwarf_decode_macros)
14318         (write_psymtabs_to_index): Use htab_up.
14319         * dwarf2loc.c (func_verify_no_selftailcall)
14320         (call_site_find_chain_1, func_verify_no_selftailcall)
14321         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
14322         std::vector, gdb::unique_xmalloc_ptr.
14323         (call_sitep): Remove typedef.
14324         (dwarf2_locexpr_baton_eval): Remove unused variable.
14325
14326 2017-01-10  Tom Tromey  <tom@tromey.com>
14327
14328         * python/python-internal.h (make_cleanup_py_decref)
14329         (make_cleanup_py_xdecref): Don't declare.
14330         * python/py-utils.c (py_decref, make_cleanup_py_decref)
14331         (py_xdecref, make_cleanup_py_xdecref): Remove.
14332
14333 2017-01-10  Tom Tromey  <tom@tromey.com>
14334
14335         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
14336         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
14337
14338 2017-01-10  Tom Tromey  <tom@tromey.com>
14339
14340         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
14341
14342 2017-01-10  Tom Tromey  <tom@tromey.com>
14343
14344         * python/py-utils.c (unicode_to_encoded_string)
14345         (python_string_to_target_string)
14346         (python_string_to_target_python_string)
14347         (python_string_to_host_string, gdbpy_obj_to_string)
14348         (get_addr_from_python): Use gdbpy_ref.
14349
14350 2017-01-10  Tom Tromey  <tom@tromey.com>
14351
14352         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
14353         gdbpy_ref.
14354
14355 2017-01-10  Tom Tromey  <tom@tromey.com>
14356
14357         * python/python.c (eval_python_command, gdbpy_decode_line)
14358         (gdbpy_run_events, gdbpy_start_type_printers)
14359         (gdbpy_apply_type_printers): Use gdbpy_ref.
14360
14361 2017-01-10  Tom Tromey  <tom@tromey.com>
14362
14363         * python/py-param.c (get_doc_string, compute_enum_values): Use
14364         gdbpy_ref.
14365
14366 2017-01-10  Tom Tromey  <tom@tromey.com>
14367
14368         * python/py-inferior.c (find_thread_object, build_inferior_list):
14369         Use gdbpy_ref.
14370
14371 2017-01-10  Tom Tromey  <tom@tromey.com>
14372
14373         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14374
14375 2017-01-10  Tom Tromey  <tom@tromey.com>
14376
14377         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
14378         gdbpy_ref.
14379
14380 2017-01-10  Tom Tromey  <tom@tromey.com>
14381
14382         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
14383         extra incref.
14384         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
14385         Use gdbpy_ref.
14386
14387 2017-01-10  Tom Tromey  <tom@tromey.com>
14388
14389         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14390         gdbpy_ref.
14391
14392 2017-01-10  Tom Tromey  <tom@tromey.com>
14393
14394         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
14395         decref results of PyArg_ParseTupleAndKeywords.
14396
14397 2017-01-10  Tom Tromey  <tom@tromey.com>
14398
14399         * python/python.c (python_run_simple_file): Use
14400         unique_xmalloc_ptr, gdbpy_ref.
14401
14402 2017-01-10  Tom Tromey  <tom@tromey.com>
14403
14404         * python/py-prettyprint.c (print_stack_unless_memory_error)
14405         (print_string_repr, print_children): Use gdbpy_ref.
14406         (dummy_python_frame): New class.
14407         (dummy_python_frame::dummy_python_frame): Rename from
14408         push_dummy_python_frame.
14409         (py_restore_tstate): Remove.
14410
14411 2017-01-10  Tom Tromey  <tom@tromey.com>
14412
14413         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14414
14415 2017-01-10  Tom Tromey  <tom@tromey.com>
14416
14417         * python/python.c (ensure_python_env, restore_python_env):
14418         Remove.
14419         * python/python-internal.h (ensure_python_env): Don't declare.
14420         * varobj.h (varobj_ensure_python_env): Don't declare.
14421         * varobj.c (varobj_ensure_python_env): Remove.
14422
14423 2017-01-10  Tom Tromey  <tom@tromey.com>
14424
14425         * varobj.c (varobj_value_get_print_value): Use
14426         gdbpy_enter_varobj.
14427
14428 2017-01-10  Tom Tromey  <tom@tromey.com>
14429
14430         * python/py-prettyprint.c (print_string_repr, print_children):
14431         Update.
14432         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
14433         of "encoding".
14434         * varobj.c (varobj_value_get_print_value): Update.
14435         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
14436
14437 2017-01-10  Tom Tromey  <tom@tromey.com>
14438
14439         * varobj.c (varobj_get_display_hint)
14440         (dynamic_varobj_has_child_method, install_new_value_visualizer)
14441         (varobj_set_visualizer, free_variable): Use
14442         gdbpy_enter_varobj.
14443
14444 2017-01-10  Tom Tromey  <tom@tromey.com>
14445
14446         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
14447         (do_finish_initialization): New function.  Use gdbpy_ref.
14448         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
14449         do_finish_initialization.
14450
14451 2017-01-10  Tom Tromey  <tom@tromey.com>
14452
14453         * python/py-param.c (get_set_value, get_show_value): Use
14454         gdbpy_enter, gdbpy_ref.
14455
14456 2017-01-10  Tom Tromey  <tom@tromey.com>
14457
14458         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
14459
14460 2017-01-10  Tom Tromey  <tom@tromey.com>
14461
14462         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
14463
14464 2017-01-10  Tom Tromey  <tom@tromey.com>
14465
14466         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
14467         Use gdbpy_enter_varobj.
14468
14469 2017-01-10  Tom Tromey  <tom@tromey.com>
14470
14471         * varobj.c (gdbpy_enter_varobj): New constructor.
14472         * python/python-internal.h (gdbpy_enter_varobj): New class.
14473         * python/py-varobj.c (py_varobj_get_iterator): Use
14474         gdbpy_enter_varobj.
14475
14476 2017-01-10  Tom Tromey  <tom@tromey.com>
14477
14478         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
14479         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14480         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
14481         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
14482         unique_xmalloc_ptr.
14483         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
14484
14485 2017-01-10  Tom Tromey  <tom@tromey.com>
14486
14487         * python/py-xmethods.c (invoke_match_method): Use
14488         gdbpy_ref.
14489
14490 2017-01-10  Tom Tromey  <tom@tromey.com>
14491
14492         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
14493         gdbpy_enter, gdbpy_ref.
14494
14495 2017-01-10  Tom Tromey  <tom@tromey.com>
14496
14497         * python/python.c (python_interactive_command): Use gdbpy_enter.
14498
14499 2017-01-10  Tom Tromey  <tom@tromey.com>
14500
14501         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
14502         gdbpy_ref.
14503
14504 2017-01-10  Tom Tromey  <tom@tromey.com>
14505
14506         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
14507         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14508
14509 2017-01-10  Tom Tromey  <tom@tromey.com>
14510
14511         * utils.h (htab_deleter): New struct.
14512         (htab_up): New typedef.
14513         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
14514         gdbpy_enter, gdbpy_ref, htab_up.
14515
14516 2017-01-10  Tom Tromey  <tom@tromey.com>
14517
14518         * python/py-unwind.c (pending_frame_invalidate): Remove.
14519         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
14520
14521 2017-01-10  Tom Tromey  <tom@tromey.com>
14522
14523         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
14524         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
14525
14526 2017-01-10  Tom Tromey  <tom@tromey.com>
14527
14528         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
14529
14530 2017-01-10  Tom Tromey  <tom@tromey.com>
14531
14532         * python/python.c (gdbpy_eval_from_control_command)
14533         (gdbpy_source_script, gdbpy_run_events)
14534         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
14535         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
14536         gdbpy_enter.
14537
14538 2017-01-10  Tom Tromey  <tom@tromey.com>
14539
14540         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
14541
14542 2017-01-10  Tom Tromey  <tom@tromey.com>
14543
14544         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
14545
14546 2017-01-10  Tom Tromey  <tom@tromey.com>
14547
14548         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
14549         (python_on_inferior_call_pre, python_on_inferior_call_post)
14550         (python_on_memory_change, python_on_register_change)
14551         (python_inferior_exit, python_new_objfile, add_thread_object)
14552         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
14553
14554 2017-01-10  Tom Tromey  <tom@tromey.com>
14555
14556         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
14557         (bpfinishpy_handle_exit): Use gdbpy_enter.
14558
14559 2017-01-10  Tom Tromey  <tom@tromey.com>
14560
14561         * python/py-cmd.c (cmdpy_destroyer)
14562         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
14563         gdbpy_enter.
14564
14565 2017-01-10  Tom Tromey  <tom@tromey.com>
14566
14567         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14568         gdbpy_enter.
14569         (gdbpy_breakpoint_has_cond): Likewise.
14570
14571 2017-01-10  Tom Tromey  <tom@tromey.com>
14572
14573         * python/python.c (gdbpy_enter): New constructor.
14574         (~gdbpy_enter): New destructor.
14575         (restore_python_env, ensure_python_env): Rewrite.
14576         * python/python-internal.h (gdbpy_enter): New class.
14577
14578 2017-01-10  Tom Tromey  <tom@tromey.com>
14579
14580         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
14581
14582 2017-01-10  Tom Tromey  <tom@tromey.com>
14583
14584         * python/py-value.c (value_has_field, get_field_flag)
14585         (get_field_type, valpy_getitem, convert_value_from_python): Use
14586         gdbpy_ref.
14587
14588 2017-01-10  Tom Tromey  <tom@tromey.com>
14589
14590         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14591         gdbpy_ref.
14592
14593 2017-01-10  Tom Tromey  <tom@tromey.com>
14594
14595         * python/py-prettyprint.c (search_pp_list)
14596         (find_pretty_printer_from_objfiles)
14597         (find_pretty_printer_from_progspace)
14598         (find_pretty_printer_from_gdb, find_pretty_printer)
14599         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
14600         gdbpy_ref.
14601
14602 2017-01-10  Tom Tromey  <tom@tromey.com>
14603
14604         * python/py-param.c (call_doc_function): Use gdbpy_ref.
14605
14606 2017-01-10  Tom Tromey  <tom@tromey.com>
14607
14608         * python/py-linetable.c (build_line_table_tuple_from_pcs)
14609         (ltpy_get_all_source_lines): Use gdbpy_ref.
14610
14611 2017-01-10  Tom Tromey  <tom@tromey.com>
14612
14613         * python/py-framefilter.c (extract_sym, extract_value)
14614         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14615         gdbpy_ref.
14616
14617 2017-01-10  Tom Tromey  <tom@tromey.com>
14618
14619         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14620
14621 2017-01-10  Tom Tromey  <tom@tromey.com>
14622
14623         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14624
14625 2017-01-10  Tom Tromey  <tom@tromey.com>
14626
14627         * python/py-function.c (convert_values_to_python, fnpy_init): Use
14628         gdbpy_ref.
14629
14630 2017-01-10  Tom Tromey  <tom@tromey.com>
14631
14632         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14633
14634 2017-01-10  Tom Tromey  <tom@tromey.com>
14635
14636         * python/py-type.c (convert_field, make_fielditem, typy_fields)
14637         (typy_range): Use gdbpy_ref.
14638
14639 2017-01-10  Tom Tromey  <tom@tromey.com>
14640
14641         * python/py-threadevent.c (create_thread_event_object): Use
14642         gdbpy_ref.
14643         * python/py-stopevent.c (create_stop_event_object): Simplify.
14644         (emit_stop_event): Use gdbpy_ref.
14645         * python/py-signalevent.c (create_signal_event_object): Use
14646         gdbpy_ref.
14647         * python/py-newobjfileevent.c (create_new_objfile_event_object)
14648         (emit_new_objfile_event, create_clear_objfiles_event_object)
14649         (emit_clear_objfiles_event): Use gdbpy_ref.
14650         * python/py-infevents.c (create_inferior_call_event_object)
14651         (create_register_changed_event_object)
14652         (create_memory_changed_event_object, emit_inferior_call_event)
14653         (emit_memory_changed_event, emit_register_changed_event): Use
14654         gdbpy_ref.
14655         * python/py-exitedevent.c (create_exited_event_object)
14656         (emit_exited_event): Use gdbpy_ref.
14657         * python/py-event.h (evpy_emit_event): Remove
14658         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14659         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14660         * python/py-continueevent.c (emit_continue_event): Use
14661         gdbpy_ref.
14662         * python/py-breakpoint.c (gdbpy_breakpoint_created)
14663         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14664         gdbpy_ref.
14665         * python/py-bpevent.c (create_breakpoint_event_object): Use
14666         gdbpy_ref.
14667
14668 2017-01-10  Tom Tromey  <tom@tromey.com>
14669
14670         * python/py-ref.h: New file.
14671
14672 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14673
14674         * cli-out.c (cli_ui_out::do_redirect): Change return type to
14675         void.
14676         * cli-out.h (cli_ui_out::do_redirect): Likewise.
14677         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14678         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14679         * ui-out.c (ui_out::redirect): Likewise.
14680         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14681         * cli/cli-logging.c (set_logging_redirect): Update call site of
14682         ui_out::redirect.
14683         (handle_redirections): Likewise.
14684         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14685         * top.c (execute_command_to_string): Likewise.
14686         * utils.c (do_ui_out_redirect_pop): Likewise.
14687
14688 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14689
14690         * stack.c (_initialize_stack): Update "frame" command help message.
14691
14692 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
14693
14694         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14695
14696 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14697
14698         * x86-linux-nat.h: Include gdb_proc_service.h.
14699
14700 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14701
14702         * ser-base.h: Include serial.h.
14703
14704 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14705
14706         * ppc-linux-tdep.h: Include ppc-tdep.h.
14707
14708 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14709
14710         * nat/amd64-linux-siginfo.h: Include signal.h.
14711
14712 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14713
14714         * nat/aarch64-linux-hw-point.h: Include break-common.h.
14715
14716 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14717
14718         * mi/mi-parse.h: Include mi-cmds.h.
14719
14720 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14721
14722         * inf-loop.c: Don't include "target.h".
14723         * inf-loop.h: Include it here.
14724
14725 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14726
14727         * dfp.h: Include "dboulest.h" and "expression.h".
14728
14729 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14730
14731         * ax-gdb.h: Include "ax.h".
14732
14733 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14734
14735         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14736         with nat/gdb_ptrace.h.
14737
14738 2017-01-05  Yao Qi  <yao.qi@linaro.org>
14739
14740         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14741         new line.
14742         (mips64_fbsd_sigframe_init): Likewise.
14743
14744 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14745
14746         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14747         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14748
14749 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14750
14751         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14752         * NEWS: Mention new FreeBSD/mips native configuration.
14753         * config/mips/fbsd.mh: New file.
14754         * configure.host: Add mips*-*-freebsd*.
14755         * mips-fbsd-nat.c: New file.
14756
14757 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14758
14759         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14760         (ALLDEPFILES): Add mips-fbsd-tdep.c.
14761         * NEWS: Mention new FreeBSD/mips target.
14762         * configure.tgt: Add mips*-*-freebsd*.
14763         * mips-fbsd-tdep.c: New file.
14764         * mips-fbsd-tdep.h: New file.
14765
14766 2017-01-04  Yao Qi  <yao.qi@linaro.org>
14767
14768         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14769         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14770
14771 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14772
14773         Update copyright year range in all GDB files.
14774
14775 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14776
14777         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14778
14779 For older changes see ChangeLog-2016.
14780 \f
14781 Local Variables:
14782 mode: change-log
14783 left-margin: 8
14784 fill-column: 74
14785 version-control: never
14786 coding: utf-8
14787 End: