Don't set terminal flags twice in a row
[external/binutils.git] / gdb / ChangeLog
1 2017-11-06  Pedro Alves  <palves@redhat.com>
2
3         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
4         longer set flags twice in row.
5
6 2017-11-06  Pedro Alves  <palves@redhat.com>
7
8         * Makefile.in (SER_HARDWIRE): Update comment.
9         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
10         * common/gdb_termios.h: Delete file.
11         * common/job-control.c: Include termios.h and unistd.h instead of
12         gdb_termios.h.
13         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
14         check.
15         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
16         Remove sgtty code.
17         * configure.ac: No longer check for termio.h and sgtty.h.
18         * configure: Regenerate.
19         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
20         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
21         Replace PROCESS_GROUP_TYPE references with pid_t references
22         throughout.
23         (gdb_getpgrp): Delete.
24         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
25         (child_terminal_inferior): Remove comment.  Remove sgtty code.
26         (child_terminal_ours_1): Use tcgetpgrp directly instead of
27         gdb_getpgrp.  Use serial_set_tty_state instead aof
28         serial_noflush_set_tty_state.  Remove sgtty code.
29         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
30         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
31         (inferior_process_group): Now returns pid_t.
32         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
33         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
34         * ser-event.c (serial_event_ops): Update.
35         * ser-go32.c (dos_noflush_set_tty_state): Delete.
36         (dos_ops): Update.
37         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
38         * ser-pipe.c (pipe_ops): Update.
39         * ser-tcp.c (tcp_ops): Update.
40         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
41         HAVE_TERMIOS checks.
42         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
43         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
44         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
45         assume termios.
46         (hardwire_noflush_set_tty_state): Delete.
47         (hardwire_print_tty_state, hardwire_drain_output)
48         (hardwire_flush_output, hardwire_flush_input)
49         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
50         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
51         code, and assume termios.
52         (hardwire_ops): Update.
53         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
54         * serial.c (serial_noflush_set_tty_state): Delete.
55         * serial.h (serial_noflush_set_tty_state): Delete.
56         (serial_ops::noflush_set_tty_state): Delete.
57
58 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
59
60         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
61         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
62         (COMMON_OBS): Remove doublest.o and dfp.o.
63         Do not build target-float.c (instead of doublest.c)
64         with -Wformat-nonliteral.
65
66         * doublest.c: Remove file.
67         * doublest.h: Remove file.
68         * dfp.c: Remove file.
69         * dfp.h: Remove file.
70
71         * target-float.c: Do not include "doublest.h" and "dfp.h".
72         (DOUBLEST): Move here from doublest.h.
73         (enum float_kind): Likewise.
74         (FLOATFORMAT_CHAR_BIT): Likewise.
75         (FLOATFORMAT_LARGEST_BYTES): Likewise.
76         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
77         (floatformat_precision): Likewise.
78         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
79         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
80         Likewise.
81         (host_float_format, host_double_format, host_long_double_format):
82         Likewise.
83         (floatformat_to_string, floatformat_from_string): Likewise.
84         (floatformat_to_doublest): Likewise.  Also, inline the original
85         convert_floatformat_to_doublest.
86         (floatformat_from_doublest): Likewise.  Also, inline the original
87         convert_floatformat_from_doublest.
88
89         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
90         (MAX_DECIMAL_STRING): Move here from dfp.c.
91         (match_endianness): Likewise.
92         (set_decnumber_context, decimal_check_errors): Likewise.
93         (decimal_from_number, decimal_to_number): Likewise.
94         (decimal_to_string, decimal_from_string): Likewise.  Make static.
95         (decimal_from_longest, decimal_from_ulongest): Likewise.
96         (decimal_to_longest): Likewise.
97         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
98         (decimal_convert): Likewise.
99
100 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
101
102         * doublest.c: Do not include "gdbtypes.h".
103         (extract_typed_floating): Remove.
104         (store_typed_floating): Remove.
105         (convert_typed_floating): Remove.
106         * doublest.h (struct type): Remove.
107         (DOUBLEST_PRINT_FORMAT): Remove.
108         (DOUBLEST_SCAN_FORMAT): Remove.
109         (extract_typed_floating): Remove.
110         (store_typed_floating): Remove.
111         (convert_typed_floating): Remove.
112
113         * dfp.c (decimal_from_doublest): Remove.
114         (decimal_to_doublest): Remove.
115         * dfp.h: Do not include "doublest.h".
116         (decimal_from_doublest): Remove.
117         (decimal_to_doublest): Remove.
118
119         * value.c: Do not include "doublest.h" and "dfp.h".
120         (value_as_double): Remove.
121         (unpack_double): Remove.
122         (value_from_double): Remove.
123         (value_from_decfloat): Remove.
124         * value.h: Do not include "doublest.h".
125         (value_as_double): Remove.
126         (unpack_double): Remove.
127         (value_from_double): Remove.
128         (value_from_decfloat): Remove.
129
130 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
131
132         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
133         (i386_extract_return_value): Use target_float_convert.
134         (i386_store_return_value): Likewise.
135         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
136         (i387_value_to_register): Likewise.
137         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
138         (ia64_register_to_value): Use target_float_convert.
139         (ia64_value_to_register): Likewise.
140         (ia64_extract_return_value): Likewise.
141         (ia64_store_return_value): Likewise.
142         (ia64_push_dummy_call): Likewise.
143         * m68k-tdep.c: Include "target-float.h".
144         (m68k_register_to_value): Use target_float_convert.
145         (m68k_value_to_register): Likewise.
146         (m68k_svr4_extract_return_value): Likewise.
147         (m68k_svr4_store_return_value): Likewise.
148         * ppc-sysv-tdep.c: Include "target-float.h".
149         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
150         (do_ppc_sysv_return_value): Likewise.
151         (ppc64_sysv_abi_push_freg): Likewise.
152         (ppc64_sysv_abi_return_value_base): Likewise.
153         * rs6000-aix-tdep.c: Include "target-float.h".
154         (rs6000_push_dummy_call): Use target_float_convert.
155         (rs6000_return_value): Likewise.
156         * rs6000-lynx178-tdep.c: Include "target-float.h".
157         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
158         (rs6000_lynx178_return_value): Likewise.
159         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
160         (rs6000_register_to_value): Use target_float_convert.
161         (rs6000_value_to_register): Likewise.
162         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
163         (arm_extract_return_value): Use target_float_convert.
164         (arm_store_return_value): Likewise.
165         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
166         (sh_register_convert_to_virtual): Use target_float_convert.
167         (sh_register_convert_to_raw): Likewise.
168         * sh64-tdep.c: Include "target-float.h".
169         (sh64_extract_return_value): Use target_float_convert.
170         (sh64_register_convert_to_virtual): Likewise.
171         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
172
173 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
174
175         * target-float.c (floatformat_to_host_double): New function.
176         (floatformat_from_host_double): Likewise.
177         (target_float_to_host_double): Likewise.
178         (target_float_from_host_double): Likewise.
179         * target-float.h (target_float_to_host_double): Add prototype.
180         (target_float_from_host_double): Likewise.
181
182         * guile/scm-value.c: Include "target-float.h".
183         (gdbscm_value_to_real): Use target_float_to_host_double.
184         Handle integer source values via value_as_long.
185         * guile/scm-math.c: Include "target-float.h".  Do not include
186         "doublest.h", "dfp.h", and "expression.h".
187         (vlscm_convert_typed_number): Use target_float_from_host_double.
188         (vlscm_convert_number): Likewise.
189
190         * python/py-value.c (valpy_float): Use target_float_to_host_double.
191         (convert_value_from_python): Use target_float_from_host_double.
192
193 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
194
195         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
196         (cast_from_fixed): Likewise.
197         (ada_scaling_type): New function.
198         (ada_delta): Return value instead of DOUBLEST.  Perform target
199         arithmetic instead of host arithmetic.
200         (scaling_factor): Rename to ...
201         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
202         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
203         (ada_fixed_to_float): Remove.
204         (ada_float_to_fixed): Remove.
205         * ada-lang.h (ada_fixed_to_float): Remove.
206         (ada_float_to_fixed): Remove.
207         (ada_delta): Return value instead of DOUBLEST.
208         (ada_scaling_factor): Add prototype.
209
210         * ada-typeprint.c: Include "target-float.h".
211         (print_fixed_point_type): Perform target arithmetic instead of
212         host arithmetic.
213         * ada-valprint.c: Include "target-float.h".
214         (ada_val_print_num): Perform target arithmetic instead of
215         host arithmetic for fixed-point types.
216
217 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
218
219         * target-float.c: Include <math.h>.
220         (floatformat_binop): New function.
221         (floatformat_compare): Likewise.
222         (target_float_binop): Likewise.
223         (target_float_compare): Likewise.
224         * target-float.h: Include "expression.h".
225         (target_float_binop): Add prototype.
226         (target_float_compare): Likewise.
227
228         * valarith.c: Do not include "doublest.h" and "dfp.h".
229         Include "common/byte-vector.h".
230         (value_args_as_decimal): Remove, replace by ...
231         (value_args_as_target_float): ... this function.  Handle both
232         binary and decimal target floating-point formats.
233         (scalar_binop): Handle both binary and decimal FP using
234         value_args_as_target_float and target_float_binop.
235         (value_equal): Handle both binary and decimal FP using
236         value_args_as_target_float and target_float_compare.
237         (value_less): Likewise.
238         (value_pos): Handle all scalar types as simple copy.
239         (value_neg): Handle all scalar types via BINOP_SUB from 0.
240         * dfp.c (decimal_binop): Throw error instead of internal_error
241         when called with an unsupported operation code.
242
243 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
244
245         * target-float.c (target_float_to_string): New function.
246         (target_float_from_string): New function.
247         * target-float.h (target_float_to_string): Add prototype.
248         (target_float_from_string): Add prototype.
249
250         * valprint.c: Include "target-float.h".  Do not include
251         "doublest.h" and "dfp.h".
252         (print_floating): Use target_float_to_string.
253         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
254         (printf_floating): Use target_float_to_string.
255         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
256         (print_i387_value): Use target_float_to_string.
257         * mips-tdep.c: Include "target-float.h".
258         (mips_print_fp_register): Use target_float_to_string.
259         * sh64-tdep.c: Include "target-float.h".
260         (sh64_do_fp_register): Use target_float_to_string.
261
262         * parse.c: Include "target-float.h".  Do not include
263         "doublest.h" and "dfp.h".
264         (parse_float): Use target_float_from_string.
265         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
266         (define_symbol): Use target_float_from_string.
267         * gdbarch-selftests.c: Include "target-float.h".
268         (register_to_value_test): Use target_float_from_string.
269
270 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
271
272         * Makefile.c (SFILES): Add target-float.c.
273         (HFILES_NO_SRCDIR): Add target-float.h.
274         (COMMON_OBS): Add target-float.o.
275         * target-float.h: New file.
276         * target-float.c: New file.
277
278         * doublest.c (floatformat_classify): Fix detection of float_zero.
279
280         * gdbtypes.c (is_floating_type): New function.
281         * gdbtypes.h (is_floating_type): Add prototype.
282
283         * value.c: Do not include "floatformat.h".
284         (unpack_double): Use target_float_is_valid.
285         (is_floating_value): New function.
286         * value.h (is_floating_value): Add prototype-
287
288         * valarith.c: Include "target-float.h".
289         (value_logical_not): Use target_float_is_zero.
290
291         * python/py-value.c: Include "target-float.h".
292         (valpy_nonzero): Use target_float_is_zero.
293
294 2017-11-04  Tom Tromey  <tom@tromey.com>
295
296         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
297
298 2017-11-04  Tom Tromey  <tom@tromey.com>
299
300         * breakpoint.c (set_momentary_breakpoint): Return
301         breakpoint_up.
302         (until_break_command): Update.
303         (new_until_break_fsm): Change argument types to
304         breakpoint_up.
305         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
306         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
307         Remove.
308         * infcmd.c (finish_forward): Update.
309         * breakpoint.h (set_momentary_breakpoint)
310         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
311         (make_cleanup_delete_breakpoint): Remove.
312         (struct breakpoint_deleter): New.
313         (breakpoint_up): New typedef.
314         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
315         (insert_exception_resume_breakpoint): Update.
316         (insert_exception_resume_from_probe): Update.
317         (insert_longjmp_resume_breakpoint): Update.
318         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
319         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
320         * infcall.c (call_function_by_hand_dummy): Update
321
322 2017-11-04  Tom Tromey  <tom@tromey.com>
323
324         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
325
326 2017-11-04  Tom Tromey  <tom@tromey.com>
327
328         * linux-tdep.c (linux_core_info_proc_mappings): Use
329         gdb::def_vector.
330         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
331         "size" argument.
332         (linux_corefile_thread): Update.
333         (linux_make_corefile_notes): Remove unused variable.
334
335 2017-11-04  Tom Tromey  <tom@tromey.com>
336
337         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
338         gdb::byte_vector.
339
340 2017-11-04  Tom Tromey  <tom@tromey.com>
341
342         * objfiles.c (do_free_objfile_cleanup): Remove.
343         * compile/compile-object-load.c (compile_object_load): Update.
344         * objfiles.h (make_cleanup_free_objfile): Remove.
345
346 2017-11-04  Tom Tromey  <tom@tromey.com>
347
348         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
349         (adi_read_versions): Change "tags" to "gdb_byte *".
350         (adi_print_versions): Likewise.
351
352 2017-11-04  Tom Tromey  <tom@tromey.com>
353
354         * breakpoint.c
355         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
356         from start_rbreak_breakpoints.
357         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
358         * breakpoint.h (class scoped_rbreak_breakpoints): New.
359         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
360         * symtab.c (do_end_rbreak_breakpoints): Remove.
361         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
362
363 2017-11-04  Tom Tromey  <tom@tromey.com>
364
365         * cp-namespace.c (reset_directive_searched): Remove.
366         (cp_lookup_symbol_via_imports): Use scoped_restore.
367         * cp-support.c (reset_directive_searched): Remove.
368         (make_symbol_overload_list_using): Use scoped_restore.
369         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
370         (reset_directive_searched): Remove.
371
372 2017-11-04  Tom Tromey  <tom@tromey.com>
373
374         * symfile.c (find_separate_debug_file_by_debuglink): Use
375         unique_xmalloc_ptr.
376
377 2017-11-04  Tom Tromey  <tom@tromey.com>
378
379         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
380         type of "info".
381         (compute_stack_depth): Likewise.
382         (do_compile_dwarf_expr_to_c): Use std::vector.
383
384 2017-11-04  Tom Tromey  <tom@tromey.com>
385
386         * compile/compile-object-load.c (link_callbacks_einfo): Use
387         std::string.
388
389 2017-11-04  Tom Tromey  <tom@tromey.com>
390
391         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
392         Use scoped_free_pendings.
393         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
394         scoped_free_pendings.
395         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
396         (xcoff_initial_scan): Likewise.
397         * buildsym.c (reset_symtab_globals): Update comment.
398         (scoped_free_pendings): Rename from really_free_pendings.
399         (prepare_for_building): Update comment.
400         (buildsym_init): Likewise.
401         * buildsym.h (class scoped_free_pendings): New class.
402         (really_free_pendings): Don't declare.
403
404 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
405
406         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
407         output when converting a zero value to a special byteorder format.
408
409 2017-11-02  Yao Qi  <yao.qi@linaro.org>
410
411         * frame.c (do_frame_register_read): Remove aspace.
412         * jit.c (jit_frame_sniffer): Likwise.
413         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
414         * regcache.c (regcache::regcache): Pass nullptr.
415         (regcache_print): Caller updated.
416         * regcache.h (regcache::regcache): Remove one constructor
417         parameter aspace.
418
419 2017-11-02  Yao Qi  <yao.qi@linaro.org>
420
421         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
422
423 2017-11-02  Yao Qi  <yao.qi@linaro.org>
424
425         * breakpoint.c (insert_single_step_breakpoints): Update.
426         * frame.c (struct frame_info) <aspace>: Add const.
427         (frame_save_as_regcache): Add const.
428         (get_frame_address_space): Return const address_space *.
429         * frame.h (get_frame_address_space): Update declaration.
430         * infrun.c (struct step_over_info) <aspace>: Add const.
431         (set_step_over_info): Make aspace const.
432         (displaced_step_prepare_throw): Change variable const.
433         (resume): Likewise.
434         (proceed): Likewise.
435         (adjust_pc_after_break): Likewise.
436         (save_waitstatus): Likewise.
437         (handle_signal_stop): Likewise.
438         (keep_going_pass_signal): Likewise.
439         * jit.c (jit_frame_sniffer): Add const.
440         * mips-tdep.c (mips_single_step_through_delay): Likewise.
441         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
442         * record-full.c (record_full_wait_1): Likewise.
443         * regcache.c (regcache::regcache): Change parameter to const.
444         * regcache.h (regcache::regcache): Likewise.
445         (regcache::aspace): Return const address_space *.
446         (regcache) <m_aspace>: Add const.
447
448 2017-11-02  Yao Qi  <yao.qi@linaro.org>
449
450         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
451         * frame.c (create_sentinel_frame): Likewise.
452         * infrun.c (displaced_step_prepare_throw): Likewise.
453         (resume): Likewise.
454         (thread_still_needs_step_over_bp): Likewise.
455         (proceed): Likewise.
456         (do_target_wait): Likewise.
457         (adjust_pc_after_break): Likewise.
458         (handle_syscall_event): Likewise.
459         (save_waitstatus): Likewise.
460         (handle_inferior_event_1): Likewise.
461         (handle_signal_stop): Likewise.
462         (keep_going_pass_signal): Likewise.
463         * linux-nat.c (status_callback): Likewise.
464         (save_stop_reason): Likewise.
465         (resume_stopped_resumed_lwps): Likewise.
466         * record-full.c (record_full_exec_insn): Likewise.
467         (record_full_wait_1): Likewise.
468         * regcache.c (get_regcache_aspace): Remove.
469         * regcache.h (get_regcache_aspace): Remove.
470
471 2017-11-02  Yao Qi  <yao.qi@linaro.org>
472
473         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
474         (init_regcache_descr): Use gdbarch_num_regs.
475         (regcache::regcache): Likewise.
476         (regcache::get_register_status): Likewise.
477         (regcache::assert_raw_regnum): Likewise.
478         (regcache::cooked_read): Likewise.
479         (regcache::cooked_read_value): Likewise.
480         (regcache::cooked_write): Likewise.
481         (regcache::dump): Likewise.
482         (regcache::num_raw_registers): New method.
483         * regcache.h (class regcache) <num_raw_registers>: New.
484
485 2017-11-02  Yao Qi  <yao.qi@linaro.org>
486
487         * regcache.c (regcache::assert_regnum): New method.
488         (regcache::invalidate): Call assert_regnum.
489         (regcache::raw_update): Likewise.
490         (regcache::raw_write): Likewise.
491         (regcache::raw_read_part): Likewise.
492         (regcache::raw_write_part): Likewise.
493         (regcache::raw_supply): Likewise.
494         (regcache::raw_supply_integer): Likewise.
495         (regcache::raw_supply_zeroed): Likewise.
496         (regcache::raw_collect): Likewise.
497         (regcache::raw_collect_integer): Likewise.
498         * regcache.h (regcache::assert_regnum): Declare.
499
500 2017-11-02  Yao Qi  <yao.qi@linaro.org>
501
502         * regcache.c (regcache::dump): Remove code.
503
504 2017-11-02  Yao Qi  <yao.qi@linaro.org>
505
506         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
507         Remove.
508         <sizeof_cooked_register_status>: Remove.
509         (init_regcache_descr): Update.
510         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
511         (regcache::save): Likewise.
512         (regcache::dump): Likewise.
513
514 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
515
516         * ft32-tdep.c (ft32_fetch_instruction): New function.
517         (ft32_analyze_prologue): Use ft32_fetch_instruction().
518
519 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
520
521         * cli/cli-script.c (execute_control_command): Rename to ...
522         (execute_control_command_1): ... this.
523         (execute_control_command): New function.
524
525 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
526
527         * tracepoint.c (tfind_command): Remove const_cast.
528
529 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
530
531         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
532
533 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
534
535         * common/common-utils.h (in_inclusive_range): New function.
536         * arm-tdep.c (arm_record_extension_space): Use
537         in_inclusive_range.
538         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
539         * cris-tdep.c (cris_spec_reg_applicable): Use
540         in_inclusive_range.
541
542 2017-10-30  Pedro Alves  <palves@redhat.com>
543             Simon Marchi <simon.marchi@ericsson.com>
544
545         * remote.c (remote_set_syscall_catchpoint): Build a std::string
546         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
547
548 2017-10-30  Pedro Alves  <palves@redhat.com>
549
550         * common/common-utils.c (string_appendf, string_vappendf): New
551         functions.
552         * common/common-utils.h (string_appendf, string_vappendf): New
553         declarations.
554         * unittests/common-utils-selftests.c (string_appendf_func)
555         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
556         (string_vappendf_tests): New functions.
557         (_initialize_common_utils_selftests): Register "string_appendf" and
558         "string_vappendf tests".
559
560 2017-10-30  Pedro Alves  <palves@redhat.com>
561
562         * unittests/common-utils-selftests.c (format_func): New typedef.
563         (string_printf_tests, string_vprintf_tests): Tests factored out
564         and merged to ...
565         (test_format_func): ... this new function.
566         (string_printf_tests, string_vprintf_tests): Reimplement on top of
567         test_format_func.
568
569 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
570
571         * darwin-nat.c: Remove include of gdb.h.
572
573 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
574
575         * xtensa-xtregs.c: Fix formatting issues.
576
577 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
578
579         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
580
581 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
582
583         PR python/21213
584         * python/py-infthread.c (thpy_get_inferior): Increment reference
585         of inferior before returning it.
586
587 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
588
589         * unittests/common-utils-selftests.c (format): Add
590         ATTRIBUTE_PRINTF.
591
592 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
593
594         * xml-syscall.c (struct syscall_desc): Add constructor.
595         <name>: Change type to std::string.
596         (syscall_desc_up): New typedef.
597         (syscall_desc_p): Remove typeder.
598         (DEF_VEC_P(syscall_desc_p)): Remove.
599         (struct syscall_group_desc): Add constructor.
600         <name>: Change type to std::string.
601         <syscalls>: Change type to std::vector.
602         (syscall_group_desc_up): New typedef.
603         (syscall_group_desc_p): Remove typedef.
604         (DEF_VEC_P(syscall_group_desc_p)): Remove.
605         (struct syscalls_info) <syscalls>: Change type to std::vector of
606         unique_ptr.
607         <groups>: Likewise.
608         <my_gdb_datadir>: Change type to std::string.
609         (syscalls_info_up): New typedef.
610         (allocate_syscalls_info): Remove.
611         (syscalls_info_free_syscalls_desc): Remove.
612         (syscalls_info_free_syscall_group_desc): Remove.
613         (free_syscalls_info): Remove.
614         (make_cleanup_free_syscalls_info): Remove.
615         (syscall_group_create_syscall_group_desc): Adjust.
616         (syscall_group_add_syscall): Adjust.
617         (syscall_create_syscall_desc): Adjust.
618         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
619         (init_syscalls_info): Adjust.
620         (syscall_group_get_group_by_name): Adjust.
621         (xml_get_syscall_number): Adjust.
622         (xml_get_syscall_name): Adjust.
623         (xml_list_of_syscalls): Adjust.
624         (xml_list_syscalls_by_group): Adjust.
625         (xml_list_of_groups): Adjust.
626
627 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
628
629         * probe.h: Don't include gdb_vecs.h.
630         (DEF_VEC_P (probe_p)): Remove.
631         (find_probes_in_objfile): Return an std::vector.
632         * probe.c (find_probes_in_objfile): Likewise.
633         * breakpoint.c (breakpoint_objfile_data)
634         <longjmp_probes>: Change type to std::vector.
635         <exception_probes>: Likewise.
636         (free_breakpoint_probes): Don't manually free vectors.
637         (create_longjmp_master_breakpoint): Adjust.
638         (create_exception_master_breakpoint): Adjust.
639         * solib-svr4.c (svr4_create_probe_breakpoints): Change
640         parameter type, adjust.
641         (svr4_create_solib_event_breakpoints): Adjust.
642
643 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
644
645         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
646         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
647         with new.
648         (free_breakpoint_probes): Rename to ...
649         (free_breakpoint_objfile_data): ... this, and call delete on
650         bp_objfile_data..
651
652 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
653
654         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
655         (loaded_script_ptr): Remove typedef.
656         (DEF_VEC_P (loaded_script_ptr)): Remove.
657         (struct collect_matching_scripts_data): Add constructor.
658         <scripts_p>: Change type to (pointer to) std::vector.
659         (collect_matching_scripts_data): Adjust.
660         (sort_scripts_by_name): Make suitable for std::sort.
661         (print_scripts): Don't sort vector, adjust to std::vector.
662         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
663
664 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
665
666         * symfile.c (filename_language): Make struct, not typedef.  Add
667         constructor.
668         <ext>: Change type to std::string.
669         (DEF_VEC_O (filename_language)): Remove.
670         (filename_language_table): Change type to std::vector.
671         (add_filename_language): Adjust.
672         (set_ext_lang_command): Adjust.
673         (info_ext_lang_command): Adjust.
674         (deduce_language_from_filename): Adjust.
675         (class scoped_restore_filename_language_table): Remove.
676         (test_filename_language): Use scoped_restore.
677         (test_set_ext_lang_command): Use scoped_restore, adjust to
678         std::vector change.
679
680 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
681
682         * symfile.c: Include selftest.h.
683         (class scoped_restore_filename_language_table): New.
684         (test_filename_language): New test.
685         (test_set_ext_lang_command): New test.
686         (_initialize_symfile): Register tests.
687
688 2017-10-27  Keith Seitz  <keiths@redhat.com>
689
690         * breakpoint.c (print_breakpoint_location): Use the symbol saved
691         in the bp_location, falling back to find_pc_sect_function when
692         needed.
693         (add_location_to_breakpoint): Save sal->symbol.
694         * breakpoint.h (struct bp_location) <symbol>: New field.
695         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
696         * symtab.h (struct symtab_and_line) <symbol>: New field.
697
698 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
699
700         PR gdb/13669
701         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
702         to rewind obstack.
703
704 2017-10-26  Pedro Alves  <palves@redhat.com>
705
706         * remote.c (remote_async_terminal_ours_p): Delete.
707         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
708         Remove references to 'remote_async_terminal_ours_p'.
709
710 2017-10-26  Yao Qi  <yao.qi@linaro.org>
711
712         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
713
714 2017-10-26  Yao Qi  <yao.qi@linaro.org>
715
716         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
717         aspace const.
718         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
719         Likewise.
720         * breakpoint.c (bpstat_check_location): Remove cast.
721         (breakpoint_hit_catch_fork): Make aspce const.
722         (breakpoint_hit_catch_solib): Likewise.
723         (breakpoint_hit_catch_exec): Likewise.
724         (breakpoint_hit_ranged_breakpoint): Likewise.
725         (breakpoint_hit_watchpoint): Likewise.
726         (base_breakpoint_breakpoint_hit): Likewise.
727         (bkpt_breakpoint_hit): Likewise.
728         (dprintf_breakpoint_hit): Likewise.
729         (tracepoint_breakpoint_hit): Likewise.
730         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
731
732 2017-10-26  Yao Qi  <yao.qi@linaro.org>
733
734         * breakpoint.c (breakpoint_location_address_match): Change
735         "struct address_space *" to "const address_space".
736         (breakpoint_location_address_range_overlap): Likewise.
737         (breakpoint_here_p): Likewise.
738         (breakpoint_in_range_p): Likewise.
739         (moribund_breakpoint_here_p): Likewise.
740         (bp_location_inserted_here_p): Likewise.
741         (software_breakpoint_inserted_here_p): Likewise.
742         (hardware_breakpoint_inserted_here_p): Likewise.
743         (hardware_watchpoint_inserted_in_range): Likewise.
744         (bpstat_check_location): Likewise.
745         (bpstat_stop_status): Likewise.
746         (breakpoint_address_match): Likewise.
747         (breakpoint_address_match_range): Likewise.
748         (breakpoint_location_address_match): Likewise.
749         (breakpoint_location_address_range_overlap): Likewise.
750         (insert_single_step_breakpoint): Likewise.
751         (breakpoint_has_location_inserted_here): Likewise.
752         (single_step_breakpoint_inserted_here_p): Likewise.
753         (pc_at_non_inline_function): Likewise.
754         * breakpoint.h (bpstat_stop_status): Update declaration.
755         (breakpoint_here_p): Likewise.
756         (breakpoint_in_range_p): Likewise.
757         (moribund_breakpoint_here_p): Likewise.
758         (breakpoint_inserted_here_p): Likewise.
759         (software_breakpoint_inserted_here_p): Likewise.
760         (hardware_breakpoint_inserted_here_p): Likewise.
761         (breakpoint_has_location_inserted_here): Likewise.
762         (single_step_breakpoint_inserted_here_p): Likewise.
763         (hardware_watchpoint_inserted_in_range): Likewise.
764         (breakpoint_address_match): Likewise.
765         (insert_single_step_breakpoint): Likewise.
766         (pc_at_non_inline_function): Likewise.
767         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
768         * record.c (record_check_stopped_by_breakpoint): Likewise.
769         * record.h (record_check_stopped_by_breakpoint): Likewise.
770         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
771
772 2017-10-25  Yao Qi  <yao.qi@linaro.org>
773
774         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
775         regcache->arch () instead get_regcache_arch.
776         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
777         Likewise.
778         (aarch64_fbsd_store_inferior_registers): Likewise.
779         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
780         (store_gregs_to_thread): Likewise.
781         (fetch_fpregs_from_thread): Likewise.
782         (store_fpregs_to_thread): Likewise.
783         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
784         (aarch64_store_return_value): Likewise.
785         (aarch64_software_single_step): Likewise.
786         * aix-thread.c (aix_thread_wait): Likewise.
787         (supply_reg32): Likewise.
788         (supply_sprs64): Likewise.
789         (supply_sprs32): Likewise.
790         (fill_gprs64): Likewise.
791         (fill_gprs32): Likewise.
792         (fill_sprs64): Likewise.
793         (fill_sprs32): Likewise.
794         (store_regs_user_thread): Likewise.
795         (store_regs_kernel_thread): Likewise.
796         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
797         (alphabsd_store_inferior_registers): Likewise.
798         * alpha-tdep.c (alpha_extract_return_value): Likewise.
799         (alpha_store_return_value): Likewise.
800         (alpha_deal_with_atomic_sequence): Likewise.
801         (alpha_next_pc): Likewise.
802         (alpha_software_single_step): Likewise.
803         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
804         (amd64bsd_store_inferior_registers): Likewise.
805         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
806         Likewise.
807         (amd64_linux_store_inferior_registers): Likewise.
808         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
809         (amd64_collect_native_gregset): Likewise.
810         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
811         (amd64obsd_collect_uthread): Likewise.
812         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
813         (amd64_collect_fpregset): Likewise.
814         (amd64_supply_fxsave): Likewise.
815         (amd64_supply_xsave): Likewise.
816         (amd64_collect_fxsave): Likewise.
817         (amd64_collect_xsave): Likewise.
818         * arc-tdep.c (arc_write_pc): Likewise.
819         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
820         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
821         (arm_fbsd_store_inferior_registers): Likewise.
822         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
823         (store_vfp_regs): Likewise.
824         (arm_linux_fetch_inferior_registers): Likewise.
825         (arm_linux_store_inferior_registers): Likewise.
826         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
827         (arm_linux_sigreturn_next_pc): Likewise.
828         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
829         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
830         (fetch_register): Likewise.
831         (store_register): Likewise.
832         * arm-tdep.c (arm_is_thumb): Likewise.
833         (displaced_in_arm_mode): Likewise.
834         (bx_write_pc): Likewise.
835         (arm_get_next_pcs_addr_bits_remove): Likewise.
836         (arm_software_single_step): Likewise.
837         (arm_extract_return_value): Likewise.
838         (arm_store_return_value): Likewise.
839         (arm_write_pc): Likewise.
840         * bfin-tdep.c (bfin_extract_return_value): Likewise.
841         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
842         (bsd_uthread_store_registers): Likewise.
843         * core-regset.c (fetch_core_registers): Likewise.
844         * corelow.c (get_core_registers): Likewise.
845         * cris-tdep.c (cris_store_return_value): Likewise.
846         (cris_extract_return_value): Likewise.
847         (find_step_target): Likewise.
848         (find_step_target): Likewise.
849         (cris_software_single_step): Likewise.
850         * ctf.c (ctf_fetch_registers): Likewise.
851         * darwin-nat.c (cancel_breakpoint): Likewise.
852         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
853         * frv-tdep.c (frv_extract_return_value): Likewise.
854         * ft32-tdep.c (ft32_store_return_value): Likewise.
855         (ft32_extract_return_value): Likewise.
856         * go32-nat.c (fetch_register): Likewise.
857         (go32_fetch_registers): Likewise.
858         (go32_store_registers): Likewise.
859         (store_register): Likewise.
860         * h8300-tdep.c (h8300_extract_return_value): Likewise.
861         (h8300_store_return_value): Likewise.
862         * hppa-linux-nat.c (fetch_register): Likewise.
863         (store_register): Likewise.
864         (hppa_linux_fetch_inferior_registers): Likewise.
865         (hppa_linux_store_inferior_registers): Likewise.
866         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
867         (i386_darwin_store_inferior_registers): Likewise.
868         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
869         (gnu_store_registers): Likewise.
870         * i386-linux-nat.c (fetch_register): Likewise.
871         (store_register): Likewise.
872         (supply_gregset): Likewise.
873         (fill_gregset): Likewise.
874         (i386_linux_fetch_inferior_registers): Likewise.
875         (i386_linux_store_inferior_registers): Likewise.
876         (i386_linux_resume): Likewise.
877         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
878         Likewise.
879         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
880         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
881         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
882         (i386obsd_collect_uthread): Likewise.
883         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
884         (i386_supply_gregset): Likewise.
885         (i386_collect_gregset): Likewise.
886         (i386_supply_fpregset): Likewise.
887         (i386_collect_fpregset): Likewise.
888         (i386_mpx_bd_base): Likewise.
889         * i386-v4-nat.c (supply_fpregset): Likewise.
890         (fill_fpregset): Likewise.
891         * i387-tdep.c (i387_supply_fsave): Likewise.
892         (i387_collect_fsave): Likewise.
893         (i387_supply_fxsave): Likewise.
894         (i387_collect_fxsave): Likewise.
895         (i387_supply_xsave): Likewise.
896         (i387_collect_xsave): Likewise.
897         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
898         (ia64_linux_store_registers): Likewise.
899         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
900         (ia64_extract_return_value): Likewise.
901         (ia64_store_return_value): Likewise.
902         (find_func_descr): Likewise.
903         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
904         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
905         (inf_ptrace_store_registers): Likewise.
906         * infrun.c (use_displaced_stepping): Likewise.
907         (displaced_step_prepare_throw): Likewise.
908         (resume): Likewise.
909         (proceed): Likewise.
910         (do_target_wait): Likewise.
911         (adjust_pc_after_break): Likewise.
912         (handle_inferior_event_1): Likewise.
913         (handle_signal_stop): Likewise.
914         (save_infcall_suspend_state): Likewise.
915         (restore_infcall_suspend_state): Likewise.
916         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
917         * jit.c (jit_frame_prev_register): Likewise.
918         * linux-nat.c (save_stop_reason): Likewise.
919         (linux_nat_wait_1): Likewise.
920         (resume_stopped_resumed_lwps): Likewise.
921         * linux-record.c (record_linux_sockaddr): Likewise.
922         (record_linux_msghdr): Likewise.
923         (record_linux_system_call): Likewise.
924         * linux-tdep.c (linux_collect_thread_registers): Likewise.
925         * lm32-tdep.c (lm32_extract_return_value): Likewise.
926         (lm32_store_return_value): Likewise.
927         * m32c-tdep.c (m32c_read_flg): Likewise.
928         (m32c_pseudo_register_read): Likewise.
929         (m32c_pseudo_register_write): Likewise.
930         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
931         (m32r_linux_collect_gregset): Likewise.
932         * m32r-tdep.c (m32r_store_return_value): Likewise.
933         (m32r_extract_return_value): Likewise.
934         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
935         (m68kbsd_collect_fpregset): Likewise.
936         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
937         * m68k-linux-nat.c (fetch_register): Likewise.
938         (old_fetch_inferior_registers): Likewise.
939         (old_store_inferior_registers): Likewise.
940         (store_regs): Likewise.
941         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
942         (m68k_svr4_store_return_value): Likewise.
943         * m88k-tdep.c (m88k_store_arguments): Likewise.
944         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
945         (mi_cmd_data_write_register_values): Likewise.
946         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
947         (mips_fbsd_store_inferior_registers): Likewise.
948         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
949         (mips_fbsd_supply_gregs): Likewise.
950         (mips_fbsd_collect_fpregs): Likewise.
951         (mips_fbsd_collect_gregs): Likewise.
952         (mips_fbsd_supply_fpregset): Likewise.
953         (mips_fbsd_collect_fpregset): Likewise.
954         (mips_fbsd_supply_gregset): Likewise.
955         (mips_fbsd_collect_gregset): Likewise.
956         * mips-linux-nat.c (supply_gregset): Likewise.
957         (fill_gregset): Likewise.
958         (supply_fpregset): Likewise.
959         (fill_fpregset): Likewise.
960         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
961         (mips_fill_gregset): Likewise.
962         (mips_supply_fpregset): Likewise.
963         (mips_fill_fpregset): Likewise.
964         (mips64_supply_gregset): Likewise.
965         (micromips_linux_sigframe_validate): Likewise.
966         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
967         (mipsnbsd_fetch_inferior_registers): Likewise.
968         (mipsnbsd_store_inferior_registers): Likewise.
969         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
970         (mipsnbsd_supply_gregset): Likewise.
971         (mipsnbsd_iterate_over_regset_sections): Likewise.
972         (mipsnbsd_supply_reg): Likewise.
973         (mipsnbsd_supply_fpreg): Likewise.
974         * mips-tdep.c (mips_in_frame_stub): Likewise.
975         (mips_dummy_id): Likewise.
976         (is_octeon_bbit_op): Likewise.
977         (micromips_bc1_pc): Likewise.
978         (extended_mips16_next_pc): Likewise.
979         (mips16_next_pc): Likewise.
980         (deal_with_atomic_sequence): Likewise.
981         * moxie-tdep.c (moxie_process_readu): Likewise.
982         * nios2-tdep.c (nios2_get_next_pc): Likewise.
983         * nto-procfs.c (procfs_store_registers): Likewise.
984         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
985         (ppcfbsd_store_inferior_registers): Likewise.
986         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
987         (fetch_altivec_register): Likewise.
988         (get_spe_registers): Likewise.
989         (fetch_spe_register): Likewise.
990         (fetch_altivec_registers): Likewise.
991         (fetch_all_gp_regs): Likewise.
992         (fetch_all_fp_regs): Likewise.
993         (store_vsx_register): Likewise.
994         (store_altivec_register): Likewise.
995         (set_spe_registers): Likewise.
996         (store_spe_register): Likewise.
997         (store_altivec_registers): Likewise.
998         (store_all_gp_regs): Likewise.
999         (store_all_fp_regs): Likewise.
1000         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
1001         (ppc_linux_collect_gregset): Likewise.
1002         (ppc_canonicalize_syscall): Likewise.
1003         (ppc_linux_record_signal): Likewise.
1004         (ppu2spu_prev_register): Likewise.
1005         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
1006         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
1007         (ppcobsd_store_registers): Likewise.
1008         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
1009         Likewise.
1010         (ppc_ravenscar_generic_store_registers): Likewise.
1011         * procfs.c (procfs_fetch_registers): Likewise.
1012         (procfs_store_registers): Likewise.
1013         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
1014         (ravenscar_store_registers): Likewise.
1015         (ravenscar_prepare_to_store): Likewise.
1016         * record-btrace.c (record_btrace_fetch_registers): Likewise.
1017         * record-full.c (record_full_wait_1): Likewise.
1018         (record_full_registers_change): Likewise.
1019         (record_full_store_registers): Likewise.
1020         (record_full_core_fetch_registers): Likewise.
1021         (record_full_save): Likewise.
1022         (record_full_goto_insn): Likewise.
1023         * regcache.c (regcache_register_size): Likewise.
1024         (get_regcache_arch): Remove.
1025         (regcache_read_pc): Likewise.
1026         * regcache.h (get_regcache_arch): Remove.
1027         * remote-sim.c (gdbsim_fetch_register): Likewise.
1028         (gdbsim_store_register): Likewise.
1029         * remote.c (fetch_register_using_p): Likewise.
1030         (send_g_packet): Likewise.
1031         (remote_prepare_to_store): Likewise.
1032         (store_registers_using_G): Likewise.
1033         * reverse.c (save_bookmark_command): Likewise.
1034         (goto_bookmark_command): Likewise.
1035         * rs6000-aix-tdep.c (branch_dest): Likewise.
1036         * rs6000-nat.c (rs6000_ptrace64): Likewise.
1037         (fetch_register): Likewise.
1038         * rs6000-tdep.c (ppc_supply_reg): Likewise.
1039         (ppc_collect_reg): Likewise.
1040         (ppc_collect_gregset): Likewise.
1041         (ppc_collect_fpregset): Likewise.
1042         (ppc_collect_vsxregset): Likewise.
1043         (ppc_collect_vrregset): Likewise.
1044         (ppc_displaced_step_hw_singlestep): Likewise.
1045         (rs6000_pseudo_register_read): Likewise.
1046         (rs6000_pseudo_register_write): Likewise.
1047         * s390-linux-nat.c (supply_gregset): Likewise.
1048         (fill_gregset): Likewise.
1049         (s390_linux_fetch_inferior_registers): Likewise.
1050         * s390-linux-tdep.c (s390_write_pc): Likewise.
1051         (s390_software_single_step): Likewise.
1052         (s390_all_but_pc_registers_record): Likewise.
1053         (s390_linux_syscall_record): Likewise.
1054         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
1055         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
1056         (shnbsd_store_inferior_registers): Likewise.
1057         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
1058         (sh_extract_return_value_fpu): Likewise.
1059         (sh_store_return_value_nofpu): Likewise.
1060         (sh_corefile_supply_regset): Likewise.
1061         (sh_corefile_collect_regset): Likewise.
1062         * sh64-tdep.c (sh64_extract_return_value): Likewise.
1063         (sh64_store_return_value): Likewise.
1064         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
1065         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
1066         (sparc_store_inferior_registers): Likewise.
1067         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
1068         (sparc_ravenscar_prepare_to_store): Likewise.
1069         * sparc-tdep.c (sparc32_store_arguments): Likewise.
1070         (sparc_analyze_control_transfer): Likewise.
1071         (sparc_step_trap): Likewise.
1072         (sparc_software_single_step): Likewise.
1073         (sparc32_gdbarch_init): Likewise.
1074         (sparc_supply_rwindow): Likewise.
1075         (sparc_collect_rwindow): Likewise.
1076         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
1077         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
1078         (sparc64nbsd_collect_gregset): Likewise.
1079         (sparc64nbsd_supply_fpregset): Likewise.
1080         (sparc64nbsd_collect_fpregset): Likewise.
1081         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
1082         (sparc64_supply_gregset): Likewise.
1083         (sparc64_collect_gregset): Likewise.
1084         (sparc64_supply_fpregset): Likewise.
1085         (sparc64_collect_fpregset): Likewise.
1086         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
1087         * spu-tdep.c (spu_unwind_sp): Likewise.
1088         (spu2ppu_prev_register): Likewise.
1089         (spu_memory_remove_breakpoint): Likewise.
1090         * stack.c (return_command): Likewise.
1091         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
1092         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
1093         * tracefile.c (trace_save_ctf): Likewise.
1094         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
1095         (do_windows_store_inferior_registers): Likewise.
1096         (windows_resume): Likewise.
1097         * xtensa-linux-nat.c (fill_gregset): Likewise.
1098         (supply_gregset_reg): Likewise.
1099         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
1100         (xtensa_register_read_masked): Likewise.
1101         (xtensa_supply_gregset): Likewise.
1102         (xtensa_extract_return_value): Likewise.
1103         (xtensa_store_return_value): Likewise.
1104
1105 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
1106
1107         * doublest.c (floatformat_from_string): New function.
1108         * doublest.h (floatformat_from_string): Add prototype.
1109
1110         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
1111         (OP_FLOAT): ... this.
1112         * expression.h: Do not include "doublest.h".
1113         (union exp_element): Replace doubleconst and decfloatconst by
1114         new element floatconst.
1115         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
1116         (ada_evaluate_subexp): Likewise.
1117         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
1118         OP_DOUBLE and OP_DECFLOAT.
1119         * expprint.c (print_subexp_standard): Likewise.
1120         (dump_subexp_body_standard): Likewise.
1121         * breakpoint.c (watchpoint_exp_is_const): Likewise.
1122
1123         * parse.c: Include "dfp.h".
1124         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1125         (write_exp_elt_floatcst): New function.
1126         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
1127         and OP_DECFLOAT.
1128         (operator_check_standard): Likewise.
1129         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
1130         Return target format buffer instead of host DOUBLEST.
1131         Use floatformat_from_string and decimal_from_string to parse
1132         either binary or decimal floating-point types.
1133         (parse_c_float): Remove.
1134         * parser-defs.h: Do not include "doublest.h".
1135         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1136         (write_exp_elt_floatcst): Add prototype.
1137         (parse_float): Update prototype.
1138         (parse_c_float): Remove.
1139
1140         * c-exp.y: Do not include "dfp.h".
1141         (typed_val_float): Use byte buffer instead of DOUBLEST.
1142         (typed_val_decfloat): Remove.
1143         (DECFLOAT): Remove.
1144         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1145         (parse_number): Update to new parse_float interface.
1146         Parse suffixes and determine type before calling parse_float.
1147         Handle decimal and binary FP types the same way.
1148
1149         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1150         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
1151         (parse_number): Update to new parse_float interface.
1152         Parse suffixes and determine type before calling parse_float.
1153
1154         * f-exp.y: Replace dval by typed_val_float.
1155         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1156         (parse_number): Use parse_float instead of atof.
1157
1158         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1159         (parse_go_float): Remove.
1160         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1161         (parse_number): Call parse_float instead of parse_go_float.
1162         Parse suffixes and determine type before calling parse_float.
1163
1164         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1165         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1166         (parse_number): Update to new parse_float interface.
1167         Parse suffixes and determine type before calling parse_float.
1168
1169         * m2-exp.y: Replace dval by byte buffer val.
1170         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1171         (parse_number): Call parse_float instead of atof.
1172
1173         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1174         (lex_number): Call parse_float instead of strtod.
1175         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
1176         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
1177         Use write_exp_elt_floatcst.
1178         (unit_testing): Remove static variable.
1179         (rust_type): Do not check unit_testing.
1180         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
1181
1182         * ada-exp.y (type_float, type_double): Remove.
1183         (typed_val_float): Use byte buffer instead of DOUBLEST.
1184         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1185         * ada-lex.l (processReal): Use parse_float instead of sscanf.
1186
1187 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
1188
1189         * aarch64-tdep.h (enum aarch64_regnum): Remove.
1190         * arch/aarch64.h: New file.
1191
1192 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1193
1194         * dfp.h (decimal_from_string): Use const reference for argument.
1195         * dfp.c (decimal_from_string): Likewise.
1196
1197 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1198
1199         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
1200         * sh64-tdep.c (sh64_do_fp_register): Likewise.
1201         * mips-tdep.c (mips_print_fp_register): Likewise.
1202
1203 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1204
1205         * common/format.h (enum argclass): Replace decfloat_arg by
1206         dec32float_arg, dec64float_arg, and dec128float_arg.
1207         * common/format.c (parse_format_string): Update to return
1208         new decimal float argument classes.
1209
1210         * printcmd.c (printf_decfloat): Rename to ...
1211         (printf_floating): ... this.  Add argclass argument, and use it
1212         instead of parsing the format string again.  Add support for
1213         binary floating-point values, using floatformat_to_string.
1214         Convert value to the target format if it doesn't already match.
1215         (ui_printf): Call printf_floating instead of printf_decfloat,
1216         also for double_arg / long_double_arg.  Pass argclass.
1217
1218         * dfp.c (decimal_to_string): Add format string argument.
1219         * dfp.h (decimal_to_string): Likewise.
1220
1221         * doublest.c (floatformat_to_string): Add format string argument.
1222         * doublest.h (floatformat_to_string): Likewise.
1223
1224 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1225
1226         * doublest.c (floatformat_precision): New routine.
1227         (floatformat_to_string): Likewise.
1228         * doublest.c (floatformat_to_string): Add prototype.
1229
1230         * printcmd.c (print_scalar_formatted): Only call print_floating
1231         on floating-point types.
1232         * valprint.c: Do not include "floatformat.h".
1233         (generic_val_print_decfloat): Remove.
1234         (generic_val_print): Call generic_val_print_float for both
1235         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
1236         (print_floating): Use floatformat_to_string.  Handle decimal float.
1237         (print_decimal_floating): Remove, merge into floatformat_to_string.
1238         * value.h (print_decimal_floating): Remove.
1239
1240         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
1241
1242 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1243
1244         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
1245
1246 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1247
1248         * memattr.h: Don't include vec.h.
1249         (struct mem_attrib): Initialize fields.
1250         <unknown>: New static method.
1251         (struct mem_region): Add constructors, operator<, initialize
1252         fields.
1253         * memattr.c: Include algorithm.
1254         (default_mem_attrib, unknown_mem_attrib): Remove.
1255         (user_mem_region_list): New global.
1256         (target_mem_region_list, mem_region_list): Change type to
1257         std::vector<mem_region>.
1258         (mem_use_target): Now a function.
1259         (target_mem_regions_valid): Change type to bool.
1260         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
1261         (require_user_regions): Adjust.
1262         (require_target_regions): Adjust.
1263         (create_mem_region): Adjust.
1264         (lookup_mem_region): Adjust.
1265         (invalidate_target_mem_regions): Adjust.
1266         (mem_clear): Rename to...
1267         (user_mem_clear): ... this, and adjust.
1268         (mem_command): Adjust.
1269         (info_mem_command): Adjust.
1270         (mem_enable, enable_mem_command, mem_disable,
1271         disable_mem_command): Adjust.
1272         (mem_delete): Adjust.
1273         (delete_mem_command): Adjust.
1274         * memory-map.h (parse_memory_map): Return an std::vector.
1275         * memory-map.c (parse_memory_map): Likewise.
1276         (struct memory_map_parsing_data): Add constructor.
1277         <memory_map>: Point to std::vector.
1278         (memory_map_start_memory): Adjust.
1279         (memory_map_end_memory): Adjust.
1280         (memory_map_end_property): Adjust.
1281         (clear_result): Remove.
1282         * remote.c (remote_memory_map): Return an std::vector.
1283         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
1284         Remove.
1285         (target_debug_print_mem_region_vector): New.
1286         * target-delegates.c: Regenerate.
1287         * target.h (mem_region_vector): New typedef.
1288         (to_memory_map): Return mem_region_vector.
1289         (target_memory_map): Return an std::vector.
1290         * target.c (target_memory_map): Return an std::vector.
1291         (flash_erase_command): Adjust.
1292
1293 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1294
1295         * memory-map.c (struct memory_map_parsing_data) <property_name>:
1296         Change type to std::string.
1297         (memory_map_start_property): Adjust.
1298         (memory_map_end_property): Adjust.
1299
1300 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1301
1302         * infrun.h: Include common/byte-vector.h.
1303         (struct displaced_step_closure): New struct.
1304         (struct buf_displaced_step_closure): New struct.
1305         * infrun.c (displaced_step_closure::~displaced_step_closure):
1306         Provide default implementation.
1307         (displaced_step_clear): Deallocate step closure with delete.
1308         * aarch64-tdep.c (displaced_step_closure): Rename to ...
1309         (aarch64_displaced_step_closure): ... this, extend
1310         displaced_step_closure.
1311         (aarch64_displaced_step_data) <dsc>: Change type to
1312         aarch64_displaced_step_closure.
1313         (aarch64_displaced_step_copy_insn): Adjust to type change, use
1314         unique_ptr.
1315         (aarch64_displaced_step_fixup): Add cast for displaced step
1316         closure.
1317         * amd64-tdep.c (displaced_step_closure): Rename to ...
1318         (amd64_displaced_step_closure): ... this, extend
1319         displaced_step_closure.
1320         <insn_buf>: Change type to std::vector<gdb_byte>.
1321         <max_len>: Remove.
1322         (fixup_riprel): Change type of DSC parameter, adjust to type
1323         change of insn_buf.
1324         (fixup_displaced_copy): Change type of DSC parameter.
1325         (amd64_displaced_step_copy_insn): Instantiate
1326         amd64_displaced_step_closure.
1327         (amd64_displaced_step_fixup): Add cast for closure type, adjust
1328         to type change of insn_buf.
1329         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
1330         parameter DSC.
1331         (arm_linux_copy_svc): Likewise.
1332         (cleanup_kernel_helper_return): Likewise.
1333         (arm_catch_kernel_helper_return): Likewise.
1334         (arm_linux_displaced_step_copy_insn): Instantiate
1335         arm_displaced_step_closure.
1336         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
1337         (displaced_read_reg): Change type of parameter DSC.
1338         (branch_write_pc): Likewise.
1339         (load_write_pc): Likewise.
1340         (alu_write_pc): Likewise.
1341         (displaced_write_reg): Likewise.
1342         (arm_copy_unmodified): Likewise.
1343         (thumb_copy_unmodified_32bit): Likewise.
1344         (thumb_copy_unmodified_16bit): Likewise.
1345         (cleanup_preload): Likewise.
1346         (install_preload): Likewise.
1347         (arm_copy_preload): Likewise.
1348         (thumb2_copy_preload): Likewise.
1349         (install_preload_reg): Likewise.
1350         (arm_copy_preload_reg): Likewise.
1351         (cleanup_copro_load_store): Likewise.
1352         (install_copro_load_store): Likewise.
1353         (arm_copy_copro_load_store) Likewise.
1354         (thumb2_copy_copro_load_store): Likewise.
1355         (cleanup_branch): Likewise.
1356         (install_b_bl_blx): Likewise.
1357         (arm_copy_b_bl_blx): Likewise.
1358         (thumb2_copy_b_bl_blx): Likewise.
1359         (thumb_copy_b): Likewise.
1360         (install_bx_blx_reg): Likewise.
1361         (arm_copy_bx_blx_reg): Likewise.
1362         (thumb_copy_bx_blx_reg): Likewise.
1363         (cleanup_alu_imm): Likewise.
1364         (arm_copy_alu_imm): Likewise.
1365         (thumb2_copy_alu_imm): Likewise.
1366         (cleanup_alu_reg): Likewise.
1367         (install_alu_reg): Likewise.
1368         (arm_copy_alu_reg): Likewise.
1369         (thumb_copy_alu_reg): Likewise.
1370         (cleanup_alu_shifted_reg): Likewise.
1371         (install_alu_shifted_reg): Likewise.
1372         (arm_copy_alu_shifted_reg): Likewise.
1373         (cleanup_load): Likewise.
1374         (cleanup_store): Likewise.
1375         (arm_copy_extra_ld_st): Likewise.
1376         (install_load_store): Likewise.
1377         (thumb2_copy_load_literal): Likewise.
1378         (thumb2_copy_load_reg_imm): Likewise.
1379         (arm_copy_ldr_str_ldrb_strb): Likewise.
1380         (cleanup_block_load_all): Likewise.
1381         (cleanup_block_store_pc): Likewise.
1382         (cleanup_block_load_pc): Likewise.
1383         (arm_copy_block_xfer): Likewise.
1384         (thumb2_copy_block_xfer): Likewise.
1385         (cleanup_svc): Likewise.
1386         (install_svc): Likewise.
1387         (arm_copy_svc): Likewise.
1388         (thumb_copy_svc): Likewise.
1389         (arm_copy_undef): Likewise.
1390         (thumb_32bit_copy_undef): Likewise.
1391         (arm_copy_unpred): Likewise.
1392         (arm_decode_misc_memhint_neon): Likewise.
1393         (arm_decode_unconditional): Likewise.
1394         (arm_decode_miscellaneous): Likewise.
1395         (arm_decode_dp_misc): Likewise.
1396         (arm_decode_ld_st_word_ubyte): Likewise.
1397         (arm_decode_media): Likewise.
1398         (arm_decode_b_bl_ldmstm): Likewise.
1399         (arm_decode_ext_reg_ld_st): Likewise.
1400         (thumb2_decode_dp_shift_reg): Likewise.
1401         (thumb2_decode_ext_reg_ld_st): Likewise.
1402         (arm_decode_svc_copro): Likewise.
1403         (thumb2_decode_svc_copro): Likewise.
1404         (install_pc_relative): Likewise.
1405         (thumb_copy_pc_relative_16bit): Likewise.
1406         (thumb_decode_pc_relative_16bit): Likewise.
1407         (thumb_copy_pc_relative_32bit): Likewise.
1408         (thumb_copy_16bit_ldr_literal): Likewise.
1409         (thumb_copy_cbnz_cbz): Likewise.
1410         (thumb2_copy_table_branch): Likewise.
1411         (cleanup_pop_pc_16bit_all): Likewise.
1412         (thumb_copy_pop_pc_16bit): Likewise.
1413         (thumb_process_displaced_16bit_insn): Likewise.
1414         (decode_thumb_32bit_ld_mem_hints): Likewise.
1415         (thumb_process_displaced_32bit_insn): Likewise.
1416         (thumb_process_displaced_insn): Likewise.
1417         (arm_process_displaced_insn): Likewise.
1418         (arm_displaced_init_closure): Likewise.
1419         (arm_displaced_step_fixup): Add cast for closure.
1420         * arm-tdep.h: Include infrun.h.
1421         (displaced_step_closure): Rename to ...
1422         (arm_displaced_step_closure): ... this, extend
1423         displaced_step_closure.
1424         <u::svc::copy_svc_os>: Change type of parameter DSC.
1425         <cleanup>: Likewise.
1426         (arm_process_displaced_insn): Likewise.
1427         (arm_displaced_init_closure): Likewise.
1428         (displaced_read_reg): Likewise.
1429         (displaced_write_reg): Likewise.
1430         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1431         Adjust.
1432         * i386-tdep.h: Include infrun.h.
1433         (i386_displaced_step_closure): New typedef.
1434         * i386-tdep.c (i386_displaced_step_copy_insn): Use
1435         i386_displaced_step_closure.
1436         (i386_displaced_step_fixup): Adjust.
1437         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
1438         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
1439         and unique_ptr.
1440         (ppc_displaced_step_fixup): Adjust.
1441         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
1442         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
1443         and unique_ptr.
1444         (s390_displaced_step_fixup): Adjust.
1445
1446 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1447
1448         * interps.h (interp_resume, interp_suspend, interp_set_temp):
1449         Remove declarations.
1450
1451 2017-10-20  Tom Tromey  <tom@tromey.com>
1452
1453         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
1454         std::vector.
1455         (gdb_bfd_record_inclusion): Update.
1456         (bfdp): Remove typedef.
1457
1458 2017-10-20  Tom Tromey  <tom@tromey.com>
1459
1460         * gdb_bfd.c (gdb_bfd_ref): Use new.
1461         (struct gdb_bfd_data): Add constructor, destructor, and member
1462         initializers.
1463         (gdb_bfd_unref): Use delete.
1464
1465 2017-10-20  Tom Tromey  <tom@tromey.com>
1466
1467         * exec.c (exec_file_attach): Use new_bfd_ref.
1468         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
1469         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1470         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
1471         new_bfd_ref.
1472         * gdb_bfd.h (new_bfd_ref): New function.
1473
1474 2017-10-20  Pedro Alves  <palves@redhat.com>
1475
1476         * main.c (captured_command_loop): Add attribute noinline.
1477
1478 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
1479
1480         * interps.c (struct interp_factory): Add constructor.
1481         (interp_factory_p): Remove typedef.
1482         (DEF_VEC_P(interp_factory_p)): Remove.
1483         (interpreter_factories): Change type to std::vector.
1484         (interp_factory_register): Adjust.
1485         (interp_lookup): Adjust.
1486         (interpreter_completer): Adjust.
1487
1488 2017-10-19  Tom Tromey  <tom@tromey.com>
1489
1490         * break-catch-syscall.c (catch_syscall_completer): Use
1491         std::string, gdb::unique_xmalloc_ptr.
1492
1493 2017-10-19  Tom Tromey  <tom@tromey.com>
1494
1495         * infcall.c (call_function_by_hand_dummy): Use std::string.
1496
1497 2017-10-19  Tom Tromey  <tom@tromey.com>
1498
1499         * mi/mi-main.c (mi_cmd_execute): Update.
1500         * top.h (prepare_execute_command): Return scoped_value_mark.
1501         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
1502         Add move constructor.
1503         * top.c (prepare_execute_command): Return scoped_value_mark.
1504         (execute_command): Update.
1505
1506 2017-10-19  Pedro Alves  <palves@redhat.com>
1507
1508         * xml-support.c (xml_fetch_content_from_file): Check fread's
1509         return.
1510
1511 2017-10-19  Pedro Alves  <palves@redhat.com>
1512
1513         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
1514         async.
1515         (handle_error_fd): New function.
1516         (ser_base_async): Add/delete an event loop file handler for
1517         error_fd.
1518
1519 2017-10-19  Pedro Alves  <palves@redhat.com>
1520
1521         * xml-support.c (xml_fetch_content_from_file): Don't read in
1522         chunks.  Instead use fseek to determine the file's size, and read
1523         it in one go.
1524
1525 2017-11-18  Keith Seitz  <keiths@redhat.com>
1526
1527         * c-exp.y (oper): Canonicalize conversion operators of user-defined
1528         types.
1529         Add whitespace to front of type name.
1530
1531 2017-10-18  Keith Seitz  <keiths@redhat.com>
1532
1533         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
1534         DW_AT_accessibility.
1535
1536 2017-10-18  Yao Qi  <yao.qi@linaro.org>
1537
1538         * features/tic6x-c62x-linux.c: Remove.
1539
1540 2017-10-17  Tom Tromey  <tom@tromey.com>
1541
1542         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
1543         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
1544         (do_mixed_source_and_assembly): Likewise.
1545
1546 2017-10-17  Tom Tromey  <tom@tromey.com>
1547
1548         * regcache.c (regcache::xfer_part): Remove assertion.
1549
1550 2017-10-17  Pedro Alves  <palves@redhat.com>
1551
1552         * xml-support.c (xml_fetch_content_from_file): Call
1553         unique_ptr::release() instead unique_ptr::get() when passing
1554         through xrealloc.
1555
1556 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1557
1558         * regcache.c (regcache::xfer_part): Remove parameters read and
1559         write, add parameter is_raw.  All callers are updated.
1560
1561 2017-10-16  Keith Seitz  <keiths@redhat.com>
1562
1563         * c-typeprint.c (enum access_specifier): Moved here from
1564         c_type_print_base.
1565         (output_access_specifier): New function.
1566         (c_type_print_base): Consider typedefs when assessing
1567         whether access labels are needed.
1568         Use output_access_specifier as needed.
1569         Output access specifier for typedefs, if needed.
1570         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
1571         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
1572         fields.
1573         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
1574         accessor macros.
1575
1576 2017-10-16  Tom Tromey  <tom@tromey.com>
1577
1578         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1579         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1580         * target.c (target_fileio_read_stralloc): Update.
1581         * sparc64-tdep.c (adi_is_addr_mapped): Update.
1582         * target.h (target_fileio_read_stralloc): Return
1583         unique_xmalloc_ptr.
1584
1585 2017-10-16  Tom Tromey  <tom@tromey.com>
1586
1587         * xml-syscall.c (xml_init_syscalls_info): Update.
1588         * xml-support.c (xinclude_start_include): Update.
1589         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1590         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1591         (xml_fetch_content_from_file): Likewise.
1592         * osdata.c (get_osdata): Update.
1593         * target.h (target_read_stralloc, target_get_osdata): Return
1594         unique_xmalloc_ptr.
1595         * solib-aix.c (solib_aix_get_library_list): Update.
1596         * solib-target.c (solib_target_current_sos): Update.
1597         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1598         * xml-tdesc.c (fetch_available_features_from_target): Update.
1599         (target_fetch_description_xml): Update.
1600         (file_read_description_xml): Update.
1601         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1602         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1603         (remote_pid_to_exec_file): Update.
1604         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1605         (target_get_osdata): Likewise.
1606
1607 2017-10-16  Tom Tromey  <tom@tromey.com>
1608
1609         * remote.c (remote_register_number_and_offset): Use std::vector.
1610         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1611         (putpkt_binary): Use gdb::def_vector.
1612         (compare_sections_command): Use gdb::byte_vector.
1613
1614 2017-10-16  Tom Tromey  <tom@tromey.com>
1615
1616         * ppc-linux-nat.c (hwdebug_insert_point): Use
1617         gdb::unique_xmalloc_ptr, XDUP.
1618
1619 2017-10-16  Tom Tromey  <tom@tromey.com>
1620
1621         * probe.c (parse_probes): Use std::string.
1622         (info_probes_for_ops, enable_probes_command)
1623         (disable_probes_command): Remove cleanups.
1624
1625 2017-10-16  Tom Tromey  <tom@tromey.com>
1626
1627         * buildsym.c (block_compar): Remove.
1628         (end_symtab_get_static_block): Use std::vector.
1629
1630 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
1631
1632         * memrange.h (struct mem_range): Define operator< and operator==.
1633         (mem_range_s): Remove.
1634         (DEF_VEC_O (mem_range_s)): Remove.
1635         (normalize_mem_ranges): Change parameter type to std::vector.
1636         * memrange.c (compare_mem_ranges): Remove.
1637         (normalize_mem_ranges): Change parameter type to std::vector,
1638         adjust to vector change.
1639         * exec.c (section_table_available_memory): Return vector, remove
1640         parameter.
1641         (section_table_read_available_memory): Adjust to std::vector
1642         change.
1643         * remote.c (remote_read_bytes): Adjust to std::vector
1644         change.
1645         * tracepoint.h (traceframe_available_memory): Change parameter
1646         type to std::vector.
1647         * tracepoint.c (traceframe_available_memory): Change parameter
1648         type to std::vector, adjust.
1649         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1650         std::vector change.
1651         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1652         unittests/memrange-selftests.c.
1653         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1654         * gdb/unittests/memrange-selftests.c: New file.
1655
1656 2017-10-16  Pedro Alves  <palves@redhat.com>
1657
1658         * elfread.c (probe_key_free): Rename range-for variable.
1659         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1660         (find_probe_by_pc, collect_probes): Rename range-for variable.
1661
1662 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1663
1664         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1665         * features/tic6x-c62x.c: Remove.
1666         * features/tic6x-c64x-linux.c: Remove.
1667         * features/tic6x-c64x.c: Remove.
1668         * features/tic6x-c64xp-linux.c: Remove.
1669         * features/tic6x-c64xp.c: Remove.
1670         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1671         initialize_tdesc_tic6x_*_linux functions.
1672         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1673         initialize_tdesc_tic6x_* functions.
1674
1675 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1676
1677         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1678         tic6x-c62x.
1679         * regformats/tic6x-c62x.dat: Remove.
1680         * regformats/tic6x-c64x.dat: Remove.
1681         * regformats/tic6x-c64xp.dat: Remove.
1682
1683 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1684
1685         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1686         (the !HAVE_LIBEXPAT version).
1687
1688 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1689
1690         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1691         const.
1692
1693 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1694
1695         * target.h: Include tracepoint.h.
1696         (enum trace_find_type): Move to tracepoint.h.
1697         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1698         * tracepoint.h: Don't include target.h
1699         (enum trace_find_type): Move from target.h.
1700         (parse_traceframe_info): Return a unique ptr.
1701         * tracepoint.c (current_traceframe_info): Change type to unique
1702         ptr.
1703         (free_traceframe_info): Remove.
1704         (clear_traceframe_info): Don't manually free
1705         current_traceframe_info.
1706         (free_result): Remove.
1707         (parse_traceframe_info): Return a unique ptr.
1708         (get_traceframe_info): Adjust to unique ptr.
1709         * ctf.c (ctf_traceframe_info): Return a unique ptr.
1710         * remote.c (remote_traceframe_info): Return a unique ptr.
1711         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1712         ptr.
1713         * target-debug.h (target_debug_print_traceframe_info_up): New
1714         macro.
1715         * target-delegates.c: Regenerate.
1716
1717 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1718
1719         * memrange.h (struct mem_range): Add constructors.
1720         * tracepoint.h (struct traceframe_info) <memory>: Change type to
1721         std::vector<mem_range>.
1722         * tracepoint.c (free_traceframe_info): Don't manually free
1723         vector.
1724         (traceframe_info_start_memory): Adjust to vector change.
1725         (traceframe_available_memory): Likewise.
1726         * tracefile-tfile.c (build_traceframe_info): Likewise.
1727         * ctf.c (ctf_traceframe_info): Likewise.
1728
1729 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1730
1731         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1732         std::vector<int>.
1733         * tracepoint.c (free_traceframe_info): Deallocate with delete.
1734         (traceframe_info_start_tvar): Adjust to vector change.
1735         (parse_traceframe_info): Allocate with new.
1736         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1737         vector change.
1738         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1739         change.
1740         tfile_traceframe_info): Allocate with new.
1741         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1742         change.
1743
1744 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1745
1746         * tracepoint.c (traceframe_info): Rename to...
1747         (current_traceframe_info): ...this.
1748         (clear_traceframe_info): Adjust.
1749         (get_traceframe_info): Adjust.
1750
1751 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1752
1753         * nat/linux-osdata.c: Include algorithm.
1754         (compare_processes): Remove.
1755         (struct pid_pgid_entry): New struct.
1756         (linux_xfer_osdata_processgroups): Use std::vector instead of
1757         XNEWVEC.
1758
1759 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1760
1761         * objfiles.h: Don't include symfile.h.
1762         (struct partial_symbol): Remove forward-declaration.
1763         (struct objfile) <global_psymbols, static_psymbols>: Change type
1764         to std::vector<partial_symbol *>.
1765         * objfiles.c (objfile::objfile): Don't memset those fields.
1766         (objfile::~objfile): Don't free those fields.
1767         * psympriv.h (struct psymbol_allocation_list): Remove
1768         forward-declaration.
1769         (add_psymbol_to_list): Change psymbol_allocation_list parameter
1770         to std::vector.
1771         (start_psymtab_common): Change parameters to std::vector.
1772         * psymtab.c: Include algorithm.
1773         (require_partial_symbols): Call shrink_to_fit.
1774         (find_pc_sect_psymbol): Adjust to vector change.
1775         (match_partial_symbol): Likewise.
1776         (lookup_partial_symbol): Likewise.
1777         (psym_relocate): Likewise.
1778         (dump_psymtab): Likewise.
1779         (recursively_search_psymtabs): Likewise.
1780         (compare_psymbols): Remove.
1781         (sort_pst_symbols): Adjust to vector change.
1782         (start_psymtab_common): Likewise.
1783         (end_psymtab_common): Likewise.
1784         (psymbol_bcache_full): De-constify return value.
1785         (add_psymbol_to_bcache): Likewise.
1786         (extend_psymbol_list): Remove.
1787         (append_psymbol_to_list): Adjust to vector change.
1788         (add_psymbol_to_list): Likewise.
1789         (init_psymbol_list): Likewise.
1790         (maintenance_info_psymtabs): Likewise.
1791         (maintenance_check_psymtabs): Likewise.
1792         * symfile.h (struct psymbol_allocation_list): Remove.
1793         * symfile.c (reread_symbols): Adjust to vector change.
1794         * dbxread.c (start_psymtab): Change type of parameters.
1795         (dbx_symfile_read): Adjust to vector change.
1796         (read_dbx_symtab): Likewise.
1797         (start_psymtab): Change type of parameters.
1798         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1799         (create_partial_symtab): Likewise.
1800         (add_partial_symbol): Likewise.
1801         (write_one_signatured_type): Likewise.
1802         (recursively_write_psymbols): Likewise.
1803         * mdebugread.c (parse_partial_symbols): Likewise.
1804         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1805         (scan_xcoff_symtab): Adjust to vector change.
1806         (xcoff_initial_scan): Likewise.
1807
1808 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
1809
1810         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1811
1812 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1813
1814         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1815         Remove s390x-*-expedite, add s390x-expedite.
1816
1817 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1818
1819         * features/s390-gs-linux64.c: Regenerated.
1820         * features/s390x-gs-linux64.c: Regenerated.
1821
1822 2017-10-13  Tom Tromey  <tom@tromey.com>
1823
1824         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1825         * solib.c (update_solib_list, reload_shared_libraries_1): Use
1826         delete.
1827         * symfile.c (symbol_file_add_with_addrs): Use new.
1828         (symbol_file_add_separate): Update comment.
1829         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1830         * jit.c (jit_object_close_impl): Use new.
1831         (jit_unregister_code): Use delete.
1832         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1833         (~objfile): Rename from free_objfile.
1834         (free_objfile_separate_debug, do_free_objfile_cleanup)
1835         (free_all_objfiles, objfile_purge_solibs): Use delete.
1836         * objfiles.h (struct objfile): Add constructor and destructor.
1837         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
1838         (allocate_objfile, free_objfile): Don't declare.
1839         (struct objstats): Add initializers.
1840
1841 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1842
1843         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1844         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1845         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1846         * gdbarch.h: Regenerate.
1847         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1848         Adjust comment.
1849         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1850         (i386_displaced_step_fixup): Adjust comment.
1851         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1852
1853 2017-10-12  Tom Tromey  <tom@tromey.com>
1854
1855         * prologue-value.h (pv_area::store_would_trash): Return bool.
1856         (pv_area::find_reg): Likewise.
1857         * prologue-value.c (pv_area::store_would_trash): Return bool.
1858         (pv_area::find_reg): Likewise.
1859
1860 2017-10-12  Tom Tromey  <tom@tromey.com>
1861
1862         * s390-linux-tdep.c (s390_store, s390_load)
1863         (s390_check_for_saved, s390_analyze_prologue): Update.
1864         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1865         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1866         * prologue-value.h (class pv_area): Move from prologue-value.c.
1867         Change names of members.  Add constructor, destructor, member
1868         functions.
1869         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1870         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1871         (pv_area_fetch, pv_area_scan): Don't declare.
1872         * prologue-value.c (struct pv_area::area_entry): Now member of
1873         pv_area.
1874         (struct pv_area): Move to prologue-value.h.
1875         (pv_area::pv_area): Rename from make_pv_area.
1876         (pv_area::~pv_area): Rename from free_pv_area.
1877         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1878         (clear_entries, find_entry, overlaps, store_would_trash, store)
1879         (fetch, find_reg, scan): Now member of pv_area.
1880         Remove "area" argument.  Update.
1881         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1882         Update.
1883         * mn10300-tdep.c (push_reg, check_for_saved)
1884         (mn10300_analyze_prologue): Update.
1885         * mep-tdep.c (is_arg_spill, check_for_saved)
1886         (mep_analyze_prologue): Update.
1887         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1888         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1889         (m32c_is_struct_return, m32c_analyze_prologue): Update.
1890         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1891         Update.
1892         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1893         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1894
1895 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1896
1897         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1898         * linux-nat.c (linux_nat_delete_thread): New variable.
1899         (lwp_free): Invoke linux_nat_delete_thread if set.
1900         (linux_nat_set_delete_thread): New function.
1901         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1902         thread delete callback.
1903         * arm-linux-nat.c (arm_linux_delete_thread): New function.
1904         (_initialize_arm_linux_nat): Assign thread delete callback.
1905         * s390-linux-nat.c (s390_delete_thread): New function.
1906         (_initialize_s390_nat): Assign thread delete callback.
1907         * x86-linux-nat.c (x86_linux_add_target): Likewise.
1908         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1909         function.
1910         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1911         declaration.
1912         * nat/x86-linux.c (x86_linux_delete_thread): New function.
1913         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1914
1915 2017-10-09  Tom Tromey  <tom@tromey.com>
1916
1917         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1918         std::string.
1919         * tui/tui-layout.c (enum tui_status): Use std::string.
1920
1921 2017-10-11  Tom Tromey  <tom@tromey.com>
1922
1923         * gdbthread.h (thread_command): Constify.
1924         * inferior.h (detach_command): Constify.
1925         * top.h (set_history, show_history): Constify.
1926         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1927         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1928         * bsd-kvm.c (bsd_kvm_cmd): Constify.
1929         * printcmd.c (set_command): Constify.
1930         (non_const_set_command): New function.
1931         * dcache.c (set_dcache_command, show_dcache_command): Constify.
1932         * breakpoint.c (enable_command, disable_command, delete_command)
1933         (catch_command, tcatch_command, set_breakpoint_cmd)
1934         (show_breakpoint_cmd): Constify.
1935         * macrocmd.c (macro_command): Constify.
1936         * infcmd.c (unset_command, kill_command, detach_command)
1937         (info_proc_cmd): Constify.
1938         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1939         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1940         (info_auto_load_cmd): Constify.
1941         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1942         (unset_tdesc_cmd): Constify.
1943         * ada-lang.c (set_ada_command, show_ada_command)
1944         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1945         * guile/guile.c (set_guile_command, show_guile_command)
1946         (info_guile_command): Constify.
1947         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1948         Constify.
1949         * skip.c (skip_command): Constify.
1950         * compile/compile.c (_initialize_compile): Constify.
1951         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
1952         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1953         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1954         (maint_btrace_pt_show_cmd): Constify.
1955         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
1956         Constify.
1957         * python/python.c (user_show_python, user_set_python): Constify.
1958         * mips-tdep.c (set_mips_command, show_mips_command)
1959         (set_mipsfpu_command): Constify.
1960         * record-btrace.c (cmd_record_btrace_start)
1961         (cmd_set_record_btrace, cmd_show_record_btrace)
1962         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
1963         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
1964         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
1965         Constify.
1966         * symfile.c (overlay_command): Constify.
1967         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
1968         * cli/cli-logging.c (set_logging_command, show_logging_command):
1969         Constify.
1970         * cli/cli-dump.c (dump_command, append_command)
1971         (srec_dump_command, ihex_dump_command, verilog_dump_command)
1972         (tekhex_dump_command, binary_dump_command)
1973         (binary_append_command): Constify.
1974         * cli/cli-decode.c (struct cmd_list_element): Change type of
1975         "fun".
1976         * cli/cli-cmds.c (info_command, show_command, set_debug)
1977         (show_debug): Constify.
1978         (show_command): Add non-const overload.
1979         * top.c (set_history, show_history): Constify.
1980         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
1981         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
1982         * target.c (target_command): Constify.
1983         * sparc64-tdep.c (info_adi_command): Constify.
1984         * record-full.c (cmd_record_full_start): Constify.
1985         (set_record_full_command): Constify.  Fix typo.
1986         (show_record_full_command): Constify.
1987         * thread.c (thread_command, thread_apply_command): Constify.
1988         * memattr.c (dummy_cmd): Constify.
1989         * value.c (function_command): Constify.
1990         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
1991         * probe.c (info_probes_command): Constify.
1992         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
1993         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
1994         (show_thread_cmd, set_thread_default_cmd)
1995         (show_thread_default_cmd): Constify.
1996         (check_empty): Constify.
1997         * tracepoint.c (tfind_command): Constify.
1998         * cp-support.c (maint_cplus_command): Constify.
1999         * windows-tdep.c (info_w32_command): Constify.
2000         * record.c (cmd_record_start, set_record_command)
2001         (show_record_command, info_record_command, cmd_record_goto):
2002         Constify.
2003         * ravenscar-thread.c (set_ravenscar_command)
2004         (show_ravenscar_command): Constify.
2005         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
2006         Constify.
2007         (add_internal_problem_command): Remove casts.
2008         * arc-tdep.c (maintenance_print_arc_command): Constify.
2009         * valprint.c (set_print, show_print, set_print_raw)
2010         (show_print_raw): Constify.
2011         * maint.c (maintenance_command, maintenance_info_command)
2012         (maintenance_print_command, maintenance_set_cmd)
2013         (maintenance_show_cmd, set_per_command_cmd)
2014         (show_per_command_cmd, maintenance_check_command): Constify.
2015         * language.c (set_check, show_check): Constify.
2016         * typeprint.c (show_print_type, set_print_type): Constify.
2017         * go32-nat.c (go32_info_dos_command): Constify.
2018
2019 2017-10-11  Tom Tromey  <tom@tromey.com>
2020
2021         * breakpoint.c (prepare_re_set_context): Remove.
2022         (breakpoint_re_set_one): Update.  Don't use cleanups.
2023         (breakpoint_re_set): Use scoped_restore, std::string, and
2024         scoped_restore_current_language.
2025
2026 2017-10-11  Tom Tromey  <tom@tromey.com>
2027
2028         * breakpoint.c (commands_command_1): Use std::string.
2029         (cleanup_executing_breakpoints): Remove.
2030         (bpstat_do_actions_1): Use scoped_restore.
2031         (bpstat_check_watchpoint): Use std::string.
2032         (decode_static_tracepoint_spec): Likewise.
2033         (break_range_command): Likewise.
2034         (watch_command_1): Likewise.
2035         (compare_breakpoints): Change argument types.
2036         (clear_command): Use std::vector.
2037         (cleanup_executing_breakpoints): Remove.
2038         (update_global_location_list): Use unique_xmalloc_ptr.
2039         (strace_command): Remove unused declaration.
2040
2041 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2042
2043         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
2044         * NEWS: Mention new FreeBSD/arm native configuration.
2045         * configure.host: Add arm*-*-freebsd*.
2046         * configure.nat: Likewise.
2047         * arm-fbsd-nat.c: New file.
2048
2049 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
2050
2051         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
2052         (ALLDEPFILES): Add arm-fbsd-tdep.c.
2053         * NEWS: Mention new FreeBSD/arm target.
2054         * configure.tgt: Add arm*-*-freebsd*.
2055         * arm-fbsd-tdep.c: New file.
2056         * arm-fbsd-tdep.h: New file.
2057
2058 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2059
2060         * linux-tdep.c (linux_make_corefile_notes): Remove call to
2061         `gdbarch_elfcore_write_linux_prpsinfo'.
2062         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
2063         method.
2064         (elf_internal_linux_prpsinfo): Remove declaration.
2065         * gdbarch.h: Regenerate.
2066         * gdbarch.c: Regenerate.
2067
2068 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
2069
2070         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
2071         `set_gdbarch_elfcore_write_linux_prpsinfo'.
2072
2073 2017-10-11  Pedro Alves  <palves@redhat.com>
2074
2075         * breakpoint.c (reattach_breakpoints): Delete.
2076         * breakpoint.h (reattach_breakpoints): Delete.
2077
2078 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
2079
2080         * symfile.c (registered_sym_fns): Make struct, not typedef.
2081         (DEF_VEC_O (registered_sym_fns)): Remove.
2082         (symtab_fns): Change type to std::vector.
2083         (add_symtab_fns): Adjust.
2084         (find_sym_fns): Adjust.
2085
2086 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
2087
2088         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
2089         * arc-tdep.h (arc_arch_is_em): New function.
2090         (arc_arch_is_hs): Likewise.
2091
2092 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
2093
2094         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
2095         parentheses in the declaration.
2096         (macro_lookup_inclusion): Likewise.
2097         (macro_lookup_definition): Likewise.
2098         * p-lang.h (pascal_builtin_types): Likewise.
2099         * tui/tui-data.c (tui_win_list): Likewise.
2100         * tui/tui-data.h (tui_win_list): Likewise.
2101         * utils.h (make_cleanup_free_section_addr_info): Likewise.
2102
2103 2017-10-11  Mark Rages  <markrages@gmail.com>
2104
2105         * target-memory.c (block_boundaries): Fix for block address not
2106         aligned on block size.
2107
2108 2017-10-10  Pedro Alves <palves@redhat.com>
2109             Tom Tromey  <tom@tromey.com>
2110
2111         * breakpoint.c (struct captured_breakpoint_query_args)
2112         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
2113         (print_breakpoint): New.
2114         * breakpoint.h (print_breakpoint): Declare.
2115         * common/common-exceptions.h (enum return_reason): Remove
2116         references to catch_exceptions.
2117         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
2118         Delete.
2119         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
2120         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
2121         * gdb.h: Delete.
2122         * gdbthread.h (thread_select): Declare.
2123         * mi/mi-cmd-break.c: Don't include gdb.h.
2124         (breakpoint_notify): Use print_breakpoint.
2125         * mi/mi-cmd-catch.c: Don't include gdb.h.
2126         * mi/mi-interp.c: Don't include gdb.h.
2127         (mi_print_breakpoint_for_event): New.
2128         (mi_breakpoint_created, mi_breakpoint_modified): Use
2129         mi_print_breakpoint_for_event.
2130         * mi/mi-main.c: Don't include gdb.h.
2131         (mi_cmd_thread_select): Parse the global thread ID here.  Use
2132         thread_select instead of gdb_thread_select.
2133         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
2134         of using gdb_list_thread_ids.
2135         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
2136         FILEIO_ENOSYS here.
2137         (remote_fileio_request): Use TRY/CATCH instead of
2138         catch_exceptions.
2139         * symfile-mem.c (struct symbol_file_add_from_memory_args)
2140         (symbol_file_add_from_memory_wrapper): Delete.
2141         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
2142         * thread.c: Don't include gdb.h.
2143         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
2144         (thread_alive): Use thread_select.
2145         (do_captured_thread_select): Delete, parts salvaged as ...
2146         (thread_select): ... this new function.
2147         (gdb_thread_select): Delete.
2148
2149 2017-10-10  Pedro Alves  <palves@redhat.com>
2150             Tom Tromey  <tom@tromey.com>
2151
2152         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
2153         and reverse logic.
2154         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
2155         No longer macros.  Instead ...
2156         (enum wp_check_result): They're now values of this new
2157         enumeration.
2158         (watchpoint_check): Change return type to wp_check_result and
2159         parameter type to bpstat.
2160         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
2161         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
2162         catch_errors.  Reverse logic of watchpoint_check call.
2163         (breakpoint_re_set_one): Now returns void and takes a breakpoint
2164         pointer as parameter.
2165         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
2166         * common/common-exceptions.c (throw_exception_sjlj): Update
2167         comments to avoid mentioning catch_errors.
2168         * exceptions.c (catch_errors): Delete.
2169         * exceptions.h: Update comments to avoid mentioning catch_errors.
2170         (catch_errors_ftype, catch_errors): Delete.
2171         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
2172         (hook_stop_stub): Delete.
2173         (restore_selected_frame): Change return type to void, and
2174         parameter type to const frame_id &.
2175         (restore_infcall_control_state): Use TRY/CATCH instead of
2176         catch_errors.
2177         * main.c (captured_command_loop): Return void and remove
2178         parameter.  Remove references to catch_errors.
2179         (captured_main): Use TRY/CATCH instead of catch_errors.
2180         * objc-lang.c (objc_submethod_helper_data)
2181         (find_objc_msgcall_submethod_helper): Delete.
2182         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
2183         catch_errors.
2184         * record-full.c (record_full_message): Return void.
2185         (record_full_message_args, record_full_message_wrapper): Delete.
2186         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
2187         instead of catch_errors.
2188         * solib-aix.c (solib_aix_open_symbol_file_object): Change
2189         parameter type to int.
2190         * solib-darwin.c (open_symbol_file_object): Ditto.
2191         * solib-dsbt.c (open_symbol_file_object): Ditto.
2192         * solib-frv.c (open_symbol_file_object): Ditto.
2193         * solib-svr4.c (open_symbol_file_object): Ditto.
2194         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
2195         * solib.c (update_solib_list): Use TRY/CATCH instead of
2196         catch_errors.
2197         * solist.h (struct target_so_ops) <open_symbol_file_object>:
2198         Change type.
2199         * symmisc.c (struct print_symbol_args): Remove.
2200         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
2201         (print_symbol): Change type.
2202         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
2203         and remove parameters.
2204         (catch_errors): New.
2205         (get_windows_debug_event): Adjust.
2206
2207 2017-10-09  Tom Tromey  <tom@tromey.com>
2208
2209         * mi/mi-main.c (free_splay_tree): Remove.
2210         (list_available_thread_groups): Use splay_tree_up.
2211         * common/gdb_splay_tree.h: New file.
2212
2213 2017-10-09  Tom Tromey  <tom@tromey.com>
2214
2215         * mi/mi-main.c (do_nothing): Remove.
2216         (list_available_thread_groups): Update.
2217
2218 2017-10-09  Pedro Alves  <palves@redhat.com>
2219
2220         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
2221         reading registers when switching context.
2222
2223 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
2224
2225         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
2226         (fbsd_convert_siginfo): Likewise.
2227         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
2228
2229 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
2230
2231         * configure.ac (try_guile_versions): Remove guile-2.2.
2232         * configure: Regenerate.
2233
2234 2017-10-09  Tom Tromey  <tom@tromey.com>
2235
2236         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
2237         (COMPILE.pre): Use $(CXX).
2238
2239 2017-10-09  Pedro Alves  <palves@redhat.com>
2240
2241         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
2242         Use bool.
2243         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2244         * cp-support.h (cp_remove_params): Now returns a
2245         gdb::unique_xmalloc_ptr.
2246         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
2247         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
2248         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
2249         returning a gdb::unique_xmalloc_ptr.
2250         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2251         * stack.c (find_frame_funname): Adjust to cp_remove_params
2252         returning a gdb::unique_xmalloc_ptr.
2253
2254 2017-10-08  Tom Tromey  <tom@tromey.com>
2255
2256         * dwarf2read.c (dwarf2_get_dwz_file): Use
2257         gdb::unique_xmalloc_ptr.
2258         (find_slot_in_mapped_hash): Likewise.
2259         (dwarf2_physname): Likewise.
2260         (create_dwo_unit_in_dwp_v1): Use std::string.
2261         (create_dwo_unit_in_dwp_v2): Likewise.
2262         (lookup_dwo_cutu): Likewise.
2263         (inherit_abstract_dies): Use std::vector.
2264         (read_array_type): Likewise.
2265         (dwarf_decode_macros): Remove unused declaration.
2266         (unsigned_int_compar): Remove.
2267         (dwarf2_build_psymtabs_hard): Use scoped_restore.
2268         (psymtabs_addrmap_cleanup): Remove.
2269
2270 2017-10-08  Tom Tromey  <tom@tromey.com>
2271
2272         * frame-unwind.c (frame_unwind_try_unwinder): Update.
2273         * frame.h (frame_cleanup_after_sniffer): Declare.
2274         (frame_prepare_for_sniffer): Return void.
2275         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
2276         type of argument.
2277         (frame_prepare_for_sniffer): Return void.
2278
2279 2017-10-08  Tom Tromey  <tom@tromey.com>
2280
2281         * utils.h (make_cleanup_value_free): Remove.
2282         * utils.c (do_value_free, struct cleanup): Remove.
2283         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
2284         Use gdb_value_up.
2285         * value.h (struct value_deleter): New.
2286         (gdb_value_up): New typedef.
2287
2288 2017-10-08  Tom Tromey  <tom@tromey.com>
2289
2290         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
2291         (make_cleanup_free_search_symbols): Remove.
2292         (search_symbols): Return std::vector.
2293         (symbol_search::compare_search_syms): Now member of
2294         symbol_search.  Change arguments.
2295         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
2296         (symtab_symbol_info, rbreak_command): Update.
2297         * symtab.h (struct symbol_search) <next>: Remove.
2298         Add constructors.
2299         (symbol_search::operator<): New function.
2300         (symbol_search::operator==): New function.
2301         (search_symbols): Remove std::vector.
2302         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
2303         (symbol_search::compare_search_syms): Declare.
2304
2305 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2306
2307         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
2308         arch/aarch64-insn.o.
2309         Remove one rule.
2310         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
2311
2312 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2313
2314         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
2315         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
2316         arch/arm-linux.o respectively.
2317         * configure.tgt: Likewise.
2318
2319 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2320
2321         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
2322         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
2323
2324 2017-10-06  Pedro Alves  <palves@redhat.com>
2325
2326         * windows-nat.c: Include <algorithm>.
2327
2328 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2329
2330         * configure.tgt (i386_tobjs): New variable.
2331         (amd64_tobjs): New variable.
2332         Set $cpu_obs and $os_obs.
2333
2334 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2335
2336         * Makefile.in (CONFIG_SRC_SUBDIR): New.
2337         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
2338         (clean): Remove object files and dependency files.
2339         (distclean): Remove the directory.
2340         * configure.ac: Invoke AC_CONFIG_COMMANDS.
2341         * configure: Re-generated.
2342         * configure.tgt: Replace amd64.o with arch/amd64.o.
2343
2344 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
2345
2346         PR build/22188
2347         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
2348         and SETEND.
2349
2350 2017-10-05  Pedro Alves  <palves@redhat.com>
2351
2352         * linux-nat.c (linux_child_follow_fork): When following the parent
2353         and detaching the child, consult the parent thread's architecture
2354         instead of the child's.
2355
2356 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2357
2358         * ax.h: Do not include "doublest.h".
2359         (union agent_val): Remove.
2360
2361 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2362
2363         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
2364         (decimal_to_string): Return std::string object.
2365         (decimal_from_string): Accept std::string object.  Return bool.
2366         (decimal_from_integral, decimal_from_doublest): Remove.
2367         (decimal_from_longest): Add prototype.
2368         (decimal_from_ulongest): Likewise.
2369         (decimal_to_longest): Likewise.
2370         (decimal_from_doublest): Likewise.
2371         * dfp.c: Do not include "gdbtypes.h" or "value.h".
2372         (MAX_DECIMAL_STRING): Move here.
2373         (decimal_to_string): Return std::string object.
2374         (decimal_from_string): Accept std::string object.  Return bool.
2375         (decimal_from_integral): Remove, replace by ...
2376         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
2377         (decimal_to_longest): New function.
2378         (decimal_from_floating): Remove, replace by ...
2379         (decimal_from_doublest): ... this new function.
2380         (decimal_to_doublest): Update to new decimal_to_string interface.
2381
2382         * value.c (unpack_long): Use decimal_to_longest.
2383         * valops.c (value_cast): Use decimal_from_doublest instead of
2384         decimal_from_floating.  Use decimal_from_[u]longest isntead of
2385         decimal_from_integral.
2386         * valarith.c (value_args_as_decimal): Likewise.
2387         * valprint.c (print_decimal_floating): Update to new
2388         decimal_to_string interface.
2389         * printcmd.c (printf_decfloat): Likewise.
2390         * c-exp.y (parse_number): Update to new decimal_from_string interface.
2391
2392 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2393
2394         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
2395         * gdbtypes.c: Include "floatformat.h".
2396         * value.c: Likewise.
2397         * m68k-tdep.c: Likewise.
2398
2399         * findvar.c: Do not include "floatformat.h".
2400         * amd64-darwin-tdep.c: Likewise.
2401         * arm-linux-tdep.c: Likewise.
2402         * i386-darwin-tdep.c: Likewise.
2403         * i387-tdep.c: Likewise.
2404         * m68k-linux-tdep.c: Likewise.
2405         * mep-tdep.c: Likewise.
2406         * mips-tdep.c: Likewise.
2407         * nios2-tdep.c: Likewise.
2408         * s390-linux-tdep.c: Likewise.
2409         * sparc-obsd-tdep.c: Likewise.
2410         * sparc-tdep.c: Likewise.
2411         * sparc64-tdep.c: Likewise.
2412         * spu-tdep.c: Likewise.
2413         * tic6x-tdep.c: Likewise.
2414         * tilegx-tdep.c: Likewise.
2415         * vax-tdep.c: Likewise.
2416         * xstormy16-tdep.c: Likewise.
2417         * xtensa-tdep.c: Likewise.
2418
2419         * top.c: Do not include "doublest.h".
2420         * aarch64-tdep.c: Likewise.
2421         * alpha-tdep.c: Likewise.
2422         * arm-linux-tdep.c: Likewise.
2423         * m68k-linux-tdep.c: Likewise.
2424         * tilegx-tdep.c: Likewise.
2425         * xstormy16-tdep.c: Likewise.
2426
2427 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2428
2429         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
2430         (mipsn32_fbsd_sigframe): Define.
2431         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
2432         for FreeBSD/mipsn32.
2433
2434 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2435
2436         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
2437         AT_HWCAP.
2438
2439 2017-10-05  Tristan Gingold  <tgingold@free.fr>
2440
2441         * MAINTAINERS (Misc): Update my email address.
2442
2443 2017-10-04  Pedro Alves  <palves@redhat.com>
2444
2445         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
2446         it instead of target_gdbarch.
2447         (get_remote_state, get_remote_packet_size): Adjust
2448         get_remote_arch_state calls, passing down target_gdbarch
2449         explicitly.
2450         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
2451         'gdbarch' and use it instead of target_gdbarch.
2452         (get_memory_packet_size): Adjust get_remote_arch_state calls,
2453         passing down target_gdbarch explicitly.
2454         (struct stop_reply) <arch>: New field.
2455         (remote_parse_stop_reply): Use the stopped thread's architecture,
2456         not the current inferior's.  Save the architecture in the
2457         stop_reply.
2458         (process_stop_reply): Use the stop reply's architecture.
2459         (process_g_packet, remote_fetch_registers)
2460         (remote_prepare_to_store, store_registers_using_G)
2461         (remote_store_registers): Adjust get_remote_arch_state calls,
2462         using the regcache's architecture.
2463         (remote_get_trace_status): Adjust get_remote_arch_state calls,
2464         passing down target_gdbarch explicitly.
2465         * spu-multiarch.c (spu_thread_architecture): Defer to the target
2466         beneath instead of calling target_gdbarch.
2467         * target.c (default_thread_architecture): Use the specified
2468         inferior's architecture, instead of the current inferior's
2469         architecture (via target_gdbarch).
2470
2471 2017-10-04  Pedro Alves  <palves@redhat.com>
2472
2473         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
2474         case.
2475         (regcache_print): Handle !target_has_registers here instead.
2476
2477 2017-10-04  Pedro Alves  <palves@redhat.com>
2478
2479         * frame.c (create_test_frame): Delete.
2480         * frame.h (create_test_frame): Delete.
2481         * gdbarch-selftests.c: Include gdbthread.h and target.h.
2482         (class regcache_test): Delete.
2483         (test_target_has_registers, test_target_has_stack)
2484         (test_target_has_memory, test_target_prepare_to_store)
2485         (test_target_store_registers): New functions.
2486         (test_target_ops): New class.
2487         (register_to_value_test): Error out if there's already a
2488         process_stratum (or higher) target pushed.  Create a fuller mock
2489         environment, with mock target_ops, inferior, address space, thread
2490         and inferior_ptid.
2491         * progspace.c (struct address_space): Move to ...
2492         * progspace.h (struct address_space): ... here.
2493         * regcache.h (regcache::~regcache, regcache::raw_write)
2494         [GDB_SELF_TEST]: No longer virtual.
2495
2496 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2497
2498         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
2499
2500 2017-10-04  Pedro Alves  <palves@redhat.com>
2501
2502         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
2503         out of 'between TRY and CATCH'.
2504
2505 2017-10-04  Pedro Alves  <palves@redhat.com>
2506
2507         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
2508         * common/common-exceptions.h (TRY): Open an outermost scope.
2509         Expand intro comment.
2510         (CATCH): Reindent.
2511         (END_CATCH): Close the outermost scope.
2512         * completer.c (complete_line_internal): Add missing END_CATCH.
2513
2514 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2515
2516         * NEWS (Changes since GDB 8.0): Add entry about new
2517         'set-cwd-on-gdbserver' feature.
2518         (New remote packets): Add entry for QSetWorkingDir.
2519         * common/common-inferior.h (set_inferior_cwd): New prototype.
2520         * infcmd.c (set_inferior_cwd): Remove "static".
2521         (show_cwd_command): Expand text to include remote debugging.
2522         * remote.c: Add PACKET_QSetWorkingDir.
2523         (remote_protocol_features) <QSetWorkingDir>: New entry for
2524         PACKET_QSetWorkingDir.
2525         (extended_remote_set_inferior_cwd): New function.
2526         (extended_remote_create_inferior): Call
2527         "extended_remote_set_inferior_cwd".
2528         (_initialize_remote): Call "add_packet_config_cmd" for
2529         QSetWorkingDir.
2530
2531 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2532
2533         * NEWS (New commands): Mention "set/show cwd".
2534         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
2535         "cd" command's help text.
2536         * common/common-inferior.h (get_inferior_cwd): New prototype.
2537         * infcmd.c (inferior_cwd_scratch): New global variable.
2538         (set_inferior_cwd): New function.
2539         (get_inferior_cwd): Likewise.
2540         (set_cwd_command): Likewise.
2541         (show_cwd_command): Likewise.
2542         (_initialize_infcmd): Add "set/show cwd" commands.
2543         * inferior.h (class inferior) <cwd>: New field.
2544         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
2545         (fork_inferior): Change inferior's cwd before its execution.
2546         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
2547         to CreateProcess.
2548
2549 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2550
2551         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
2552         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
2553         (COMMON_OBS): Add gdb_tilde_expand.o.
2554         * common/gdb_tilde_expand.c: New file.
2555         * common/gdb_tilde_expand.h: Likewise.
2556
2557 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
2558
2559         * gdbarch.sh (objfile): Remove duplicate declaration.
2560         * gdbarch.h: Regenerate.
2561
2562 2017-10-03  Tom Tromey  <tom@tromey.com>
2563
2564         * utils.c (internal_vproblem): Use string_vprintf.
2565
2566 2017-10-03  Tom Tromey  <tom@tromey.com>
2567
2568         * printcmd.c (info_symbol_command): Use std::string.
2569
2570 2017-10-03  Tom Tromey  <tom@tromey.com>
2571
2572         * top.c (gdb_safe_append_history): Use std::string.
2573
2574 2017-10-03  Tom Tromey  <tom@tromey.com>
2575
2576         * event-top.c (stdin_event_handler): Update.
2577         * main.c (captured_main_1): Update.
2578         * top.h (make_delete_ui_cleanup): Remove.
2579         (struct ui): Add constructor and destructor.
2580         (new_ui, delete_ui): Remove.
2581         * top.c (make_delete_ui_cleanup): Remove.
2582         (new_ui_command): Use std::unique_ptr.
2583         (delete_ui_cleanup): Remove.
2584         (ui::ui): Rename from new_ui.  Update.
2585         (free_ui): Remove.
2586         (ui::~ui): Rename from delete_ui.  Update.
2587
2588 2017-10-03  Tom Tromey  <tom@tromey.com>
2589
2590         * symfile.c (load_progress): Use gdb::byte_vector.
2591
2592 2017-10-03  Tom Tromey  <tom@tromey.com>
2593
2594         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2595         declaration.
2596         * printcmd.c (x_command): Remove unused declaration.
2597         * symfile.c (symbol_file_command): Remove unused declaration.
2598
2599 2017-10-03  Tom Tromey  <tom@tromey.com>
2600
2601         * utils.c (internal_vproblem): Use std::string.
2602         (defaulted_query): Likewise.
2603
2604 2017-10-03  Tom Tromey  <tom@tromey.com>
2605
2606         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2607         * top.c (execute_command_to_string): Update.
2608         * utils.c (make_cleanup_restore_page_info): Remove.
2609         (do_restore_page_info_cleanup): Remove.
2610         (set_batch_flag_and_restore_page_info):
2611         New.
2612         (make_cleanup_restore_page_info): Remove.
2613         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2614         (~set_batch_flag_and_restore_page_info): New
2615         (make_cleanup_restore_uinteger): Remove.
2616         (make_cleanup_restore_integer): Remove.
2617         (struct restore_integer_closure): Remove.
2618         (restore_integer): Remove.
2619         * utils.h (struct set_batch_flag_and_restore_page_info): New
2620         class.
2621         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2622         (make_cleanup_restore_page_info): Remove.
2623         (make_cleanup_restore_uinteger) Remove.
2624         (make_cleanup_restore_integer) Remove.
2625
2626 2017-10-03  Tom Tromey  <tom@tromey.com>
2627
2628         * record-full.h (record_full_gdb_operation_disable_set): Return
2629         scoped_restore_tmpl<int>.
2630         * infrun.c (adjust_pc_after_break): Update.
2631         (handle_signal_stop): Update.
2632         * record-full.c (record_full_gdb_operation_disable_set): Return
2633         scoped_restore_tmpl<int>.
2634         (record_full_wait_1, record_full_insert_breakpoint)
2635         (record_full_remove_breakpoint, record_full_save)
2636         (record_full_goto_insn): Update.
2637
2638 2017-10-02  Tom Tromey  <tom@tromey.com>
2639
2640         PR rust/22236:
2641         * rust-lang.c (rust_val_print_str): New function.
2642         (val_print_struct): Call it.
2643         (rust_subscript): Preserve name of slice type.
2644
2645 2017-10-02  Tom Tromey  <tom@tromey.com>
2646
2647         * rust-lang.c (rust_subscript): Handle slices in
2648         EVAL_AVOID_SIDE_EFFECTS case.
2649
2650 2017-10-02  Tom Tromey  <tom@tromey.com>
2651
2652         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2653
2654 2017-10-02  Tom Tromey  <tom@tromey.com>
2655
2656         * rust-lang.h (rust_slice_type): Add "extern".
2657
2658 2017-10-02  Tom Tromey  <tom@tromey.com>
2659             Pedro Alves  <palves@redhat.com>
2660
2661         * ada-lang.h (ada_exc_info::operator<): Make const.
2662         (ada_exc_info::operator==): Make const.
2663         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2664         Make const.
2665
2666 2017-09-29  Tom Tromey  <tom@tromey.com>
2667
2668         * target.c (read_whatever_is_readable): Change type of "result".
2669         Update.
2670         (free_memory_read_result_vector): Remove.
2671         (read_memory_robust): Change return type.  Update.
2672         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
2673         bin2hex, std::string.
2674         * target.h (memory_read_result_s): Remove typedef.
2675         (free_memory_read_result_vector): Remove.
2676         (read_memory_robust): Return std::vector.
2677
2678 2017-09-29  Tom Tromey  <tom@tromey.com>
2679
2680         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2681
2682 2017-09-29  Tom Tromey  <tom@tromey.com>
2683
2684         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2685         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
2686         operator< and operator==.
2687         (ada_exceptions_list): Return a std::vector.
2688         * ada-lang.c (ada_exc_info::operator<): Rename from
2689         compare_ada_exception_info.
2690         (ada_exc_info::operator==): New.
2691         (sort_remove_dups_ada_exceptions_list): Change type of
2692         "exceptions".
2693         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2694         (ada_add_global_exceptions): Likewise.
2695         (ada_exceptions_list_1): Return a std::vector.
2696         (ada_exceptions_list): Likewise.
2697
2698 2017-09-29  Tom Tromey  <tom@tromey.com>
2699
2700         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2701         'std::set *'.
2702         (print_one_inferior): Update.
2703         (free_vector_of_ints): Remove.
2704         (list_available_thread_groups): Change "ids" to std::set.
2705         (mi_cmd_list_thread_groups): Update.
2706         (struct collect_cores_data) <core>: Now a std::set.
2707         (collect_cores): Update.
2708         (unique): Remove.
2709         (print_one_inferior): Update.
2710
2711 2017-09-29  Tom Tromey  <tom@tromey.com>
2712
2713         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2714         (mi_execute_async_cli_command): Likewise.
2715         (mi_cmd_trace_frame_collected): Use field_fmt.
2716
2717 2017-09-29  Tom Tromey  <tom@tromey.com>
2718
2719         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2720         gdb::byte_vector.
2721
2722 2017-09-29  Tom Tromey  <tom@tromey.com>
2723
2724         * mi/mi-parse.c (mi_parse): Remove unused declaration.
2725
2726 2017-09-29  Tom Tromey  <tom@tromey.com>
2727
2728         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2729
2730 2017-09-29  Tom Tromey  <tom@tromey.com>
2731
2732         * varobj.h (varobj_gen_name): Return std::string.
2733         * varobj.c (varobj_gen_name): Return std::string.
2734         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2735         (mi_cmd_var_delete): Don't copy "name".
2736
2737 2017-09-29  Tom Tromey  <tom@tromey.com>
2738
2739         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2740         (mi_cmd_break_insert_1): Update.
2741
2742 2017-09-29  Tom Tromey  <tom@tromey.com>
2743
2744         * target.h (make_scoped_defer_target_commit_resume): Update.
2745         * target.c (make_scoped_defer_target_commit_resume): Rename from
2746         make_cleanup_defer_target_commit_resume.  Return a
2747         scoped_restore.
2748         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2749
2750 2017-09-29  Tom Tromey  <tom@tromey.com>
2751
2752         * main.c (captured_main_1): Remove unused declaration.
2753         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2754
2755 2017-09-29  Tom Tromey  <tom@tromey.com>
2756
2757         * symtab.c (search_symbols): Remove unused outer cleanup.
2758         (make_source_files_completion_list): Remove unused declaration.
2759
2760 2017-09-29  Tom Tromey  <tom@tromey.com>
2761
2762         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2763
2764 2017-09-29  Tom Tromey  <tom@tromey.com>
2765
2766         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2767         gdb::byte_vector.
2768
2769 2017-09-29  Tom Tromey  <tom@tromey.com>
2770
2771         * complaints.c (vcomplaint): Use std::string.
2772
2773 2017-09-29  Tom Tromey  <tom@tromey.com>
2774
2775         * tracepoint.c (trace_variable_command): Use std::string.
2776         (encode_actions_1): Remove unused declarations.
2777         (create_tsv_from_upload): Use std::string.
2778
2779 2017-09-29  Tom Tromey  <tom@tromey.com>
2780
2781         * cp-support.c (gdb_demangle): Use std::string.
2782
2783 2017-09-29  Tom Tromey  <tom@tromey.com>
2784
2785         * stack.c (parse_frame_specification): Use std::string
2786         (info_frame_command): Use gdb::unique_xmalloc_ptr.
2787
2788 2017-09-29  Tom Tromey  <tom@tromey.com>
2789
2790         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2791
2792 2017-09-29  Tom Tromey  <tom@tromey.com>
2793
2794         * utils.c (vfprintf_maybe_filtered): Use std::string.
2795         (vfprintf_unfiltered): Likewise.
2796
2797 2017-09-29  Tom Tromey  <tom@tromey.com>
2798
2799         * event-top.c (top_level_prompt): Return std::string.
2800         (display_gdb_prompt): Update.
2801
2802 2017-09-29  Tom Tromey  <tom@tromey.com>
2803
2804         * unittests/common-utils-selftests.c (format): New function.
2805         (string_vprintf_tests): New function.
2806         (_initialize_common_utils_selftests): Register new tests.
2807         * common/common-utils.c (string_vprintf): New function.
2808         * common/common-utils.h (string_vprintf): Declare.
2809
2810 2017-09-29  Pedro Alves  <palves@redhat.com>
2811
2812         * common/rsp-low.c (unpack_varlen_hex): Constify.
2813         * common/rsp-low.h (unpack_varlen_hex): Constify.
2814         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2815         Constify.
2816         * remote.c (remote_set_permissions, read_ptid)
2817         (remote_current_thread, remote_get_threads_with_qthreadinfo)
2818         (remote_static_tracepoint_marker_at)
2819         (remote_static_tracepoint_markers_by_strid)
2820         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2821         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2822         (parse_tracepoint_definition, parse_tsv_definition)
2823         (parse_static_tracepoint_marker_definition): Constify.
2824         * tracepoint.h (parse_static_tracepoint_marker_definition)
2825         (parse_trace_status, parse_tracepoint_status)
2826         (parse_tracepoint_definition, parse_tsv_definition): Constify.
2827
2828 2017-09-29  Pedro Alves  <palves@redhat.com>
2829
2830         * remote.c (target_buf, target_buf_size): Delete.
2831         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2832         Use the connection's packet buffer instead.
2833         All callers adjusted.
2834         (_initialize_remote): Remove references to target_buf and
2835         target_buf_size.
2836
2837 2017-09-28  Pedro Alves  <palves@redhat.com>
2838
2839         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2840         unittests/common-utils-selftests.c.
2841         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2842         (COMMON_OBS): Remove utils-selftests.o.
2843         * utils-selftests.c: Move to ...
2844         * unittests/common-utils-selftests.c: ... here and rename self
2845         test to "string_printf".
2846
2847 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2848
2849         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2850         having NULL cus or tus.
2851
2852 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2853
2854         * arm-tdep.c: (convert_from_extended): Remove.
2855         (convert_to_extended): Likewise.
2856         (arm_extract_return_value): Use convert_typed_floating.
2857         (arm_store_return_value): Likewise.
2858
2859         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2860         * sh-tdep.c: Do not include "floatformat.h".
2861         (sh_littlebyte_bigword_type): New function.
2862         (sh_register_convert_to_virtual): Use convert_typed_floating.
2863         (sh_register_convert_to_raw): Likewise.
2864         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2865         (sh64_littlebyte_bigword_type): New function.
2866         (sh64_extract_return_value): Use convert_typed_floating.
2867         (sh64_register_convert_to_virtual): Likewise.
2868         (sh64_register_convert_to_raw): Likewise.
2869
2870 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2871
2872         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2873         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2874
2875         * gdbtypes.h (union type_specific): Make field floatformat hold
2876         just a single struct floatformat, not an array.
2877         (floatformat_from_type): Move here.
2878         * gdbtypes.c (floatformat_from_type): Move here.  Update to
2879         changed TYPE_FLOATFORMAT definition.
2880         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2881         (recursive_dump_type): Likewise.
2882         (init_float_type): Install correct floatformat for byte order.
2883         (arch_float_type): Likewise.
2884
2885 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2886
2887         * gdbtypes.c (init_type): Change incoming argument from
2888         length-in-bytes to length-in-bits.  Assert length is a
2889         multiple of TARGET_CHAR_BITS.
2890         (arch_type, arch_flags_type): Likewise.
2891         (init_integer_type): Update call to init_type.
2892         (init_character_type): Likewise.
2893         (init_boolean_type): Likewise.
2894         (init_float_type): Likewise.
2895         (init_decfloat_type): Likewise.
2896         (init_complex_type): Likewise.
2897         (init_pointer_type): Likewise.
2898         (objfile_type): Likewise.
2899         (arch_integer_type): Update call to arch_type.
2900         (arch_character_type): Likewise.
2901         (arch_boolean_type): Likewise.
2902         (arch_float_type): Likewise.
2903         (arch_decfloat_type): Likewise.
2904         (arch_complex_type): Likewise.
2905         (arch_pointer_type): Likewise.
2906         (gdbtypes_post_init): Likewise.
2907
2908         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2909         (read_base_type): Likewise.
2910         * mdebugread.c (basic_type): Likewise.
2911         * stabsread.c (dbx_init_float_type): Likewise.
2912         (rs6000_builtin_type): Likewise.
2913         (read_range_type): Likewise.  Also, fix call to init_integer_type
2914         with erroneous length argument.
2915
2916         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2917         * d-lang.c (build_d_types): Likewise.
2918         * f-lang.c (build_fortran_types): Likewise.
2919         * go-lang.c (build_go_types): Likewise.
2920         * opencl-lang.c (build_opencl_types): Likewise.
2921         * jit.c (finalize_symtab): Likewise.
2922         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2923         (build_std_type_info_type): Likewise.
2924         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
2925         update call to arch_flags_type.
2926
2927         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2928         arch_type.
2929         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2930         * windows-tdep.c (windows_get_tlb_type): Likewise.
2931
2932         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2933         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2934         * m32c-tdep.c (make_types): Likewise.
2935         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2936         (rl78_psw_type): Update call to arch_flags_type.
2937         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2938         * rx-tdep.c (rx_psw_type): Likewise.
2939         (rx_fpsw_type): Likewise.
2940         * sparc-tdep.c (sparc_psr_type): Likewise.
2941         (sparc_fsr_type): Likewise.
2942         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2943         (sparc64_ccr_type): Likewise.
2944         (sparc64_fsr_type): Likewise.
2945         (sparc64_fprs_type): Likewise.
2946
2947 2017-09-27  Tom Tromey  <tom@tromey.com>
2948
2949         * findcmd.c (find_command): Constify.
2950
2951 2017-09-27  Tom Tromey  <tom@tromey.com>
2952
2953         * ada-tasks.c (task_command_1, task_command): Constify.
2954
2955 2017-09-27  Tom Tromey  <tom@tromey.com>
2956
2957         * symtab.c (maintenance_print_symbol_cache)
2958         (maintenance_flush_symbol_cache)
2959         (maintenance_print_symbol_cache_statistics): Constify.
2960
2961 2017-09-27  Tom Tromey  <tom@tromey.com>
2962
2963         * inferior.c (detach_inferior_command, kill_inferior_command)
2964         (inferior_command): Constify.
2965
2966 2017-09-27  Tom Tromey  <tom@tromey.com>
2967
2968         * regcache.c (regcache_print, maintenance_print_registers)
2969         (maintenance_print_raw_registers)
2970         (maintenance_print_cooked_registers)
2971         (maintenance_print_register_groups)
2972         (maintenance_print_remote_registers): Constify.
2973
2974 2017-09-27  Tom Tromey  <tom@tromey.com>
2975
2976         * printcmd.c (map_display_numbers, undisplay_command)
2977         (enable_disable_display_command, enable_display_command)
2978         (disable_display_command): Constify.
2979
2980 2017-09-27  Tom Tromey  <tom@tromey.com>
2981
2982         * breakpoint.h (delete_command): Don't declare.
2983         * breakpoint.c (delete_command, enable_once_command)
2984         (enable_count_command, enable_delete_command, breakpoint_1)
2985         (maintenance_info_breakpoints, stopin_command, stopat_command)
2986         (delete_command, delete_trace_command, save_breakpoints)
2987         (save_breakpoints_command, save_tracepoints_command): Constify.
2988
2989 2017-09-27  Tom Tromey  <tom@tromey.com>
2990
2991         * macrocmd.c (macro_expand_command, macro_expand_once_command)
2992         (skip_ws, extract_identifier, macro_define_command)
2993         (macro_undef_command, macro_list_command): Constify.
2994
2995 2017-09-27  Tom Tromey  <tom@tromey.com>
2996
2997         * infcmd.c (environment_info, set_environment_command)
2998         (unset_environment_command, path_info, info_proc_cmd_1)
2999         (info_proc_cmd_mappings, info_proc_cmd_stat)
3000         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
3001         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
3002
3003 2017-09-27  Tom Tromey  <tom@tromey.com>
3004
3005         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
3006         Constify.
3007
3008 2017-09-27  Tom Tromey  <tom@tromey.com>
3009
3010         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
3011
3012 2017-09-27  Tom Tromey  <tom@tromey.com>
3013
3014         * demangle.c (demangle_command): Constify.
3015
3016 2017-09-27  Tom Tromey  <tom@tromey.com>
3017
3018         * progspace.c (maintenance_info_program_spaces_command):
3019         Constify.
3020
3021 2017-09-27  Tom Tromey  <tom@tromey.com>
3022
3023         * compile/compile.c (check_raw_argument, compile_file_command)
3024         (compile_code_command, compile_print_command): Constify.
3025
3026 2017-09-27  Tom Tromey  <tom@tromey.com>
3027
3028         * reggroups.c (maintenance_print_reggroups): Constify.
3029
3030 2017-09-27  Tom Tromey  <tom@tromey.com>
3031
3032         * dwarf2read.c (save_gdb_index_command): Constify.
3033
3034 2017-09-27  Tom Tromey  <tom@tromey.com>
3035
3036         * stap-probe.c (info_probes_stap_command): Constify.
3037
3038 2017-09-27  Tom Tromey  <tom@tromey.com>
3039
3040         * fork-child.c (unset_exec_wrapper_command): Constify.
3041
3042 2017-09-27  Tom Tromey  <tom@tromey.com>
3043
3044         * btrace.c (get_uint, get_context_size, no_chunk)
3045         (maint_btrace_packet_history_cmd)
3046         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
3047         (maint_info_btrace_cmd): Constify.
3048
3049 2017-09-27  Tom Tromey  <tom@tromey.com>
3050
3051         * reverse.c (delete_bookmark_command): Constify.
3052
3053 2017-09-27  Tom Tromey  <tom@tromey.com>
3054
3055         * remote.c (set_memory_packet_size)
3056         (set_memory_write_packet_size, show_memory_write_packet_size)
3057         (set_memory_read_packet_size, show_memory_read_packet_size)
3058         (compare_sections_command, packet_command, remote_put_command)
3059         (remote_get_command, remote_delete_command): Constify.
3060
3061 2017-09-27  Tom Tromey  <tom@tromey.com>
3062
3063         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
3064         (set_mipsfpu_double_command, set_mipsfpu_none_command)
3065         (set_mipsfpu_auto_command): Constify.
3066
3067 2017-09-27  Tom Tromey  <tom@tromey.com>
3068
3069         * cli/cli-cmds.h (cd_command): Constify.
3070         * cli/cli-cmds.c (cd_command): Constify.
3071
3072 2017-09-27  Tom Tromey  <tom@tromey.com>
3073
3074         * thread.c (thread_name_command, thread_find_command): Constify.
3075
3076 2017-09-27  Tom Tromey  <tom@tromey.com>
3077
3078         * probe.c (enable_probes_command, disable_probes_command):
3079         Constify.
3080
3081 2017-09-27  Tom Tromey  <tom@tromey.com>
3082
3083         * symfile.c (symbol_file_command): Constify.
3084         * gdbcore.h (deprecated_file_changed_hook): Constify.
3085         * exec.c (deprecated_file_changed_hook, exec_file_command)
3086         (file_command): Constify.
3087         * defs.h (symbol_file_command): Constify.
3088
3089 2017-09-27  Tom Tromey  <tom@tromey.com>
3090
3091         * remote-fileio.c (set_system_call_allowed)
3092         (show_system_call_allowed): Constify.
3093
3094 2017-09-27  Tom Tromey  <tom@tromey.com>
3095
3096         * tracepoint.c (delete_trace_variable_command)
3097         (tfind_end_command, tfind_start_command, tfind_pc_command)
3098         (tfind_tracepoint_command, tfind_line_command)
3099         (tfind_range_command, tfind_outside_command): Constify.
3100
3101 2017-09-27  Tom Tromey  <tom@tromey.com>
3102
3103         * ax-gdb.c (maint_agent_printf_command, agent_command)
3104         (agent_eval_command): Constify.
3105
3106 2017-09-27  Tom Tromey  <tom@tromey.com>
3107
3108         * tracepoint.c (info_scope_command): Constify.
3109         * python/python.c (gdbpy_decode_line): Constify.
3110         * python/py-breakpoint.c (bppy_init): Constify.
3111         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
3112         * location.h: (new_linespec_location)
3113         (string_to_event_location_basic, string_to_event_location):
3114         Constify.
3115         * location.c (new_linespec_location)
3116         (string_to_event_location_basic, string_to_event_location):
3117         Constify.
3118         * linespec.h (decode_line_with_current_source)
3119         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
3120         * linespec.c (linespec_lex_to_end)
3121         (decode_line_with_current_source)
3122         (decode_line_with_last_displayed): Constify.
3123         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
3124         Constify.
3125         * cli/cli-cmds.c (edit_command, list_command): Constify.
3126         * breakpoint.h (until_break_command, watch_command_wrapper)
3127         (awatch_command_wrapper, rwatch_command_wrapper)
3128         (init_ada_exception_breakpoint): Constify.
3129         * breakpoint.c (break_command_1, dprintf_command)
3130         (break_range_command, watch_command_wrapper)
3131         (rwatch_command_wrapper, awatch_command_wrapper)
3132         (until_break_command, init_ada_exception_breakpoint)
3133         (strace_marker_create_sals_from_location, trace_command)
3134         (ftrace_command, strace_command, struct tracepoint): Constify.
3135         * ax-gdb.c (agent_command_1): Constify.
3136         * ada-lang.c (ada_exception_sal): Constify.
3137
3138 2017-09-27  Tom Tromey  <tom@tromey.com>
3139
3140         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
3141         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
3142         (get_context_size, no_chunk, get_insn_history_modifiers)
3143         (cmd_record_insn_history, get_call_history_modifiers)
3144         (cmd_record_call_history): Constify.
3145
3146 2017-09-27  Tom Tromey  <tom@tromey.com>
3147
3148         * source.c (show_substitute_path_command)
3149         (unset_substitute_path_command, set_substitute_path_command):
3150         Constify.
3151
3152 2017-09-27  Tom Tromey  <tom@tromey.com>
3153
3154         * typeprint.c (maintenance_print_type): Constify.
3155         * maint.c (maintenance_dump_me, maintenance_demangle)
3156         (maintenance_time_display, maintenance_info_sections)
3157         (maintenance_print_statistics, maintenance_deprecate)
3158         (maintenance_undeprecate): Constify.
3159         (maintenance_do_deprecate): Constify.  Use std::string.
3160         (maintenance_selftest): Constify.
3161         * gdbtypes.h (maintenance_print_type): Constify.
3162
3163 2017-09-27  Tom Tromey  <tom@tromey.com>
3164
3165         * hppa-tdep.c (unwind_command): Constify.
3166
3167 2017-09-27  Tom Tromey  <tom@tromey.com>
3168
3169         * target-descriptions.c (unset_tdesc_filename_cmd)
3170         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
3171         Constify.
3172
3173 2017-09-27  Tom Tromey  <tom@tromey.com>
3174
3175         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
3176
3177 2017-09-27  Tom Tromey  <tom@tromey.com>
3178
3179         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
3180
3181 2017-09-27  Tom Tromey  <tom@tromey.com>
3182
3183         * tui/tui-regs.c (tui_reg_command): Constify.
3184
3185 2017-09-27  Tom Tromey  <tom@tromey.com>
3186
3187         * skip.c (skip_file_command, skip_function_command)
3188         (skip_enable_command, skip_disable_command, skip_delete_command):
3189         Constify.
3190
3191 2017-09-27  Tom Tromey  <tom@tromey.com>
3192
3193         * record-btrace.c (cmd_record_btrace_bts_start)
3194         (cmd_record_btrace_pt_start): Constify.
3195
3196 2017-09-27  Tom Tromey  <tom@tromey.com>
3197
3198         * symmisc.c (maintenance_print_symbols)
3199         (maintenance_print_msymbols, maintenance_print_objfiles)
3200         (maintenance_info_symtabs, maintenance_check_symtabs)
3201         (maintenance_expand_symtabs, maintenance_info_line_tables):
3202         Constify.
3203
3204 2017-09-27  Tom Tromey  <tom@tromey.com>
3205
3206         * top.c (new_ui_command): Constify.
3207
3208 2017-09-27  Tom Tromey  <tom@tromey.com>
3209
3210         * symfile.c (add_symbol_file_command)
3211         (remove_symbol_file_command, list_overlays_command)
3212         (map_overlay_command, unmap_overlay_command)
3213         (overlay_auto_command, overlay_manual_command)
3214         (overlay_off_command, overlay_load_command): Constify.
3215
3216 2017-09-27  Tom Tromey  <tom@tromey.com>
3217
3218         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
3219         (info_spu_mailbox_command, info_spu_dma_command)
3220         (info_spu_proxydma_command): Constify.
3221
3222 2017-09-27  Tom Tromey  <tom@tromey.com>
3223
3224         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
3225
3226 2017-09-27  Tom Tromey  <tom@tromey.com>
3227
3228         * cli/cli-script.c (user_defined_command): Constify.
3229
3230 2017-09-27  Tom Tromey  <tom@tromey.com>
3231
3232         * cli/cli-dump.c (dump_memory_command, dump_value_command)
3233         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
3234         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
3235         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
3236         (dump_binary_value, append_binary_memory, append_binary_value):
3237         Constify.
3238         (struct dump_context) <func>: Constify.
3239         (add_dump_command): Update.
3240
3241 2017-09-27  Tom Tromey  <tom@tromey.com>
3242
3243         * cli/cli-cmds.c (show_version, show_configuration)
3244         (source_command, show_user): Constify.
3245
3246 2017-09-27  Tom Tromey  <tom@tromey.com>
3247
3248         * target.c (maintenance_print_target_stack): Constify.
3249
3250 2017-09-27  Tom Tromey  <tom@tromey.com>
3251
3252         * interps.c (interpreter_exec_cmd): Constify.
3253
3254 2017-09-27  Tom Tromey  <tom@tromey.com>
3255
3256         * record-full.c (cmd_record_full_restore): Constify.
3257
3258 2017-09-27  Tom Tromey  <tom@tromey.com>
3259
3260         * memattr.c (enable_mem_command, disable_mem_command)
3261         (delete_mem_command): Constify.
3262
3263 2017-09-27  Tom Tromey  <tom@tromey.com>
3264
3265         * value.c (show_convenience): Constify.
3266
3267 2017-09-27  Tom Tromey  <tom@tromey.com>
3268
3269         * gdbcore.h (core_file_command): Update.
3270         * corefile.c (core_file_command): Constify.
3271
3272 2017-09-27  Tom Tromey  <tom@tromey.com>
3273
3274         * user-regs.c (maintenance_print_user_registers): Constify.
3275
3276 2017-09-27  Tom Tromey  <tom@tromey.com>
3277
3278         * cp-namespace.c (maintenance_cplus_namespace): Constify.
3279
3280 2017-09-27  Tom Tromey  <tom@tromey.com>
3281
3282         * cp-support.c (first_component_command): Constify.
3283
3284 2017-09-27  Tom Tromey  <tom@tromey.com>
3285
3286         * psymtab.c (maintenance_print_psymbols)
3287         (maintenance_info_psymtabs, maintenance_check_psymtabs):
3288         Constify.
3289
3290 2017-09-27  Tom Tromey  <tom@tromey.com>
3291
3292         * windows-tdep.c (display_tib): Constify.
3293
3294 2017-09-27  Tom Tromey  <tom@tromey.com>
3295
3296         * linux-fork.c (delete_checkpoint_command)
3297         (detach_checkpoint_command): Constify.
3298
3299 2017-09-27  Tom Tromey  <tom@tromey.com>
3300
3301         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
3302
3303 2017-09-27  Tom Tromey  <tom@tromey.com>
3304
3305         * arc-tdep.c (dump_arc_instruction_command): Constify.
3306
3307 2017-09-27  Tom Tromey  <tom@tromey.com>
3308
3309         * valprint.c (set_radix, show_radix): Constify.
3310
3311 2017-09-27  Tom Tromey  <tom@tromey.com>
3312
3313         * dtrace-probe.c (info_probes_dtrace_command): Constify.
3314
3315 2017-09-27  Tom Tromey  <tom@tromey.com>
3316
3317         * command.h (not_just_help_class_command): Update.
3318         * cli/cli-decode.h (not_just_help_class_command): Update.
3319         * cli/cli-decode.c (not_just_help_class_command): Constify.
3320
3321 2017-09-27  Tom Tromey  <tom@tromey.com>
3322
3323         * gdb_bfd.c (maintenance_info_bfds): Constify.
3324
3325 2017-09-27  Tom Tromey  <tom@tromey.com>
3326
3327         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
3328         overloads.
3329         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
3330         (do_const_cfunc): New function.
3331         (cmd_cfunc_eq): New overload.
3332         (cli_user_command_p): Check do_const_cfunc.
3333         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
3334         const_cfunc.
3335         * command.h (add_cmd): Add const overload and no-function
3336         overload.
3337         (set_cmd_cfunc): Add const overload.
3338         (cmd_const_cfunc_ftype): Declare.
3339         (cmd_cfunc_eq): Add const overload.
3340         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
3341         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
3342         overload.
3343
3344 2017-09-27  Tom Tromey  <tom@tromey.com>
3345
3346         * macroexp.c (get_next_token_for_substitution): New function.
3347         (substitute_args): Call it.  Check for __VA_OPT__.
3348
3349 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3350             Pedro Alves <palves@redhat.com>
3351
3352         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
3353         producer_is_icc_lt_14.
3354         (producer_is_icc_lt_14): New function.
3355         (check_producer): Add code for checking version of ICC.
3356         (producer_is_icc): Move to producer.c.
3357         (read_structure_type): Restrict ICC workaround to ICC<14.
3358         * producer.c: Include selftest.h.
3359         (producer_is_icc, producer_parsing_tests, _initialize_producer):
3360         New functions.
3361         * producer.h (producer_is_icc): New declaration.
3362
3363 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3364
3365         * Makefile.in (SFILES): Add producer.c.
3366         (COMMON_OBS): Add producer.o
3367         * amd64-tdep.c (producer.h): Add new include.
3368         * dwarf2read.c (producer.h): Add new include.
3369         * producer.c: New file.
3370         * producer.h: New file.
3371         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
3372         producer.c.
3373         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
3374         producer.h.
3375
3376 2017-09-26  Matthias Klose  <doko@ubuntu.com>
3377
3378         * configure.ac: Search ncursesw before ncurses.
3379         Check ncursesw/ncurses.h before ncurses/ncurses.h.
3380         * gdb_curses.h: Include <ncursesw/ncurses.h>
3381         * config.in, configure: Regenerate.
3382
3383 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3384
3385         PR gdb/22185
3386         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
3387         obsolete.
3388         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
3389         Remove i386sol2 support.
3390         * configure.nat <i386sol2>: Remove.
3391         <sol2-64>: Fold into ...
3392         <sol2>: ... this.
3393         Move common settings to default section.
3394         Add sol-thread.o.
3395         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
3396         x86_64-*-solaris2.1[0-9]*>: Rename to ...
3397         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
3398         <i[34567]86-*-solaris*>: Remove.
3399         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
3400
3401         * configure.ac: Remove wctype in libw check.
3402         (_MSE_INT_H): Don't define on Solaris 7-9.
3403         <solaris*>: Remove libthread_db.so.1 check.
3404         * configure: Regenerate.
3405         * config.in: Regenerate.
3406
3407         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
3408         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
3409         (gdb_ps_size_t): Remove.
3410         Use base types in users.
3411         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
3412
3413         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
3414
3415 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3416
3417         PR build/22206
3418         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
3419         (adi_is_addr_mapped): Likewise.
3420         (PSR_ICC): Don't redefine.
3421         (PSR_IMPL): Likewise.
3422
3423 2017-09-25  Tom Tromey  <tom@tromey.com>
3424
3425         * regcache.c (regcache::dump): Use string_printf.
3426
3427 2017-09-25  Tom Tromey  <tom@tromey.com>
3428
3429         * regcache.c (class regcache_invalidator): New.
3430         (struct register_to_invalidate): Remove.
3431         (make_cleanup_regcache_invalidate): Remove.
3432         (regcache::raw_write): Use regcache_invalidator.
3433
3434 2017-09-25  Tom Tromey  <tom@tromey.com>
3435
3436         * spu-tdep.c (spu2ppu_sniffer): Update.
3437         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
3438         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
3439         Remove.
3440         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
3441         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
3442         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
3443         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
3444         (frame_pop): Update.
3445
3446 2017-09-25  Tom Tromey  <tom@tromey.com>
3447
3448         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
3449         * regcache.h (regcache_xfree): Don't declare.
3450         * regcache.c (regcache_xfree): Remove.
3451         (do_regcache_xfree): Use delete.
3452         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
3453         * linux-fork.c (free_fork): Use delete.
3454         (fork_save_infrun_state): Likewise.
3455         * jit.c (jit_dealloc_cache): Use delete.
3456         * infrun.c (discard_infcall_suspend_state): Use delete.
3457
3458 2017-09-25  Tom Tromey  <tom@tromey.com>
3459
3460         * regcache.h (regcache_xmalloc): Don't declare.
3461         (regcache_raw_set_cached_value): Update comment.
3462         * regcache.c (regcache_xmalloc): Remove.
3463         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
3464         * jit.c (jit_frame_sniffer): Use new.
3465         * frame.c (frame_save_as_regcache): Use new.
3466
3467 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3468
3469         * NEWS: Advertise support for guarded-storage registers on IBM z.
3470
3471 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3472
3473         * s390-linux-nat.c (have_regset_gs): New static variable.
3474         (s390_linux_fetch_inferior_registers): Handle guarded-storage
3475         control block and guarded-storage broadcast control regsets.
3476         (s390_read_description): Detect whether the target has
3477         guarded-storage support, return appropriate tdesc.
3478         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
3479         (features/s390x-gs-linux64.c): Likewise.
3480         (struct gdbarch_tdep) <have_gs>: New field.
3481         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
3482         (s390_gsbc_regset): New variables.
3483         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
3484         and s390_gsbc_regset, if applicable.
3485         (s390_core_read_description): Check whether core file was from a
3486         target with guarded-storage support; include appropriate regsets.
3487         (s390_gdbarch_init): Add registers for guarded-storage support.
3488         (_initialize_s390_tdep): Initialize new target descriptions that
3489         include registers for guarded-storage support.
3490         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
3491         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
3492         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
3493         (S390_NUM_REGS): Adjust macro definition.
3494         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
3495         (tdesc_s390x_gs_linux64): New declarations.
3496
3497 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3498
3499         * features/s390-gs-linux64.xml: New file.
3500         * features/s390-gs.xml: New file.
3501         * features/s390-gsbc.xml: New file.
3502         * features/s390x-gs-linux64.xml: New file.
3503         * features/Makefile (WHICH): Add s390-gs-linux64 and
3504         s390x-gs-linux64.
3505         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
3506         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
3507         * features/s390-gs-linux64.c: New generated file.
3508         * features/s390x-gs-linux64.c: New file.
3509         * regformats/s390-gs-linux64.dat: New file.
3510         * regformats/s390x-gs-linux64.dat: New file.
3511
3512 2017-09-23  Tom Tromey  <tom@tromey.com>
3513
3514         * defs.h (make_cleanup_override_quit_handler): Don't declare.
3515
3516 2017-09-22  Tom Tromey  <tom@tromey.com>
3517
3518         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
3519         type to scoped_restore_tmpl.
3520         <scoped_input_handler>: Initialize m_quit_handler directly.
3521
3522 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3523
3524         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
3525         (cd_command): Likewise.  Free "current_directory" before
3526         assigning to it.
3527         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
3528         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
3529         * top.c (gdb_dirbuf): Remove global declaration.
3530         * top.h (gdb_dirbuf): Likewise.
3531
3532 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3533
3534         * gnulib/aclocal.m4: Regenerate.
3535         * gnulib/config.in: Regenerate.
3536         * gnulib/configure: Regenerate.
3537         * gnulib/import/Makefile.am: Regenerate.
3538         * gnulib/import/Makefile.in: Regenerate.
3539         * gnulib/import/assure.h: New file.
3540         * gnulib/import/at-func.c: Likewise
3541         * gnulib/import/chdir-long.c: New file.
3542         * gnulib/import/chdir-long.h: New file.
3543         * gnulib/import/cloexec.c: New file.
3544         * gnulib/import/cloexec.h: New file.
3545         * gnulib/import/close.c: New file.
3546         * gnulib/import/closedir.c: New file.
3547         * gnulib/import/dirent-private.h: New file.
3548         * gnulib/import/dup-safer.c: New file.
3549         * gnulib/import/dup.c: New file.
3550         * gnulib/import/dup2.c: New file.
3551         * gnulib/import/error.c: New file.
3552         * gnulib/import/error.h: New file.
3553         * gnulib/import/exitfail.c: New file.
3554         * gnulib/import/exitfail.h: New file.
3555         * gnulib/import/fchdir.c: New file.
3556         * gnulib/import/fcntl.c: New file.
3557         * gnulib/import/fcntl.in.h: New file.
3558         * gnulib/import/fd-hook.c: New file.
3559         * gnulib/import/fd-hook.h: New file.
3560         * gnulib/import/fd-safer.c: New file.
3561         * gnulib/import/fdopendir.c: New file.
3562         * gnulib/import/filename.h: New file.
3563         * gnulib/import/filenamecat-lgpl.c: New file.
3564         * gnulib/import/filenamecat.h: New file.
3565         * gnulib/import/fstat.c: New file.
3566         * gnulib/import/fstatat.c: New file.
3567         * gnulib/import/getcwd-lgpl.c: New file.
3568         * gnulib/import/getcwd.c: New file.
3569         * gnulib/import/getdtablesize.c: New file.
3570         * gnulib/import/getlogin_r.c: New file.
3571         * gnulib/import/getprogname.c: New file.
3572         * gnulib/import/getprogname.h: New file.
3573         * gnulib/import/gettext.h: New file.
3574         * gnulib/import/glob-libc.h: New file.
3575         * gnulib/import/glob.c: New file.
3576         * gnulib/import/glob.in.h: New file.
3577         * gnulib/import/intprops.h: New file.
3578         * gnulib/import/m4/chdir-long.m4: New file.
3579         * gnulib/import/m4/close.m4: New file.
3580         * gnulib/import/m4/closedir.m4: New file.
3581         * gnulib/import/m4/d-ino.m4: New file.
3582         * gnulib/import/m4/d-type.m4: New file.
3583         * gnulib/import/m4/dup.m4: New file.
3584         * gnulib/import/m4/dup2.m4: New file.
3585         * gnulib/import/m4/error.m4: New file.
3586         * gnulib/import/m4/fchdir.m4: New file.
3587         * gnulib/import/m4/fcntl.m4: New file.
3588         * gnulib/import/m4/fcntl_h.m4: New file.
3589         * gnulib/import/m4/fdopendir.m4: New file.
3590         * gnulib/import/m4/filenamecat.m4: New file.
3591         * gnulib/import/m4/fstat.m4: New file.
3592         * gnulib/import/m4/fstatat.m4: New file.
3593         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3594         * gnulib/import/m4/getcwd-path-max.m4: New file.
3595         * gnulib/import/m4/getcwd.m4: New file.
3596         * gnulib/import/m4/getdtablesize.m4: New file.
3597         * gnulib/import/m4/getlogin_r.m4: New file.
3598         * gnulib/import/m4/getprogname.m4: New file.
3599         * gnulib/import/m4/glob.m4: New file.
3600         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3601         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3602         * gnulib/import/m4/mempcpy.m4: New file.
3603         * gnulib/import/m4/memrchr.m4: New file.
3604         * gnulib/import/m4/mode_t.m4: New file.
3605         * gnulib/import/m4/msvc-inval.m4: New file.
3606         * gnulib/import/m4/msvc-nothrow.m4: New file.
3607         * gnulib/import/m4/open.m4: New file.
3608         * gnulib/import/m4/openat.m4: New file.
3609         * gnulib/import/m4/opendir.m4: New file.
3610         * gnulib/import/m4/readdir.m4: New file.
3611         * gnulib/import/m4/realloc.m4: New file.
3612         * gnulib/import/m4/rewinddir.m4: New file.
3613         * gnulib/import/m4/save-cwd.m4: New file.
3614         * gnulib/import/m4/strdup.m4: New file.
3615         * gnulib/import/m4/strerror.m4: New file.
3616         * gnulib/import/m4/unistd-safer.m4: New file.
3617         * gnulib/import/mempcpy.c: New file.
3618         * gnulib/import/memrchr.c: New file.
3619         * gnulib/import/msvc-inval.c: New file.
3620         * gnulib/import/msvc-inval.h: New file.
3621         * gnulib/import/msvc-nothrow.c: New file.
3622         * gnulib/import/msvc-nothrow.h: New file.
3623         * gnulib/import/open.c: New file.
3624         * gnulib/import/openat-die.c: New file.
3625         * gnulib/import/openat-priv.h: New file.
3626         * gnulib/import/openat-proc.c: New file.
3627         * gnulib/import/openat.c: New file.
3628         * gnulib/import/openat.h: New file.
3629         * gnulib/import/opendir.c: New file.
3630         * gnulib/import/pipe-safer.c: New file.
3631         * gnulib/import/readdir.c: New file.
3632         * gnulib/import/realloc.c: New file.
3633         * gnulib/import/rewinddir.c: New file.
3634         * gnulib/import/save-cwd.c: New file.
3635         * gnulib/import/save-cwd.h: New file.
3636         * gnulib/import/strdup.c: New file.
3637         * gnulib/import/strerror-override.c: New file.
3638         * gnulib/import/strerror-override.h: New file.
3639         * gnulib/import/strerror.c: New file.
3640         * gnulib/import/unistd--.h: New file.
3641         * gnulib/import/unistd-safer.h: New file.
3642         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3643         "getcwd" and "glob".
3644         * ser-tcp.c: Undefine "close" before redefining it.
3645
3646 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3647
3648         * guile/scm-value.c (gdbscm_value_address): Initialize address,
3649         get rid of res_val.
3650
3651 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3652
3653         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3654         <sol2,sparc>: Likewise.
3655         <sol2-64,i386>: Likewise.
3656
3657         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3658         -Wdeprecated-declarations on *-*-solaris*.
3659         * configure: Regenerate.
3660
3661         * procfs.c: Include "nat/inferior.h".
3662         (procfs_info_proc): Fix typo.
3663
3664 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3665
3666         * remote.c (vector): Include.
3667         (struct private_thread_info): Add field, thread_handle.
3668         (free_private_thread_info): Deallocate storage associated with
3669         thread handle.
3670         (get_private_info_thread): Initialize `thread_handle' field.
3671         (struct thread_item): Add field, thread_handle.
3672         (clear_threads_listing_context): Deallocate storage associated
3673         with thread handle.
3674         (start_thread): Add support for "handle" attribute.
3675         (thread_attributes): Add "handle".
3676         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3677         field.
3678         (remote_update_thread_list): Update thread_handle.
3679         (remote_thread_handle_to_thread_info): New function.
3680         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3681
3682 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3683
3684         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3685         function.
3686         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3687         * python/python-internal.h (thread_object_type): Declare.
3688
3689 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3690
3691         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3692         (target_thread_handle_to_thread_info): Declare.
3693         * target.c (target_thread_handle_to_thread_info): New function.
3694         * target-delegates.c: Regenerate.
3695         * gdbthread.h (find_thread_by_handle): Declare.
3696         * thread.c (find_thread_by_handle): New function.
3697         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3698         function.
3699         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3700
3701 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3702
3703         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3704
3705 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3706
3707         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3708
3709 2017-09-21  Yao Qi  <yao.qi@linaro.org>
3710
3711         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3712         to gdb_target_obs.
3713
3714 2017-09-20  Tom Tromey  <tom@tromey.com>
3715
3716         * breakpoint.c (struct counted_command_line): Remove.
3717         (breakpoint_commands): Update.
3718         (alloc_counted_command_line, incref_counted_command_line)
3719         (decref_counted_command_line, do_cleanup_counted_command_line)
3720         (make_cleanup_decref_counted_command_line): Remove.
3721         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3722         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3723         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3724         (save_breakpoints): Update.
3725         * breakpoint.h (counted_command_line): Now a typedef to
3726         shared_ptr.
3727         (struct breakpoint) <commands>: Now a counted_command_line.
3728         (struct bpstats) <command>: Likewise.
3729
3730 2017-09-20  Tom Tromey  <tom@tromey.com>
3731
3732         * breakpoint.c (struct commands_info, do_map_commands_command):
3733         Remove.
3734         (commands_command_1): Update.
3735         (iterate_over_related_breakpoints): Take a function_view.
3736         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3737         (delete_command): Update.
3738         (map_breakpoint_numbers): Take a function_view.
3739         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3740         (disable_command): Update.
3741         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3742         (enable_command): Update.
3743         (struct disp_data, do_enable_breakpoint_disp)
3744         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3745         (do_map_enable_delete_breakpoint): Remove.
3746         (enable_once_command, enable_count_command, enable_delete_command)
3747         (delete_trace_variable_command): Update.
3748
3749 2017-09-20  Tom Tromey  <tom@tromey.com>
3750
3751         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
3752         (bpstat_clear): Use delete.
3753         (bpstats): New constructors.
3754         (bpstat_copy, bpstat_stop_status): Use new.
3755         (dprintf_after_condition_true): Update.
3756         * breakpoint.h (bpstats::bpstats): Add constructors.
3757         (bpstats::~bpstats): Add destructor.
3758
3759 2017-09-20  Pedro Alves  <palves@redhat.com>
3760
3761         * eval.c (make_params): Delete, refactored as ...
3762         (class fake_method): ... this new type's ctor.
3763         (fake_method::~fake_method): New.
3764         (evaluate_subexp_standard): Use 'fake_method'.
3765
3766 2017-09-20  Tom Tromey  <tom@tromey.com>
3767
3768         * windows-nat.c (get_windows_debug_event, windows_wait)
3769         (do_initial_windows_stuff, windows_attach): Update.
3770         * utils.c (vwarning, internal_vproblem): Update.
3771         (ui_unregister_input_event_handler_cleanup)
3772         (prepare_to_handle_input): Remove.
3773         (class scoped_input_handler): New.
3774         (defaulted_query, prompt_for_continue): Update.
3775         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3776         Update.
3777         * top.c (undo_terminal_modifications_before_exit): Update.
3778         * target/target.h (target_terminal_init, target_terminal_inferior)
3779         (target_terminal_ours): Don't declare.
3780         (class target_terminal): New.
3781         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3782         (target_terminal_ours_for_output)
3783         (make_cleanup_restore_target_terminal): Don't declare.
3784         (target_terminal_info): Remove.
3785         * target.c (enum terminal_state, terminal_state): Remove.
3786         (target_terminal::terminal_state): Define.
3787         (target_terminal::init): Rename from target_terminal_init.
3788         (target_terminal::inferior): Rename from
3789         target_terminal_inferior.
3790         (target_terminal::ours): Rename from target_terminal_ours.
3791         (target_terminal::ours_for_output): Rename from
3792         target_terminal_ours_for_output.
3793         (target_terminal::info): New method.
3794         (cleanup_restore_target_terminal)
3795         (make_cleanup_restore_target_terminal): Remove.
3796         * solib.c (handle_solib_event): Update.
3797         * remote.c (remote_serial_quit_handler): Update.
3798         (remote_terminal_inferior, remote_wait_as): Update.
3799         * record-full.c (record_full_wait_1): Update.
3800         * nto-procfs.c (procfs_create_inferior): Update.
3801         * nat/fork-inferior.c (startup_inferior): Update.
3802         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3803         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3804         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3805         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3806         (mi_breakpoint_created, mi_breakpoint_deleted)
3807         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3808         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3809         (mi_user_selected_context_changed, report_initial_inferior):
3810         Update.
3811         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3812         (linux_nat_terminal_inferior): Update.
3813         * infrun.c (follow_fork_inferior)
3814         (handle_vfork_child_exec_or_exit, do_target_resume)
3815         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3816         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3817         Update.
3818         * inflow.c (child_terminal_init, info_terminal_command): Update.
3819         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3820         (attach_command): Update.
3821         * infcall.c (call_thread_fsm_should_stop): Update.
3822         * gnu-nat.c (gnu_attach): Update.
3823         * extension.c (struct active_ext_lang_state)
3824         (restore_active_ext_lang): Update.
3825         * exceptions.c (print_flush): Update.
3826         * event-top.c (async_enable_stdin, default_quit_handler): Update.
3827         (struct quit_handler_cleanup_data, restore_quit_handler)
3828         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3829         Remove.
3830         * cp-support.c (gdb_demangle): Update.
3831         * breakpoint.c (update_inserted_breakpoint_locations)
3832         (insert_breakpoint_locations, handle_jit_event)
3833         (disable_breakpoints_in_unloaded_shlib): Update.
3834         * annotate.c (annotate_breakpoints_invalid)
3835         (annotate_frames_invalid): Update.
3836
3837 2017-09-20  Tom Tromey  <tom@tromey.com>
3838
3839         * main.c (catch_command_errors): Rename from
3840         catch_command_errors_const.
3841         (captured_main_1): Update.
3842
3843 2017-09-20  Pedro Alves  <palves@redhat.com>
3844
3845         * cli/cli-cmds.c (list_command): Use print_sal_location.
3846         (print_sal_location): New function.
3847         (ambiguous_line_spec): Use print_sal_location.
3848         * linespec.c (symbol_to_sal): Record the symbol in the sal.
3849         * symtab.c (find_function_start_sal): Likewise.
3850         * symtab.h (symtab_and_line::symbol): New field.
3851
3852 2017-09-20  Pedro Alves  <palves@redhat.com>
3853
3854         * linespec.c (minsym_found): Handle non-text minsyms.
3855         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3856
3857 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3858
3859         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3860         backslash.
3861
3862 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3863
3864         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3865         vmovups instead vmovaps.
3866         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3867
3868 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
3869
3870         * NEWS (Changes since GDB 8.0): Add starti.
3871         * infcmd.c (enum run_break): New.
3872         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3873         case.
3874         (run_command): Use enum run_how.
3875         (start_command): Likewise.
3876         (starti_command): New function.
3877         (RUN_ARGS_HELP): New macro.
3878         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3879         commands.  Add starti command.
3880
3881 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3882
3883         * Makefile.in (monitor.o): Remove the rule.
3884
3885 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3886
3887         * annotate.h (struct annotate_arg_emitter): Use
3888         DISABLE_COPY_AND_ASSIGN.
3889         * common/refcounted-object.h (refcounted_object): Likewise.
3890         * completer.h (struct completion_result): Likewise.
3891         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3892         * filename-seen-cache.h (filename_seen_cache): Likewise.
3893         * gdbcore.h (thread_section_name): Likewise.
3894         * gdb_regex.h (compiled_regex): Likewise.
3895         * gdbthread.h (scoped_restore_current_thread): Likewise.
3896         * inferior.h (scoped_restore_current_inferior): Likewise.
3897         * jit.c (jit_reader): Likewise.
3898         * linespec.h (struct linespec_result): Likewise.
3899         * mi/mi-parse.h (struct mi_parse): Likewise.
3900         * nat/fork-inferior.c (execv_argv): Likewise.
3901         * progspace.h (scoped_restore_current_program_space): Likewise.
3902         * python/python-internal.h (class gdbpy_enter): Likewise.
3903         * regcache.h (regcache): Likewise.
3904         * target-descriptions.c (struct tdesc_reg): Likewise.
3905         (struct tdesc_type): Likewise.
3906         (struct tdesc_feature): Likewise.
3907         * ui-out.h (ui_out_emit_type): Likewise.
3908
3909 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3910
3911         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3912         label abort_expression.
3913
3914 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3915
3916         * common/buffer.c (buffer_xml_printf): Adjust.
3917         * common/xml-utils.c (xml_escape_text): Change return type to
3918         std::string, update code accordingly.
3919         * common/xml-utils.h (xml_escape_text): Change return type to
3920         std::string.
3921         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3922         * windows-tdep.c (windows_xfer_shared_library): Adjust.
3923         * unittests/xml-utils-selftests.c (test_xml_escape_text):
3924         Adjust.
3925
3926 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3927
3928         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3929         (SUBDIR_UNITTESTS_OBS): Add new object file.
3930         * unittests/xml-utils-selftests.c: New file.
3931
3932 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3933
3934         * common/selftest.h (selftest): New struct/interface.
3935         (register_test): Add name parameter, add new overload.
3936         (run_tests): Add filter parameter.
3937         (for_each_selftest_ftype): New typedef.
3938         (for_each_selftest): New declaration.
3939         * common/selftest.c (tests): Change type to
3940         map<string, unique_ptr<selftest>>.
3941         (simple_selftest): New struct.
3942         (register_test): New function.
3943         (register_test): Add name parameter and use it.
3944         (run_tests): Add filter parameter and use it.  Add prints.
3945         Adjust to vector -> map change.
3946         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3947         registering selftests.
3948         * arm-tdep.c (_initialize_arm_tdep): Likewise.
3949         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3950         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3951         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
3952         * findvar.c (_initialize_findvar): Likewise.
3953         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
3954         * maint.c (maintenance_selftest): Update call to run_tests.
3955         (maintenance_info_selftests): New function.
3956         (_initialize_maint_cmds): Register "maintenance info selftests"
3957         command.  Update "maintenance selftest" doc.
3958         * regcache.c (_initialize_regcache): Add names when registering
3959         selftests.
3960         * rust-exp.y (_initialize_rust_exp): Likewise.
3961         * selftest-arch.c (gdbarch_selftest): New struct.
3962         (gdbarch_tests): Remove.
3963         (register_test_foreach_arch): Add name parameter.  Call
3964         register_test.
3965         (tests_with_arch): Remove, move most content to
3966         gdbarch_selftest::operator().
3967         (_initialize_selftests_foreach_arch): Remove.
3968         * selftest-arch.h (register_test_foreach_arch): Add name
3969         parameter.
3970         (run_tests_with_arch): New declaration.
3971         * utils-selftests.c (_initialize_utils_selftests): Add names
3972         when registering selftests.
3973         * utils.c (_initialize_utils): Likewise.
3974         * unittests/array-view-selftests.c
3975         (_initialize_array_view_selftests): Likewise.
3976         * unittests/environ-selftests.c (_initialize_environ_selftests):
3977         Likewise.
3978         * unittests/function-view-selftests.c
3979         (_initialize_function_view_selftests): Likewise.
3980         * unittests/offset-type-selftests.c
3981         (_initialize_offset_type_selftests): Likewise.
3982         * unittests/optional-selftests.c
3983         (_initialize_optional_selftests): Likewise.
3984         * unittests/scoped_restore-selftests.c
3985         (_initialize_scoped_restore_selftests): Likewise.
3986         * NEWS: Document "maintenance selftest" and "maint info
3987         selftests".
3988
3989 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3990
3991         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
3992         scoped_restore.
3993
3994 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3995
3996         * mi/mi-main.c (mi_load_progress): Make uiout variable
3997         a unique_ptr.
3998
3999 2017-09-15  Pedro Alves  <palves@redhat.com>
4000
4001         * compile/compile-c-types.c (convert_enum, convert_int)
4002         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
4003
4004 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
4005
4006         * dwarf2read.c (copy_string): Remove.
4007         (parse_macro_definition): Replace copy_string with savestring.
4008
4009 2017-09-15  Yao Qi  <yao.qi@linaro.org>
4010
4011         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
4012         gdb_target_obs.
4013         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
4014         Likewise.
4015         (i[34567]86-*-linux*): Likewise.
4016
4017 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4018
4019         * dwarf2expr.h (dwarf_stack_value): Add constructor.
4020         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
4021         <stack>: Change type to std::vector.
4022         <stack_len, stack_allocated>: Remove.
4023         <grow_stack>: Remove.
4024         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4025         (dwarf_expr_context::~dwarf_expr_context): Remove.
4026         (dwarf_expr_context::grow_stack): Remove.
4027         (dwarf_expr_context::push): Adjust.
4028         (dwarf_expr_context::pop): Adjust.
4029         (dwarf_expr_context::fetch): Adjust.
4030         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
4031         (dwarf_expr_context::stack_empty_p): Adjust.
4032         (dwarf_expr_context::execute_stack_op): Adjust.
4033
4034 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4035
4036         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
4037         return type to bool.
4038         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
4039
4040 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4041
4042         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
4043         Change type to bool.
4044         (dwarf_stack_value) <in_stack_memory>: Likewise.
4045         (dwarf_expr_context) <push_address>: Change parameter type to
4046         bool.
4047         <fetch_in_stack_memory>: Change return type to bool.
4048         <push>: Change parameter type to bool.
4049         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
4050         to bool.
4051         (dwarf_expr_context::push_address): Likewise.
4052         (dwarf_expr_context::fetch_in_stack_memory): Change return type
4053         to bool.
4054         (dwarf_expr_context::execute_stack_op): Adjust.
4055         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
4056
4057 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
4058
4059         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
4060         (struct dwarf_expr_context) <n_pieces>: Remove.
4061         <pieces>: Change type to std::vector.
4062         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
4063         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
4064         pieces.
4065         (dwarf_expr_context::add_piece): Adjust.
4066         * dwarf2loc.c (struct piece_closure): Initialize fields.
4067         <n_pieces>: Remove.
4068         <pieces>: Change type to std::vector.
4069         (allocate_piece_closure): Adjust, change parameter to
4070         std::vector rvalue and std::move it to piece_closure.
4071         (rw_pieced_value): Adjust.
4072         (check_pieced_synthetic_pointer): Adjust.
4073         (indirect_synthetic_pointer): Adjust.
4074         (coerce_pieced_ref): Adjust.
4075         (free_pieced_value_closure):  Adjust.  Use delete to free
4076         piece_closure.
4077         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
4078         to allocate_piece_closure.
4079         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
4080
4081 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4082
4083         * probe.h (probe_ops_cp): Remove typedef.
4084         (DEF_VEC_P (probe_ops_cp)): Remove.
4085         (all_probe_ops): Change type to std::vector.
4086         * probe.c (info_probes_for_ops): Adjust to vector change.
4087         (probe_linespec_to_ops): Likewise.
4088         (all_probe_ops): Change type to std::vector.
4089         (_initialize_probe): Adjust to vector change.
4090         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
4091         * elfread.c (elf_get_probes): Likewise.
4092         * stap-probe.c (_initialize_stap_probe): Likewise.
4093
4094 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4095
4096         * probe.h (struct bound_probe): Define constructors.
4097         * probe.c (bound_probe_s): Remove typedef.
4098         (DEF_VEC_O (bound_probe_s)): Remove VEC.
4099         (collect_probes): Change return type to std::vector, remove
4100         cleanup.
4101         (compare_probes): Return bool, change parameter type.  Change
4102         semantic to "less than".
4103         (gen_ui_out_table_header_info): Change parameter to std::vector
4104         and update.
4105         (exists_probe_with_pops): Likewise.
4106         (info_probes_for_ops): Update to std::vector change.
4107         (enable_probes_command): Likewise.
4108         (disable_probes_command): Likewise.
4109
4110 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4111
4112         * probe.h (struct probe_ops) <get_probes>: Change parameter from
4113         vec to std::vector.
4114         * probe.c (parse_probes_in_pspace): Update.
4115         (find_probes_in_objfile): Update.
4116         (find_probe_by_pc): Update.
4117         (collect_probes): Update.
4118         (probe_any_get_probes): Update.
4119         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
4120         return type to reference to std::vector.
4121         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
4122         std::vector and update.
4123         (dtrace_process_dof): Likewise.
4124         (dtrace_get_probes): Likewise.
4125         * elfread.c (elf_get_probes): Change return type to std::vector,
4126         store an std::vector in bfd_data.
4127         (probe_key_free): Update to std::vector.
4128         * stap-probe.c (handle_stap_probe): Change parameter to
4129         std::vector and update.
4130         (stap_get_probes): Likewise.
4131         * symfile-debug.c (debug_sym_get_probes): Change return type to
4132         std::vector and update.
4133
4134 2017-09-11  Tom Tromey  <tom@tromey.com>
4135
4136         * breakpoint.c (program_breakpoint_here_p): Update.
4137         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
4138         from make_show_memory_breakpoints_cleanup.  Return a
4139         scoped_restore_tmpl<int>.
4140         (restore_show_memory_breakpoints): Remove.
4141         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
4142         * mem-break.c (memory_validate_breakpoint): Update.
4143         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
4144         (ia64_memory_remove_breakpoint): Update.
4145         (ia64_breakpoint_from_pc): Update.
4146         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
4147         from make_show_memory_breakpoints_cleanup.
4148
4149 2017-09-11  Tom Tromey  <tom@tromey.com>
4150
4151         * d-namespace.c (d_lookup_symbol): Use std::string.
4152         (find_symbol_in_baseclass): Likewise.
4153
4154 2017-09-11  Tom Tromey  <tom@tromey.com>
4155
4156         * ctf.c (ctf_start): Use std::string.
4157
4158 2017-09-11  Tom Tromey  <tom@tromey.com>
4159
4160         * ada-lang.c (is_known_support_routine): Update.
4161         (ada_unhandled_exception_name_addr_from_raise): Update.
4162         * guile/scm-frame.c (gdbscm_frame_name): Update.
4163         * python/py-frame.c (frapy_name): Update.
4164         (frapy_function): Update.
4165         * stack.h (find_frame_funname): Update.
4166         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
4167         (print_frame): Update.
4168
4169 2017-09-11  Tom Tromey  <tom@tromey.com>
4170
4171         * findcmd.c (put_bits): Take a gdb::byte_vector.
4172         (parse_find_args): Return gdb::byte_vector.  "args" now const.
4173         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
4174         cleanups.
4175         (find_command): Update.
4176
4177 2017-09-11  Tom Tromey  <tom@tromey.com>
4178
4179         * cli/cli-script.c (class scoped_restore_hook_in): New.
4180         (clear_hook_in_cleanup): Remove.
4181         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
4182         scoped_restore_hook_in.
4183
4184 2017-09-11  Tom Tromey  <tom@tromey.com>
4185
4186         * cli/cli-script.c (restore_interp): Remove.
4187         (read_command_lines): Use scoped_restore_interp.
4188         * interps.c (scoped_restore_interp::set_temp): Rename from
4189         interp_set_temp.
4190         * interps.h (class scoped_restore_interp): New.
4191         (interp_set_temp): Remove.
4192
4193 2017-09-11  Tom Tromey  <tom@tromey.com>
4194
4195         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4196         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
4197         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
4198         scoped_restore.
4199         (mi_cmd_break_insert_1): Update.
4200         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
4201         scoped_restore.
4202
4203 2017-09-11  Tom Tromey  <tom@tromey.com>
4204
4205         * demangle.c (demangle_command): Update.
4206         * breakpoint.c (disable_command): Update.
4207         (enable_command): Update.
4208         (find_location_by_number): Make "number" const.  Use
4209         get_number_trailer.
4210         * cli/cli-utils.c (extract_arg): Return std::string.
4211         * probe.c (parse_probe_linespec): Update.  Change types.
4212         (collect_probes): Take string arguments.
4213         (parse_probe_linespec): Likewise.
4214         (info_probes_for_ops): Update.
4215         (enable_probes_command): Update.
4216         (disable_probes_command): Update.
4217         * break-catch-sig.c (catch_signal_split_args): Update.
4218         * mi/mi-parse.c (mi_parse): Update.
4219
4220 2017-09-11  Tom Tromey  <tom@tromey.com>
4221
4222         * language.h (language_enum): Make argument const.
4223         * language.c (language_enum): Make argument const.
4224
4225 2017-09-11  Tom Tromey  <tom@tromey.com>
4226
4227         * common/common-utils.h (skip_to_space): Remove macro, redeclare
4228         as function.
4229         (skip_to_space): Rename from skip_to_space_const.
4230         * common/common-utils.c (skip_to_space): New function.
4231         (skip_to_space): Rename from skip_to_space_const.
4232         * cli/cli-utils.h (get_number): Rename from get_number_const.
4233         (extract_arg): Rename from extract_arg_const.
4234         * cli/cli-utils.c (get_number): Rename from get_number_const.
4235         (extract_arg): Rename from extract_arg_const.
4236         (number_or_range_parser::get_number): Use ::get_number.
4237         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
4238         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
4239         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
4240         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
4241         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
4242         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
4243         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
4244         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
4245
4246 2017-09-11  Tom Tromey  <tom@tromey.com>
4247
4248         * python/python.c (do_start_initialization): Use
4249         py-event-types.def to initialize types.
4250         Define all object type structures.
4251         * python/python-internal.h: Don't declare event initialization
4252         functions.
4253         * python/py-threadevent.c (thread_event_object_type): Don't
4254         define.
4255         * python/py-stopevent.c (stop_event_object_type): Don't define.
4256         * python/py-signalevent.c (signal_event_object_type): Don't
4257         declare or define.
4258         * python/py-newobjfileevent.c (new_objfile_event_object_type)
4259         (clear_objfiles_event_object_type): Don't declare or define.
4260         * python/py-infevents.c (inferior_call_pre_event_object_type)
4261         (inferior_call_post_event_object_type)
4262         (register_changed_event_object_type)
4263         (memory_changed_event_object_type): Don't declare or define.
4264         * python/py-inferior.c (new_thread_event_object_type)
4265         (new_inferior_event_object_type)
4266         (inferior_deleted_event_object_type): Don't declare or define.
4267         * python/py-exitedevent.c (exited_event_object_type): Don't
4268         declare or define.
4269         * python/py-evts.c (gdbpy_initialize_py_events): Use
4270         py-all-events.def.
4271         * python/py-events.h (thread_event_object_type): Don't declare.
4272         (events_object): Use py-all-events.def.
4273         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
4274         py-event-types.def.
4275         * python/py-event-types.def: New file.
4276         * python/py-continueevent.c (create_continue_event_object): Don't
4277         declare or define.
4278         * python/py-bpevent.c (breakpoint_event_object_type): Don't
4279         declare or define.
4280         * python/py-all-events.def: New file.
4281
4282 2017-09-11  Tom Tromey  <tom@tromey.com>
4283
4284         * python/py-threadevent.c (create_thread_event_object): Return
4285         gdbpy_ref.
4286         * python/py-stopevent.h (create_stop_event_object)
4287         (create_breakpoint_event_object, create_signal_event_object):
4288         Update.
4289         * python/py-stopevent.c (create_stop_event_object): Return
4290         gdbpy_ref.
4291         (emit_stop_event): Update.
4292         * python/py-signalevent.c (create_signal_event_object): Return
4293         gdbpy_ref.
4294         * python/py-infevents.c (create_inferior_call_event_object):
4295         Update.
4296         * python/py-event.h (create_event_object)
4297         (create_thread_event_object): Update.
4298         * python/py-event.c (create_event_object): Return gdbpy_ref.
4299         * python/py-continueevent.c: Return gdbpy_ref.
4300         * python/py-bpevent.c (create_breakpoint_event_object): Return
4301         gdbpy_ref.
4302
4303 2017-09-11  Tom Tromey  <tom@tromey.com>
4304
4305         PR python/15622:
4306         * NEWS: Add entry.
4307         * python/python.c (do_start_initialization): Initialize new event
4308         types.
4309         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
4310         (gdbpy_initialize_inferior_deleted_event)
4311         (gdbpy_initialize_new_thread_event): Declare.
4312         * python/py-threadevent.c (create_thread_event_object): Add option
4313         "thread" parameter.
4314         * python/py-inferior.c (new_thread_event_object_type)
4315         (new_inferior_event_object_type)
4316         (inferior_deleted_event_object_type): Declare.
4317         (python_new_inferior, python_inferior_deleted): New functions.
4318         (add_thread_object): Emit new_thread event.
4319         (gdbpy_initialize_inferior): Attach new functions to corresponding
4320         observers.
4321         (new_thread, new_inferior, inferior_deleted): Define new event
4322         types.
4323         * python/py-evts.c (gdbpy_initialize_py_events): Add new
4324         registries.
4325         * python/py-events.h (events_object) <new_inferior,
4326         inferior_deleted, new_thread>: New fields.
4327         * python/py-event.h (create_thread_event_breakpoint): Add optional
4328         "thread" parameter.
4329
4330 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4331
4332         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
4333         check current_ui instead.
4334         (internal_vproblem): Likewise.
4335
4336 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
4337
4338         * thread.c (print_thread_info_1): Remove unnecessary calls to
4339         uiout->is_mi_like_p.
4340
4341 2017-09-09  Tom Tromey  <tom@tromey.com>
4342
4343         * namespace.h (add_using_directive): Update.
4344         * namespace.c (add_using_directive): Change type of excludes to
4345         std::vector.
4346         * dwarf2read.c (read_import_statement): Use std::vector.
4347         (read_namespace): Update.
4348         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4349
4350 2017-09-09  Tom Tromey  <tom@tromey.com>
4351
4352         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
4353
4354 2017-09-09  Tom Tromey  <tom@tromey.com>
4355
4356         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
4357
4358 2017-09-09  Tom Tromey  <tom@tromey.com>
4359
4360         * stack.c (func_command): Use gdb::def_vector.
4361
4362 2017-09-09  Tom Tromey  <tom@tromey.com>
4363
4364         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
4365         ui_out_emit_list, ui_out_emit_tuple.
4366         (mi_cmd_var_update): Likewise.
4367
4368 2017-09-09  Tom Tromey  <tom@tromey.com>
4369
4370         * mi/mi-interp.c (mi_user_selected_context_changed): Use
4371         ui_out_redirect_pop.
4372         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
4373         ui_out_redirect_pop.
4374         * utils.c (do_ui_out_redirect_pop)
4375         (make_cleanup_ui_out_redirect_pop): Remove.
4376         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
4377         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
4378         * ui-out.h (ui_out_redirect_pop): New class.
4379
4380 2017-09-09  Tom Tromey  <tom@tromey.com>
4381
4382         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
4383         (list_available_thread_groups, mi_cmd_list_thread_groups)
4384         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
4385         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
4386         Likewise.
4387
4388 2017-09-09  Tom Tromey  <tom@tromey.com>
4389
4390         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
4391         ui_out_emit_tuple.
4392
4393 2017-09-09  Tom Tromey  <tom@tromey.com>
4394
4395         * target.c (flash_erase_command): Use ui_out_emit_tuple.
4396         * stack.c (print_frame): Use ui_out_emit_tuple.
4397         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
4398         (info_spu_mailbox_command, info_spu_dma_command)
4399         (info_spu_proxydma_command): Likewise.
4400         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
4401         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
4402         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
4403         ui_out_emit_tuple.
4404         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
4405
4406 2017-09-09  Tom Tromey  <tom@tromey.com>
4407
4408         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
4409         (class ui_out_emit_table): Update comment.
4410         * ui-out.c (do_cleanup_table_end)
4411         (make_cleanup_ui_out_table_begin_end): Remove.
4412         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
4413         (info_spu_dma_cmdlist): Likewise.
4414         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
4415         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
4416         ui_out_emit_table.
4417
4418 2017-09-09  Tom Tromey  <tom@tromey.com>
4419
4420         * thread.c (print_thread_info_1): Use ui_out_emit_table,
4421         ui_out_emit_list, gdb::optional.
4422
4423 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
4424
4425         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
4426         prototype.
4427         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
4428         prototype.
4429         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
4430         prototype.
4431         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
4432         * ada-exp.y: Remove _initialize_ada_exp prototype.
4433         * ada-lang.c: Remove _initialize_ada_language prototype.
4434         * ada-tasks.c: Remove _initialize_tasks prototype.
4435         * addrmap.c: Remove _initialize_addrmap prototype.
4436         * agent.c: Remove _initialize_agent prototype.
4437         * aix-thread.c: Remove _initialize_aix_thread prototype.
4438         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
4439         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
4440         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
4441         prototype.
4442         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
4443         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
4444         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
4445         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
4446         prototype.
4447         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
4448         prototype.
4449         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
4450         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
4451         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
4452         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
4453         prototype.
4454         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
4455         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
4456         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
4457         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
4458         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4459         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
4460         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
4461         prototype.
4462         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
4463         prototype.
4464         * annotate.c: Remove _initialize_annotate prototype.
4465         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
4466         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
4467         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
4468         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
4469         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
4470         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
4471         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
4472         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
4473         prototype.
4474         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
4475         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
4476         * auto-load.c: Remove _initialize_auto_load prototype.
4477         * auxv.c: Remove _initialize_auxv prototype.
4478         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
4479         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
4480         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
4481         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
4482         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
4483         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
4484         prototype.
4485         * break-catch-throw.c: Remove _initialize_break_catch_throw
4486         prototype.
4487         * breakpoint.c: Remove _initialize_breakpoint prototype.
4488         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
4489         * btrace.c: Remove _initialize_btrace prototype.
4490         * charset.c: Remove _initialize_charset prototype.
4491         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
4492         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
4493         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
4494         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
4495         * cli/cli-script.c: Remove _initialize_cli_script prototype.
4496         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
4497         * coffread.c: Remove _initialize_coffread prototype.
4498         * compile/compile.c: Remove _initialize_compile prototype.
4499         * complaints.c: Remove _initialize_complaints prototype.
4500         * completer.c: Remove _initialize_completer prototype.
4501         * copying.awk: Remove _initialize_copying prototype.
4502         * copying.c: Regenerate.
4503         * core-regset.c: Remove _initialize_core_regset prototype.
4504         * corefile.c: Remove _initialize_core prototype.
4505         * corelow.c: Remove _initialize_corelow prototype.
4506         * cp-abi.c: Remove _initialize_cp_abi prototype.
4507         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
4508         * cp-support.c: Remove _initialize_cp_support prototype.
4509         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
4510         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
4511         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
4512         * ctf.c: Remove _initialize_ctf prototype.
4513         * d-lang.c: Remove _initialize_d_language prototype.
4514         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
4515         prototype.
4516         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
4517         * dbxread.c: Remove _initialize_dbxread prototype.
4518         * dcache.c: Remove _initialize_dcache prototype.
4519         * demangle.c: Remove _initialize_demangler prototype.
4520         * disasm-selftests.c: Remove _initialize_disasm_selftests
4521         prototype.
4522         * disasm.c: Remove _initialize_disasm prototype.
4523         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
4524         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
4525         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
4526         prototype.
4527         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
4528         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
4529         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
4530         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
4531         * elfread.c: Remove _initialize_elfread prototype.
4532         * exec.c: Remove _initialize_exec prototype.
4533         * extension.c: Remove _initialize_extension prototype.
4534         * f-lang.c: Remove _initialize_f_language prototype.
4535         * f-valprint.c: Remove _initialize_f_valprint prototype.
4536         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
4537         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
4538         * filesystem.c: Remove _initialize_filesystem prototype.
4539         * findcmd.c: Remove _initialize_mem_search prototype.
4540         * fork-child.c: Remove _initialize_fork_child prototype.
4541         * frame-base.c: Remove _initialize_frame_base prototype.
4542         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
4543         * frame.c: Remove _initialize_frame prototype.
4544         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
4545         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
4546         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
4547         * gcore.c: Remove _initialize_gcore prototype.
4548         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
4549         * gdbarch.c: Regenerate.
4550         * gdbarch.sh: Remove _initialize_gdbarch prototype.
4551         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
4552         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
4553         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
4554         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
4555         * go-lang.c: Remove _initialize_go_language prototype.
4556         * go32-nat.c: Remove _initialize_go32_nat prototype.
4557         * guile/guile.c: Remove _initialize_guile prototype.
4558         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4559         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4560         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4561         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4562         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4563         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4564         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4565         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4566         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
4567         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
4568         prototype.
4569         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
4570         prototype.
4571         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
4572         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
4573         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
4574         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
4575         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4576         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4577         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4578         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4579         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4580         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4581         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4582         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4583         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4584         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4585         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4586         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4587         prototype.
4588         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4589         prototype.
4590         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4591         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4592         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4593         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4594         * infcall.c: Remove _initialize_infcall prototype.
4595         * infcmd.c: Remove _initialize_infcmd prototype.
4596         * inferior.c: Remove _initialize_inferiors prototype.
4597         * inflow.c: Remove _initialize_inflow prototype.
4598         * infrun.c: Remove _initialize_infrun prototype.
4599         * interps.c: Remove _initialize_interpreter prototype.
4600         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4601         * jit.c: Remove _initialize_jit prototype.
4602         * language.c: Remove _initialize_language prototype.
4603         * linux-fork.c: Remove _initialize_linux_fork prototype.
4604         * linux-nat.c: Remove _initialize_linux_nat prototype.
4605         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4606         * linux-thread-db.c: Remove _initialize_thread_db prototype.
4607         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4608         * m2-lang.c: Remove _initialize_m2_language prototype.
4609         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4610         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4611         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4612         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4613         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4614         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4615         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4616         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4617         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4618         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4619         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4620         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4621         * machoread.c: Remove _initialize_machoread prototype.
4622         * macrocmd.c: Remove _initialize_macrocmd prototype.
4623         * macroscope.c: Remove _initialize_macroscope prototype.
4624         * maint.c: Remove _initialize_maint_cmds prototype.
4625         * mdebugread.c: Remove _initialize_mdebugread prototype.
4626         * memattr.c: Remove _initialize_mem prototype.
4627         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4628         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4629         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4630         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4631         * mi/mi-main.c: Remove _initialize_mi_main prototype.
4632         * microblaze-linux-tdep.c: Remove
4633         _initialize_microblaze_linux_tdep prototype.
4634         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4635         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4636         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4637         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4638         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4639         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4640         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4641         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4642         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4643         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4644         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4645         prototype.
4646         * mipsread.c: Remove _initialize_mipsread prototype.
4647         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4648         prototype.
4649         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4650         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4651         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4652         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4653         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4654         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4655         prototype.
4656         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4657         * nto-procfs.c: Remove _initialize_procfs prototype.
4658         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4659         * objc-lang.c: Remove _initialize_objc_language prototype.
4660         * objfiles.c: Remove _initialize_objfiles prototype.
4661         * observer.c: Remove observer_test_first_notification_function,
4662         observer_test_second_notification_function,
4663         observer_test_third_notification_function, and
4664         _initialize_observer prototypes.
4665         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4666         * osabi.c: Remove _initialize_gdb_osabi prototype.
4667         * osdata.c: Remove _initialize_osdata prototype.
4668         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4669         * parse.c: Remove _initialize_parse prototype.
4670         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4671         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4672         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4673         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4674         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4675         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4676         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4677         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4678         * printcmd.c: Remove _initialize_printcmd prototype.
4679         * probe.c: Remove _initialize_probe prototype.
4680         * proc-api.c: Remove _initialize_proc_api prototype.
4681         * proc-events.c: Remove _initialize_proc_events prototype.
4682         * proc-service.c: Remove _initialize_proc_service prototype.
4683         * procfs.c: Remove _initialize_procfs prototype.
4684         * psymtab.c: Remove _initialize_psymtab prototype.
4685         * python/python.c: Remove _initialize_python prototype.
4686         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4687         * record-btrace.c: Remove _initialize_record_btrace prototype.
4688         * record-full.c: Remove _initialize_record_full prototype.
4689         * record.c: Remove _initialize_record prototype.
4690         * regcache.c: Remove _initialize_regcache prototype.
4691         * reggroups.c: Remove _initialize_reggroup prototype.
4692         * remote-notif.c: Remove _initialize_notif prototype.
4693         * remote-sim.c: Remove _initialize_remote_sim prototype.
4694         * remote.c: Remove _initialize_remote prototype.
4695         * reverse.c: Remove _initialize_reverse prototype.
4696         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4697         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4698         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4699         prototype.
4700         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4701         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4702         * rust-exp.y: Remove _initialize_rust_exp prototype.
4703         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4704         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4705         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4706         * score-tdep.c: Remove _initialize_score_tdep prototype.
4707         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4708         prototype.
4709         * ser-go32.c: Remove _initialize_ser_dos prototype.
4710         * ser-mingw.c: Remove _initialize_ser_windows prototype.
4711         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4712         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4713         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4714         * serial.c: Remove _initialize_serial prototype.
4715         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4716         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4717         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4718         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4719         * skip.c: Remove _initialize_step_skip prototype.
4720         * sol-thread.c: Remove _initialize_sol_thread prototype.
4721         * solib-aix.c: Remove _initialize_solib_aix prototype.
4722         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4723         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4724         * solib-frv.c: Remove _initialize_frv_solib prototype.
4725         * solib-spu.c: Remove _initialize_spu_solib prototype.
4726         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4727         * solib-target.c: Remove _initialize_solib_target prototype.
4728         * solib.c: Remove _initialize_solib prototype.
4729         * source.c: Remove _initialize_source prototype.
4730         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4731         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4732         prototype.
4733         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4734         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4735         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4736         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4737         prototype.
4738         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4739         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4740         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4741         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4742         prototype.
4743         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4744         prototype.
4745         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4746         prototype.
4747         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4748         prototype.
4749         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4750         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4751         prototype.
4752         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4753         prototype.
4754         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4755         prototype.
4756         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4757         prototype.
4758         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4759         prototype.
4760         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4761         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4762         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4763         * stabsread.c: Remove _initialize_stabsread prototype.
4764         * stack.c: Remove _initialize_stack prototype.
4765         * stap-probe.c: Remove _initialize_stap_probe prototype.
4766         * std-regs.c: Remove _initialize_frame_reg prototype.
4767         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4768         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4769         * symfile.c: Remove _initialize_symfile prototype.
4770         * symmisc.c: Remove _initialize_symmisc prototype.
4771         * symtab.c: Remove _initialize_symtab prototype.
4772         * target-dcache.c: Remove _initialize_target_dcache prototype.
4773         * target-descriptions.c: Remove _initialize_target_descriptions
4774         prototype.
4775         * thread.c: Remove _initialize_thread prototype.
4776         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4777         prototype.
4778         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4779         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4780         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4781         prototype.
4782         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4783         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4784         * tracefile.c: Remove _initialize_tracefile prototype.
4785         * tracepoint.c: Remove _initialize_tracepoint prototype.
4786         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4787         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4788         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4789         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4790         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4791         * tui/tui-win.c: Remove _initialize_tui_win prototype.
4792         * tui/tui.c: Remove _initialize_tui prototype.
4793         * typeprint.c: Remove _initialize_typeprint prototype.
4794         * user-regs.c: Remove _initialize_user_regs prototype.
4795         * utils.c: Remove _initialize_utils prototype.
4796         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4797         * valarith.c: Remove _initialize_valarith prototype.
4798         * valops.c: Remove _initialize_valops prototype.
4799         * valprint.c: Remove _initialize_valprint prototype.
4800         * value.c: Remove _initialize_values prototype.
4801         * varobj.c: Remove _initialize_varobj prototype.
4802         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4803         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4804         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4805         * windows-nat.c: Remove _initialize_windows_nat,
4806         _initialize_check_for_gdb_ini, and _initialize_loadable
4807         prototypes.
4808         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4809         * xcoffread.c: Remove _initialize_xcoffread prototype.
4810         * xml-support.c: Remove _initialize_xml_support prototype.
4811         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4812         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4813         prototype.
4814         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4815         prototype.
4816         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4817
4818 2017-09-08  Keith Seitz  <keiths@redhat.com>
4819
4820         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4821         field.
4822
4823 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
4824
4825         * f-valprint.c (f_val_print): Remove check for one byte
4826         sized integers. Remove printing of character type.
4827
4828 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
4829             Christoph Weinmann  <christoph.t.weinmann@intel.com>
4830             Bernhard Heckel  <bernhard.heckel@intel.com>
4831
4832         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4833         to maintain proper indentation when printing pointers/refs.
4834
4835 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4836
4837         GDB 8.0.1 released.
4838
4839 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4840
4841         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4842
4843 2017-09-05  Tom Tromey  <tom@tromey.com>
4844
4845         * parse.c (funcall_chain): Now a std::vector.
4846         (start_arglist, end_arglist): Simplify.
4847         (free_funcalls): Remove.
4848         (parse_exp_in_context_1): Remove cleanup.
4849
4850 2017-09-05  Tom Tromey  <tom@tromey.com>
4851
4852         * go-exp.y (go_parse): Don't create a cleanup.
4853
4854 2017-09-05  Tom Tromey  <tom@tromey.com>
4855
4856         * d-exp.y (PrimaryExpression): Use std::string.
4857         (d_parse): Don't create a cleanup.
4858
4859 2017-09-05  Tom Tromey  <tom@tromey.com>
4860
4861         * utils.c (do_clear_parser_state): Remove.
4862         (make_cleanup_clear_parser_state): Remove.
4863         * p-exp.y (pascal_parse): Use scoped_restore.
4864         * m2-exp.y (m2_parse): Use scoped_restore.
4865         * f-exp.y (f_parse): Use scoped_restore.
4866         * d-exp.y (d_parse): Use scoped_restore.
4867         * c-exp.y (c_parse): Use scoped_restore.
4868         * ada-exp.y (ada_parse): Use scoped_restore.
4869         * utils.h (make_cleanup_clear_parser_state): Remove.
4870
4871 2017-09-06  Keith Seitz  <keiths@redhat.com>
4872
4873         * dwarf2read.c (dw2_linkage_name_attr): New function.
4874         (dw2_linkage_name): New function.
4875         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4876         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4877         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4878
4879 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4880
4881         * config/djgpp/djconfig.sh: Correct shell portability issue.
4882
4883 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4884
4885         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4886
4887 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4888
4889         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4890         * NEWS: Mention new FreeBSD/mips native configuration.
4891         * configure.host: Add aarch64*-*-freebsd*.
4892         * configure.nat: Likewise.
4893         * aarch64-fbsd-nat.c: New file.
4894
4895 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4896
4897         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4898         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4899         * NEWS: Mention new FreeBSD/aarch64 target.
4900         * configure.tgt: Add aarch64*-*-freebsd*.
4901         * aarch64-fbsd-tdep.c: New file.
4902         * aarch64-fbsd-tdep.h: New file.
4903
4904 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4905
4906         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4907
4908 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
4909
4910         * parse.c (find_minsym_type_and_address): Don't relocate addresses
4911         of TLS symbols.
4912
4913 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4914
4915         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4916         call.
4917
4918 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4919
4920         * infrun.c (follow_exec): Call add_thread after
4921         target_find_description.
4922
4923 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4924
4925         * infrun.c (handle_inferior_event_1): When exec'ing, read
4926         stop_pc after follow_exec.
4927
4928 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4929
4930         * remote.c (process_g_packet): Update error message.
4931
4932 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4933
4934         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4935         targets.
4936
4937 2017-09-05  Pedro Alves  <palves@redhat.com>
4938
4939         * eval.c (eval_call, evaluate_funcall): New functions, factored
4940         out from ...
4941         (evaluate_subexp_standard): ... this.
4942
4943 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4944
4945         * amd64-tdep.c (amd64_target_description): Create target
4946         descriptions.
4947         (_initialize_amd64_tdep): Don't call functions
4948         initialize_tdesc_amd64_*.  Add self tests.
4949         * arch/amd64.c (amd64_create_target_description): Add parameter
4950         is_linux.  Call set_tdesc_osabi if is_linux is true.
4951         * arch/amd64.h (amd64_create_target_description): Update the
4952         declaration.
4953         * arch/i386.c (i386_create_target_description): Add parameter
4954         is_linux.  Call set_tdesc_osabi if is_linux is true.
4955         * arch/i386.h (i386_create_target_description): Update
4956         declaration.
4957         * configure.tgt: Add i386.o to gdb_target_obs.
4958         * features/Makefile (XMLTOC): Remove i386/*.xml.
4959         * features/i386/amd64-avx-avx512.c: Remove.
4960         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
4961         * features/i386/amd64-avx-mpx.c: Remove.
4962         * features/i386/amd64-avx.c: Remove.
4963         * features/i386/amd64-mpx.c: Remove.
4964         * features/i386/amd64.c: Remove.
4965         * features/i386/i386-avx-avx512.c: Remove.
4966         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
4967         * features/i386/i386-avx-mpx.c: Remove.
4968         * features/i386/i386-avx.c: Remove.
4969         * features/i386/i386-mmx.c: Remove.
4970         * features/i386/i386-mpx.c: Remove.
4971         * features/i386/i386.c: Remove.
4972         * i386-tdep.c: Don't include features/i386/i386*.c., include
4973         target-descriptions.h and arch/i386.h.
4974         (i386_target_description): Create target descriptions.
4975         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
4976         functions.  Do self tests.
4977
4978 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4979
4980         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
4981         * features/i386/amd64-avx-avx512-linux.c: Removed.
4982         * features/i386/amd64-avx-linux.c: Removed.
4983         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
4984         * features/i386/amd64-avx-mpx-linux.c: Removed.
4985         * features/i386/amd64-linux.c: Removed.
4986         * features/i386/amd64-mpx-linux.c: Removed.
4987         * features/i386/x32-avx-avx512-linux.c: Removed.
4988         * features/i386/x32-avx-linux.c: Removed.
4989         * features/i386/x32-linux.c: Removed.
4990
4991 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4992
4993         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
4994         features/i386/*.c.
4995         (amd64_linux_read_description): Call
4996         amd64_create_target_description.
4997         * arch/amd64.c: New file.
4998         * arch/amd64.h: New file.
4999         * configure.tgt (x86_64-*-linux*): Append amd64.o.
5000         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
5001
5002 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5003
5004         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
5005         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
5006         (amd64_linux_read_description): Create target descriptions.
5007         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
5008         functions.  Add unit tests.
5009         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
5010         x32-core.xml.
5011         * features/i386/64bit-avx.c: Generated.
5012         * features/i386/64bit-avx512.c: Generated.
5013         * features/i386/64bit-core.c: Generated.
5014         * features/i386/64bit-linux.c: Generated.
5015         * features/i386/64bit-mpx.c: Generated.
5016         * features/i386/64bit-pkeys.c: Generated.
5017         * features/i386/64bit-segments.c: Generated.
5018         * features/i386/64bit-sse.c: Generated.
5019         * features/i386/x32-core.c: Generated.
5020         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
5021         c files for amd64-linux and x32-linux.
5022
5023 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5024
5025         * amd64-linux-tdep.c (amd64_linux_read_description): New
5026         function.
5027         (amd64_linux_core_read_description): Call
5028         amd64_linux_read_description.
5029         (amd64_linux_init_abi): Likewise.
5030         (amd64_x32_linux_init_abi): Likewise.
5031         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
5032         * x86-linux-nat.c (x86_linux_read_description): Call
5033         amd64_linux_read_description.
5034
5035 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5036
5037         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
5038         comments.
5039
5040 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5041
5042         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
5043         * features/i386/i386-avx-avx512-linux.c: Remove.
5044         * features/i386/i386-avx-linux.c: Remove.
5045         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
5046         * features/i386/i386-avx-mpx-linux.c: Remove.
5047         * features/i386/i386-linux.c: Remove.
5048         * features/i386/i386-mmx-linux.c: Remove.
5049         * features/i386/i386-mpx-linux.c: Remove.
5050
5051 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5052
5053         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
5054         (SFILES): Add arch/i386.c.
5055         (HFILES_NO_SRCDIR): Add arch/i386.h.
5056         * arch/i386.c: New file.
5057         * arch/i386.h: New file.
5058         * arch/tdesc.h (allocate_target_description): Declare.
5059         (set_tdesc_architecture): Declare.
5060         (set_tdesc_osabi): Declare.
5061         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
5062         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
5063         include arch/i386.h.
5064         (i386_linux_read_description): Remove code and call
5065         i386_create_target_description.
5066         (set_tdesc_architecture): New function.
5067         (set_tdesc_osabi): New function.
5068         * target-descriptions.h (allocate_target_description): Remove.
5069
5070 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5071
5072         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
5073         * target-descriptions.c (tdesc_create_feature): Likewise, and
5074         adjust code.
5075         * features/i386/32bit-avx.c: Re-generated.
5076         * features/i386/32bit-avx512.c: Re-generated.
5077         * features/i386/32bit-core.c: Re-generated.
5078         * features/i386/32bit-linux.c: Re-generated.
5079         * features/i386/32bit-mpx.c: Re-generated.
5080         * features/i386/32bit-pkeys.c: Re-generated.
5081         * features/i386/32bit-sse.c: Re-generated.
5082
5083 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5084
5085         * regformats/regdef.h (struct reg): Override operator == and !=.
5086
5087 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5088
5089         * arch/tdesc.h: New file.
5090         * regformats/regdat.sh: Generate code using tdesc_create_reg.
5091         * target-descriptions.c: Update comments.
5092         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
5093         declarations.
5094         * features/i386/32bit-avx.c: Re-generated.
5095         * features/i386/32bit-avx512.c: Re-generated.
5096         * features/i386/32bit-core.c: Re-generated.
5097         * features/i386/32bit-linux.c: Re-generated.
5098         * features/i386/32bit-mpx.c: Re-generated.
5099         * features/i386/32bit-pkeys.c: Re-generated.
5100         * features/i386/32bit-sse.c: Re-generated.
5101
5102 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5103
5104         * regformats/regdat.sh: Update generated code.
5105
5106 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5107
5108         * regformats/regdat.sh: Adjust code order.
5109
5110 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5111
5112         * expprint.c (dump_subexp_body_standard): Use constant format
5113         string in fprintf_filtered call.
5114
5115 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5116
5117         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
5118         NetBSD/i386.
5119         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
5120
5121 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5122
5123         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
5124
5125 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5126
5127         * bsd-kvm.o: Define _KMEMUSER.
5128         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
5129         * configure: Regenerate.
5130
5131 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5132
5133         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
5134         * i386-fbsd-nat.c: Likewise.
5135
5136 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5137
5138         * unittests/array-view-selftests.c: Add include of <array>.
5139
5140 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5141
5142         * spu-tdep.c (flush_ea_cache): Add missing argument to
5143         call_function_by_hand.
5144
5145 2017-09-04  Pedro Alves  <palves@redhat.com>
5146
5147         * NEWS (Safer support for debugging with no debug info): New.
5148
5149 2017-09-04  Pedro Alves  <palves@redhat.com>
5150
5151         * c-exp.y (function_method, function_method_void): Add current
5152         instance flags to TYPE_INSTANCE.
5153         * dwarf2read.c (check_modifier): New.
5154         (compute_delayed_physnames): Assert that only C++ adds delayed
5155         physnames.  Mark fn_fields as const/volatile depending on
5156         physname.
5157         * eval.c (make_params): New type_instance_flags parameter.  Use
5158         it as the new type's instance flags.
5159         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
5160         flags element and pass it to make_params.
5161         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
5162         instance flags element.
5163         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
5164         * gdbtypes.h: Include "enum-flags.h".
5165         (type_instance_flags): New enum-flags type.
5166         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
5167         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
5168         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
5169         (follow_type_instance_flags): New function.
5170         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
5171         * parser-defs.h (follow_type_instance_flags): Declare.
5172         * valops.c (value_struct_elt_for_reference): const/volatile must
5173         match too.
5174
5175 2017-09-04  Pedro Alves  <palves@redhat.com>
5176
5177         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
5178         function/method scopes; lookup the nested name as a function local
5179         static variable.
5180
5181 2017-09-04  Pedro Alves  <palves@redhat.com>
5182
5183         (%type <voidval>): Add function_method.
5184         * c-exp.y (exp): New production for calls with no arguments.
5185         (function_method, function_method_void_or_typelist): New
5186         productions.
5187         (exp): New production for "method()::static_var".
5188         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
5189         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5190         Handle OP_FUNC_STATIC_VAR.
5191         * parse.c (operator_length_standard):
5192         Handle OP_FUNC_STATIC_VAR.
5193
5194 2017-09-04  Pedro Alves  <palves@redhat.com>
5195
5196         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
5197         handling.
5198         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5199         Ditto.
5200         * parse.c (operator_length_standard, operator_check_standard):
5201         Ditto.
5202         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
5203
5204 2017-09-04  Pedro Alves  <palves@redhat.com>
5205
5206         * ax-gdb.c: Include "typeprint.h".
5207         (gen_expr_for_cast): New function.
5208         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
5209         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
5210         type is unknown.
5211         * dwarf2read.c (new_symbol_full): Fallback to int instead of
5212         nodebug_data_symbol.
5213         * eval.c: Include "typeprint.h".
5214         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
5215         Error out if symbol has unknown type.
5216         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
5217         evaluate_subexp_for_cast.
5218         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
5219         OP_VAR_MSYM_VALUE.
5220         (evaluate_subexp_for_cast): New function.
5221         * gdbtypes.c (init_nodebug_var_type): New function.
5222         (objfile_type): Use it to initialize types of variables with no
5223         debug info.
5224         * typeprint.c (error_unknown_type): New.
5225         * typeprint.h (error_unknown_type): New declaration.
5226         * compile/compile-c-types.c (convert_type_basic): Handle
5227         TYPE_CODE_ERROR; warn and fallback to int for variables with
5228         unknown type.
5229
5230 2017-09-04  Pedro Alves  <palves@redhat.com>
5231
5232         * eval.c (evaluate_var_value): New function, factored out from ...
5233         (evaluate_subexp_standard): ... here.
5234
5235 2017-09-04  Pedro Alves  <palves@redhat.com>
5236
5237         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
5238         Remove useless assignments to 'op'.
5239
5240 2017-09-04  Pedro Alves  <palves@redhat.com>
5241
5242         * eval.c (eval_skip_value): New function.
5243         (evaluate_subexp_standard): Use it.
5244
5245 2017-09-04  Pedro Alves  <palves@redhat.com>
5246
5247         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
5248         function name from symbol/minsym and pass it to
5249         error_call_unknown_return_type.
5250
5251 2017-09-04  Pedro Alves  <palves@redhat.com>
5252
5253         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
5254         * ax-gdb.c (gen_msym_var_ref): New function.
5255         (gen_expr): Handle OP_VAR_MSYM_VALUE.
5256         * eval.c (evaluate_var_msym_value): New function.
5257         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
5258         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
5259         to call_function_by_hand.
5260         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5261         Handle OP_VAR_MSYM_VALUE.
5262         (union exp_element) <msymbol>: New field.
5263         * minsyms.h (struct type): Forward declare.
5264         (find_minsym_type_and_address): Declare.
5265         * parse.c (write_exp_elt_msym): New function.
5266         (write_exp_msymbol): Delete, refactored as ...
5267         (find_minsym_type_and_address): ... this new function.
5268         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
5269         (operator_length_standard, operator_check_standard): Handle
5270         OP_VAR_MSYM_VALUE.
5271         * std-operator.def (OP_VAR_MSYM_VALUE): New.
5272
5273 2017-09-04  Pedro Alves  <palves@redhat.com>
5274
5275         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
5276         TYPE_GNU_IFUNC specially here.  Throw error if return type is
5277         unknown.
5278         * ada-typeprint.c (print_func_type): Handle functions with unknown
5279         return type.
5280         * c-typeprint.c (c_type_print_base): Handle functions and methods
5281         with unknown return type.
5282         * compile/compile-c-symbols.c (convert_symbol_bmsym)
5283         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
5284         * compile/compile-c-types.c: Include "objfiles.h".
5285         (convert_func): For functions with unknown return type, warn and
5286         default to int.
5287         * compile/compile-object-run.c (compile_object_run): Adjust call
5288         to call_function_by_hand_dummy.
5289         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
5290         call_function_by_hand.
5291         * eval.c (evaluate_subexp_standard): Adjust calls to
5292         call_function_by_hand.  Handle functions and methods with unknown
5293         return type.  Pass expect_type to call_function_by_hand.
5294         * f-typeprint.c (f_type_print_base): Handle functions with unknown
5295         return type.
5296         * gcore.c (call_target_sbrk): Adjust call to
5297         call_function_by_hand.
5298         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
5299         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
5300         an integer address type instead of nodebug.
5301         * guile/scm-value.c (gdbscm_value_call): Adjust call to
5302         call_function_by_hand.
5303         * infcall.c (error_call_unknown_return_type): New function.
5304         (call_function_by_hand): New "default_return_type" parameter.
5305         Pass it down.
5306         (call_function_by_hand_dummy): New "default_return_type"
5307         parameter.  Use it instead of defaulting to int.  If there's no
5308         default and the return type is unknown, throw an error.  If
5309         there's a default return type, and the called function has no
5310         debug info, then assume the function is prototyped.
5311         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
5312         New "default_return_type" parameter.
5313         (error_call_unknown_return_type): New declaration.
5314         * linux-fork.c (call_lseek): Cast return type of lseek.
5315         (inferior_call_waitpid, checkpoint_command): Adjust calls to
5316         call_function_by_hand.
5317         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
5318         calls to call_function_by_hand.
5319         * m2-typeprint.c (m2_procedure): Handle functions with unknown
5320         return type.
5321         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5322         (value_nsstring, print_object_command): Adjust calls to
5323         call_function_by_hand.
5324         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
5325         functions with unknown return type.
5326         (pascal_type_print_func_varspec_suffix): New function.
5327         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
5328         TYPE_CODE_METHOD>: Use it.
5329         * python/py-value.c (valpy_call): Adjust call to
5330         call_function_by_hand.
5331         * rust-lang.c (rust_evaluate_funcall): Adjust call to
5332         call_function_by_hand.
5333         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
5334         call_function_by_hand.
5335         * valops.c (value_allocate_space_in_inferior): Adjust call to
5336         call_function_by_hand.
5337         * typeprint.c (type_print_unknown_return_type): New function.
5338         * typeprint.h (type_print_unknown_return_type): New declaration.
5339
5340 2017-09-04  Pedro Alves  <palves@redhat.com>
5341
5342         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
5343         types with more than one parameter as prototyped.
5344
5345 2017-09-04  Pedro Alves  <palves@redhat.com>
5346
5347         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
5348         (disassemble_command): Use gdb_disassembly_flags instead of bare
5349         int.
5350         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
5351         (dump_insns, do_mixed_source_and_assembly_deprecated)
5352         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
5353         Use gdb_disassembly_flags instead of bare int.
5354         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
5355         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
5356         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
5357         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
5358         (enum gdb_disassembly_flag): ... values of this new enumeration.
5359         (gdb_disassembly_flags): Define.
5360         (gdb_disassembly)
5361         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
5362         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
5363         gdb_disassembly_flags instead of bare int.
5364         * record-btrace.c (btrace_insn_history)
5365         (record_btrace_insn_history, record_btrace_insn_history_range)
5366         (record_btrace_insn_history_from): Use gdb_disassembly_flags
5367         instead of bare int.
5368         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
5369         Use gdb_disassembly_flags instead of bare int.
5370         * target-debug.h (target_debug_print_gdb_disassembly_flags):
5371         Define.
5372         * target-delegates.c: Regenerate.
5373         * target.c (target_insn_history, target_insn_history_from)
5374         (target_insn_history_range): Use gdb_disassembly_flags instead of
5375         bare int.
5376         * target.h: Include "disasm.h".
5377         (struct target_ops) <to_insn_history, to_insn_history_from,
5378         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
5379         int.
5380         (target_insn_history, target_insn_history_from)
5381         (target_insn_history_range): Use gdb_disassembly_flags instead of
5382         bare int.
5383
5384 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5385
5386         * cli/cli-script.c (build_command_line): For if/while commands,
5387         check whether args is empty.
5388
5389 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5390
5391         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
5392         (enum command_control_type): Likewise.
5393         (struct command_line): Likewise.
5394         (free_command_lines): Likewise.
5395         (struct command_lines_deleter): Likewise.
5396         (command_line_up): Likewise.
5397         (read_command_lines): Likewise.
5398         (read_command_lines_1): Likewise.
5399         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
5400         (enum command_control_type): Likewise.
5401         (struct command_line): Likewise.
5402         (free_command_lines): Likewise.
5403         (struct command_lines_deleter): Likewise.
5404         (command_line_up): Likewise.
5405         (read_command_lines): Likewise.
5406         (read_command_lines_1): Likewise.
5407         * breakpoint.h: Include cli/cli-script.h.
5408         * extension-priv.h: Likewise.
5409         * gdbcmd.h: Likewise.
5410
5411 2017-09-04  Pedro Alves  <palves@redhat.com>
5412
5413         * ada-lang.c (is_known_support_routine): Move sal declaration to
5414         where it is initialized.
5415         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
5416         (parse_breakpoint_sals, decode_static_tracepoint_spec)
5417         (clear_command, update_static_tracepoint): Remove init_sal
5418         references.  Move declarations closer to initializations.
5419         * cli/cli-cmds.c (list_command): Move sal declarations closer to
5420         initializations.
5421         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
5422         references.  Move sal declarations closer to initializations.
5423         * frame.c (find_frame_sal): Return a symtab_and_line via function
5424         return instead of output parameter.  Remove init_sal references.
5425         * frame.h (find_frame_sal): Return a symtab_and_line via function
5426         return instead of output parameter.
5427         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
5428         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
5429         instead of memset.
5430         (gdbscm_find_pc_line): Remove init_sal reference.
5431         * infcall.c (call_function_by_hand_dummy): Remove init_sal
5432         references.  Move declarations closer to initializations.
5433         * infcmd.c (set_step_frame): Update.  Move declarations closer to
5434         initializations.
5435         (finish_backward): Remove init_sal references.  Move declarations
5436         closer to initializations.
5437         * infrun.c (process_event_stop_test, handle_step_into_function)
5438         (insert_hp_step_resume_breakpoint_at_frame)
5439         (insert_step_resume_breakpoint_at_caller): Likewise.
5440         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
5441         (symbol_to_sal): Likewise.
5442         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
5443         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
5444         to its initialization.
5445         * reverse.c (save_bookmark_command): Use new/delete.  Remove
5446         init_sal references.  Move declarations closer to initializations.
5447         * source.c (get_current_source_symtab_and_line): Remove brace
5448         initialization.
5449         (set_current_source_symtab_and_line): Now takes the sal by const
5450         reference.  Remove brace initialization.
5451         (line_info): Remove init_sal reference.
5452         * source.h (set_current_source_symtab_and_line): Now takes a
5453         symtab_and_line via const reference.
5454         * stack.c (set_current_sal_from_frame): Adjust.
5455         (print_frame_info): Adjust.
5456         (get_last_displayed_sal): Return the sal via function return
5457         instead of via output parameter.  Simplify.
5458         (frame_info): Adjust.
5459         * stack.h (get_last_displayed_sal): Return the sal via function
5460         return instead of via output parameter.
5461         * symtab.c (init_sal): Delete.
5462         (find_pc_sect_line): Remove init_sal references.  Move
5463         declarations closer to initializations.
5464         (find_function_start_sal): Remove init_sal references.  Move
5465         declarations closer to initializations.
5466         * symtab.h (struct symtab_and_line): In-class initialize all
5467         fields.
5468         * tracepoint.c (set_traceframe_context)
5469         (print_one_static_tracepoint_marker): Remove init_sal references.
5470         Move declarations closer to initializations.
5471         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
5472         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
5473         declarations closer to initializations.
5474         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
5475         init_sal references.  Adjust.
5476
5477 2017-09-04  Pedro Alves  <palves@redhat.com>
5478
5479         * ax-gdb.c (agent_command_1): Use range-for.
5480         * break-catch-throw.c (re_set_exception_catchpoint): Update.
5481         * breakpoint.c: Include "common/array-view.h".
5482         (init_breakpoint_sal, create_breakpoint_sal): Change sals
5483         parameter from struct symtabs_and_lines to
5484         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
5485         (breakpoint_sals_to_pc): Change sals parameter from struct
5486         symtabs_and_lines to std::vector reference.
5487         (check_fast_tracepoint_sals): Change sals parameter from struct
5488         symtabs_and_lines to std::array_view.  Use range-for.
5489         (decode_static_tracepoint_spec): Return a std::vector instead of
5490         symtabs_and_lines.  Update.
5491         (create_breakpoint): Update.
5492         (break_range_command, until_break_command, clear_command): Update.
5493         (base_breakpoint_decode_location, bkpt_decode_location)
5494         (bkpt_probe_create_sals_from_location)
5495         (bkpt_probe_decode_location, tracepoint_decode_location)
5496         (tracepoint_probe_decode_location)
5497         (strace_marker_create_sals_from_location): Return a std::vector
5498         instead of symtabs_and_lines.
5499         (strace_marker_create_breakpoints_sal): Update.
5500         (strace_marker_decode_location): Return a std::vector instead of
5501         symtabs_and_lines.  Update.
5502         (update_breakpoint_locations): Change struct symtabs_and_lines
5503         parameters to gdb::array_view.  Adjust.
5504         (location_to_sals): Return a std::vector instead of
5505         symtabs_and_lines.  Update.
5506         (breakpoint_re_set_default): Use std::vector instead of struct
5507         symtabs_and_lines.
5508         (decode_location_default): Return a std::vector instead of
5509         symtabs_and_lines.  Update.
5510         * breakpoint.h: Include "common/array-view.h".
5511         (struct breakpoint_ops) <decode_location>: Now returns a
5512         std::vector instead of returning a symtabs_and_lines via output
5513         parameter.
5514         (update_breakpoint_locations): Change sals parameters to use
5515         gdb::array_view.
5516         * cli/cli-cmds.c (edit_command, list_command): Update to use
5517         std::vector and gdb::array_view.
5518         (ambiguous_line_spec): Adjust to use gdb::array_view and
5519         range-for.
5520         (compare_symtabs): Rename to ...
5521         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
5522         const reference and adjust.
5523         (filter_sals): Rewrite using std::vector and standard algorithms.
5524         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
5525         (jump_command): Update to use std::vector.
5526         * linespec.c (struct linespec_state) <canonical_names>: Update
5527         comment.
5528         (add_sal_to_sals_basic): Delete.
5529         (add_sal_to_sals, filter_results, convert_results_to_lsals)
5530         (decode_line_2, create_sals_line_offset)
5531         (convert_address_location_to_sals, convert_linespec_to_sals)
5532         (convert_explicit_location_to_sals, parse_linespec)
5533         (event_location_to_sals, decode_line_full, decode_line_1)
5534         (decode_line_with_current_source)
5535         (decode_line_with_last_displayed, decode_objc)
5536         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
5537         (linespec_result::~linespec_result): Adjust to use std::vector
5538         instead of symtabs_and_lines.
5539         * linespec.h (linespec_sals::sals): Now a std::vector.
5540         (struct linespec_result): Use std::vector, bool, and in-class
5541         initialization.
5542         (decode_line_1, decode_line_with_current_source)
5543         (decode_line_with_last_displayed): Return std::vector.
5544         * macrocmd.c (info_macros_command): Use std::vector.
5545         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
5546         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
5547         std::vector.
5548         * probe.h (parse_probes): Return a std::vector.
5549         * python/python.c (gdbpy_decode_line): Use std::vector and
5550         gdb::array_view.
5551         * source.c (select_source_symtab, line_info): Use std::vector.
5552         * stack.c (func_command): Use std::vector.
5553         * symtab.h (struct symtabs_and_lines): Delete.
5554         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
5555
5556 2017-09-04  Pedro Alves  <palves@redhat.com>
5557
5558         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5559         unittests/array-view-selftests.c.
5560         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5561         * common/array-view.h: New file.
5562         * unittests/array-view-selftests.c: New file.
5563
5564 2017-09-04  Pedro Alves  <palves@redhat.com>
5565
5566         * cli/cli-cmds.c (edit_command): Pass message to
5567         ambiguous_line_spec.
5568         (list_command): Pass message to ambiguous_line_spec.  Say
5569         "first"/"last" instead of "start" and "end" to be consistent with
5570         the manual.
5571         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
5572         them to print formatted message.
5573
5574 2017-09-04  Pedro Alves  <palves@redhat.com>
5575
5576         * btrace.c (ftrace_add_pt): Pass btrace_insn to
5577         ftrace_update_insns by reference instead of pointer.
5578
5579 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5580
5581         * i386-go32-tdep.c: Include x86-xstate.h.
5582         (i386_go32_init_abi): Call i386_target_description.
5583         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5584         if xcr0 is X86_XSTATE_X87_MASK.
5585         * i386-tdep.h (tdesc_i386): Remove the declaration.
5586         (tdesc_i386_mmx): Likewise.
5587
5588 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5589
5590         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5591         X86_XSTATE_SSE_MASK instead of 0.
5592
5593 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5594
5595         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5596         i386_target_description.
5597         * i386-fbsd-nat.c (i386fbsd_read_description): Call
5598         i386_target_description.
5599         * i386-tdep.c (i386_gdbarch_init): Likewise.
5600
5601 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5602
5603         * amd64-darwin-tdep.c: Include "x86-xstate.h".
5604         (x86_darwin_init_abi_64): Call amd64_target_description.
5605         * amd64-dicos-tdep.c: Likewise.
5606         * amd64-fbsd-nat.c: Likewise.
5607         * amd64-fbsd-tdep.c: Likewise.
5608         * amd64-nbsd-tdep.c: Likewise.
5609         * amd64-obsd-tdep.c: Likewise.
5610         * amd64-sol2-tdep.c: Likewise.
5611         * amd64-windows-tdep.c: Likewise.
5612         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5613
5614 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5615
5616         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5617         (btrace_function) <insn>: Change type to use std::vector.
5618         * btrace.c (ftrace_debug, ftrace_call_num_insn,
5619         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5620         ftrace_update_insns, ftrace_compute_global_level_offset,
5621         btrace_stitch_bts, btrace_clear, btrace_insn_get,
5622         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5623         change to std::vector.
5624         (ftrace_update_insns): Adjust to change to std::vector, change
5625         type of INSN parameter.
5626         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5627         * record-btrace.c (btrace_call_history_insn_range,
5628         btrace_compute_src_line_range,
5629         record_btrace_frame_prev_register): Adjust to change to
5630         std::vector.
5631         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5632         to change to std::vector.
5633
5634 2017-09-03  Tom Tromey  <tom@tromey.com>
5635
5636         * corefile.c (reopen_exec_file): Use std::string.
5637
5638 2017-09-03  Tom Tromey  <tom@tromey.com>
5639
5640         * compile/compile.c (compile_register_name_mangled): Return
5641         std::string.
5642         * compile/compile-loc2c.c (pushf_register_address): Update.
5643         (pushf_register): Update.
5644         * compile/compile-c-types.c (convert_array): Update.
5645         * compile/compile-c-symbols.c (generate_vla_size): Update.
5646         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5647         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5648         (convert_one_symbol): Update.
5649         (generate_c_for_for_one_variable): Update.
5650         * compile/compile-c-support.c (c_get_range_decl_name): Return a
5651         std::string.
5652         (generate_register_struct): Update.
5653         * compile/compile-internal.h (c_get_range_decl_name): Return a
5654         std::string.
5655         (compile_register_name_mangled): Return std::string.
5656
5657 2017-09-03  Tom Tromey  <tom@tromey.com>
5658
5659         * utils.c (perror_string): Return a std::string.
5660         (throw_perror_with_name, perror_warning_with_name): Update.
5661
5662 2017-09-03  Tom Tromey  <tom@tromey.com>
5663
5664         * demangle.c (demangle_command): Use std::string,
5665         unique_xmalloc_ptr.
5666
5667 2017-09-03  Tom Tromey  <tom@tromey.com>
5668
5669         * cli/cli-setshow.c (do_set_command): Use std::string.
5670
5671 2017-09-03  Tom Tromey  <tom@tromey.com>
5672
5673         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5674
5675 2017-09-03  Tom Tromey  <tom@tromey.com>
5676
5677         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5678
5679 2017-09-03  Tom Tromey  <tom@tromey.com>
5680
5681         * mi/mi-cmd-env.c (env_execute_cli_command): Use
5682         gdb::unique_xmalloc_ptr.
5683
5684 2017-09-03  Tom Tromey  <tom@tromey.com>
5685
5686         * thread.c (print_thread_info_1): Use string_printf.
5687         (thread_apply_command, thread_apply_all_command): Use
5688         std::string.
5689
5690 2017-09-03  Tom Tromey  <tom@tromey.com>
5691
5692         * valprint.c (val_print_string): Update.
5693         * gdbcore.h (memory_error_message): Return std::string.
5694         * corefile.c (memory_error_message): Return std::string.
5695         (memory_error): Update.
5696         * breakpoint.c (insert_bp_location): Update.
5697
5698 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
5699
5700         * target/waitstatus.h (target_waitstatus_to_string): Change
5701         return type to std::string.
5702         * target/waitstatus.c (target_waitstatus_to_string): Return
5703         std::string.
5704         * target.h (target_waitstatus_to_string): Remove declaration.
5705         * infrun.c (resume, clear_proceed_status_thread,
5706         print_target_wait_results, do_target_wait, save_waitstatus,
5707         stop_all_threads): Adjust.
5708         * record-btrace.c (record_btrace_wait): Adjust.
5709         * target-debug.h
5710         (target_debug_print_struct_target_waitstatus_p): Adjust.
5711
5712 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
5713
5714         PR gdb/22046
5715         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5716         detection.
5717
5718 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
5719
5720         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5721         for setting/unsetting environment variables on the remote target.
5722         (New remote packets): Add entries for QEnvironmentHexEncoded,
5723         QEnvironmentUnset and QEnvironmentReset.
5724         * common/environ.c (gdb_environ::operator=): Extend method to
5725         handle m_user_set_env_list and m_user_unset_env_list.
5726         (gdb_environ::clear): Likewise.
5727         (match_var_in_string): Change type of first parameter from 'char
5728         *' to 'const char *'.
5729         (gdb_environ::set): Extend method to handle
5730         m_user_set_env_list and m_user_unset_env_list.
5731         (gdb_environ::unset): Likewise.
5732         (gdb_environ::clear_user_set_env): New method.
5733         (gdb_environ::user_set_envp): Likewise.
5734         (gdb_environ::user_unset_envp): Likewise.
5735         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5736         m_user_unset_env_list on move constructor/assignment.
5737         (unset): Add new default parameter 'update_unset_list = true'.
5738         (clear_user_set_env): New method.
5739         (user_set_envp): Likewise.
5740         (user_unset_envp): Likewise.
5741         (m_user_set_env_list): New std::set.
5742         (m_user_unset_env_list): Likewise.
5743         * common/rsp-low.c (hex2str): New function.
5744         (bin2hex): New overload for bin2hex function.
5745         * common/rsp-low.c (hex2str): New prototype.
5746         (str2hex): New overload prototype.
5747         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5748         QEnvironmentUnset and QEnvironmentReset.
5749         (remote_protocol_features): Add QEnvironmentHexEncoded,
5750         QEnvironmentUnset and QEnvironmentReset packets.
5751         (send_environment_packet): New function.
5752         (extended_remote_environment_support): Likewise.
5753         (extended_remote_create_inferior): Call
5754         extended_remote_environment_support.
5755         (_initialize_remote): Add QEnvironmentHexEncoded,
5756         QEnvironmentUnset and QEnvironmentReset packet configs.
5757         * unittests/environ-selftests.c (gdb_selftest_env_var):
5758         New variable.
5759         (test_vector_initialization): New function.
5760         (test_init_from_host_environ): Likewise.
5761         (test_reinit_from_host_environ): Likewise.
5762         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5763         Likewise.
5764         (test_unset_set_empty_vector): Likewise.
5765         (test_vector_clear): Likewise.
5766         (test_std_move): Likewise.
5767         (test_move_constructor):
5768         (test_self_move): Likewise.
5769         (test_set_unset_reset): Likewise.
5770         (run_tests): Rewrite in terms of the functions above.
5771
5772 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
5773
5774         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5775         (adi_available): Use a temp variable of type CORE_ADDR as argument
5776         3 when calling target_auxv_search.
5777         (adi_normalize_address): Use masks and xor operators to calculate
5778         normalized address.
5779         (adi_read_versions, adi_write_versions, adi_print_versions)
5780         (do_examine, do_assign): Use paddress.
5781
5782 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
5783
5784         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5785         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5786         out of loop and add supply of FIR.
5787         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5788         add collect of FIR.
5789
5790 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
5791
5792         PR gdb/21827
5793         * cli/cli-script.c (define_command): Don't convert command name
5794         to lower case.
5795
5796 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
5797
5798         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5799         Update all callers accordingly. Remove all code blocks handling
5800         the case where DISPP is not NULL.
5801
5802 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5803
5804         PR symtab/22003
5805         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5806         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5807         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5808
5809 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5810
5811         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5812         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5813         (read_comp_units_from_section): New parameter abbrev_section, use
5814         read_and_check_comp_unit_head, allocate signatured_type if needed.
5815         (create_all_comp_units): Update read_comp_units_from_section caller.
5816
5817 2017-08-23  Pedro Alves  <palves@redhat.com>
5818
5819         PR remote/21852
5820         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5821         to null_ptid and switch to thread without reading the registers
5822         after adding the inferior.
5823
5824 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5825
5826         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5827         compile-gcc.
5828         * compile/compile.c (compile_gcc, show_compile_gcc): New.
5829         (compile_to_object): Implement compile_gcc.
5830         (_initialize_compile): Install "set compile-gcc".  Initialize
5831         compile_gcc.
5832
5833 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5834
5835         * compile/compile.c (compile_to_object): Conditionally call
5836         set_verbose.  Conditionally call compile or compile_v0.
5837
5838 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
5839
5840         * sparc64-tdep.h: (adi_normalize_address): New export.
5841         * sparc-nat.h: (open_adi_tag_fd): New export.
5842         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5843         * sparc64-linux-tdep.c:
5844         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5845         (sparc64_linux_handle_segmentation_fault): New function.
5846         (sparc64_linux_init_abi): Register
5847         sparc64_linux_handle_segmentation_fault
5848         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5849         (sparc64_addr_bits_remove): New function.
5850         (sparc64_init_abi): Register sparc64_addr_bits_remove.
5851         (MAX_PROC_NAME_SIZE): New macro.
5852         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5853         (sparc64adilist): New variable.
5854         (adi_proc_list): New variable.
5855         (find_adi_info): New function.
5856         (add_adi_info): New function.
5857         (get_adi_info_proc): New function.
5858         (get_adi_info): New function.
5859         (info_adi_command): New function.
5860         (read_maps_entry): New function.
5861         (adi_available): New function.
5862         (adi_normalize_address): New function.
5863         (adi_align_address): New function.
5864         (adi_convert_byte_count): New function.
5865         (adi_tag_fd): New function.
5866         (adi_is_addr_mapped): New function.
5867         (adi_read_versions): New function.
5868         (adi_write_versions): New function.
5869         (adi_print_versions): New function.
5870         (do_examine): New function.
5871         (do_assign): New function.
5872         (adi_examine_command): New function.
5873         (adi_assign_command): New function.
5874         (_initialize_sparc64_adi_tdep): New function.
5875
5876 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
5877
5878         * breakpoint.c (breakpoints_info): Rename to ...
5879         (info_breakpoints_command): ... this.
5880         (watchpoints_info): Rename to ...
5881         (info_watchpoints_command): ... this.
5882         (tracepoints_info): Rename to ...
5883         (info_tracepoints_command): ... this.
5884         (_initialize_breakpoint): Adjust.
5885         * dcache.c (dcache_info): Rename to ...
5886         (info_display_command): ... this.
5887         (_initialize_dcache): Adjust.
5888         * frame.h (args_info): Rename to ...
5889         (info_args_command): ... this.
5890         (locals_info): Rename to ...
5891         (info_locals_command): ... this.
5892         * infcmd.c (nofp_registers_info): Rename to ...
5893         (info_registers_command): ... this.
5894         (float_info): Rename to ...
5895         (info_float_command): ... this.
5896         (program_info): Rename to ...
5897         (info_program_command): ... this.
5898         (all_registers_info): Rename to ...
5899         (info_all_registers_command): ... this.
5900         (vector_info): Rename to ...
5901         (info_vector_command): ... this.
5902         (float_info): Rename to ...
5903         (info_float_command): ... this.
5904         (_initialize_infcmd): Adjust.
5905         * inferior.h (term_info): Rename to ...
5906         (info_terminal_command): ... this.
5907         * inflow.c (term_info): Rename to ...
5908         (info_terminal_command): ... this.
5909         (_initialize_inflow): Adjust.
5910         * infrun.c (signals_info): Rename to ...
5911         (info_signals_command): ... this.
5912         (_initialize_infrun): Adjust.
5913         * objc-lang.c (classes_info): Rename to ...
5914         (info_classes_command): ... this.
5915         (selectors_info): Rename to ...
5916         (info_selectors_command): ... this.
5917         (_initialize_objc_language): Adjust.
5918         * printcmd.c (sym_info): Rename to ...
5919         (info_symbol_command): ... this.
5920         (address_info): Rename to ...
5921         (info_address_command): ... this.
5922         (display_info): Rename to ...
5923         (info_display_command): ... this.
5924         (_initialize_printcmd): Adjust.
5925         * reverse.c (bookmarks_info): Rename to ...
5926         (info_breakpoints_command): ... this.
5927         (_initialize_reverse): Adjust.
5928         * ser-go32.c (dos_info): Rename to ...
5929         (info_serial_command): ... this.
5930         (_initialize_ser_dos): Adjust.
5931         * skip.c (skip_info): Rename to ...
5932         (info_skip_command): ... this.
5933         (_initialize_step_skip): Adjust.
5934         * source.c (line_info): Rename to ...
5935         (info_line_command): ... this.
5936         (source_info): Rename to ...
5937         (info_source_command)
5938         * stack.c (frame_info): Rename to ...
5939         (info_frame_command): ... this.
5940         (locals_info): Rename to ...
5941         (info_locals_command): ... this.
5942         (args_info): Rename to ...
5943         (info_args_command): ... this.
5944         (_initialize_stack): Adjust.
5945         * symtab.c (sources_info): Rename to ...
5946         (info_sources_command): ... this.
5947         (variables_info): Rename to ...
5948         (info_variables_command): ... this.
5949         (functions_info): Rename to ...
5950         (info_functions_command): ... this.
5951         (types_info): Rename to ...
5952         (info_types_command): ... this.
5953         (_initialize_symtab): Adjust.
5954         * target.c (target_info): Rename to ...
5955         (info_target_command): ... this.
5956         (initialize_targets): Adjust.
5957         * tracepoint.c (tvariables_info): Rename to ...
5958         (info_tvariables_command): ... this.
5959         (scope_info): Rename to ...
5960         (info_scope_command): ... this.
5961         (trace_dump_actions): Adjust.
5962         (_initialize_tracepoint): Adjust.
5963
5964 2017-08-22  Tom Tromey  <tom@tromey.com>
5965
5966         * breakpoint.h (install_breakpoint): Update.
5967         * breakpoint.c (add_solib_catchpoint): Update.
5968         (install_breakpoint): Change argument to a std::unique_ptr.
5969         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
5970         (create_breakpoint_sal, create_breakpoint): Update.
5971         (watch_command_1, catch_exec_command_1)
5972         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
5973         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
5974         Return the breakpoint.
5975         (set_raw_breakpoint_without_location, set_raw_breakpoint)
5976         (new_single_step_breakpoint): Update.
5977         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
5978         std::unique_ptr.
5979         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5980         std::unique_ptr.
5981         * break-catch-sig.c (create_signal_catchpoint): Use
5982         std::unique_ptr.
5983         * ada-lang.c (create_ada_exception_catchpoint): Use
5984         std::unique_ptr.
5985
5986 2017-08-22  Tom Tromey  <tom@tromey.com>
5987
5988         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
5989
5990 2017-08-22  Tom Tromey  <tom@tromey.com>
5991
5992         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
5993         (lookup_partial_symbol): Update.
5994
5995 2017-08-22  Tom Tromey  <tom@tromey.com>
5996
5997         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
5998         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
5999         (find_and_open_source, symtab_to_fullname): Update.
6000         * psymtab.c (psymtab_to_fullname): Update.
6001
6002 2017-08-22  Tom Tromey  <tom@tromey.com>
6003
6004         * exec.c (exec_file_attach): Update.
6005         * linux-thread-db.c (try_thread_db_load): Update.
6006         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
6007         * utils.c (gdb_realpath): Change return type.
6008         (gdb_realpath_keepfile): Update.
6009         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
6010         (_initialize_utils): Register the new self test.
6011         * source.c (openp): Update.
6012         (find_and_open_source): Update.
6013         * nto-tdep.c (nto_find_and_open_solib): Update.
6014         * main.c (set_gdb_data_directory): Update.
6015         (captured_main_1): Update.
6016         * dwarf2read.c (dwarf2_get_dwz_file): Update
6017         (dw2_map_symbol_filenames): Update.
6018         * auto-load.c (auto_load_safe_path_vec_update): Update.
6019         (filename_is_in_auto_load_safe_path_vec): Change type of
6020         "filename_realp".
6021         (auto_load_objfile_script): Update.
6022         (file_is_auto_load_safe): Update.  Use std::string.
6023         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
6024
6025 2017-08-22  Tom Tromey  <tom@tromey.com>
6026
6027         * utils.c (gdb_realpath_keepfile): Return a
6028         gdb::unique_xmalloc_ptr.
6029         * exec.c (exec_file_attach): Update.
6030         * utils.h (gdb_realpath_keepfile): Return a
6031         gdb::unique_xmalloc_ptr.
6032
6033 2017-08-22  Tom Tromey  <tom@tromey.com>
6034
6035         * compile/compile.c (compile_file_command): Use
6036         gdb::unique_xmalloc_ptr, std::string.
6037         * utils.c (gdb_abspath): Change return type.
6038         * source.c (openp): Update.
6039         * objfiles.c (allocate_objfile): Update.
6040         * main.c (set_gdb_data_directory): Update.
6041         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
6042
6043 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
6044
6045         * cli-cmds.c (list_commands): List actual code around more than
6046         one location.
6047
6048 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
6049
6050         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
6051
6052 2017-08-21  Pedro Alves  <palves@redhat.com>
6053
6054         PR gdb/19487
6055         * c-exp.y (variable production): Handle function aliases.
6056         * minsyms.c (msymbol_is_text): New function.
6057         * minsyms.h (msymbol_is_text): Declare.
6058         * symtab.c (find_function_alias_target): New function.
6059         * symtab.h (find_function_alias_target): Declare.
6060
6061 2017-08-21  Pedro Alves  <palves@redhat.com>
6062
6063         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
6064         typedefs.
6065         * typeprint.c (whatis_exp): If handling "whatis", and expression
6066         is OP_TYPE, strip one typedef level.  Otherwise don't strip
6067         typedefs here.
6068         * valops.c (value_cast): Save "to" type before resolving
6069         stubs/typedefs.  Use that type as resulting value's type.
6070
6071 2017-08-18  Tom Tromey  <tom@tromey.com>
6072             Pedro Alves  <palves@redhat.com>
6073
6074         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
6075         * sol-thread.c (sol_thread_resume, sol_thread_wait)
6076         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
6077         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
6078         * proc-service.c (ps_xfer_memory): Use scoped_restore.
6079         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
6080         (linux_get_siginfo_data): Add "thread" argument.  Use
6081         scoped_restore.
6082         * linux-nat.c (linux_child_follow_fork)
6083         (check_stopped_by_watchpoint): Use scoped_restore.
6084         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
6085         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
6086         (restore_inferior_ptid, save_inferior_ptid): Remove.
6087         * btrace.c (btrace_fetch): Use scoped_restore.
6088         * bsd-uthread.c (bsd_uthread_fetch_registers)
6089         (bsd_uthread_store_registers): Use scoped_restore.
6090         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
6091         scoped_restore.
6092         * aix-thread.c (aix_thread_resume, aix_thread_wait)
6093         (aix_thread_xfer_partial): Use scoped_restore.
6094         * inferior.h (save_inferior_ptid): Remove.
6095
6096 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6097
6098         PR tdep/21818
6099         * arm-tdep.c (gdb_print_insn_arm): Mark
6100         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
6101
6102 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6103
6104         * NEWS: Mention GDBserver's new option "--selftest".
6105         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
6106         * selftest.c: Move it to common/selftest.c.
6107         * selftest.h: Move it to common/selftest.h.
6108         * selftest-arch.c (reset): New function.
6109         (tests_with_arch): Call reset.
6110
6111 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6112
6113         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
6114         instead of exception_fprintf and printf_filtered.
6115
6116 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6117
6118         * selftest.c (register_self_test): Rename it to
6119         selftests::register_test.
6120         (run_self_tests): selftest::run_tests.
6121         * selftest.h: Update declarations.
6122         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
6123         selftests::register_test_foreach_arch.
6124         * selftest-arch.h: Update declaration.
6125         * aarch64-tdep.c: Update.
6126         * arm-tdep.c: Likewise.
6127         * disasm-selftests.c: Likewise.
6128         * dwarf2loc.c: Likewise.
6129         * dwarf2-frame.c: Likewise.
6130         * findvar.c: Likewise.
6131         * gdbarch-selftests.c: Likewise.
6132         * maint.c (maintenance_selftest): Likewise.
6133         * regcache.c: Likewise.
6134         * rust-exp.y: Likewise.
6135         * selftest-arch.c: Likewise.
6136         * unittests/environ-selftests.c: Likewise.
6137         * unittests/function-view-selftests.c: Likewise.
6138         * unittests/offset-type-selftests.c: Likewise.
6139         * unittests/optional-selftests.c: Likewise.
6140         * unittests/scoped_restore-selftests.c: Likewise.
6141         * utils-selftests.c: Likewise.
6142
6143 2017-08-17  Pedro Alves  <palves@redhat.com>
6144
6145         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
6146         local.
6147
6148 2017-08-17  Pedro Alves  <palves@redhat.com>
6149
6150         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
6151         field.
6152         (reset_die_in_process): Delete, replaced by ...
6153         (process_die_scope): ... this new class.  Make it responsible for
6154         freeing cu->line_header too.
6155         (process_die): Use process_die_scope.
6156         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
6157         cu->line_header_die_owner.  Don't release the line header if it's
6158         owned by the CU.
6159         (setup_type_unit_groups): Make the CU/DIE own the line header.
6160         Don't release the line header here.
6161
6162 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
6163
6164         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
6165
6166 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6167
6168         * NEWS: Mention new shortcuts for nexti and stepi in TUI
6169         Single-Key mode
6170
6171 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6172
6173         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
6174         mode command list.
6175
6176 2017-08-15  Stafford Horne  <shorne@gmail.com>
6177
6178         * MAINTAINERS (Write After Approval): Add Stafford Horne.
6179
6180 2017-08-15  Stafford Horne  <shorne@gmail.com>
6181
6182         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
6183
6184 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
6185
6186         PR gdb/21954
6187         * infcmd.c (unset_environment_command): Use the 'clear' method on
6188         the environment instead of resetting it.
6189
6190 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
6191
6192         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
6193         platforms.
6194
6195 2017-08-14  Tom Tromey  <tom@tromey.com>
6196
6197         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
6198         (print_binary_chars): Likewise.
6199         (BITS_IN_BYTES): Remove.
6200
6201 2017-08-14  Tom Tromey  <tom@tromey.com>
6202
6203         PR gdb/21675
6204         * valprint.c (LOW_ZERO): Change value to 034.
6205         (print_octal_chars): Add static_asserts for octal constants.
6206         * printcmd.c (print_scalar_formatted): Add 'd' case.
6207
6208 2017-08-11  Tom Tromey  <tom@tromey.com>
6209
6210         * symfile.c (add_symbol_file_command): Use std::vector.
6211
6212 2017-08-14  Tom Tromey  <tom@tromey.com>
6213
6214         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
6215         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6216         std::move.
6217         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
6218
6219 2017-08-11  Pedro Alves  <palves@redhat.com>
6220
6221         * infrun.c (process_event_stop_test): Adjust
6222         function_name_is_marked_for_skip call.
6223         * skip.c: Include <list>.
6224         (skiplist_entry): Make it a class with private fields, and
6225         getters/setters.
6226         (skiplist_entry_chain): Delete.
6227         (skiplist_entries): New.
6228         (skiplist_entry_count): Delete.
6229         (highest_skiplist_entry_num): New.
6230         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
6231         (add_skiplist_entry): Delete.
6232         (skiplist_entry::skiplist_entry): New.
6233         (skiplist_entry::add_entry): New.
6234         (skip_file_command, skip_function): Adjust.
6235         (compile_skip_regexp): Delete.
6236         (skip_command): Don't compile regexp here.  Adjust to use
6237         skiplist_entry::add_entry.
6238         (skip_info): Adjust to use range-for and getters.
6239         (skip_enable_command, skip_disable_command): Adjust to use
6240         range-for and setters.
6241         (skip_delete_command): Adjust to use std::list.
6242         (add_skiplist_entry): Delete.
6243         (skip_file_p): Delete, refactored as ...
6244         (skiplist_entry::do_skip_file_p): ... this new method.
6245         (skip_gfile_p): Delete, refactored as ...
6246         (skiplist_entry::do_gskip_file_p): ... this new method.
6247         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
6248         (skiplist_entry::skip_function_p): ... this new method.
6249         (function_name_is_marked_for_skip): Now returns bool, and takes
6250         the function sal by const reference.  Adjust to use range-for and
6251         skiplist_entry methods.
6252         (_initialize_step_skip): Remove references to
6253         skiplist_entry_chain, skiplist_entry_count.
6254         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
6255         takes the function sal by const reference.
6256
6257 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6258
6259         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
6260         (dwarf2_frame_cache): Remove reset_cache_cleanup.
6261         (dwarf2_frame_cache):
6262         * frame-unwind.c (frame_unwind_try_unwinder): Catch
6263         RETURN_MASK_ALL and set *this_case to NULL.
6264         * frame-unwind.h: Update comments.
6265
6266 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6267
6268         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
6269         (dwarf2_frame_state_copy_regs): Remove.
6270         (dwarf2_frame_state_free_regs): Remove.
6271         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
6272         (dwarf2_restore_rule): Call method .alloc_regs instead of
6273         dwarf2_frame_state_alloc_regs.
6274         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
6275         constructor.  Call std::move.
6276         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
6277         (dwarf2_frame_cache): Likewise.
6278
6279         [GDB_SELF_TEST]: Include selftest.h and
6280         selftest-arch.h.
6281         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
6282         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
6283         execute_cfa_program_test.
6284
6285         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
6286         copy ctor, assignment operator, move assignment.
6287         <alloc_regs>: New method.
6288         <swap>: New method.
6289         (struct dwarf2_frame_state): Delete dtor.
6290         (dwarf2_frame_state_alloc_regs): Remove declaration.
6291         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
6292         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
6293
6294 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6295
6296         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
6297         (dwarf2_frame_state::dwarf2_frame_state): New.
6298         (dwarf2_frame_state::~dwarf2_frame_state): New.
6299         (dwarf2_fetch_cfa_info): Update.
6300         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
6301         rather than a pointer.  Update code.
6302         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
6303         dtor.
6304         <data_align, code_align, retaddr_column>: Change them to const.
6305         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
6306         to bool.
6307
6308 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6309
6310         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
6311         <loc.exp>: New field.
6312         * dwarf2-frame.c (execute_cfa_program): Update.
6313         (dwarf2_frame_prev_register): Update.
6314
6315 2017-08-10  Pedro Alves  <palves@redhat.com>
6316
6317         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
6318
6319 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6320
6321         * fbsd-nat.c (struct fbsd_fork_info): Remove.
6322         (fbsd_pending_children): Use std::list.
6323         (fbsd_remember_child): Likewise.
6324         (fbsd_is_child_pending): Likewise.
6325         (fbsd_pending_vfork_done): Use std::forward_list.
6326         (fbsd_add_vfork_done): Likewise.
6327         (fbsd_is_vfork_done_pending): Likewise.
6328         (fbsd_next_vfork_done): Likewise.
6329
6330 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6331
6332         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
6333         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
6334         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
6335         for `mapfilename'.
6336         (fbsd_xfer_partial): Use gdb::byte_vector.
6337         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
6338
6339 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6340
6341         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
6342         "filestuff.h".
6343         (fbsd_find_memory_regions): Fix `mapfile' initialization.
6344
6345 2017-08-09  Tom Tromey  <tom@tromey.com>
6346
6347         * skip.c (skiplist_entry): New constructor.
6348         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
6349         (skiplist_entry::file_is_glob): Now bool.
6350         (skiplist_entry::file, skiplist_entry::function): Now
6351         std::string.
6352         (make_skip_entry): Return a unique_ptr.  Use new.
6353         (free_skiplist_entry, free_skiplist_entry_cleanup)
6354         (make_free_skiplist_entry_cleanup): Remove.
6355         (skip_command, skip_disable_command, add_skiplist_entry)
6356         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
6357         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
6358         (function_name_is_marked_for_skip): Update.
6359         (skip_delete_command): Update.  Use delete.
6360
6361 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
6362
6363         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
6364         (aarch64_linux_core_read_description): New function.
6365         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
6366
6367 2017-08-09  Pedro Alves  <palves@redhat.com>
6368
6369         * cp-name-parser.y (cp_comp_to_string): Return a
6370         gdb::unique_xmalloc_ptr<char>.
6371         * cp-support.c (replace_typedefs_qualified_name)
6372         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
6373         (cp_canonicalize_string_full): Use op= instead of explicit
6374         convertion.
6375         (cp_class_name_from_physname, method_name_from_physname)
6376         (cp_func_name, cp_remove_params): Adjust to use
6377         gdb::unique_xmalloc_ptr<char>.
6378         * cp-support.h (cp_comp_to_string): Return a
6379         gdb::unique_xmalloc_ptr<char>.
6380         * python/py-type.c (typy_lookup_type): Adjust to use
6381         gdb::unique_xmalloc_ptr<char>.
6382
6383 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
6384
6385         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
6386
6387 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
6388             Yao Qi  <yao.qi@linaro.org>
6389
6390         * cp-support.c (cp_canonicalize_string_full): Use
6391         gdb::unique_xmalloc_ptr<char>.
6392         (cp_canonicalize_string): Likewise.
6393
6394 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6395
6396         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
6397         * regformats/i386/amd64-avx-avx512.dat: Remove.
6398         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
6399         * regformats/i386/amd64-avx-mpx.dat:Remove.
6400         * regformats/i386/amd64-avx.dat: Remove.
6401         * regformats/i386/amd64-mpx.dat: Remove.
6402         * regformats/i386/i386-avx-avx512.dat: Remove.
6403         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
6404         * regformats/i386/i386-avx-mpx.dat: Remove.
6405         * regformats/i386/i386-mmx.dat: Remove.
6406         * regformats/i386/i386-mpx.dat: Remove.
6407
6408 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6409
6410         * amd64-tdep.h (tdesc_x32): Remove the declaration.
6411         * amd64-tdep.c: Don't include features/i386/x32*.c.
6412         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
6413         functions.
6414         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
6415         and i386/x32-avx-avx512.
6416         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
6417         and i386/x32.xml.
6418         * features/i386/x32-avx-avx512.c: Removed.
6419         * features/i386/x32-avx-avx512.xml: Removed.
6420         * features/i386/x32-avx.c: Removed.
6421         * features/i386/x32-avx.xml: Removed.
6422         * features/i386/x32.c: Removed.
6423         * features/i386/x32.xml: Removed.
6424         * regformats/i386/x32-avx-avx512.dat: Removed.
6425         * regformats/i386/x32-avx.dat: Removed.
6426         * regformats/i386/x32.dat: Removed.
6427
6428 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6429
6430         PR breakpoints/21886
6431         * mem-break.c (default_memory_insert_breakpoint): Use
6432         `->placed_address' rather than `->reqstd_address' for the
6433         breakpoint location.
6434
6435 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6436
6437         * arch-utils.c (default_print_insn): Remove arch/mach/endian
6438         assertions.
6439
6440 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6441
6442         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
6443         a union of `tdep_info', `tdesc_data' and `id'.
6444         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
6445         rather than `info.tdep_info'.
6446         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
6447         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6448         * i386-tdep.c (i386_gdbarch_init): Likewise.
6449         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
6450         * mips-tdep.c (mips_gdbarch_init): Likewise.
6451         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6452         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6453         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
6454         `info.tdep_info'.
6455         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
6456         `info.tdep_info'.
6457         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6458         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
6459         `info.tdep_info'.
6460         * spu-tdep.c (spu_gdbarch_init): Likewise.
6461         * gdbarch.h: Regenerate.
6462
6463 2017-08-07  Leszek Swirski  <leszeks@google.com>
6464
6465         PR symtab/20899
6466         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
6467
6468 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
6469
6470         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
6471         (gdbsim_open): Rename gdb_argv args object to argv.
6472
6473 2017-08-05  Tom Tromey  <tom@tromey.com>
6474
6475         * compile/compile-object-load.c (compile_object_load): Use
6476         gdb::unique_xmalloc_ptr.
6477         * cli/cli-dump.c (scan_filename): Rename from
6478         scan_filename_with_cleanup.  Change return type.
6479         (scan_expression): Rename from scan_expression_with_cleanup.
6480         Change return type.
6481         (dump_memory_to_file, dump_value_to_file, restore_command):
6482         Use gdb::unique_xmalloc_ptr.  Update.
6483         * cli/cli-cmds.c (find_and_open_script): Use
6484         gdb::unique_xmalloc_ptr.
6485         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
6486         * symmisc.c (maintenance_print_symbols)
6487         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
6488         * symfile.c (symfile_bfd_open, generic_load)
6489         (add_symbol_file_command, remove_symbol_file_command): Use
6490         gdb::unique_xmalloc_ptr.
6491         * source.c (openp): Use gdb::unique_xmalloc_ptr.
6492         * psymtab.c (maintenance_print_psymbols): Use
6493         gdb::unique_xmalloc_ptr.
6494         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
6495         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
6496         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
6497         (reload_shared_libraries_1): Likewise.
6498
6499 2017-08-05  Tom Tromey  <tom@tromey.com>
6500
6501         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
6502         (rust_op_vector, rust_set_vector): New typedefs.
6503         (current_parser): New global.
6504         (work_obstack): Change to pointer type.  Update all users.
6505         (rust_ast, pstate): Remove globals.
6506         (struct rust_parser): New.
6507         (%union) <params, field_inits>: Change type.
6508         (start, tuple_expr, unit_expr, struct_expr_list, literal)
6509         (field_expr, expr_list, maybe_expr_list, type_list): Update.
6510         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
6511         (convert_params_to_types, convert_params_to_expression): Change
6512         type of "params".
6513         (ast_string): Change type of "fields".
6514         (rust_parse): Make a rust_parser.  Remove cleanups.
6515         (rust_lex_tests): Make and install an auto_obstack.
6516
6517 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6518
6519         * configure.srv (ipa_x32_linux_regobj): New.
6520         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
6521         instead of X86_TDESC_AVX512.
6522         (initialize_low_tracepoint): Call
6523         init_registers_x32_avx_avx512_linux.
6524
6525 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6526
6527         * utils.h (gdb_argv): Add namespace std for nullptr_t.
6528
6529 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6530
6531         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
6532
6533 2017-08-03  Tom Tromey  <tom@tromey.com>
6534
6535         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
6536         Remove.
6537         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
6538
6539 2017-08-03  Tom Tromey  <tom@tromey.com>
6540
6541         * python/py-param.c (compute_enum_values): Use gdb_argv.
6542
6543 2017-08-03  Tom Tromey  <tom@tromey.com>
6544
6545         * utils.h (struct gdb_argv_deleter): New.
6546         (gdb_argv): New class.
6547         * utils.c (gdb_argv::reset): New method.
6548         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
6549         * tracefile.c (tsave_command): Use gdb_argv.
6550         * top.c (new_ui_command): Use gdb_argv.
6551         * symmisc.c (maintenance_print_symbols)
6552         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
6553         * symfile.c (symbol_file_command, generic_load)
6554         (remove_symbol_file_command): Use gdb_argv.
6555         * stack.c (backtrace_command): Use gdb_argv.
6556         * source.c (add_path, show_substitute_path_command)
6557         (unset_substitute_path_command, set_substitute_path_command):
6558         Use gdb_argv.
6559         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
6560         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6561         * remote.c (extended_remote_run, remote_put_command)
6562         (remote_get_command, remote_delete_command): Use gdb_argv.
6563         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6564         (gdbsim_open): Use gdb_argv.
6565         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6566         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
6567         * procfs.c (procfs_info_proc): Use gdb_argv.
6568         * interps.c (interpreter_exec_cmd): Use gdb_argv.
6569         * infrun.c (handle_command): Use gdb_argv.
6570         * inferior.c (add_inferior_command, clone_inferior_command):
6571         Use gdb_argv.
6572         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
6573         * exec.c (exec_file_command): Use gdb_argv.
6574         * cli/cli-cmds.c (alias_command): Use gdb_argv.
6575         * compile/compile.c (build_argc_argv): Use gdb_argv.
6576
6577 2017-08-03  Tom Tromey  <tom@tromey.com>
6578
6579         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6580
6581 2017-08-03  Tom Tromey  <tom@tromey.com>
6582
6583         * python/python.c (compute_python_string): Return std::string.
6584         (gdbpy_eval_from_control_command): Update.
6585         (do_start_initialization): Use std::string.
6586         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6587         xstrprintf.
6588         * python/py-breakpoint.c (local_setattro): Use string_printf, not
6589         xstrprintf.
6590
6591 2017-08-03  Tom Tromey  <tom@tromey.com>
6592
6593         * top.h (do_restore_instream_cleanup): Remove.
6594         * top.c (do_restore_instream_cleanup): Remove.
6595         (read_command_file): Use scoped_restore.
6596         * cli/cli-script.c (execute_user_command): Use scoped_restore.
6597
6598 2017-08-03  Tom Tromey  <tom@tromey.com>
6599
6600         * cli/cli-script.c (execute_user_command)
6601         (execute_control_command): Use scoped_restore.
6602
6603 2017-08-03  Tom Tromey  <tom@tromey.com>
6604
6605         * cli/cli-script.c (do_restore_user_call_depth): Remove.
6606         (execute_user_command): Remove user_call_depth; use
6607         user_args_stack's size instead.
6608
6609 2017-08-03  Tom Tromey  <tom@tromey.com>
6610
6611         * top.h (in_user_command): Remove.
6612         * top.c (in_user_command): Remove.
6613         * cli/cli-script.c (do_restore_user_call_depth)
6614         (execute_user_command): Update.
6615
6616 2017-08-03  Tom Tromey  <tom@tromey.com>
6617
6618         * valops.c (search_struct_method): Use gdb::byte_vector.
6619         * valarith.c (value_concat): Use std::vector.
6620         * target.c (memory_xfer_partial): Use gdb::byte_vector.
6621         (simple_search_memory): Likewise.
6622         * printcmd.c (find_string_backward): Use gdb::byte_vector.
6623         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6624         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6625         * elfread.c (elf_rel_plt_read): Use std::string.
6626         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6627         * cli/cli-dump.c (restore_section_callback): Use
6628         gdb::byte_vector.
6629
6630 2017-08-03  Tom Tromey  <tom@tromey.com>
6631
6632         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6633
6634 2017-08-03  Tom Tromey  <tom@tromey.com>
6635
6636         * tui/tui-regs.c (tui_restore_gdbout): Remove.
6637         (tui_register_format): Use scoped_restore.
6638
6639 2017-08-03  Tom Tromey  <tom@tromey.com>
6640
6641         * reverse.c (exec_direction_default): Remove.
6642         (exec_reverse_once): Use scoped_restore.
6643         * remote.c (restore_remote_timeout): Remove.
6644         (remote_flash_erase, remote_flash_write, remote_flash_done)
6645         (readchar, remote_serial_write): Use scoped_restore.
6646         * cli/cli-script.c (struct source_cleanup_lines_args)
6647         (source_cleanup_lines): Remove.
6648         (script_from_file): Use scoped_restore.
6649         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6650         (source_command): Use scoped_restore.
6651
6652 2017-08-03  Tom Tromey  <tom@tromey.com>
6653
6654         * utils.h (make_cleanup_free_so): Remove.
6655         * utils.c (do_free_so, make_cleanup_free_so): Remove.
6656         * solist.h (struct so_deleter): New.
6657         (so_list_up): New typedef.
6658         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6659
6660 2017-08-03  Tom Tromey  <tom@tromey.com>
6661
6662         * utils.h (make_cleanup_restore_current_language): Remove.
6663         * utils.c (do_restore_current_language)
6664         (make_cleanup_restore_current_language): Remove.
6665         * parse.c (parse_exp_in_context_1)
6666         (parse_expression_with_language): Use
6667         scoped_restore_current_language.
6668         * mi/mi-main.c (mi_cmd_execute): Use
6669         scoped_restore_current_language.
6670         * language.h (scoped_restore_current_language): New class.
6671
6672 2017-08-03  Tom Tromey  <tom@tromey.com>
6673
6674         * compile/compile.c (cleanup_unlink_file): Remove.
6675         (compile_to_object): Use gdb::unlinker.
6676         (eval_compile_command): Likewise.
6677
6678 2017-08-03  Tom Tromey  <tom@tromey.com>
6679
6680         * utils.h (make_cleanup_fclose): Remove.
6681         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6682
6683 2017-08-03  Tom Tromey  <tom@tromey.com>
6684
6685         * top.c (open_terminal_stream): Return gdb_file_up.
6686         (new_ui_command): Update.
6687
6688 2017-08-03  Tom Tromey  <tom@tromey.com>
6689
6690         * source.c (print_source_lines_base, forward_search_command)
6691         (reverse_search_command): Use gdb_file_up.
6692
6693 2017-08-03  Tom Tromey  <tom@tromey.com>
6694
6695         * fbsd-nat.c (fbsd_find_memory_regions): Update.
6696
6697 2017-08-03  Tom Tromey  <tom@tromey.com>
6698
6699         * cli/cli-cmds.c (find_and_open_script): Change return type.
6700         Remove "streamp" and "full_path" parameters.
6701         (source_script_with_search): Update.
6702         * auto-load.c (source_script_file): Update.
6703         * cli/cli-cmds.h (find_and_open_script): Change type.
6704         (open_script): New struct.
6705
6706 2017-08-03  Tom Tromey  <tom@tromey.com>
6707
6708         * xml-support.c (xml_fetch_content_from_file): Update.
6709         * ui-file.c (stdio_file::open): Update.
6710         * tracefile-tfile.c (tfile_start): Update.
6711         * remote.c (remote_file_put, remote_file_get): Update.
6712         * nat/linux-procfs.c (linux_proc_get_int)
6713         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6714         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6715         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6716         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6717         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6718         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6719         * linux-nat.c (linux_proc_pending_signals): Update.
6720         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6721         (file_closer): Remove.
6722         * compile/compile.c (compile_to_object): Update.
6723         * common/filestuff.h (struct gdb_file_deleter): New.
6724         (gdb_file_up): New typedef.
6725         (gdb_fopen_cloexec): Change return type.
6726         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6727         * cli/cli-dump.c (fopen_with_cleanup): Remove.
6728         (dump_binary_file, restore_binary_file): Update.
6729         * auto-load.c (auto_load_objfile_script_1): Update.
6730
6731 2017-08-03  Tom Tromey  <tom@tromey.com>
6732
6733         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6734         (info_static_tracepoint_markers_command): Likewise.
6735         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6736         * skip.c (skip_info): Use ui_out_emit_table.
6737         * progspace.c (print_program_space): Use ui_out_emit_table.
6738         * osdata.c (info_osdata): Use ui_out_emit_table.
6739         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6740         ui_out_emit_table.
6741         * linux-thread-db.c (info_auto_load_libthread_db): Use
6742         ui_out_emit_table.
6743         * inferior.c (print_inferior): Use ui_out_emit_table.
6744         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6745         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6746         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6747         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6748         * ui-out.h (class ui_out_emit_table): New.
6749
6750 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
6751
6752         * mips-tdep.c (mips_fpu_type_str): New function.
6753         (mips_dump_tdep): Call it.
6754
6755 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
6756
6757         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6758         `->mips_fpu_type'.
6759
6760 2017-07-31  Xavier Roirand  <roirand@adacore.com>
6761
6762         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6763
6764 2017-07-27  Xavier Roirand  <roirand@adacore.com>
6765
6766         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6767
6768 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6769
6770         * cli/cli-cmds.c (maintenancechecklist): New variable.
6771         * gdbcmd.h (maintenancechecklist): Declare it.
6772         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6773         Call i386_linux_read_description with different masks.
6774         * maint.c (maintenance_check_command): New function.
6775         (_initialize_maint_cmds): Call add_prefix_cmd.
6776         * target-descriptions.c (tdesc_reg): override operator != and ==.
6777         (tdesc_type): Likewise.
6778         (tdesc_feature): Likewise.
6779         (target_desc): Likewise.
6780         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6781         (maintenance_check_xml_descriptions): New function.
6782         (_initialize_target_descriptions) Add command "xml-descriptions".
6783         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6784
6785 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6786
6787         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6788         Include features/i386/32bit-*.c.
6789         (i386_linux_read_description): Generate target description if it
6790         doesn't exist.
6791         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6792         functions.
6793         * features/i386/32bit-linux.c: Re-generated.
6794         * features/i386/32bit-sse.c: Likewise.
6795         * target-descriptions.c (print_c_feature::visit): Print code to
6796         set register number if needed.
6797         (print_c_feature) <m_next_regnum>: New field.
6798
6799 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6800
6801         * features/Makefile (CFILES): Rename with TDESC_CFILES.
6802         (FEATURE_XMLFILES): New.
6803         (FEATURE_CFILES): New.
6804         New rules.
6805         (clean-cfiles): Remove generated c files.
6806         * features/i386/32bit-avx.c: Generated.
6807         * features/i386/32bit-avx512.c: Generated.
6808         * features/i386/32bit-core.c: Generated.
6809         * features/i386/32bit-linux.c: Generated.
6810         * features/i386/32bit-mpx.c: Generated.
6811         * features/i386/32bit-pkeys.c: Generated.
6812         * features/i386/32bit-sse.c: Generated.
6813         * target-descriptions.c: Include algorithm.
6814         (tdesc_element_visitor): Add method visit_end.
6815         (print_c_tdesc): Implement visit_end.
6816         (print_c_tdesc:: m_filename_after_features): Move it to
6817         protected.
6818         (print_c_feature): New class.
6819         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6820         name starts with "i386/32bit-".
6821
6822 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6823
6824         * target-descriptions.c (tdesc_element_visitor): New class.
6825         (tdesc_element): New class.
6826         (tdesc_reg): Inherit from tdesc_element.
6827         (tdesc_reg::accept): New function.
6828         (tdesc_type): Inherit from tdesc_element.
6829         (tdesc_type::accept): New function.
6830         (tdesc_feature): Inherit from tdesc_element.
6831         (tdesc_feature::accept): New function.
6832         (target_desc): Inherit from tdesc_element.
6833         (target_desc::target_desc): New.
6834         (target_desc::~target_desc): New.
6835         (target_desc::accept): New.
6836         (allocate_target_description): Use new.
6837         (free_target_description): Use delete.
6838         (print_c_tdesc): New class.
6839         (maint_print_c_tdesc_cmd): Adjust.
6840
6841         * features/aarch64.c: Re-generated.
6842         * features/arc-arcompact.c: Re-generated.
6843         * features/arc-v2.c: Re-generated.
6844         * features/arm/arm-with-iwmmxt.c: Re-generated.
6845         * features/arm/arm-with-m.c: Re-generated.
6846         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6847         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6848         * features/arm/arm-with-neon.c: Re-generated.
6849         * features/arm/arm-with-vfpv2.c: Re-generated.
6850         * features/arm/arm-with-vfpv3.c: Re-generated.
6851         * features/i386/amd64-avx-avx512.c: Re-generated.
6852         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6853         * features/i386/amd64-avx.c: Re-generated.
6854         * features/i386/amd64-avx-linux.c: Re-generated.
6855         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6856         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6857         * features/i386/amd64-avx-mpx.c: Re-generated.
6858         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6859         * features/i386/amd64.c: Re-generated.
6860         * features/i386/amd64-linux.c: Re-generated.
6861         * features/i386/amd64-mpx.c: Re-generated.
6862         * features/i386/amd64-mpx-linux.c: Re-generated.
6863         * features/i386/i386-avx-avx512.c: Re-generated.
6864         * features/i386/i386-avx-avx512-linux.c: Re-generated.
6865         * features/i386/i386-avx.c: Re-generated.
6866         * features/i386/i386-avx-linux.c: Re-generated.
6867         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6868         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6869         * features/i386/i386-avx-mpx.c: Re-generated.
6870         * features/i386/i386-avx-mpx-linux.c: Re-generated.
6871         * features/i386/i386.c: Re-generated.
6872         * features/i386/i386-linux.c: Re-generated.
6873         * features/i386/i386-mmx.c: Re-generated.
6874         * features/i386/i386-mmx-linux.c: Re-generated.
6875         * features/i386/i386-mpx.c: Re-generated.
6876         * features/i386/i386-mpx-linux.c: Re-generated.
6877         * features/i386/x32-avx-avx512.c: Re-generated.
6878         * features/i386/x32-avx-avx512-linux.c: Re-generated.
6879         * features/i386/x32-avx.c: Re-generated.
6880         * features/i386/x32-avx-linux.c: Re-generated.
6881         * features/i386/x32.c: Re-generated.
6882         * features/i386/x32-linux.c: Re-generated.
6883         * features/microblaze.c: Re-generated.
6884         * features/microblaze-with-stack-protect.c: Re-generated.
6885         * features/mips64-dsp-linux.c: Re-generated.
6886         * features/mips64-linux.c: Re-generated.
6887         * features/mips-dsp-linux.c: Re-generated.
6888         * features/mips-linux.c: Re-generated.
6889         * features/nds32.c: Re-generated.
6890         * features/nios2.c: Re-generated.
6891         * features/nios2-linux.c: Re-generated.
6892         * features/rs6000/powerpc-32.c: Re-generated.
6893         * features/rs6000/powerpc-32l.c: Re-generated.
6894         * features/rs6000/powerpc-403.c: Re-generated.
6895         * features/rs6000/powerpc-403gc.c : Re-generated.
6896         * features/rs6000/powerpc-405.c: Re-generated.
6897         * features/rs6000/powerpc-505.c: Re-generated.
6898         * features/rs6000/powerpc-601.c: Re-generated.
6899         * features/rs6000/powerpc-602.c: Re-generated.
6900         * features/rs6000/powerpc-603.c: Re-generated.
6901         * features/rs6000/powerpc-604.c: Re-generated.
6902         * features/rs6000/powerpc-64.c: Re-generated.
6903         * features/rs6000/powerpc-64l.c: Re-generated.
6904         * features/rs6000/powerpc-7400.c: Re-generated.
6905         * features/rs6000/powerpc-750.c: Re-generated.
6906         * features/rs6000/powerpc-860.c: Re-generated.
6907         * features/rs6000/powerpc-altivec32.c: Re-generated.
6908         * features/rs6000/powerpc-altivec32l.c: Re-generated.
6909         * features/rs6000/powerpc-altivec64.c: Re-generated.
6910         * features/rs6000/powerpc-altivec64l.c: Re-generated.
6911         * features/rs6000/powerpc-cell32l.c: Re-generated.
6912         * features/rs6000/powerpc-cell64l.c: Re-generated.
6913         * features/rs6000/powerpc-e500.c: Re-generated.
6914         * features/rs6000/powerpc-e500l.c: Re-generated.
6915         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6916         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6917         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6918         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6919         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6920         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6921         * features/rs6000/powerpc-vsx32.c: Re-generated.
6922         * features/rs6000/powerpc-vsx32l.c: Re-generated.
6923         * features/rs6000/powerpc-vsx64.c: Re-generated.
6924         * features/rs6000/powerpc-vsx64l.c: Re-generated.
6925         * features/rs6000/rs6000.c: Re-generated.
6926         * features/s390-linux32.c: Re-generated.
6927         * features/s390-linux32v1.c: Re-generated.
6928         * features/s390-linux32v2.c: Re-generated.
6929         * features/s390-linux64.c: Re-generated.
6930         * features/s390-linux64v1.c: Re-generated.
6931         * features/s390-linux64v2.c: Re-generated.
6932         * features/s390-te-linux64.c: Re-generated.
6933         * features/s390-tevx-linux64.c: Re-generated.
6934         * features/s390-vx-linux64.c: Re-generated.
6935         * features/s390x-linux64.c: Re-generated.
6936         * features/s390x-linux64v1.c: Re-generated.
6937         * features/s390x-linux64v2.c: Re-generated.
6938         * features/s390x-te-linux64.c: Re-generated.
6939         * features/s390x-tevx-linux64.c: Re-generated.
6940         * features/s390x-vx-linux64.c: Re-generated.
6941         * features/sparc/sparc32-solaris.c: Re-generated.
6942         * features/sparc/sparc64-solaris.c: Re-generated.
6943         * features/tic6x-c62x.c: Re-generated.
6944         * features/tic6x-c62x-linux.c: Re-generated.
6945         * features/tic6x-c64x.c: Re-generated.
6946         * features/tic6x-c64x-linux.c: Re-generated.
6947         * features/tic6x-c64xp.c: Re-generated.
6948         * features/tic6x-c64xp-linux.c: Re-generated.
6949
6950 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6951
6952         * i386-linux-tdep.c (i386_linux_read_description): New function.
6953         (i386_linux_core_read_description): Call
6954         i386_linux_read_description.
6955         * i386-linux-tdep.h (i386_linux_read_description): Declare.
6956         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
6957         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
6958         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
6959         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
6960         * x86-linux-nat.c (x86_linux_read_description): Call
6961         i386_linux_read_description.
6962
6963 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6964
6965         * NEWS: Mention it.
6966         * features/Makefile (%.c: %.xml): Pass the xml file name to
6967         command "maint print c-tdesc".
6968         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
6969         name from 'arg'.
6970
6971 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6972
6973         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
6974         in-class initialization.
6975         (tdesc_create_feature): Call new instead of XCNEW.
6976         (free_target_description): Ue delete.
6977
6978 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
6979
6980         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
6981
6982 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6983
6984         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
6985         constant.
6986         (amd64_x32_init_abi): Likewise.
6987         * amd64-tdep.h (amd64_init_abi): Update declaration.
6988         (amd64_x32_init_abi): Likewise.
6989
6990 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6991
6992         PR tdep/21717
6993         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
6994         condition for FPSCR.
6995         (arm_linux_store_inferior_registers): Likewise.
6996
6997 2017-07-22  Tom Tromey  <tom@tromey.com>
6998
6999         * break-catch-syscall.c (struct catch_syscall_inferior_data)
7000         <syscalls_counts>: Now a std::vector.
7001         (get_catch_syscall_inferior_data): Use "new".
7002         (catch_syscall_inferior_data_cleanup): Use "delete".
7003         (insert_catch_syscall, remove_catch_syscall)
7004         (clear_syscall_counts): Update.
7005
7006 2017-07-22  Tom Tromey  <tom@tromey.com>
7007
7008         * break-catch-syscall.c (syscall_catchpoint)
7009         <syscalls_to_be_caught>: Now a std::vector<int>
7010         (~syscall_catchpoint): Remove.
7011         (insert_catch_syscall, remove_catch_syscall)
7012         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
7013         (print_mention_catch_syscall, print_recreate_catch_syscall):
7014         Update.
7015         (create_syscall_event_catchpoint): Change type of "filter"
7016         parameter.
7017         (catch_syscall_split_args): Return a std::vector.
7018         (catch_syscall_command_1, catching_syscall_number_1): Update.
7019
7020 2017-07-22  Tom Tromey  <tom@tromey.com>
7021
7022         * break-catch-throw.c (struct exception_catchpoint)
7023         <exception_rx>: Now a std::string.
7024         (~exception_catchpoint): Remove.
7025         (print_one_detail_exception_catchpoint): Update.
7026         (handle_gnu_v3_exceptions): Change type of except_rx.
7027         (extract_exception_regexp): Return a std::string.
7028         (catch_exception_command_1): Update.
7029
7030 2017-07-22  Tom Tromey  <tom@tromey.com>
7031
7032         * break-catch-sig.c (gdb_signal_type): Remove typedef.
7033         (struct signal_catchpoint) <signals_to_be_caught>: Now a
7034         std::vector.
7035         <catch_all>: Now a bool.
7036         (~signal_catchpoint): Remove.
7037         (signal_catchpoint_insert_location)
7038         (signal_catchpoint_remove_location)
7039         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
7040         (signal_catchpoint_print_mention)
7041         (signal_catchpoint_print_recreate)
7042         (signal_catchpoint_explains_signal): Update.
7043         (create_signal_catchpoint): Change type of "filter" and
7044         "catch_all".
7045         (catch_signal_split_args): Return a std::vector.  Change type of
7046         "catch_all".
7047         (catch_signal_command): Update.
7048
7049 2017-07-20  Pedro Alves  <palves@redhat.com>
7050
7051         * ada-lang.c (ada_language_defn): Make extern.
7052         (_initialize_ada_language): Remove add_language call.
7053         * c-lang.c (c_language_defn, cplus_language_defn)
7054         (asm_language_defn, minimal_language_defn): Make extern.
7055         (_initialize_c_language): Delete.
7056         * completer.c (compare_cstrings): Delete, moved to utils.h.
7057         * d-lang.c (d_language_defn): Make extern.
7058         (_initialize_d_language): Remove add_language calls.
7059         * defs.h (enum language): Add comment.
7060         * f-lang.c (f_language_defn): Make extern.
7061         (_initialize_f_language): Remove add_language call.
7062         * go-lang.c (go_language_defn): Make extern.
7063         (_initialize_go_language): Remove add_language call.
7064         * language.c: Include <algorithm>.
7065         (languages): Redefine as const array.
7066         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
7067         (set_language_command): Handle "local".  Use for-range loop.
7068         (set_language): Remove loop.
7069         (language_enum): Rewrite.
7070         (language_def, language_str): Remove loops.
7071         (add_language): Delete.
7072         (add_set_language_command): New, based on add_languages.
7073         (skip_language_trampoline): Adjust.
7074         (local_language_defn): Delete.
7075         (language_gdbarch_post_init): Adjust.
7076         (_initialize_language): Remove add_language calls.  Call
7077         add_set_language_command.
7078         * language.h (add_language): Delete.
7079         (auto_language_defn)
7080         (unknown_language_defn, minimal_language_defn, ada_language_defn)
7081         (asm_language_defn, c_language_defn, cplus_language_defn)
7082         (d_language_defn, f_language_defn, go_language_defn)
7083         (m2_language_defn, objc_language_defn, opencl_language_defn)
7084         (pascal_language_defn, rust_language_defn): Declare.
7085         * m2-lang.c (m2_language_defn): Make extern.
7086         (_initialize_m2_language): Remove add_language call.
7087         * objc-lang.c (objc_language_defn): Make extern.
7088         (_initialize_objc_language): Remove add_language call.
7089         * opencl-lang.c (opencl_language_defn): Make extern.
7090         (_initialize_opencl_language): Remove add_language call.
7091         * p-lang.c (pascal_language_defn): Make extern.
7092         (_initialize_pascal_language): Delete.
7093         * rust-lang.c (rust_language_defn): Make extern.
7094         (_initialize_rust_language): Delete.
7095         * utils.h (compare_cstrings): New static inline function.
7096
7097 2017-07-20  Pedro Alves  <palves@redhat.com>
7098
7099         * ada-lang.c (ada_to_fixed_type_1): Adjust.
7100         (get_var_value): Constify parameters.
7101         (get_int_var_value): Change prototype.
7102         (to_fixed_range_type): Adjust.
7103         * ada-lang.h (get_int_var_value): Change prototype.
7104
7105 2017-07-20  Pedro Alves  <palves@redhat.com>
7106
7107         * dwarf2read.c (dw2_lookup_symbol): Use
7108         SYMBOL_MATCHES_SEARCH_NAME.
7109         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
7110
7111 2017-07-20  Pedro Alves  <palves@redhat.com>
7112
7113         * block.c (block_iter_name_step, block_iter_name_first)
7114         (block_iter_name_next): Delete.
7115         (block_lookup_symbol_primary): Adjust to use
7116         dict_iter_match_first/dict_iter_match_next.
7117         * block.h (block_iter_name_first, block_iter_name_next): Delete
7118         declarations.
7119         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
7120         dict_iter_match_first/dict_iter_match_next.
7121
7122 2017-07-20  Pedro Alves  <palves@redhat.com>
7123
7124         * cp-support.c (cp_find_first_component_aux): Add missing case for
7125         end of string.
7126
7127 2017-07-18  David Blaikie  <dblaikie@gmail.com>
7128
7129         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
7130         of dwo_cu's dwo_file.
7131
7132 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7133
7134         * remote.c (store_registers_using_G): Remove one line comment.
7135
7136 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7137
7138         * regcache.c (regcache_cpy): Simplify it.
7139         (regcache::cpy_no_passthrough): Remove it.
7140         * regcache.h (cpy_no_passthrough): Remove it.
7141         (regcache_dup, regcache_cpy): Update comments.
7142
7143 2017-07-18  Pedro Alves  <palves@redhat.com>
7144
7145         * remote-sim.c (sim_command_completer): Adjust to work with a
7146         completion_tracker instead of a VEC.
7147
7148 2017-07-17  Pedro Alves  <palves@redhat.com>
7149
7150         * completer.c (complete_source_filenames): New function.
7151         (complete_address_and_linespec_locations): New function.
7152         (location_completer): Use complete_address_and_linespec_locations.
7153         (completion_tracker::build_completion_result): Honor the tracker's
7154         request to suppress append.
7155         * completer.h (completion_tracker::suppress_append_ws)
7156         (completion_tracker::set_suppress_append_ws): New methods.
7157         (completion_tracker::m_suppress_append_ws): New field.
7158         (complete_source_filenames): New declaration.
7159         * linespec.c (linespec_complete_what): New.
7160         (struct ls_parser) <complete_what, completion_word,
7161         completion_quote_char, completion_quote_end, completion_tracker>:
7162         New fields.
7163         (string_find_incomplete_keyword_at_end): New.
7164         (linespec_lexer_lex_string): Record quote char.  If in completion
7165         mode, don't throw.
7166         (linespec_lexer_consume_token): Advance the completion word point.
7167         (linespec_lexer_peek_token): Save/restore completion info.
7168         (save_stream_and_consume_token): New.
7169         (set_completion_after_number): New.
7170         (linespec_parse_basic): Set what to complete next depending on
7171         token.  Handle function and label completions specially.
7172         (parse_linespec): Disable objc shortcut in completion mode.  Set
7173         what to complete next depending on token type.  Skip keyword if in
7174         completion mode.
7175         (complete_linespec_component, linespec_complete): New.
7176         * linespec.h (linespec_complete): Declare.
7177
7178 2017-07-17  Pedro Alves  <palves@redhat.com>
7179
7180         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
7181         Handle 'operator<' / 'operator<<'.
7182
7183 2017-07-17  Pedro Alves  <palves@redhat.com>
7184
7185         * completer.c (collect_explicit_location_matches): Handle
7186         MATCH_LABEL.
7187         (convert_explicit_location_to_linespec): New, factored out from
7188         ...
7189         (convert_explicit_location_to_sals): ... this.
7190         (complete_label): New.
7191         (linespec_complete_label, find_label_symbols_in_block): New.
7192         (find_label_symbols): Add completion_mode parameter and adjust to
7193         call find_label_symbols_in_block.
7194         * linespec.h (linespec_complete_label): Declare.
7195
7196 2017-07-17  Pedro Alves  <palves@redhat.com>
7197
7198         * ada-lang.c (ada_collect_symbol_completion_matches): Add
7199         complete_symbol_mode parameter.
7200         * cli/cli-cmds.c (complete_command): Get the completion result out
7201         of the handle_brkchars tracker if used a custom word point.
7202         * completer.c: Include "linespec.h".
7203         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
7204         (advance_to_expression_complete_word_point): New.
7205         (completion_tracker::completes_to_completion_word): New.
7206         (complete_files_symbols): Pass down
7207         complete_symbol_mode::EXPRESSION.
7208         (explicit_options, probe_options): New.
7209         (collect_explicit_location_matches): Complete on the
7210         explictit_loc->foo instead of word.  Use
7211         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
7212         keyword and options completions.
7213         (backup_text_ptr): Delete.
7214         (skip_keyword): New.
7215         (complete_explicit_location): Remove 'word' parameter.  Add
7216         language, quoted_arg_start and quoted_arg_end parameters.
7217         Rewrite, parsing left to right.
7218         (location_completer): Rewrite.
7219         (location_completer_handle_brkchars): New function.
7220         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
7221         (enum complete_line_internal_reason): Adjust comments.
7222         (completion_tracker::discard_completions): New.
7223         (completer_handle_brkchars_func_for_completer): Handle
7224         location_completer.
7225         (gdb_custom_word_point_brkchars)
7226         (gdb_org_rl_basic_quote_characters): New.
7227         (gdb_completion_word_break_characters_throw)
7228         (completion_find_completion_word): Handle trackers that use a
7229         custom word point.
7230         (completion_tracker::advance_custom_word_point_by): New.
7231         (completion_tracker::build_completion_result): Don't rely on
7232         readline appending the quote char.
7233         (gdb_rl_attempted_completion_function_throw): Handle trackers that
7234         use a custom word point.
7235         (gdb_rl_attempted_completion_function): Restore
7236         rl_basic_quote_characters.
7237         * completer.h (class completion_tracker): Extend intro comment.
7238         (completion_tracker::set_quote_char)
7239         (completion_tracker::quote_char)
7240         (completion_tracker::set_use_custom_word_point)
7241         (completion_tracker::use_custom_word_point)
7242         (completion_tracker::custom_word_point)
7243         (completion_tracker::set_custom_word_point)
7244         (completion_tracker::advance_custom_word_point_by)
7245         (completion_tracker::completes_to_completion_word)
7246         (completion_tracker::discard_completions): New methods.
7247         (completion_tracker::m_quote_char)
7248         (completion_tracker::m_use_custom_word_point)
7249         (completion_tracker::m_custom_word_point): New fields.
7250         (advance_to_expression_complete_word_point): Declare.
7251         * f-lang.c (f_collect_symbol_completion_matches): Add
7252         complete_symbol_mode parameter.
7253         * language.h (struct language_defn)
7254         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
7255         parameter.
7256         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
7257         (linespec_complete_function): New function.
7258         (linespec_lexer_lex_keyword): Adjust.
7259         * linespec.h (linespec_keywords, linespec_complete_function): New
7260         declarations.
7261         * location.c (find_end_quote): New function.
7262         (explicit_location_lex_one): Add explicit_completion_info
7263         parameter.  Save quoting info.  Don't throw if being called for
7264         completion.  Don't handle Ada operators here.
7265         (is_cp_operator, skip_op_false_positives, first_of)
7266         (explicit_location_lex_one_function): New function.
7267         (string_to_explicit_location): Replace 'dont_throw' parameter with
7268         an explicit_completion_info pointer parameter.  Handle it.  Don't
7269         use explicit_location_lex_one to lex function names.  Use
7270         explicit_location_lex_one_function instead.
7271         * location.h (struct explicit_completion_info): New.
7272         (string_to_explicit_location): Replace 'dont_throw' parameter with
7273         an explicit_completion_info pointer parameter.
7274         * symtab.c (default_collect_symbol_completion_matches_break_on):
7275         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
7276         (default_collect_symbol_completion_matches)
7277         (collect_symbol_completion_matches): Add complete_symbol_mode
7278         parameter.
7279         (collect_symbol_completion_matches_type): Pass down
7280         complete_symbol_mode::EXPRESSION.
7281         (collect_file_symbol_completion_matches): Add complete_symbol_mode
7282         parameter.  Handle LINESPEC mode.
7283         * symtab.h (complete_symbol_mode): New.
7284         (default_collect_symbol_completion_matches_break_on)
7285         (default_collect_symbol_completion_matches)
7286         (collect_symbol_completion_matches)
7287         (collect_file_symbol_completion_matches): Add complete_symbol_mode
7288         parameter.
7289
7290 2017-07-17  Pedro Alves  <palves@redhat.com>
7291
7292         * utils.c (enum class strncmp_iw_mode): New.
7293         (strcmp_iw): Rename to ...
7294         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
7295         parameters.  Handle them.
7296         (strncmp_iw): New.
7297         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
7298         * utils.h (strncmp_iw): Declare.
7299         (strcmp_iw): Move describing comments here.
7300
7301 2017-07-17  Pedro Alves  <palves@redhat.com>
7302
7303         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
7304         CP_OPERATOR_STR.
7305         * c-typeprint.c (is_type_conversion_operator): Use
7306         CP_OPERATOR_STR.
7307         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
7308         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
7309         CP_OPERATOR_LEN.
7310         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
7311         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
7312         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
7313         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
7314         CP_OPERATOR_STR.
7315         * location.c: Include "cp-support.h".
7316         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
7317         CP_OPERATOR_STR.
7318         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
7319         CP_OPERATOR_LEN.
7320
7321 2017-07-17  Pedro Alves  <palves@redhat.com>
7322
7323         * cli/cli-cmds.c (complete_command): Use a completion tracker
7324         along with completion_find_completion_word for handle_brkchars
7325         phase.
7326         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
7327         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
7328         (struct gdb_rl_completion_word_info): New.
7329         (gdb_rl_find_completion_word): New.
7330         (completion_find_completion_word): New.
7331         * completer.h (completion_find_completion_word): Declare.
7332
7333 2017-07-17  Pedro Alves  <palves@redhat.com>
7334
7335         * ada-lang.c (symbol_completion_match): Adjust comments.
7336         (symbol_completion_add): Replace vector parameter with
7337         completion_tracker parameter.  Use it.
7338         (ada_make_symbol_completion_list): Rename to...
7339         (ada_collect_symbol_completion_matches): ... this.  Add
7340         completion_tracker parameter and use it.
7341         (ada_language_defn): Adjust.
7342         * break-catch-syscall.c (catch_syscall_completer): Adjust
7343         prototype and work with completion_tracker instead of VEC.
7344         * breakpoint.c (condition_completer): Adjust prototype and work
7345         with completion_tracker instead of VEC.
7346         * c-lang.c (c_language_defn, cplus_language_defn)
7347         (asm_language_defn, minimal_language_defn): Adjust to renames.
7348         * cli/cli-cmds.c (complete_command): Rework using
7349         completion_tracker.  Catch exceptions when completing.
7350         * cli/cli-decode.c (integer_unlimited_completer)
7351         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
7352         with completion_tracker instead of VEC.
7353         * command.h (struct completion_tracker): Forward declare.
7354         (completer_ftype, completer_handle_brkchars_ftype): Change
7355         types.
7356         (complete_on_cmdlist, complete_on_enum): Adjust.
7357         * completer.c: Include <algorithm>.
7358         (struct gdb_completer_state): New.
7359         (current_completion): New global.
7360         (readline_line_completion_function): Delete.
7361         (noop_completer, filename_completer)
7362         (filename_completer_handle_brkchars, complete_files_symbols)
7363         (linespec_location_completer): Adjust to work with a
7364         completion_tracker instead of a VEC.
7365         (string_or_empty): New.
7366         (collect_explicit_location_matches): Adjust to work with a
7367         completion_tracker instead of a VEC.
7368         (explicit_location_completer): Rename to ...
7369         (complete_explicit_location): ... this and adjust to work with a
7370         completion_tracker instead of a VEC.
7371         (location_completer): Adjust to work with a completion_tracker
7372         instead of a VEC.
7373         (add_struct_fields): Adjust to work with a completion_list instead
7374         of VEC.
7375         (expression_completer): Rename to ...
7376         (complete_expression): ... this and adjust to work with a
7377         completion_tracker instead of a VEC.  Use complete_files_symbols.
7378         (expression_completer): Reimplement on top of complete_expression.
7379         (symbol_completer): Adjust to work with a completion_tracker
7380         instead of a VEC.
7381         (enum complete_line_internal_reason): Add describing comments.
7382         (complete_line_internal_normal_command): Adjust to work with a
7383         completion_tracker instead of a VEC.
7384         (complete_line_internal): Rename to ...
7385         (complete_line_internal_1): ... this and adjust to work with a
7386         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
7387         handle_brkchars phase.
7388         (new_completion_tracker): Delete.
7389         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
7390         complete_line_internal_1.
7391         (free_completion_tracker): Delete.
7392         (INITIAL_COMPLETION_HTAB_SIZE): New.
7393         (completion_tracker::completion_tracker)
7394         (completion_tracker::~completion_tracker): New.
7395         (maybe_add_completion): Delete.
7396         (completion_tracker::maybe_add_completion)
7397         (completion_tracker::add_completion)
7398         (completion_tracker::add_completions): New.
7399         (throw_max_completions_reached_error): Delete.
7400         (complete_line): Adjust to work with a completion_tracker instead
7401         of a VEC.  Don't create a completion_tracker_t or check for max
7402         completions here.
7403         (command_completer, command_completer_handle_brkchars)
7404         (signal_completer, reg_or_group_completer_1)
7405         (reg_or_group_completer, default_completer_handle_brkchars):
7406         Adjust to work with a completion_tracker.
7407         (gdb_completion_word_break_characters_throw): New.
7408         (gdb_completion_word_break_characters): Reimplement.
7409         (line_completion_function): Delete.
7410         (completion_tracker::recompute_lowest_common_denominator)
7411         (expand_preserving_ws)
7412         (completion_tracker::build_completion_result)
7413         (completion_result::completion_result)
7414         (completion_result::completion_result)
7415         (completion_result::~completion_result)
7416         (completion_result::completion_result)
7417         (completion_result::release_match_list, compare_cstrings)
7418         (completion_result::sort_match_list)
7419         (completion_result::reset_match_list)
7420         (gdb_rl_attempted_completion_function_throw)
7421         (gdb_rl_attempted_completion_function): New.
7422         * completer.h (completion_list, struct completion_result)
7423         (class completion_tracker): New.
7424         (complete_line): Add completion_tracker parameter.
7425         (readline_line_completion_function): Delete.
7426         (gdb_rl_attempted_completion_function): New.
7427         (noop_completer, filename_completer, expression_completer)
7428         (location_completer, symbol_completer, command_completer)
7429         (signal_completer, reg_or_group_completer): Update prototypes.
7430         (completion_tracker_t, new_completion_tracker)
7431         (make_cleanup_free_completion_tracker): Delete.
7432         (enum maybe_add_completion_enum): Delete.
7433         (maybe_add_completion): Delete.
7434         (throw_max_completions_reached_error): Delete.
7435         * corefile.c (complete_set_gnutarget): Adjust to work with a
7436         completion_tracker instead of a VEC.
7437         * cp-abi.c (cp_abi_completer): Adjust to work with a
7438         completion_tracker instead of a VEC.
7439         * d-lang.c (d_language_defn): Adjust.
7440         * disasm.c (disassembler_options_completer): Adjust to work with a
7441         completion_tracker instead of a VEC.
7442         * f-lang.c (f_make_symbol_completion_list): Rename to ...
7443         (f_collect_symbol_completion_matches): ... this.  Adjust to work
7444         with a completion_tracker instead of a VEC.
7445         (f_language_defn): Adjust.
7446         * go-lang.c (go_language_defn): Adjust.
7447         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
7448         Adjust to work with a completion_tracker instead of a VEC.
7449         * infrun.c (handle_completer): Likewise.
7450         * interps.c (interpreter_completer): Likewise.
7451         * interps.h (interpreter_completer): Likewise.
7452         * language.c (unknown_language_defn, auto_language_defn)
7453         (local_language_defn): Adjust.
7454         * language.h (language_defn::la_make_symbol_completion_list):
7455         Rename to ...
7456         (language_defn::la_collect_symbol_completion_matches): ... this
7457         and adjust to work with a completion_tracker instead of a VEC.
7458         * m2-lang.c (m2_language_defn): Adjust.
7459         * objc-lang.c (objc_language_defn): Adjust.
7460         * opencl-lang.c (opencl_language_defn): Adjust.
7461         * p-lang.c (pascal_language_defn): Adjust.
7462         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
7463         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
7464         with a completion_tracker.
7465         * rust-lang.c (rust_language_defn): Adjust.
7466         * symtab.c (free_completion_list, do_free_completion_list)
7467         (return_val, completion_tracker): Delete.
7468         (completion_list_add_name, completion_list_add_symbol)
7469         (completion_list_add_msymbol, completion_list_objc_symbol)
7470         (completion_list_add_fields, add_symtab_completions): Add
7471         completion_tracker parameter and use it.
7472         (default_make_symbol_completion_list_break_on_1): Rename to...
7473         (default_collect_symbol_completion_matches_break_on): ... this.
7474         Add completion_tracker parameter and use it instead of allocating
7475         a completion tracker here.
7476         (default_make_symbol_completion_list_break_on): Delete old
7477         implementation.
7478         (default_make_symbol_completion_list): Delete.
7479         (default_collect_symbol_completion_matches): New.
7480         (make_symbol_completion_list): Delete.
7481         (collect_symbol_completion_matches): New.
7482         (make_symbol_completion_type): Rename to ...
7483         (collect_symbol_completion_matches_type): ... this.  Add
7484         completion_tracker parameter and use it instead of VEC.
7485         (make_file_symbol_completion_list_1): Rename to...
7486         (collect_file_symbol_completion_matches): ... this.  Add
7487         completion_tracker parameter and use it instead of VEC.
7488         (make_file_symbol_completion_list): Delete.
7489         (add_filename_to_list): Use completion_list instead of a VEC.
7490         (add_partial_filename_data::list): Now a completion_list.
7491         (make_source_files_completion_list): Work with a completion_list
7492         instead of a VEC.
7493         * symtab.h: Include "completer.h".
7494         (default_make_symbol_completion_list_break_on)
7495         (default_make_symbol_completion_list, make_symbol_completion_list)
7496         (make_symbol_completion_type, make_file_symbol_completion_list)
7497         (make_source_files_completion_list): Delete.
7498         (default_collect_symbol_completion_matches_break_on)
7499         (default_collect_symbol_completion_matches)
7500         (collect_symbol_completion_matches)
7501         (collect_symbol_completion_matches_type)
7502         (collect_file_symbol_completion_matches)
7503         (make_source_files_completion_list): New.
7504         * top.c (init_main): Don't install a rl_completion_entry_function
7505         hook.  Install a rl_attempted_completion_function hook instead.
7506         * tui/tui-layout.c (layout_completer): Adjust to work with a
7507         completion_tracker.
7508         * tui/tui-regs.c (tui_reggroup_completer):
7509         * tui/tui-win.c (window_name_completer, focus_completer)
7510         (winheight_completer): Adjust to work with a completion_tracker.
7511         * value.c: Include "completer.h".
7512         (complete_internalvar): Adjust to work with a completion_tracker.
7513         * value.h (complete_internalvar): Likewise.
7514
7515 2017-07-17  Pedro Alves  <palves@redhat.com>
7516
7517         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
7518         renames.
7519         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
7520         comments to completer_ftype's declaration.
7521         <completer_handle_brkchars>: Change type to
7522         completer_handle_brkchars_ftype.
7523         * command.h (completer_ftype): Add describing comment and give
7524         names to parameters.
7525         (completer_ftype_void): Rename to ...
7526         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
7527         (set_cmd_completer_handle_brkchars): Adjust.
7528         * completer.c (filename_completer_handle_brkchars): New function.
7529         (complete_line_internal_normal_command): New function, factored
7530         out from ...
7531         (complete_line_internal): ... here.
7532         (command_completer_handle_brkchars)
7533         (default_completer_handle_brkchars)
7534         (completer_handle_brkchars_func_for_completer): New functions.
7535         * completer.h (set_gdb_completion_word_break_characters): Delete
7536         declaration.
7537         (completer_handle_brkchars_func_for_completer): New declaration.
7538         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
7539         completer_handle_brkchars_func_for_completer.
7540
7541 2017-07-17  Pedro Alves  <palves@redhat.com>
7542
7543         * completer.c (symbol_completer): New function, based on
7544         make_symbol_completion_list_fn.
7545         * completer.h (symbol_completer): New declaration.
7546         * guile/scm-cmd.c (cmdscm_completers): Adjust.
7547         * python/py-cmd.c (completers): Adjust.
7548         * symtab.c (make_symbol_completion_list_fn): Delete.
7549         * symtab.h (make_symbol_completion_list_fn): Delete.
7550         * cli/cli-decode.c (add_cmd): Adjust.
7551
7552 2017-07-17  Pedro Alves  <palves@redhat.com>
7553
7554         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
7555         * dwarf2read.c: Include "filename-seen-cache.h".
7556         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
7557         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
7558         * filename-seen-cache.c: New file.
7559         * filename-seen-cache.h: New file.
7560         * symtab.c: Include "filename-seen-cache.h".
7561         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7562         (create_filename_seen_cache, clear_filename_seen_cache)
7563         (delete_filename_seen_cache, filename_seen): Delete, parts moved
7564         to filename-seen-cache.h/filename-seen-cache.c.
7565         (output_source_filename, sources_info)
7566         (maybe_add_partial_symtab_filename)
7567         (make_source_files_completion_list): Adjust to use
7568         filename_seen_cache.
7569
7570 2017-07-17  Pedro Alves  <palves@redhat.com>
7571
7572         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
7573         fields.
7574         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
7575         dwarf2_debug_sections*)): New.
7576         (dwarf2_per_objfile::dwarf2_per_objfile(const
7577         dwarf2_per_objfile&)): Declare as deleted.
7578         (dwarf2_per_objfile::operator=): Declare as deleted.
7579         (dwarf2_per_objfile::dwarf2_per_objfile)
7580         (dwarf2_per_objfile::~dwarf2_per_objfile)
7581         (dwarf2_per_objfile::free_cached_comp_units): New.
7582         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7583         ctor.  Call dwarf2_per_objfile's ctor manually.
7584         (dwarf2_locate_sections): Deleted/refactored as ...
7585         (dwarf2_per_objfile::locate_sections): ... this new method.
7586         (free_cached_comp_units): Defer to
7587         dwarf2_per_objfile::free_cached_comp_units.
7588         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7589
7590 2017-07-14  Tom Tromey  <tom@tromey.com>
7591
7592         PR rust/21764:
7593         * rust-exp.y (convert_ast_to_expression): Add "want_type"
7594         parameter.
7595         <UNOP_SIZEOF>: Split into separate case.
7596         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
7597
7598 2017-07-14  Tom Tromey  <tom@tromey.com>
7599
7600         PR rust/21763:
7601         * symtab.c (symbol_matches_domain): Add language_rust to special
7602         case.
7603         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7604         treat LOC_TYPEDEF symbols as variables.
7605
7606 2017-07-14  Pedro Alves  <palves@redhat.com>
7607
7608         * symtab.c (make_file_symbol_completion_list_1): Iterate over
7609         symtabs matching all symtabs with SRCFILE as file name instead of
7610         only considering the first hit, with lookup_symtab.
7611
7612 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7613
7614         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7615         operator_name parameters.
7616         (gen_expr): Update function call.
7617
7618 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7619
7620         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7621         parameter.
7622         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7623         Likewise.
7624         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7625         parameter, use agent_expr::gdbarch instead, update function
7626         calls.
7627         (locexpr_tracepoint_var_ref): Likewise.
7628         (loclist_tracepoint_var_ref): Likewise.
7629         * ax-gdb.c (gen_trace_static_fields): Likewise.
7630         (gen_traced_pop): Likewise.
7631         (gen_frame_args_address): Likewise.
7632         (gen_frame_locals_address): Likewise.
7633         (gen_var_ref): Likewise.
7634         (gen_struct_ref_recursive): Likewise.
7635         (gen_static_field): Likewise.
7636         (gen_maybe_namespace_elt): Likewise.
7637         (gen_expr): Likewise.
7638         (gen_trace_for_var): Likewise.
7639         (gen_trace_for_expr): Likewise.
7640         (gen_trace_for_return_address): Likewise.
7641
7642 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7643
7644         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7645         parameter.
7646         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7647
7648 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7649
7650         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7651         from ax, update calls.
7652         (gen_usual_arithmetic): Likewise.
7653         (gen_integral_promotions): Likewise.
7654         (gen_bitfield_ref): Likewise.
7655         (gen_primitive_field): Likewise.
7656         (gen_struct_ref_recursive): Likewise.
7657         (gen_struct_ref): Likewise.
7658         (gen_maybe_namespace_elt): Likewise.
7659         (gen_struct_elt_for_reference): Likewise.
7660         (gen_namespace_elt): Likewise.
7661         (gen_aggregate_elt_ref): Likewise.
7662         (gen_expr): Get gdbarch from ax, update calls.
7663         (gen_expr_binop_rest): Likewise.
7664
7665 2017-07-13  Pedro Alves  <palves@redhat.com>
7666
7667         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7668         as default tdesc.
7669         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7670         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7671         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7672         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
7673         tdep.
7674         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7675         Get final tdesc from the tdep.
7676         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7677         default tdesc.
7678         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7679         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7680         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7681         Use it as default tdesc.
7682         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7683         down to amd_init_abi.  No longer handle fallback tdesc here.
7684         * amd64-tdep.h (tdesc_x32): Declare.
7685         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7686         parameter.
7687         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7688         as default tdesc.
7689
7690 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7691
7692         * s390-linux-tdep.c (s390_process_record): Add support for
7693         instructions new in arch12.
7694
7695 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7696
7697         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7698         PT_GETFSBASE and PT_GETGSBASE.
7699         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7700         PT_SETGSBASE.
7701
7702 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7703
7704         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7705         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7706         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7707         those rules.
7708         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7709         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7710         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7711         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7712         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7713         * features/i386/amd64.xml: Add 64bit-segments.xml.
7714         * features/i386/amd64-avx-avx512.c: Regenerated.
7715         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7716         * features/i386/amd64-avx-mpx.c: Regenerated.
7717         * features/i386/amd64-avx.c: Regenerated.
7718         * features/i386/amd64-mpx.c: Regenerated.
7719         * features/i386/amd64.c: Regenerated.
7720         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7721         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7722         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7723         * regformats/i386/amd64-avx.dat: Regenerated.
7724         * regformats/i386/amd64-mpx.dat: Regenerated.
7725         * regformats/i386/amd64.dat: Regenerated.
7726
7727 2017-07-10  Yao Qi  <yao.qi@linaro.org>
7728
7729         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7730         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7731
7732 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
7733
7734         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7735         unsetenv.
7736         * gnulib/aclocal.m4: Regenerate.
7737         * gnulib/config.in: Regenerate.
7738         * gnulib/configure: Regenerate.
7739         * gnulib/import/Makefile.am: Regenerate.
7740         * gnulib/import/Makefile.in: Regenerate.
7741         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7742         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7743         * gnulib/import/m4/environ.m4: New file.
7744         * gnulib/import/m4/setenv.m4: New file.
7745         * gnulib/import/setenv.c: New file.
7746         * gnulib/import/unsetenv.c: New file.
7747
7748 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
7749
7750         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7751         address when op is DW_OP_addr.
7752
7753 2017-07-09  Tom Tromey  <tom@tromey.com>
7754
7755         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7756         check and apply to outer type.
7757
7758 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7759
7760         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7761         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7762         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7763         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7764
7765 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7766
7767         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7768
7769 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7770
7771         * corelow.c (get_core_siginfo): Remove.
7772         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7773         instead of get_core_siginfo.
7774         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7775         * gdbarch.h: Re-generate.
7776         * gdbarch.c: Re-generate.
7777         * linux-tdep.c (linux_core_xfer_siginfo): New.
7778         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7779
7780 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7781
7782         * corelow.c (thread_section_name): Move to ...
7783         * gdbcore.h (thread_section_name): ... here.
7784
7785 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7786
7787         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7788         (struct siginfo32): New.
7789         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7790         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7791         via ptrace(PT_LWPINFO).
7792
7793 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7794
7795         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7796         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7797         (fbsd_get_siginfo_type): New.
7798         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7799         (_initialize_fbsd_tdep): New.
7800
7801 2017-07-06  David Blaikie  <dblaikie@gmail.com>
7802
7803         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7804         a singular dwo_unit*) to support multiple CUs in the same way that
7805         multiple TUs are supported.
7806         (create_cus_hash_table): Replace create_dwo_cu with a function for
7807         parsing multiple CUs from a DWO file.
7808         (open_and_init_dwo_file): Use create_cus_hash_table rather than
7809         create_dwo_cu.
7810         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7811         htab_find, rather than comparing the signature to a singleton CU in
7812         the dwo_file.
7813
7814 2017-07-06  Pedro Alves  <palves@redhat.com>
7815
7816         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7817
7818 2017-07-04  Pedro Alves  <palves@redhat.com>
7819
7820         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7821         * gdbtypes.h (TYPE_STATIC): Delete.
7822         (struct fn_field) <is_public, is_abstract, is_static, is_final,
7823         is_synchronized, is_native>: Delete.
7824         <dummy>: Bump.
7825         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7826         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7827         (TYPE_FN_FIELD_ABSTRACT): Delete.
7828
7829 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
7830
7831         * buffer.h (buffer_finish): Fix spelling mistakes.
7832
7833 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
7834
7835         * .dir-locals.el: Automatically switch to C-style comments in
7836         versions of Emacs that support the feature.
7837
7838 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7839             Pedro Alves  <palves@redhat.com>
7840
7841         PR cli/21688
7842         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7843         (process_next_line): New variable 'inline_cmd'.
7844         Adjust 'if' clauses for "python", "compile" and "guile" to use
7845         'command_name_equals' and check for '!inline_cmd'.
7846
7847 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7848
7849         PR cli/21688
7850         * cli/cli-script.c (command_name_equals_not_inline): New function.
7851         (process_next_line): Adjust 'if' clauses for "python", "compile"
7852         and "guile" to use command_name_equals_not_inline.
7853
7854 2017-06-29  Pedro Alves  <palves@redhat.com>
7855
7856         * completer.c (expression_completer): Call
7857         linespec_location_completer instead of location_completer.
7858
7859 2017-06-29  Pedro Alves  <palves@redhat.com>
7860
7861         * completer.c (expression_completer): Remove code that recomputes
7862         'text' from 'word'.
7863
7864 2017-06-29  Yao Qi  <yao.qi@linaro.org>
7865
7866         * regformats/regdat.sh: Generate code with
7867         "ifndef IN_PROCESS_AGENT".
7868
7869 2017-06-28  Pedro Alves  <palves@redhat.com>
7870
7871         * command.h: Include "common/scoped_restore.h".
7872
7873 2017-06-28  Yao Qi  <yao.qi@linaro.org>
7874
7875         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7876         instead of obstack_grow.
7877
7878 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
7879
7880         PR gdb/21337
7881         * symfile.c (reread_symbols): Call objfiles_changed just before
7882         read_symbols.
7883
7884 2017-06-27  Pedro Alves  <palves@redhat.com>
7885
7886         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7887         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7888         (completion_list_add_symbol, completion_list_add_msymbol):
7889         ... these new functions.
7890         (add_symtab_completions)
7891         (default_make_symbol_completion_list_break_on_1): Adjust.
7892
7893 2017-06-27  Pedro Alves  <palves@redhat.com>
7894
7895         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7896         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
7897         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7898         dtor.
7899         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
7900         'storage_obstack' field an auto_obstack.  In-class initialize all
7901         non-bitfield fields.  Make minsyms_read bool.
7902         * symfile.c (read_symbols): Adjust.
7903
7904 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
7905
7906         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7907         (gdbsim_store_register): Likewise.
7908
7909 2017-06-27  Pedro Alves  <palves@redhat.com>
7910
7911         * c-exp.y (name_obstack): Now an auto_obstack.
7912         (yylex): Use auto_obstack::clear.
7913         (c_parse): Use auto_obstack::clear instead of reinitializing and
7914         freeing the obstack.
7915         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7916         * d-exp.y (name_obstack): Now an auto_obstack.
7917         (yylex): Use auto_obstack::clear.
7918         (d_parse): Use auto_obstack::clear instead of reinitializing and
7919         freeing the obstack.
7920         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7921         auto_obstack.
7922         * dwarf2read.c (create_addrmap_from_index)
7923         (dwarf2_build_psymtabs_hard)
7924         (update_enumeration_type_from_children): Likewise.
7925         * gdb_obstack.h (auto_obstack): New type.
7926         * go-exp.y (name_obstack): Now an auto_obstack.
7927         (build_packaged_name): Use auto_obstack::clear.
7928         (go_parse): Use auto_obstack::clear instead of reinitializing and
7929         freeing the obstack.
7930         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7931         auto_obstack.
7932         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7933         * rust-exp.y (work_obstack): Now an auto_obstack.
7934         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7935         reinitializing and freeing the obstack.
7936         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7937         (host_char_to_target): Use auto_obstack.
7938         * utils.h (make_cleanup_obstack_free): Delete declaration.
7939         * valprint.c (generic_emit_char, generic_printstr): Use
7940         auto_obstack.
7941
7942 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7943
7944         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7945         thread.
7946         (darwin_init_thread_list): Don't update dummy thread.
7947         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7948
7949 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7950
7951         * record-full.c (netorder16): Remove.
7952
7953 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7954
7955         * common/diagnostics.h: Define macros for GCC.
7956         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
7957         * common/vec.h: Include diagnostics.h.
7958         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
7959         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
7960         warning.
7961
7962 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7963
7964         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
7965         New macro.
7966         * ada-lex.l: Ignore deprecated register warnings.
7967
7968 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7969
7970         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
7971         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
7972
7973 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7974
7975         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
7976         its own line.
7977
7978 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7979
7980         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
7981
7982 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
7983
7984         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
7985         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
7986         (xtensa_register_read_masked): Likewise.
7987
7988 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
7989
7990         * common/environ.c (gdb_environ::unset): Update comment.
7991
7992 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7993
7994         * python/py-unwind.c (pyuw_sniffer): Allocate space for
7995         registers.
7996
7997 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7998
7999         * record-full.c (record_full_exec_insn): Use byte_vector.
8000
8001 2017-06-22  Yao Qi  <yao.qi@linaro.org>
8002
8003         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
8004         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8005
8006 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
8007
8008         * remote.c (cached_reg): Move from here...
8009         * regcache.h (cached_reg): ...to here.
8010         * python/py-unwind.c (struct reg_info): Remove.
8011         (cached_frame_info): Use cached_reg_t.
8012         (pyuw_prev_register): Likewise.
8013         (pyuw_sniffer): Use cached_reg_t and allocate registers.
8014         (pyuw_dealloc_cache): Free all registers.
8015
8016 2017-06-22  Pedro Alves  <palves@redhat.com>
8017             Simon Marchi  <simon.marchi@ericsson.com>
8018
8019         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
8020         warning.
8021         * common/diagnostics.h: New file.
8022
8023 2017-06-22  Pedro Alves  <palves@redhat.com>
8024
8025         * common/agent.h: Add include guards.
8026
8027 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
8028
8029         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
8030         talk about addressable units instead of bytes.
8031
8032 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8033
8034         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
8035         of '::const_iterator'.
8036
8037 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8038
8039         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8040         'unittests/environ-selftests.c'.
8041         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
8042         * charset.c (find_charset_names): Declare object 'iconv_env'.
8043         Update code to use 'iconv_env' object.  Remove call to
8044         'free_environ'.
8045         * common/environ.c: Include <utility>.
8046         (make_environ): Delete function.
8047         (free_environ): Delete function.
8048         (gdb_environ::clear): New function.
8049         (gdb_environ::operator=): New function.
8050         (gdb_environ::get): Likewise.
8051         (environ_vector): Delete function.
8052         (set_in_environ): Delete function.
8053         (gdb_environ::set): New function.
8054         (unset_in_environ): Delete function.
8055         (gdb_environ::unset): New function.
8056         (gdb_environ::envp): Likewise.
8057         * common/environ.h: Include <vector>.
8058         (struct gdb_environ): Delete; transform into...
8059         (class gdb_environ): ... this class.
8060         (free_environ): Delete prototype.
8061         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
8062         environ_vector): Likewise.
8063         * infcmd.c (run_command_1): Update code to call
8064         'envp' from 'gdb_environ' class.
8065         (environment_info): Update code to call methods from 'gdb_environ'
8066         class.
8067         (unset_environment_command): Likewise.
8068         (path_info): Likewise.
8069         (path_command): Likewise.
8070         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
8071         (inferior::inferior): Initialize 'environment' using the host's
8072         information.
8073         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
8074         Include "environ.h".
8075         (class inferior) <environment>: Change type from 'struct
8076         gdb_environ' to 'gdb_environ'.
8077         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
8078         methods from 'gdb_environ' class.
8079         * solib.c (solib_find_1): Likewise
8080         * unittests/environ-selftests.c: New file.
8081
8082 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8083
8084         * features/i386/i386-linux.xml: Exchange the order of including
8085         32bit-linux.xml and 32bit-sse.xml.
8086         * features/i386/i386-linux.c: Regenerated.
8087
8088 2017-06-20  Yao Qi  <yao.qi@linaro.org>
8089
8090         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
8091         Delete copy ctor and assignment operator.
8092         (tdesc_type): Likewise.
8093         (tdesc_feature): Likewise.
8094         (tdesc_free_reg): Remove.
8095         (tdesc_create_reg): Use new.
8096         (tdesc_free_type): Remove.
8097         (tdesc_create_vector): Use new.
8098         (tdesc_create_union): Likewise.
8099         (tdesc_create_flags): Likewise.
8100         (tdesc_create_enum): Likewise.
8101         (tdesc_free_feature): Delete.
8102         (free_target_description): Use delete.
8103
8104 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
8105
8106         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
8107         registers.
8108
8109 2017-06-19  Pedro Alves  <palves@redhat.com>
8110
8111         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
8112         after gdb::unlinker.
8113
8114 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
8115
8116         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
8117         gdb_environ to access an environment variable.
8118
8119 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
8120
8121         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
8122         gdb_byte*.
8123
8124 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8125
8126         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
8127
8128 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8129
8130         * configure: Re-generate.
8131         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
8132
8133 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8134
8135         * configure: Re-generate.
8136         * warning.m4: Pass -Werror to compiler when checking for
8137         supported warning flags.
8138
8139 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8140
8141         * Makefile.in (COMPILE.pre): Add "-x c++".
8142
8143 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
8144             Pedro Alves  <palves@redhat.com>
8145             Yao Qi  <yao.qi@linaro.org>
8146
8147         * defs.h (RequireLongest): New.
8148         (extract_integer): Declare function template.
8149         (extract_signed_integer): Remove the declaration, but define it
8150         static inline.
8151         (extract_unsigned_integer): Likewise.
8152         (store_integer): Declare function template.
8153         (store_signed_integer): Remove the declaration, but define it
8154         static inline.
8155         (store_unsigned_integer): Likewise.
8156         * findvar.c (extract_integer): New function template.
8157         (extract_signed_integer): Remove.
8158         (extract_unsigned_integer): Remove.
8159         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
8160         instantiations.
8161         (store_integer): New function template.
8162         (store_signed_integer): Remove.
8163         (store_unsigned_integer): Remove.
8164         (store_integer): Explicit instantiations.
8165         * regcache.c (regcache_raw_read_signed): Update.
8166         (regcache::raw_read): New function.
8167         (regcache::raw_read_signed): Remove.
8168         (regcache::raw_read_unsigned): Remove.
8169         (regcache_raw_read_unsigned): Update.
8170         (regcache_raw_write_unsigned): Update.
8171         (regcache::raw_write_signed): Remove.
8172         (regcache::raw_write): New function.
8173         (regcache_cooked_read_signed): Update.
8174         (regcache::raw_write_unsigned): Remove.
8175         (regcache::cooked_read_signed): Remove.
8176         (regcache_cooked_read_unsigned): Update.
8177         (regcache::cooked_read_unsigned): Remove.
8178         (regcache_cooked_write_signed): Update.
8179         (regcache_cooked_write_unsigned): Update.
8180         * regcache.h (regcache) <raw_read_signed>: Remove.
8181         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
8182         <raw_read, raw_write>: New.
8183         <cooked_read_signed, cooked_write_signed>: Remove.
8184         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
8185         <cooked_read, cooked_write>: New.
8186         * sh64-tdep.c (sh64_pseudo_register_read): Update.
8187         (sh64_pseudo_register_write): Update.
8188
8189 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
8190
8191         * arc-tdep.c (arc_disassembler_options): New variable.
8192         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
8193         of default_print_insn.
8194         (arc_delayed_print_insn): Set info->section when needed,
8195         use default_print_insn to retrieve a disassembler.
8196
8197 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
8198
8199         PR gdb/21574
8200         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
8201         to mention $SHELL and startup-with-shell.
8202
8203 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
8204
8205         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
8206
8207 2017-06-14  Yao Qi  <yao.qi@linaro.org>
8208
8209         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
8210         default_print_insn instead of print_insn_aarch64.
8211         * arm-tdep.c (gdb_print_insn_arm): Call
8212         default_print_insn instead of print_insn_big_arm
8213         and print_insn_little_arm.
8214         * i386-tdep.c (i386_print_insn): Call default_print_insn
8215         instead of print_insn_i386.
8216         * ia64-tdep.c (ia64_print_insn): Call
8217         default_print_insn instead of print_insn_ia64.
8218         * mips-tdep.c (gdb_print_insn_mips): Call
8219         default_print_insn instead of print_insn_big_mips
8220         and print_insn_little_mips.
8221         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
8222         instead of print_insn_spu.
8223
8224 2017-06-14  Pedro Alves  <palves@redhat.com>
8225
8226         * ada-lang.c: Include "common/byte-vector.h".
8227         (ada_value_primitive_packed_val): Use gdb::byte_vector.
8228         * charset.c (wchar_iterator::iterate): Resize the vector instead
8229         of reserving it.
8230         * common/byte-vector.h: Include "common/def-vector.h".
8231         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
8232         * cli/cli-dump.c: Include "common/byte-vector.h".
8233         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
8234         * common/byte-vector.h: New file.
8235         * common/def-vector.h: New file.
8236         * common/default-init-alloc.h: New file.
8237         * dwarf2loc.c: Include "common/byte-vector.h".
8238         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
8239         instead of reserving it.
8240         * dwarf2read.c: Include "common/byte-vector.h".
8241         (data_buf::m_vec): Now a gdb::byte_vector.
8242         * gdb_regex.c: Include "common/def-vector.h".
8243         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
8244         * mi/mi-main.c: Include "common/byte-vector.h".
8245         (mi_cmd_data_read_memory): Use gdb::byte_vector.
8246         * printcmd.c: Include "common/byte-vector.h".
8247         (print_scalar_formatted): Use gdb::byte_vector.
8248         * valprint.c: Include "common/byte-vector.h".
8249         (maybe_negate_by_bytes, print_decimal_chars): Use
8250         gdb::byte_vector.
8251
8252 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8253
8254         * darwin-nat.c: Include "nat/fork-inferior.h".
8255
8256 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8257
8258         * configure.nat: Factor out Darwin bits that are not
8259         architecture-specific.  Add fork-inferior.o.
8260
8261 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8262
8263         * configure.nat: Factor out AIX bits that are not
8264         architecture-specific.  Add fork-inferior.o.
8265
8266 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8267
8268         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
8269         (read_pieced_value, write_pieced_value): ...here.  Reduce to
8270         wrappers that just call rw_pieced_value.
8271
8272 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8273
8274         * dwarf2loc.c (write_pieced_value): When writing the data for a
8275         memory piece, use write_memory_with_notification instead of
8276         write_memory.
8277
8278 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8279
8280         * valops.c (read_value_memory): Change embedded_offset to
8281         represent a bit offset instead of a byte offset.
8282         * value.h (read_value_memory): Adjust comment.
8283
8284 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8285
8286         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
8287         dest_offset_bits and source_offset_bits.
8288         (write_pieced_value): Likewise.
8289
8290 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8291
8292         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
8293         given by DW_OP_bit_piece.
8294         (write_pieced_value): Likewise.
8295
8296 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8297
8298         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
8299         some other preparations to the places where sufficient information
8300         is available.
8301         (write_pieced_value): Likewise.
8302
8303 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8304
8305         * dwarf2loc.c (bits_to_bytes): New function.
8306         (read_pieced_value): Fix offset calculations for register pieces
8307         on big-endian targets.
8308         (write_pieced_value): Likewise.
8309
8310 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8311
8312         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
8313         (write_pieced_value): Likewise.
8314
8315 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8316
8317         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
8318         transfer the source value's least significant bits, instead of its
8319         lowest-addressed ones.  Rename type_len to max_offset.
8320         (read_pieced_value): Mirror above changes to write_pieced_value as
8321         applicable.
8322
8323 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8324
8325         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
8326         truncate full bytes from dest_offset_bits before using it as an
8327         offset into the buffer.
8328
8329 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8330
8331         * dwarf2loc.c (write_pieced_value): Include transfer size in
8332         byte-wise check.
8333
8334 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8335
8336         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
8337         calculation of this_size.
8338
8339 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8340
8341         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
8342         when targeting a bit-field.
8343         (write_pieced_value): Likewise.
8344
8345 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8346
8347         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
8348         (allocate_piece_closure): Drop addr_size parameter.
8349         (dwarf2_evaluate_loc_desc_full): Adjust call to
8350         allocate_piece_closure.
8351
8352 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8353
8354         PR gdb/21226
8355         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
8356         the LSB end, independent of endianness.
8357
8358 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8359
8360         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
8361         size capping.
8362
8363 2017-06-13  Yao Qi  <yao.qi@linaro.org>
8364
8365         * mips-linux-nat.c: Move include features/mips*-linux.c to
8366         mips-linux-tdep.c.
8367         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
8368         to mips-linux-tdep.c.
8369         * mips-linux-tdep.c: Include features/mips*-linux.c
8370         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
8371         functions.
8372         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
8373         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
8374         (tdesc_mips64_dsp_linux): Declare.
8375
8376 2017-06-12  Tom Tromey  <tom@tromey.com>
8377
8378         * valprint.h (val_print_type_code_int): Remove.
8379         * valprint.c (generic_val_print_int): Always call
8380         val_print_scalar_formatted.
8381         (val_print_type_code_int): Remove.
8382         * printcmd.c (print_scalar_formatted): Handle options->format==0.
8383         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
8384         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
8385         * ada-valprint.c (ada_val_print_num): Use
8386         val_print_scalar_formatted.
8387
8388 2017-06-12  Tom Tromey  <tom@tromey.com>
8389
8390         * printcmd.c (print_scalar_formatted): Unify the two switches.
8391         Don't convert scalars to LONGEST.
8392
8393 2017-06-12  Tom Tromey  <tom@tromey.com>
8394
8395         PR exp/16225:
8396         * valprint.h (print_decimal_chars): Update.
8397         * valprint.c (maybe_negate_by_bytes): New function.
8398         (print_decimal_chars): Add "is_signed" argument.
8399         * printcmd.c (print_scalar_formatted): Update.
8400
8401 2017-06-12  Tom Tromey  <tom@tromey.com>
8402
8403         PR exp/16225:
8404         * valprint.h (print_binary_chars, print_hex_chars): Update.
8405         * valprint.c (val_print_type_code_int): Update.
8406         (print_binary_chars): Add "zero_pad" argument.
8407         (emit_octal_digit): New function.
8408         (print_octal_chars): Don't zero-pad.
8409         (print_decimal_chars): Likewise.
8410         (print_hex_chars): Add "zero_pad" argument.
8411         * sh64-tdep.c (sh64_do_fp_register): Update.
8412         * regcache.c (regcache::dump): Update.
8413         * printcmd.c (print_scalar_formatted): Update.
8414         * infcmd.c (default_print_one_register_info): Update.
8415
8416 2017-06-12  Pedro Alves  <palves@redhat.com>
8417             Alan Hayward  <alan.hayward@arm.com>
8418
8419         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
8420         (mips_eabi_push_dummy_call): Rename local 'regsize' to
8421         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
8422         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
8423         Assert that abi_regsize bytes fit in 'ref_valbuf'.
8424
8425 2017-06-12  Pedro Alves  <palves@redhat.com>
8426
8427         * dwarf2read.c (mapped_symtab::data): Now a vector of
8428         symtab_index_entry instead of vector of
8429         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
8430         whether an element's name is NULL instead of checking whether the
8431         element itself is NULL.
8432         (find_slot): Change return type.  Adjust.
8433         (hash_expand, , add_index_entry, uniquify_cu_indices)
8434         (write_hash_table): Adjust.
8435
8436 2017-06-12  Pedro Alves  <palves@redhat.com>
8437
8438         * dwarf2read.c (recursively_count_psymbols): New function.
8439         (write_psymtabs_to_index): Call it to compute number of psyms and
8440         pass estimate size of psyms_seen to unordered_set's ctor.
8441
8442 2017-06-12  Pedro Alves  <palves@redhat.com>
8443
8444         * dwarf2read.c (write_hash_table): Check if key already exists
8445         before emplacing.
8446
8447 2017-06-12  Pedro Alves  <palves@redhat.com>
8448
8449         * dwarf2read.c (data_buf::append_space): Rename to...
8450         (data_buf::grow): ... this, and make private.  Adjust all callers.
8451         (data_buf::append_uint): New method.
8452         (add_address_entry, write_one_signatured_type)
8453         (write_psymtabs_to_index): Use it.
8454
8455 2017-06-12  Pedro Alves  <palves@redhat.com>
8456
8457         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
8458         (file_write (FILE *, const std::vector<Elem>&)): Delete.
8459         (data_buf::file_write): Call ::fwrite directly.
8460
8461 2017-06-12  Pedro Alves  <palves@redhat.com>
8462
8463         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
8464         std::vector::erase.
8465
8466 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8467
8468         Code cleanup: C++ify .gdb_index producer.
8469         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
8470         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
8471         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
8472         (create_strtab, add_string): Remove.
8473         (file_write, data_buf): New.
8474         (struct symtab_index_entry): Use std::vector for cu_indices.
8475         (struct mapped_symtab): Use std::vector for data.
8476         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
8477         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
8478         Remove.
8479         (find_slot): Change return type.  Update it to the new data structures.
8480         (hash_expand, add_index_entry): Update it to the new data structures.
8481         (offset_type_compare): Remove.
8482         (uniquify_cu_indices): Update it to the new data structures.
8483         (c_str_view, c_str_view_hasher, vector_hasher): New.
8484         (add_indices_to_cpool): Remove.
8485         (write_hash_table): Update it to the new data structures.
8486         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
8487         (eq_psymtab_cu_index): Remove.
8488         (psym_index_map): New typedef.
8489         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
8490         reference and std::unordered_map for cu_index_htab.
8491         (add_address_entry, add_address_entry_worker, write_address_map)
8492         (write_psymbols): Update it to the new data structures.
8493         (write_obstack): Remove.
8494         (struct signatured_type_index_data): Change types_list to a data_buf
8495         reference and psyms_seen to a std::unordered_set reference.
8496         (write_one_signatured_type, recursively_write_psymbols)
8497         (write_psymtabs_to_index): Update it to the new data structures.
8498
8499 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
8500
8501         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
8502         separate-debug-file commands.
8503         * symfile.h (separate_debug_file_debug): New global.
8504         * symfile.c (separate_debug_file_debug): New global.
8505         (separate_debug_file_exists, find_separate_debug_file): Add
8506         debug output.
8507         (_initialize_symfile): Add "set debug separate-debug-file"
8508         command.
8509         * build-id.c (build_id_to_debug_bfd,
8510         find_separate_debug_file_by_buildid): Add debug output.
8511
8512 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8513
8514         * gdbarch.sh (displaced_step_free_closure): Remove.
8515         * gdbarch.h, gdbarch.c: Re-generate.
8516         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
8517         displaced_step_free_closure.
8518         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
8519         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
8520         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8521         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8522         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8523         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8524         * arch-utils.h (simple_displaced_step_free_closure): Remove.
8525         * arch-utils.c (simple_displaced_step_free_closure): Remove.
8526         * infrun.c (displaced_step_clear): Call xfree instead of
8527         gdbarch_displaced_step_free_closure.
8528
8529 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
8530
8531         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
8532         NULL".
8533
8534 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
8535
8536         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
8537         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
8538         (mn10300_push_dummy_call): Likewise.
8539
8540 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8541
8542         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
8543
8544 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8545
8546         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
8547
8548 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8549
8550         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
8551         able to start inferiors using a shell.
8552         (New remote packets): Announce new packet "QStartupWithShell".
8553         * remote.c: Add PACKET_QStartupWithShell.
8554         (extended_remote_create_inferior): Handle new
8555         PACKET_QStartupWithShell.
8556         (remote_protocol_features) <QStartupWithShell>: New entry for
8557         PACKET_QStartupWithShell.
8558         (_initialize_remote): Call "add_packet_config_cmd" for
8559         QStartupShell.
8560
8561 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8562             Pedro Alves  <palves@redhat.com>
8563
8564         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8565         and "nat/fork-inferior.h".
8566         * common/common-inferior.h: New file, with contents from
8567         "gdb/inferior.h".
8568         * commom/common-utils.c: Include "common-utils.h".
8569         (stringify_argv): New function.
8570         * common/common-utils.h (stringify_argv): New prototype.
8571         * configure.nat: Add "fork-inferior.o" as a dependency for
8572         "*linux*", "fbsd*" and "nbsd*" hosts.
8573         * corefile.c (get_exec_file): Update comment.
8574         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
8575         instead of "startup_inferior".
8576         (darwin_create_inferior): Call "add_thread_silent" after
8577         "fork_inferior".
8578         * fork-child.c: Cleanup unnecessary includes.
8579         (SHELL_FILE): Move to "common/common-fork-child.c".
8580         (environ): Likewise.
8581         (exec_wrapper): Initialize.
8582         (get_exec_wrapper): New function.
8583         (breakup_args): Move to "common/common-fork-child.c"; rename to
8584         "breakup_args_for_exec".
8585         (escape_bang_in_quoted_argument): Move to
8586         "common/common-fork-child.c".
8587         (saved_ui): New variable.
8588         (prefork_hook): New function.
8589         (postfork_hook): Likewise.
8590         (postfork_child_hook): Likewise.
8591         (gdb_startup_inferior): Likewise.
8592         (fork_inferior): Move to "common/common-fork-child.c".  Update
8593         function to support gdbserver.
8594         (startup_inferior): Likewise.
8595         * gdbcore.h (get_exec_file): Remove declaration.
8596         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8597         instead of "startup_inferior".  Call "add_thread_silent" after
8598         "fork_inferior".
8599         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8600         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8601         instead of "startup_inferior".  Call "add_thread_silent" after
8602         "fork_inferior".
8603         * inferior.h: Include "common-inferior.h".
8604         (trace_start_error): Move to "common/common-utils.h".
8605         (trace_start_error_with_name): Likewise.
8606         (fork_inferior): Move prototype to "nat/fork-inferior.h".
8607         (startup_inferior): Likewise.
8608         (gdb_startup_inferior): New prototype.
8609         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8610         * nat/fork-inferior.h: New file.
8611         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8612         instead of "startup_inferior".  Call "add_thread_silent" after
8613         "fork_inferior".
8614         * target.h (target_terminal_init): Move prototype to
8615         "target/target.h".
8616         (target_terminal_inferior): Likewise.
8617         (target_terminal_ours): Likewise.
8618         * target/target.h (target_terminal_init): New prototype, moved
8619         from "target.h".
8620         (target_terminal_inferior): Likewise.
8621         (target_terminal_ours): Likewise.
8622         * utils.c (gdb_flush_out_err): New function.
8623
8624 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8625
8626         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8627         * common/common-gdbthread.h: New file, with parts from
8628         "gdb/gdbthread.h".
8629         * gdbthread.h: Include "common-gdbthread.h".
8630         (switch_to_thread): Moved to "common/common-gdbthread.h".
8631
8632 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8633
8634         * Makefile.in (SFILES): Add "common/job-control.c".
8635         (HFILES_NO_SRCDIR): Add "common/job-control.h".
8636         (COMMON_OBS): Add "job-control.o".
8637         * common/job-control.c: New file, with contents from
8638         "gdb/inflow.c".
8639         * common/job-control.h: New file, with contents from "terminal.h".
8640         * fork-child.c: Include "job-control.h".
8641         * inflow.c: Include "job-control.h".
8642         (gdb_setpgid): Move to "common/common-inflow.c".
8643         (_initialize_inflow): Move setting of "job_control" to
8644         "handle_job_control".
8645         * terminal.h (job_control): Moved to "common/common-terminal.h".
8646         (gdb_setpgid): Likewise.
8647         * top.c: Include "job_control.h".
8648         * utils.c: Likewise.
8649         (job_control): Moved to "job-control.c".
8650
8651 2017-06-07  Pedro Alves  <palves@redhat.com>
8652
8653         * Makefile.in (SFILES): Add gdb_regex.c.
8654         (COMMON_OBS): Add gdb_regex.o.
8655         * ada-lang.c (ada_add_standard_exceptions)
8656         (ada_add_exceptions_from_frame, name_matches_regex)
8657         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8658         parameter type to compiled_regex.  Adjust.
8659         (ada_exceptions_list): Use compiled_regex.
8660         * break-catch-throw.c (exception_catchpoint::pattern): Now a
8661         std::unique_ptr<compiled_regex>.
8662         (exception_catchpoint::~exception_catchpoint): Remove regfree
8663         call.
8664         (check_status_exception_catchpoint): Adjust to use compiled_regex.
8665         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8666         * breakpoint.c (solib_catchpoint::compiled): Now a
8667         std::unique_ptr<compiled_regex>.
8668         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8669         (check_status_catch_solib): Adjust to use compiled_regex.
8670         (add_solib_catchpoint): Adjust to use compiled_regex.
8671         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8672         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8673         compiled_regex reference.  Adjust to use it.
8674         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8675         declaration.  Include "gdb_regex.h".
8676         (apropos_cmd): Change regex parameter to compiled_regex reference.
8677         * gdb_regex.c: New file.
8678         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8679         declarations.
8680         (class compiled_regex): New.
8681         * linux-tdep.c: Include "common/gdb_optional.h".
8682         (struct mapping_regexes): New, factored out from
8683         mapping_is_anonymous_p, and adjusted to use compiled_regex.
8684         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8685         gdb::optional and remove cleanups.  Adjust to compiled_regex.
8686         * probe.c: Include "common/gdb_optional.h".
8687         (collect_probes): Use compiled_regex and gdb::optional and remove
8688         cleanups.
8689         * skip.c: Include "common/gdb_optional.h".
8690         (skiplist_entry::compiled_function_regexp): Now a
8691         gdb::optional<compiled_regex>.
8692         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8693         (free_skiplist_entry): Remove regfree call.
8694         (compile_skip_regexp, skip_rfunction_p): Adjust to use
8695         compiled_regex and gdb::optional.
8696         * symtab.c: Include "common/gdb_optional.h".
8697         (search_symbols): Use compiled_regex and gdb::optional.
8698         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8699         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
8700         to gdb_regex.c.
8701
8702 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8703
8704         * regcache.c (regcache::save): Avoid buffer use.
8705         (regcache::dump): Likewise.
8706
8707 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8708
8709         * sh-tdep.c (sh_pseudo_register_read): Remove
8710         MAX_REGISTER_SIZE.
8711         (sh_pseudo_register_write): Likewise.
8712         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8713         (sh64_pseudo_register_write): Likewise
8714
8715 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8716
8717         * aarch64-tdep.c (aarch64_store_return_value): Use
8718         V_REGISTER_SIZE.
8719         (aarch64_pseudo_read_value): Likewise.
8720         (aarch64_pseudo_write): Likewise.
8721
8722 2017-06-06  Yao Qi  <yao.qi@linaro.org>
8723
8724         * regformats/regdef.h (set_register_cache): Remove the
8725         declaration.
8726
8727 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
8728
8729         * frame.c (frame_unwind_register_signed): Use
8730         frame_unwind_register_value.
8731
8732 2017-06-06  Pedro Alves  <palves@redhat.com>
8733
8734         PR breakpoints/21553
8735         * breakpoint.c (create_breakpoints_sal_default)
8736         (init_breakpoint_sal, create_breakpoint_sal): Use
8737         gdb::unique_xmalloc_ptr for string parameters.
8738         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8739         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
8740         (base_breakpoint_create_breakpoints_sal)
8741         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8742         (strace_marker_create_breakpoints_sal)
8743         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8744         string parameters.
8745         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8746         gdb::unique_xmalloc_ptr for string parameters.
8747         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8748         parameters.
8749
8750 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8751
8752         * alpha-tdep.c (alpha_register_to_value): Use
8753         get_frame_register_value.
8754         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8755
8756 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8757
8758         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8759         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8760         (ia64_value_to_register): Likewise.
8761         (ia64_extract_return_value): Likewise.
8762         (ia64_store_return_value): Likewise.
8763         (ia64_push_dummy_call): Likewise.
8764
8765 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
8766
8767         GDB 8.0 released.
8768
8769 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
8770
8771         * x86-linux-nat.c (struct arch_lwp_info): Remove.
8772
8773 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
8774
8775         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8776         parameter.
8777         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8778
8779 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8780
8781         * event-loop.c (poll_timers): Unallocate timer using delete
8782         instead of xfree.
8783
8784 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8785
8786         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8787         (struct breakpoint) <~breakpoint>: New.
8788         (struct watchpoint): Inherit from breakpoint.
8789         <~watchpoint>: New.
8790         <base>: Remove.
8791         (struct tracepoint): Inherit from breakpoint.
8792         <base>: Remove.
8793         * breakpoint.c (longjmp_breakpoint_ops): Remove.
8794         (struct longjmp_breakpoint): Inherit from breakpoint.
8795         <~longjmp_breakpoint>: New.
8796         <base>: Remove.
8797         (new_breakpoint_from_type): Remove casts.
8798         (watchpoint_in_thread_scope): Remove reference to base field.
8799         (watchpoint_del_at_next_stop): Likewise.
8800         (update_watchpoint): Likewise.
8801         (watchpoint_check): Likewise.
8802         (bpstat_check_watchpoint): Likewise.
8803         (set_longjmp_breakpoint): Likewise.
8804         (struct fork_catchpoint): Inherit from breakpoint.
8805         <base>: Remove.
8806         (struct solib_catchpoint): Inherit from breakpoint.
8807         <~solib_catchpoint>: New.
8808         <base>: Remove.
8809         (dtor_catch_solib): Change to ...
8810         (solib_catchpoint::~solib_catchpoint): ... this.
8811         (breakpoint_hit_catch_solib): Remove reference to base field.
8812         (add_solib_catchpoint): Likewise.
8813         (create_fork_vfork_event_catchpoint): Likewise.
8814         (struct exec_catchpoint): Inherit from breakpoint.
8815         <~exec_catchpoint>: New.
8816         <base>: Remove.
8817         (dtor_catch_exec): Change to ...
8818         (exec_catchpoint::~exec_catchpoint): ... this.
8819         (dtor_watchpoint): Change to ...
8820         (watchpoint::~watchpoint): ... this.
8821         (watch_command_1): Remove reference to base field.
8822         (catch_exec_command_1): Likewise.
8823         (base_breakpoint_dtor): Change to ...
8824         (breakpoint::~breakpoint): ... this.
8825         (base_breakpoint_ops): Remove dtor field value.
8826         (longjmp_bkpt_dtor): Change to ...
8827         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8828         (strace_marker_create_breakpoints_sal): Remove reference to base
8829         field.
8830         (delete_breakpoint): Don't manually call breakpoint destructor.
8831         (create_tracepoint_from_upload): Remove reference to base field.
8832         (trace_pass_set_count): Likewise.
8833         (initialize_breakpoint_ops): Don't initialize
8834         momentary_breakpoint_ops, don't set dtors.
8835         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8836         <~ada_catchpoint>: New.
8837         <base>: Remove.
8838         (create_excep_cond_exprs): Remove reference to base field.
8839         (dtor_exception): Change to ...
8840         (ada_catchpoint::~ada_catchpoint): ... this.
8841         (dtor_catch_exception): Remove.
8842         (dtor_catch_exception_unhandled): Remove.
8843         (dtor_catch_assert): Remove.
8844         (create_ada_exception_catchpoint): Remove reference to base
8845         field.
8846         (initialize_ada_catchpoint_ops): Don't set dtors.
8847         * break-catch-sig.c (struct signal_catchpoint): Inherit from
8848         breakpoint.
8849         <~signal_catchpoint>: New.
8850         <base>: Remove.
8851         (signal_catchpoint_dtor): Change to ...
8852         (signal_catchpoint::~signal_catchpoint): ... this.
8853         (create_signal_catchpoint): Remove reference to base field.
8854         (initialize_signal_catchpoint_ops): Don't set dtor.
8855         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8856         from breakpoint.
8857         <~syscall_catchpoint>: New.
8858         <base>: Remove.
8859         (dtor_catch_syscall): Change to ...
8860         (syscall_catchpoint::~syscall_catchpoint): ... this.
8861         (create_syscall_event_catchpoint): Remove reference to base
8862         field.
8863         (initialize_syscall_catchpoint_ops): Don't set dtor.
8864         * break-catch-throw.c (struct exception_catchpoint): Inherit
8865         from breakpoint.
8866         <~exception_catchpoint>: New.
8867         <base>: Remove.
8868         (dtor_exception_catchpoint): Change to ...
8869         (exception_catchpoint::~exception_catchpoint): ... this.
8870         (handle_gnu_v3_exceptions): Remove reference to base field.
8871         (initialize_throw_catchpoint_ops): Don't set dtor.
8872         * ctf.c (ctf_get_traceframe_address): Remove reference to base
8873         field.
8874         * remote.c (remote_get_tracepoint_status): Likewise.
8875         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8876         * tracefile.c (tracefile_fetch_registers): Likewise.
8877         * tracepoint.c (actions_command): Likewise.
8878         (validate_actionline): Likewise.
8879         (tfind_1): Likewise.
8880         (get_traceframe_location): Likewise.
8881         (find_matching_tracepoint_location): Likewise.
8882         (parse_tracepoint_status): Likewise.
8883         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8884
8885 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8886
8887         * breakpoint.c (struct longjmp_breakpoint): New struct.
8888         (is_tracepoint_type): Change return type to bool.
8889         (is_longjmp_type): New function.
8890         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8891         (set_raw_breakpoint_without_location): Use
8892         new_breakpoint_from_type.
8893         (set_raw_breakpoint): Likewise.
8894
8895 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8896
8897         * breakpoint.c (new_breakpoint_from_type): New function.
8898         (create_breakpoint_sal): Use new_breakpoint_from_type and
8899         unique_ptr.
8900         (create_breakpoint): Likewise.
8901
8902 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
8903
8904         * memattr.c (mem_info_command): Rename to ...
8905         (info_mem_command): ... this.
8906         (mem_enable_command): Rename to ...
8907         (enable_mem_command): ... this.
8908         (mem_disable_command): Rename to ...
8909         (disable_mem_command): ... this.
8910         (mem_delete_command): Rename to ...
8911         (delete_mem_command): ... this.
8912         (_initialize_mem): Adjust function names.
8913
8914 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8915
8916         * btrace.c (handle_pt_insn_events): New.
8917         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
8918         STATUS.  Split into this and ...
8919         (handle_pt_insn_event_flags): ... this.
8920
8921 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8922
8923         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8924         and struct pt_insn.resynced.
8925         * configure: Regenerated.
8926         * config.in: Regenerated.
8927
8928 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8929
8930         * btrace.c (ftrace_find_call_by_number): New function.
8931         (ftrace_new_function): Store objects, not pointers.
8932         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8933         ftrace_new_gap, ftrace_update_function,
8934         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8935         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8936         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8937         btrace_ends_with_single_insn, btrace_call_get): Account for
8938         btrace_thread_info::functions now storing objects.
8939         * btrace.h (struct btrace_thread_info): Add constructor.
8940         (struct btrace_thread_info) <functions>: Make std::vector.
8941         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8942         Initialize with default values.
8943         * record-btrace.c (record_btrace_frame_sniffer): Account for
8944         btrace_thread_info::functions now storing objects.
8945
8946 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8947
8948         * btrace.c: Remove typedef bfun_s.
8949         (ftrace_new_gap): Directly add gaps to the list of gaps.
8950         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8951         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
8952         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
8953         instead of gdb VEC.
8954
8955 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8956
8957         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
8958         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
8959         with btrace_thread_info::next_segment and
8960         btrace_thread_info::prev_segment.
8961         * btrace.h: Remove struct btrace_func_link.
8962         (struct btrace_function): Replace pair of function segment pointers
8963         with pair of indices.
8964         * python/py-record-btrace.c (btpy_call_prev_sibling,
8965         btpy_call_next_sibling): Replace references to
8966         btrace_thread_info::segment with btrace_thread_info::next_segment and
8967         btrace_thread_info::prev_segment.
8968         * record-btrace.c (record_btrace_frame_this_id): Use
8969         btrace_find_call_by_number.
8970
8971 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8972
8973         * btrace.c (ftrace_new_function, ftrace_fixup_level,
8974         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
8975         btrace_insn_next, btrace_insn_prev): Remove references to
8976         btrace_thread_info::flow.
8977         * btrace.h (struct btrace_function): Remove FLOW.
8978
8979 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8980
8981         * btrace.c (ftrace_find_call_by_number): New function.
8982         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
8983         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
8984         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
8985         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
8986         index.
8987         * btrace.h (struct btrace_function): Turn UP into an index.
8988         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
8989         as an index.
8990         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
8991         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
8992         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
8993
8994 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8995
8996         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8997         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8998         ftrace_update_function, ftrace_compute_global_level_offset,
8999         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
9000         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
9001         btrace_insn_end, btrace_is_empty): Remove references to
9002         btrace_thread_info::begin and btrace_thread_info::end.
9003         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
9004         (struct btrace_thread_info) <functions>: Adjust comment.
9005         * record-btrace.c (record_btrace_start_replaying): Remove reference to
9006         btrace_thread_info::begin.
9007
9008 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9009
9010         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
9011         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
9012         ftrace_update_function): Remove arguments that implicitly were always
9013         BTINFO->END.
9014         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
9015         Don't pass BTINFO->END.
9016
9017 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9018
9019         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
9020         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
9021         btrace_find_insn_by_number): Replace function segment pointer with
9022         index.
9023         (btrace_insn_cmp): Simplify.
9024         * btrace.h: (struct btrace_insn_iterator) Rename index to
9025         insn_index.  Replace function segment pointer with index into function
9026         segment vector.
9027         * record-btrace.c (record_btrace_call_history): Replace function
9028         segment pointer use with index.
9029         (record_btrace_frame_sniffer): Retrieve function call segment through
9030         vector.
9031         (record_btrace_set_replay): Remove defunc't safety check.
9032
9033 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9034
9035         * btrace.c (btrace_ends_with_single_insn): New function.
9036         (btrace_call_get, btrace_call_number, btrace_call_begin,
9037         btrace_call_end, btrace_call_next, btrace_call_prev,
9038         btrace_find_call_by_number): Use index into call segment vector
9039         instead of pointer.
9040         (btrace_call_cmp): Simplify.
9041         * btrace.h (struct btrace_call_iterator): Replace function call segment
9042         pointer with index into vector.
9043         * record-btrace.c (record_btrace_call_history): Use index instead of
9044         pointer.
9045
9046 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9047
9048         * btrace.c (btrace_insn_begin, btrace_insn_end,
9049         btrace_find_insn_by_number): Add btinfo to iterator.
9050         * btrace.h (struct btrace_insn_iterator): Add btinfo.
9051
9052 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9053
9054         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
9055         and save pointers directly.
9056         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
9057         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
9058         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
9059         changed signature of functions.
9060         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
9061         (btrace_fetch): Remove code that adds btrace_function pointers to
9062         vector of btrace_functions.
9063         (btrace_clear): Simplify freeing vector of btrace_functions.
9064
9065 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
9066
9067         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
9068         Replace VEC_* with std::vector functions.
9069         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
9070         (struct btrace_thread_info)<functions>: Change type to std::vector.
9071
9072 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
9073
9074         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
9075         "Removed targets and native configurations" up.  Merge duplicate
9076         "New commands" sub-sections.  Add "New options" sub-sections.
9077
9078 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
9079
9080         * defs.h (copy_integer_to_size): New declaration.
9081         * findvar.c (copy_integer_to_size): New function.
9082         (do_cint_test): New selftest function.
9083         (copy_integer_to_size_test): Likewise.
9084         (_initialize_findvar): Likewise.
9085         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
9086         (mips_fbsd_collect_reg): Use raw_collect_integer.
9087         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
9088         (mips64_fill_gregset): Use raw_collect_integer
9089         (mips64_fill_fpregset): Use raw_supply_integer.
9090         * regcache.c (regcache::raw_supply_integer): New function.
9091         (regcache::raw_collect_integer): Likewise.
9092         * regcache.h: (regcache::raw_supply_integer): New declaration.
9093         (regcache::raw_collect_integer): Likewise.
9094
9095 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9096
9097         * Makefile.in (SFILES): Add gdbarch-selftests.c.
9098         (COMMON_OBS): Add gdbarch-selftests.o.
9099         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
9100         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
9101         * gdbarch-selftests.c: New file.
9102         * regcache.h (regcache) <~regcache>: Mark it virtual if
9103         GDB_SELF_TEST.
9104         <raw_write>: Likewise.
9105
9106 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9107
9108         * regcache.c (current_regcache): Change it to
9109         regcache::current_regcache.
9110         (regcache_observer_target_changed): Update.
9111         (regcache_thread_ptid_changed): Make it a regcache static
9112         method.
9113         (regcache_thread_ptid_changed): Update.
9114         (class regcache_access): New.
9115         (current_regcache_test): Update.
9116         (_initialize_regcache): Update.
9117         * regcache.h: Include forward_list.
9118         (regcache): Declare regcache_thread_ptid_changed and declare
9119         registers_changed_ptid as friend.
9120
9121 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9122
9123         * i387-tdep.c (i387_register_to_value): Use register_size
9124         instead of TYPE_LENGTH.
9125         * m68k-tdep.c (m68k_register_to_value): Likewise.
9126
9127 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9128
9129         * i387-tdep.c (i387_convert_register_p): Return false if type
9130         code isn't TYPE_CODE_FLT.
9131
9132 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9133
9134         * alpha-tdep.c (alpha_convert_register_p): Return true if type
9135         length is 4.
9136         (alpha_register_to_value): Remove type length check.
9137         (alpha_value_to_register): Likewise.
9138
9139 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9140
9141         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
9142         TYPE_CODE_FLT.
9143
9144 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9145
9146         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
9147         TYPE_CODE_FLT or not.
9148
9149 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9150
9151         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
9152         * avr-tdep.c (avr_gdbarch_init): Likewise.
9153         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9154         * cris-tdep.c (cris_gdbarch_init): Likewise.
9155         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9156         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9157         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9158         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
9159         * mep-tdep.c (mep_gdbarch_init): Likewise.
9160         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9161         * mips-tdep.c (mips_gdbarch_init): Likewise.
9162         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9163         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9164         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9165         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9166         * v850-tdep.c (v850_gdbarch_init): Likewise.
9167
9168 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9169
9170         * selftest-arch.c (tests_with_arch): Call registers_changed
9171         and reinit_frame_cache.
9172         * selftest.c (run_self_tests): Likewise.
9173
9174 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9175
9176         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
9177         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
9178
9179 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9180
9181         * rl78-tdep.c (rl78_gdbarch_init): Don't call
9182         set_gdbarch_print_insn.
9183
9184 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9185
9186         * h8300-tdep.c (h8300_gdbarch_init): Don't call
9187         set_gdbarch_print_insn.
9188
9189 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9190
9191         * alpha-tdep.c (alpha_gdbarch_init): Don't call
9192         set_gdbarch_print_insn.
9193         * arc-tdep.c (arc_gdbarch_init): Likewise.
9194         * arch-utils.c: include dis-asm.h.
9195         (default_print_insn): New function.
9196         * arch-utils.h (default_print_insn): Declare.
9197         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
9198         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9199         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
9200         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
9201         * frv-tdep.c (frv_gdbarch_init): Likewise.
9202         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9203         * gdbarch.sh (print_insn): Use default_print_insn.
9204         * gdbarch.c: Regenerated.
9205         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
9206         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
9207         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9208         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
9209         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9210         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
9211         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
9212         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
9213         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
9214         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9215         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9216         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9217         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9218         * mt-tdep.c (mt_gdbarch_init): Likewise.
9219         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9220         * nios2-tdep.c (nios2_print_insn): Remove.
9221         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
9222         * rx-tdep.c (rx_gdbarch_init): Likewise.
9223         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9224         * score-tdep.c (score_print_insn): Remove.
9225         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
9226         * sh-tdep.c (sh_gdbarch_init): Likewise.
9227         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9228         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9229         * tic6x-tdep.c (tic6x_print_insn): Remove.
9230         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
9231         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
9232         * v850-tdep.c (v850_gdbarch_init): Likewise.
9233         * vax-tdep.c (vax_gdbarch_init): Likewise.
9234         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9235         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
9236
9237 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
9238
9239         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
9240         (MIPS_FP0_REGNUM): Remove.
9241         (MIPS_FSR_REGNUM): Remove.
9242         (mips_fbsd_supply_fpregs): Use mips_regnum.
9243         (mips_fbsd_supply_gregs): Likewise.
9244         (mips_fbsd_collect_fpregs): Likewise.
9245         (mips_fbsd_collect_gregs): Likewise.
9246
9247 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
9248
9249         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
9250         (getpfpregs_supplies): New function.
9251         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
9252         getfpregs_supplies.
9253         (mips_fbsd_store_inferior_registers): Likewise.
9254
9255 2017-05-22  Pedro Alves <palves@redhat.com>
9256
9257         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
9258         maintainer.
9259
9260 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
9261
9262         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
9263         (store_register): Likewise.
9264         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
9265         (get_decimal_float_return_value): Likewise.
9266         (do_ppc_sysv_return_value): Likewise.
9267         (ppc64_sysv_abi_push_integer): Likewise.
9268         (ppc64_sysv_abi_push_freg): Likewise.
9269         (ppc64_sysv_abi_return_value_base): Likewise.
9270         (ppc64_sysv_abi_return_value): Likewise.
9271         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
9272         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
9273         * rs6000-nat.c: Likewise.
9274         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
9275         (rs6000_value_to_register): Likewise.
9276         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
9277
9278 2017-05-21  Tom Tromey  <tom@tromey.com>
9279
9280         PR rust/21466:
9281         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
9282         arrays as "[T]", not "[T; ]".
9283
9284 2017-05-19  Tom Tromey  <tom@tromey.com>
9285
9286         PR rust/21484:
9287         * rust-lang.c (exp_descriptor_rust): New function.
9288         (rust_language_defn): Use it.
9289         * p-lang.c (pascal_language_defn): Update.
9290         * opencl-lang.c (opencl_language_defn): Update.
9291         * objc-lang.c (objc_language_defn): Update.
9292         * m2-lang.c (m2_language_defn): Update.
9293         * language.h (struct language_defn)
9294         <la_watch_location_expression>: New member.
9295         * language.c (unknown_language_defn, auto_language_defn)
9296         (local_language_defn): Update.
9297         * go-lang.c (go_language_defn): Update.
9298         * f-lang.c (f_language_defn): Update.
9299         * d-lang.c (d_language_defn): Update.
9300         * c-lang.h (c_watch_location_expression): Declare.
9301         * c-lang.c (c_watch_location_expression): New function.
9302         (c_language_defn, cplus_language_defn, asm_language_defn)
9303         (minimal_language_defn): Use it.
9304         * breakpoint.c (watch_command_1): Call
9305         la_watch_location_expression.
9306         * ada-lang.c (ada_language_defn): Update.
9307
9308 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9309
9310         PR tui/21482
9311         * gdb_curses.h (NOMACROS): Define.
9312         (NCURSES_NOMACROS): Define.
9313
9314 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9315
9316         PR tui/21482
9317         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
9318         arg to char *.
9319         * tui/tui-wingeneral.c (box_win): Likewise.
9320         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
9321         (tui_show_source_line): Likewise.
9322         (tui_show_exec_info_content): Likewise.
9323
9324 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
9325
9326         * sparc-tdep.c (sparc_structure_return_p)
9327         (sparc_arg_on_registers_p): New functions.
9328         (sparc32_store_arguments): Use them.
9329         * sparc64-tdep.c (sparc64_16_byte_align_p)
9330         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
9331         Handle TYPE_CODE_ARRAY.
9332
9333 2017-05-17  Yao Qi  <yao.qi@linaro.org>
9334
9335         * cli/cli-decode.c (add_alias_cmd): New function.
9336         * command.h (add_alias_cmd): Declare.
9337         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
9338         instead call add_alias_cmd.
9339
9340 2017-05-17  Pedro Alves  <palves@redhat.com>
9341
9342         * Makefile.in (nat_extra_makefile_frag): Rename to ...
9343         (nat_makefile_frag): ... this.  All references updated.
9344         * configure.ac: Likewise.
9345         * configure.nat: Likewise.  Enhance comments.
9346         * configure: Regenerate.
9347
9348 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9349
9350         * procfs.c (procfs_create_inferior): Change prototype to match
9351         definition.
9352
9353 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
9354
9355         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
9356         C++ compiler warning.
9357
9358 2017-05-12  Tom Tromey  <tom@tromey.com>
9359
9360         PR rust/21483:
9361         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
9362         recurse, just call value_struct_elt directly.
9363
9364 2017-05-12  Tom Tromey  <tom@tromey.com>
9365
9366         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
9367         OP_RUST_ARRAY>: Fix.
9368
9369 2017-05-12  Tom Tromey  <tom@tromey.com>
9370
9371         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
9372
9373 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9374
9375         * regcache.c: Include <forward_list>.
9376         (struct regcache_list): Remove.
9377         (current_regcache): Update.
9378         (get_thread_arch_aspace_regcache): Update for std::forward_list.
9379         (regcache_thread_ptid_changed): Likewise.
9380         (registers_changed_ptid): Likewise.
9381         (current_regcache_size): Likewise.
9382
9383 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9384
9385         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
9386         (current_regcache_size): New function.
9387         (current_regcache_test): New function.
9388         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
9389
9390 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9391
9392         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
9393         (print_gp_register_row): Use get_frame_register_value.
9394
9395 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9396
9397         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
9398         (mips_supply_fpregset): Likewise.
9399         (mips64_supply_gregset): Likewise.
9400
9401 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9402
9403         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
9404         regcache->raw_supply_zeroed.
9405
9406 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9407
9408         * configure.nat: Rearrange 'case' statements to match
9409         host before cpu.
9410
9411 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9412
9413         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
9414         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
9415         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
9416         "@nat_extra_makefile_frag@".
9417         (Makefile): Remove dependency on "@frags@".
9418         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
9419         (data-directory/Makefile): Likewise.
9420         * config/aarch64/linux.mh: Deleted; moved contents to
9421         "gdb/configure.nat".
9422         * config/alpha/alpha-linux.mh: Likewise.
9423         * config/alpha/nbsd.mh: Likewise.
9424         * config/arm/linux.mh: Likewise.
9425         * config/arm/nbsdelf.mh: Likewise.
9426         * config/i386/cygwin.mh: Likewise.
9427         * config/i386/cygwin64.mh: Likewise.
9428         * config/i386/darwin.mh: Likewise.
9429         * config/i386/fbsd.mh: Likewise.
9430         * config/i386/fbsd64.mh: Likewise.
9431         * config/i386/go32.mh: Likewise.
9432         * config/i386/i386gnu.mh: Likewise.
9433         * config/i386/i386sol2.mh: Likewise.
9434         * config/i386/linux.mh: Likewise.
9435         * config/i386/linux64.mh: Likewise.
9436         * config/i386/mingw.mh: Likewise.
9437         * config/i386/mingw64.mh: Likewise.
9438         * config/i386/nbsd64.mh: Likewise.
9439         * config/i386/nbsdelf.mh: Likewise.
9440         * config/i386/nto.mh: Likewise.
9441         * config/i386/obsd.mh: Likewise.
9442         * config/i386/obsd64.mh: Likewise.
9443         * config/i386/sol2-64.mh: Likewise.
9444         * config/ia64/linux.mh: Likewise.
9445         * config/m32r/linux.mh: Likewise.
9446         * config/m68k/linux.mh: Likewise.
9447         * config/m68k/nbsdelf.mh: Likewise.
9448         * config/m68k/obsd.mh: Likewise.
9449         * config/m88k/obsd.mh: Likewise.
9450         * config/mips/fbsd.mh: Likewise.
9451         * config/mips/linux.mh: Likewise.
9452         * config/mips/nbsd.mh: Likewise.
9453         * config/mips/obsd64.mh: Likewise.
9454         * config/pa/linux.mh: Likewise.
9455         * config/pa/nbsd.mh: Likewise.
9456         * config/pa/obsd.mh: Likewise.
9457         * config/powerpc/aix.mh: Likewise.
9458         * config/powerpc/fbsd.mh: Likewise.
9459         * config/powerpc/linux.mh: Likewise.
9460         * config/powerpc/nbsd.mh: Likewise.
9461         * config/powerpc/obsd.mh: Likewise.
9462         * config/powerpc/ppc64-linux.mh: Likewise.
9463         * config/powerpc/spu-linux.mh: Likewise.
9464         * config/s390/linux.mh: Likewise.
9465         * config/sh/nbsd.mh: Likewise.
9466         * config/sparc/fbsd.mh: Likewise.
9467         * config/sparc/linux.mh: Likewise.
9468         * config/sparc/linux64.mh: Likewise.
9469         * config/sparc/nbsd64.mh: Likewise.
9470         * config/sparc/nbsdelf.mh: Likewise.
9471         * config/sparc/obsd64.mh: Likewise.
9472         * config/sparc/sol2.mh: Likewise.
9473         * config/tilegx/linux.mh: Likewise.
9474         * config/vax/nbsdelf.mh: Likewise.
9475         * config/vax/obsd.mh: Likewise.
9476         * config/xtensa/linux.mh: Likewise.
9477         * config/i386/i386gnu.mn: New file, with excerpts from
9478         "config/i386/i386gnu.mh".
9479         * configure: Regenerate.
9480         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
9481         *.mh files under "gdb/config".
9482         * configure.nat: New file, with contents from the
9483         "gdb/config/*/*.mh" files.
9484
9485 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
9486
9487         * btrace.c (btrace_clear): Free insn vector.
9488
9489 2017-05-05  Pedro Alves  <palves@redhat.com>
9490
9491         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
9492         * configure: Regenerate.
9493
9494 2017-05-04  Pedro Alves  <palves@redhat.com>
9495
9496         * Makefile.in (SFILES): Add progspace-and-thread.c.
9497         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
9498         (COMMON_OBS): Add progspace-and-thread.o.
9499         * breakpoint.c: Include "progspace-and-thread.h".
9500         (update_inserted_breakpoint_locations)
9501         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
9502         Use scoped_restore_current_pspace_and_thread.
9503         (create_std_terminate_master_breakpoint): Use
9504         scoped_restore_current_program_space.
9505         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
9506         (print_breakpoint_location): Use
9507         scoped_restore_current_program_space.
9508         (bp_loc_is_permanent): Use
9509         scoped_restore_current_pspace_and_thread.
9510         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
9511         (download_tracepoint_locations): Use
9512         scoped_restore_current_pspace_and_thread.
9513         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
9514         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
9515         (enum step_over_calls_kind): Moved from inferior.h.
9516         (class scoped_restore_current_thread): New class.
9517         * gdbthread.h (make_cleanup_restore_current_thread): Delete
9518         declaration.
9519         (scoped_restore_current_thread): New class.
9520         * infcmd.c: Include "common/gdb_optional.h".
9521         (continue_1, proceed_after_attach): Use
9522         scoped_restore_current_thread.
9523         (notice_new_inferior): Use scoped_restore_current_thread.
9524         * inferior.c: Include "progspace-and-thread.h".
9525         (restore_inferior, save_current_inferior): Delete.
9526         (add_inferior_command, clone_inferior_command): Use
9527         scoped_restore_current_pspace_and_thread.
9528         * inferior.h (scoped_restore_current_inferior): New class.
9529         * infrun.c: Include "progspace-and-thread.h" and
9530         "common/gdb_optional.h".
9531         (follow_fork_inferior): Use
9532         scoped_restore_current_pspace_and_thread.
9533         (scoped_restore_exited_inferior): New class.
9534         (handle_vfork_child_exec_or_exit): Use
9535         scoped_restore_exited_inferior,
9536         scoped_restore_current_pspace_and_thread,
9537         scoped_restore_current_thread and scoped_restore.
9538         (fetch_inferior_event): Use scoped_restore_current_thread.
9539         * linespec.c (decode_line_full, decode_line_1): Use
9540         scoped_restore_current_program_space.
9541         * mi/mi-main.c: Include "progspace-and-thread.h".
9542         (exec_continue): Use scoped_restore_current_thread.
9543         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
9544         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
9545         * proc-service.c (ps_pglobal_lookup): Use
9546         scoped_restore_current_program_space.
9547         * progspace-and-thread.c: New file.
9548         * progspace-and-thread.h: New file.
9549         * progspace.c (release_program_space, clone_program_space): Use
9550         scoped_restore_current_program_space.
9551         (restore_program_space, save_current_program_space)
9552         (save_current_space_and_thread): Delete.
9553         (switch_to_program_space_and_thread): Moved to
9554         progspace-and-thread.c.
9555         * progspace.h (save_current_program_space)
9556         (save_current_space_and_thread): Delete declarations.
9557         (scoped_restore_current_program_space): New class.
9558         * remote.c (remote_btrace_maybe_reopen): Use
9559         scoped_restore_current_thread.
9560         * symtab.c: Include "progspace-and-thread.h".
9561         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9562         * thread.c (print_thread_info_1): Use
9563         scoped_restore_current_thread.
9564         (struct current_thread_cleanup): Delete.
9565         (do_restore_current_thread_cleanup)
9566         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
9567         (scoped_restore_current_thread::~scoped_restore_current_thread):
9568         ... this new dtor.
9569         (make_cleanup_restore_current_thread): Rename/convert to ...
9570         (scoped_restore_current_thread::scoped_restore_current_thread):
9571         ... this new ctor.
9572         (thread_apply_all_command): Use scoped_restore_current_thread.
9573         (thread_apply_command): Use scoped_restore_current_thread.
9574         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
9575         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9576
9577 2017-05-04  Pedro Alves  <palves@redhat.com>
9578
9579         * thread.c (make_cleanup_restore_current_thread): Move
9580         find_thread_ptid call before the is_stopped call.  Assert that the
9581         thread is found.  Replace is_stopped call by checking the thread's
9582         state directly.  Remove unnecessary NULL-thread check.
9583
9584 2017-05-04  Pedro Alves  <palves@redhat.com>
9585
9586         * corelow.c (thread_section_name): New class.
9587         (get_core_register_section, get_core_siginfo): Use it.
9588
9589 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9590
9591         * corelow.c (sniff_core_bfd): Remove extra semicolon.
9592         (get_core_register_section): Remove xfree of NULL pointer.
9593
9594 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
9595
9596         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9597         * regcache.c (regcache::raw_supply_zeroed): New function.
9598         * regcache.h (regcache::raw_supply_zeroed): New declaration.
9599
9600 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9601
9602         * gdbarch.sh: Remove commented out definition of
9603         TARGET_CHAR_BIT.
9604         * gdbarch.h: Re-generate.
9605
9606 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
9607
9608         * configure: Regenerate.
9609
9610 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
9611
9612         * solib-target.c (solib_target_relocate_section_addresses):
9613         Remove num_section_bases, num_bases, segment_bases variables.
9614
9615 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9616
9617         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9618
9619 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9620
9621         * solib-target.c: Include <vector>
9622         (struct lm_info_target) <~lm_info_target>: Remove.
9623         <segment_bases, section_bases>: Change type to
9624         std::vector<CORE_ADDR>.
9625         (library_list_start_segment, library_list_start_section,
9626         library_list_end_library,
9627         solib_target_relocate_section_addresses): Adjust.
9628
9629 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9630
9631         * gdbarch.sh (software_single_step): Change return type to
9632         std::vector<CORE_ADDR>.
9633         * gdbarch.c, gdbarch.h: Re-generate.
9634         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9635         Adjust.
9636         (arm_deal_with_atomic_sequence_raw): Adjust.
9637         (thumb_get_next_pcs_raw): Adjust.
9638         (arm_get_next_pcs_raw): Adjust.
9639         (arm_get_next_pcs): Adjust.
9640         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9641         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9642         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9643         (alpha_software_single_step): Adjust.
9644         * alpha-tdep.h (alpha_software_single_step): Adjust.
9645         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9646         * arm-tdep.c (arm_software_single_step): Adjust.
9647         (arm_breakpoint_kind_from_current_state): Adjust.
9648         * arm-tdep.h (arm_software_single_step): Adjust.
9649         * breakpoint.c (insert_single_step_breakpoint): Adjust.
9650         * cris-tdep.c (cris_software_single_step): Adjust.
9651         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9652         (micromips_deal_with_atomic_sequence): Adjust.
9653         (deal_with_atomic_sequence): Adjust.
9654         (mips_software_single_step): Adjust.
9655         * mips-tdep.h (mips_software_single_step): Adjust.
9656         * moxie-tdep.c (moxie_software_single_step): Adjust.
9657         * nios2-tdep.c (nios2_software_single_step): Adjust.
9658         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9659         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9660         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9661         * s390-linux-tdep.c (s390_software_single_step): Adjust.
9662         * sparc-tdep.c (sparc_software_single_step): Adjust.
9663         * spu-tdep.c (spu_software_single_step): Adjust.
9664         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9665
9666 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9667
9668         * gdbarch.sh: Use semi-colon as field separator instead of colon.
9669         * gdbarch.h: Re-generate.
9670
9671 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9672
9673         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9674         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9675         * python/py-instruction.c, python/py-instruction.h: New file.
9676         * python/py-record.c: Add py-instruction.h include.
9677         (gdbpy_initialize_record): Make gdb.Instruction a super class of
9678         gdb.RecordInstruction.
9679         * python/python-internal.h: Add gdbpy_initialize_instruction
9680         declaration.
9681         * python/python.c (do_start_initialization): Add
9682         gdbpy_initialize_instruction.
9683
9684 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9685
9686         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9687         Remove.
9688         (btrace_func_from_recpy_func): New function.
9689         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9690         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9691         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9692         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9693         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9694         Also, use new helper functions.
9695         (btpy_list_item): Use new helper functions.
9696         (recpy_bt_function_call_history): Use new type name.
9697         (btpy_call_getset): Remove.
9698         (gdbpy_initialize_btrace): Remove code to initialize
9699         gdb.BtraceFunctionCall.
9700         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9701         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9702         recpy_bt_func_prev, recpy_bt_func_next): New export.
9703         * python/py-record.c (recpy_func_type): New static object.
9704         (recpy_func_new, recpy_func_level, recpy_func_symbol,
9705         recpy_func_instructions, recpy_func_up, recpy_func_prev,
9706         recpy_func_next): New function.
9707         (recpy_element_hash, recpy_element_richcompare): Updated comment.
9708         (recpy_func_getset): New static object.
9709         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9710         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9711
9712 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9713
9714         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9715         (btpy_object, btpy_insn_type, btpy_new): Remove.
9716         (btpy_list_object): Use gdb.RecordInstruction type instead of
9717         gdb.BtraceInstruction type.
9718         (btrace_insn_from_recpy_insn): New function.
9719         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9720         btpy_new.
9721         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9722         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9723         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9724         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9725         instead of btpy_object.
9726         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9727         btpy_insn_data, btpy_insn_decode): Rename to ...
9728         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9729         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9730         recpy_bt_insn_decode): This.  Also, use new helper functions.
9731         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9732         recpy_insn_type.
9733         (btpy_insn_getset): Remove.
9734         (gdbpy_initialize_btrace): Remove code to initialize
9735         gdb.BtraceInstruction.  Use recpy_element_object.
9736         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9737         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9738         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9739         * python/py-record.c (recpy_insn_type): New static object.
9740         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9741         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9742         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9743         New function.
9744         (recpy_insn_getset): New static object.
9745         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9746         * python/py-record.h (recpy_element_object): New typedef.
9747         (recpy_insn_type, recpy_insn_new): New export.
9748
9749 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9750
9751         * py-record-btrace.c (btpy_insn_new): Removed.
9752         (btpy_insn_or_gap_new): New function.
9753         (btpy_insn_error): Removed.
9754         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9755         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9756         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9757         btpy_insn_or_gap_new instead of btpy_insn_new.
9758         (btpy_insn_getset): Remove btpy_insn_error.
9759         * py-record.c (recpy_gap_type): New static object.
9760         (recpy_gap_object): New typedef.
9761         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9762         recpy_gap_reason_string): New function.
9763         (recpy_gap_getset): New static object.
9764         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9765         * py-record.h (recpy_gap_new): New export.
9766
9767 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9768
9769         * python/py-record.c (recpy_ptid): Remove.
9770         (recpy_record_getset): Remove recpy_ptid.
9771
9772 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9773
9774         * btrace.c (btrace_fetch): Set inferior_ptid.
9775         * python/py-record-btrace.c: Add "py-record.h" include.
9776         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9777         recpy_bt_end, recpy_bt_instruction_history,
9778         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9779         in gdb.Record object instead of current ptid.
9780         * python/py-record.c: Include new "py-record.h" file.
9781         (recpy_record_object): Moved to py-record.h.
9782         * python/py-record.h: New file.
9783
9784 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9785
9786         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9787         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9788         indentation.
9789
9790 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
9791
9792         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9793         the past maintainers section.
9794
9795 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9796
9797         * infcmd.c (get_return_value): Use regcache ctor, and remove
9798         cleanup.
9799
9800 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9801             Pedro Alves  <palves@redhat.com>
9802
9803         * regcache.c (regcache::regcache): New tag dispatch ctor.
9804         (do_cooked_read): Moved above.
9805         (regcache_dup): Use the tag dispatch ctor..
9806         * regcache.h (regcache): Declare ctor, delete copy ctor and
9807         assignment operator, remove friend regcache_dup.
9808
9809 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9810
9811         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9812         call method save instead of regcache_cpy.
9813         * regcache.h (struct regcache): Make regcache_dup a friend.
9814
9815 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9816
9817         * regcache.c (struct regcache): Move to regcache.h
9818         (regcache::arch): New method.
9819         (regcache_get_ptid): Update.
9820         (get_regcache_arch): Call arch method.
9821         (get_regcache_aspace): Call method aspace.
9822         (register_buffer): Change it to method.
9823         (regcache_save): Change it to regcache::save.
9824         (regcache_restore): Likewise.
9825         (regcache_cpy_no_passthrough): Remove the declaration.
9826         (regcache_cpy): Call methods restore and cpy_no_passthrough.
9827         (regcache_cpy_no_passthrough): Change it to method
9828         cpy_no_passthrough.
9829         (regcache_register_status): Change it to method
9830         get_register_status.
9831         (regcache_invalidate): Change it to method invalidate.
9832         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9833         (regcache_raw_update): Change it to method raw_update.
9834         (regcache_raw_read): Likewise.
9835         (regcache_raw_read_signed): Likewise.
9836         (regcache_raw_read_unsigned): Likewise.
9837         (regcache_raw_write_signed): Likewise.
9838         (regcache_raw_write_unsigned): Likewise.
9839         (regcache_cooked_read): Likewise.
9840         (regcache_cooked_read_value): Likewise.
9841         (regcache_cooked_read_signed): Likewise.
9842         (regcache_cooked_read_unsigned): Likewise.
9843         (regcache_cooked_write_signed): Likewise.
9844         (regcache_cooked_write_unsigned): Likewise.
9845         (regcache_raw_set_cached_value): Likewise.
9846         (regcache_raw_write): Likewise.
9847         (regcache_cooked_write): Likewise.
9848         (regcache_xfer_part): Likewise.
9849         (regcache_raw_read_part): Likewise.
9850         (regcache_raw_write_part): Likewise.
9851         (regcache_cooked_read_part): Likewise.
9852         (regcache_cooked_write_part): Likewise.
9853         (regcache_raw_supply): Likewise.
9854         (regcache_raw_collect): Likewise.
9855         (regcache_transfer_regset): Likewise.
9856         (regcache_supply_regset): Likewise.
9857         (regcache_collect_regset): Likewise.
9858         (regcache_debug_print_register): Likewise.
9859         (enum regcache_dump_what): Move it to regcache.h.
9860         (regcache_dump): Change it to method dump.
9861         * regcache.h (enum regcache_dump_what): New.
9862         (class regcache): New.
9863         * target.c (target_fetch_registers): Call method
9864         debug_print_register.
9865         (target_store_registers): Likewise.
9866
9867 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9868
9869         * windows-nat.c (struct lm_info_windows): Initialize field.
9870         (windows_make_so): Allocate lm_info_windows with new.
9871         (windows_free_so): Free lm_info_windows with delete.
9872
9873 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9874
9875         * solib-darwin.c (struct lm_info_darwin): Initialize field.
9876         (darwin_current_sos): Allocate lm_info_darwin with new, remove
9877         cleanup.
9878         (darwin_free_so): Free lm_info_darwin with delete.
9879
9880 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9881
9882         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9883         <l_addr_p>: Change type to bool.
9884         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9885         (svr4_free_so): Free lm_info_svr4 with delete.
9886         (svr4_copy_library_list): Replace memcpy with call to copy
9887         constructor.
9888         (library_list_start_library, svr4_default_sos): Allocate
9889         lm_info_svr4 with new.
9890
9891 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9892
9893         * solib-target.c (struct lm_info_target): Add destructor,
9894         initialize fields.
9895         <name>: Change type to std::string.
9896         (library_list_start_library): Allocate lm_info_target with new.
9897         (solib_target_free_library_list): Free lm_info_target with
9898         delete.
9899         (solib_target_current_sos): Adapt to std::string.
9900         (solib_target_free_so): Free lm_info_target with delete.
9901
9902 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9903
9904         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9905         fields.
9906         (frv_current_sos): Allocate lm_info_frv with new.
9907         (frv_relocate_main_executable): Free lm_info_frv with delete,
9908         allocate with new.
9909         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9910
9911 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9912
9913         * solib-frv.c (struct lm_info_frv): Fix indentation.
9914
9915 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9916
9917         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9918         map field.
9919         (dsbt_current_sos): Allocate lm_info_dsbt with new.
9920         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9921         and allocate with new.
9922         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9923
9924 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9925
9926         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9927         <filename, member_name>: Change type to std::string.
9928         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9929         (library_list_start_library): Allocate lm_info_aix with new.
9930         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9931         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9932         with copy constructor.
9933
9934 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9935
9936         * solist.h (struct lm_info): Remove.
9937         (struct lm_info_base): New class.
9938         (struct so_list) <lm_info>: Change type to lm_info_base *.
9939         * nto-tdep.c (struct lm_info): Remove.
9940         (lm_addr): Adjust.
9941         * solib-aix.c (struct lm_info): Rename to ...
9942         (struct lm_info_aix): ... this.  Extend lm_info_base.
9943         (lm_info_p): Rename to ...
9944         (lm_info_aix_p): ... this, and adjust.
9945         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9946         solib_aix_parse_libraries, library_list_start_library,
9947         solib_aix_free_library_list, solib_aix_parse_libraries,
9948         solib_aix_get_library_list,
9949         solib_aix_relocate_section_addresses, solib_aix_free_so,
9950         solib_aix_get_section_offsets,
9951         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
9952         Adjust.
9953         (struct solib_aix_inferior_data) <library_list>: Adjust.
9954         * solib-darwin.c (struct lm_info): Rename to ...
9955         (struct lm_info_darwin): ... this.  Extend lm_info_base.
9956         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
9957         * solib-dsbt.c (struct lm_info): Rename to ...
9958         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
9959         (struct dsbt_info) <main_executable_lm_info): Adjust.
9960         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
9961         dsbt_relocate_section_addresses): Adjust.
9962         * solib-frv.c (struct lm_info): Rename to ...
9963         (struct lm_info_frv): ... this.  Extend lm_info_base.
9964         (main_executable_lm_info): Adjust.
9965         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
9966         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
9967         find_canonical_descriptor_in_load_object,
9968         frv_fdpic_find_canonical_descriptor): Adjust.
9969         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
9970         to lm_info_svr4.
9971         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
9972         svr4_clear_so, svr4_copy_library_list,
9973         library_list_start_library, svr4_default_sos, svr4_read_so_list,
9974         svr4_current_sos, svr4_fetch_objfile_link_map,
9975         solist_update_incremental): Adjust.
9976         * solib-svr4.h (struct lm_info_svr4): Move here from
9977         solib-svr4.c.
9978         * solib-target.c (struct lm_info): Rename to ...
9979         (struct lm_info_target): ... this.  Extend lm_info_base.
9980         (lm_info_p): Rename to ...
9981         (lm_info_target_p): ... this.
9982         (solib_target_parse_libraries, library_list_start_segment,
9983         library_list_start_section, library_list_start_library,
9984         library_list_end_library, solib_target_free_library_list,
9985         solib_target_current_sos, solib_target_free_so,
9986         solib_target_relocate_section_addresses): Adjust.
9987         * windows-nat.c (struct lm_info): Rename to ...
9988         (struct lm_info_windows): ... this.  Extend lm_info_base.
9989         (windows_make_so, handle_load_dll, handle_unload_dll,
9990         windows_xfer_shared_libraries): Adjust.
9991
9992 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9993
9994         * solib-darwin.c (struct darwin_so_list): Remove.
9995         (darwin_current_sos): Allocate an so_list object instead of a
9996         darwin_so_list, separately allocate an lm_info object.
9997         (darwin_free_so): Free lm_info.
9998
9999 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
10000
10001         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
10002         with fprintf_filtered.
10003
10004 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10005
10006         * regcache.c (regcache::regcache): New function.
10007         (regcache::~regcache): New function.
10008         (regcache_xmalloc_1): Remove.
10009         (regcache_xmalloc): Call new regcache.
10010         (regcache_xfree): Call delete regcache.
10011         (get_thread_arch_aspace_regcache): Call new regcache.
10012
10013 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10014
10015         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
10016         lwp instead of ptid_get_lwp.
10017
10018 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10019
10020         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
10021         lwp_info instead of getting from inferior_ptid.
10022
10023 2017-04-27  Keith Seitz  <keiths@redhat.com>
10024
10025         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
10026         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
10027         (CV_CONVERSION_BADNESS): Define.
10028         (rank_one_type): Remove overly restrictive rvalue reference
10029         rank checks.
10030         Add cv-qualifier checks and subranks for type equality.
10031         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
10032         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
10033         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
10034
10035 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
10036
10037         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
10038         count when creating the object.
10039
10040 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
10041             Ulrich Weigand  <uweigand@de.ibm.com>
10042
10043         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
10044         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
10045         is used in AIX.
10046         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
10047         (process_xcoff_symbol): Likewise.
10048         (scan_xcoff_symtab): Likewise.
10049
10050 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10051
10052         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
10053         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
10054         (ia64_access_reg): Use get_frame_register_unsigned.
10055         (ia64_access_rse_reg): Likewise.
10056         (ia64_libunwind_frame_prev_register): Likewise.
10057
10058 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
10059
10060         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
10061         * gdbarch.c: Regenerated.
10062         * gdbarch.h: Regenerated.
10063         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
10064         visibility external.
10065         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
10066         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
10067         (enum cfa_how_kind): Move to ...
10068         (struct dwarf2_frame_state_reg_info): Likewise.
10069         (struct dwarf2_frame_state): Likewise.
10070         * dwarf2-frame.h: ... here.
10071         (dwarf2_frame_state_alloc_regs): New declaration.
10072         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
10073         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
10074
10075 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10076
10077         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
10078         regcache_raw_read_unsigned.
10079         (xtensa_pseudo_register_write): Likewise.
10080
10081 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
10082
10083         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
10084         (nds32_pseudo_register_write): Likewise.
10085
10086 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10087
10088         * regcache.c (struct regcache) <readonly_p>: Change its type
10089         to bool.
10090         (regcache_xmalloc_1): Update parameter type and callers update.
10091
10092 2017-04-25  Yao Qi  <yao.qi@linaro.org>
10093
10094         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
10095         set_gdbarch_wchar_bit.
10096         * arm-tdep.c (arm_gdbarch_init): Likewise.
10097
10098 2017-04-25  Pedro Alves  <palves@redhat.com>
10099
10100         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
10101         (BothAreRelocatable, memcopy, memmove): Don't define.
10102         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
10103         macros.
10104
10105 2017-04-25  Pedro Alves  <palves@redhat.com>
10106
10107         * common/common-defs.h: Include "common/poison.h".
10108         * common/function-view.h: (Not, Or, Requires): Move to traits.h
10109         and adjust.
10110         * common/poison.h: New file.
10111         * common/traits.h: Include <type_traits>.
10112         (Not, Or, Requires): New, moved from common/function-view.h.
10113
10114 2017-04-25  Pedro Alves  <palves@redhat.com>
10115
10116         * breakpoint.h (struct breakpoint): In-class initialize all
10117         fields.  Make boolean fields "bool".
10118         * breakpoint.c (init_raw_breakpoint_without_location): Remove
10119         memset call and initializations no longer necessary.
10120
10121 2017-04-25  Pedro Alves  <palves@redhat.com>
10122
10123         * btrace.c (pt_btrace_insn_flags): Change parameter type to
10124         reference.
10125         (pt_btrace_insn): New function.
10126         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
10127
10128 2017-04-25  Pedro Alves  <palves@redhat.com>
10129
10130         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
10131         "base" field and inherit from "bp_location" instead.  Add
10132         non-default ctor.
10133         (allocate_location_exception): Use new non-default ctor.
10134         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
10135         (init_bp_location): Convert to ...
10136         (bp_location::bp_location): ... this new ctor, and remove memset
10137         call.
10138         (base_breakpoint_allocate_location): Use the new non-default ctor.
10139         * breakpoint.h (bp_location): Now a class.  Declare default and
10140         non-default ctors.  In-class initialize all members.
10141         (init_bp_location): Remove declaration.
10142
10143 2017-04-25  Pedro Alves  <palves@redhat.com>
10144
10145         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
10146         assignment operator.
10147
10148 2017-04-24  Yao Qi  <yao.qi@linaro.org>
10149
10150         * doublest.c (convert_doublest_to_floatformat): Call
10151         floatformat_totalsize_bytes.
10152
10153 2017-04-22  Tom Tromey  <tom@tromey.com>
10154
10155         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
10156         ui_out_emit_list.
10157         * stack.c (print_frame): Use ui_out_emit_list.
10158         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10159         ui_out_emit_list.
10160         * mi/mi-main.c (print_one_inferior)
10161         (mi_cmd_data_list_register_names)
10162         (mi_cmd_data_list_register_values, mi_cmd_list_features)
10163         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
10164         ui_out_emit_list.
10165         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
10166         (mi_output_solib_attribs): Use ui_out_emit_list,
10167         ui_out_emit_tuple.
10168         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
10169         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
10170         (mi_cmd_stack_list_args, list_args_or_locals): Use
10171         ui_out_emit_list.
10172         * disasm.c (do_assembly_only): Use ui_out_emit_list.
10173         * breakpoint.c (print_solib_event, output_thread_groups): Use
10174         ui_out_emit_list.
10175
10176 2017-04-22  Tom Tromey  <tom@tromey.com>
10177
10178         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
10179         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
10180         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
10181
10182 2017-04-22  Tom Tromey  <tom@tromey.com>
10183
10184         * tracepoint.c (tvariables_info_1)
10185         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
10186
10187 2017-04-22  Tom Tromey  <tom@tromey.com>
10188
10189         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
10190         annotate_arg_emitter.
10191         * breakpoint.c (print_mention_watchpoint)
10192         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
10193         * annotate.h (struct annotate_arg_emitter): New.
10194
10195 2017-04-22  Tom Tromey  <tom@tromey.com>
10196
10197         * record-btrace.c (record_btrace_insn_history)
10198         (record_btrace_insn_history_range, record_btrace_call_history)
10199         (record_btrace_call_history_range): Use ui_out_emit_tuple.
10200         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
10201         ui_out_emit_tuple.
10202         * stack.c (print_frame_info): Use ui_out_emit_tuple.
10203         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
10204         * skip.c (skip_info): Use ui_out_emit_tuple.
10205         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
10206         * progspace.c (print_program_space): Use ui_out_emit_tuple.
10207         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
10208         * osdata.c (info_osdata): Use ui_out_emit_tuple.
10209         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10210         ui_out_emit_tuple.
10211         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
10212         (output_register, mi_cmd_data_read_memory)
10213         (mi_cmd_data_read_memory_bytes, mi_load_progress)
10214         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
10215         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
10216         Use ui_out_emit_tuple.
10217         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
10218         ui_out_emit_tuple.
10219         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10220         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
10221         * linux-thread-db.c (info_auto_load_libthread_db): Use
10222         ui_out_emit_tuple.
10223         * inferior.c (print_inferior): Use ui_out_emit_tuple.
10224         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
10225         * disasm.c (do_mixed_source_and_assembly_deprecated)
10226         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
10227         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
10228         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
10229         * breakpoint.c (print_one_breakpoint_location)
10230         (print_one_breakpoint): Use ui_out_emit_tuple.
10231         * auto-load.c (print_script, info_auto_load_cmd): Use
10232         ui_out_emit_tuple.
10233         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
10234
10235 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
10236
10237         * thread.c (print_thread_info_1): Remove dead code.
10238
10239 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10240
10241         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
10242         GDB_SELF_TEST.
10243         * arm-tdep.c (selftests::arm_record_test): Likewise.
10244
10245 2017-04-21  Yao Qi  <yao.qi@linaro.org>
10246
10247         * regcache.c (regcache_restore): Remove argument 2.  Replace
10248         argument 3 with regcache.  Get register status from
10249         src->register_status and get register contents from
10250         register_buffer (src, regnum).
10251         (regcache_cpy): Update.
10252
10253 2017-04-19  Pedro Alves  <palves@redhat.com>
10254
10255         * gdbthread.h (thread): Add missing closing parenthesis in
10256         comment.
10257
10258 2017-04-19  Pedro Alves  <palves@redhat.com>
10259
10260         * common/refcounted-object.h: New file.
10261         * gdbthread.h: Include "common/refcounted-object.h".
10262         (thread_info): Inherit from refcounted_object and add comments.
10263         (thread_info::incref, thread_info::decref)
10264         (thread_info::m_refcount): Delete.
10265         (thread_info::deletable): Use the refcounted_object::refcount()
10266         method.
10267         * inferior.c (current_inferior_): Add comment.
10268         (set_current_inferior): Increment/decrement refcounts.
10269         (prune_inferiors, remove_inferior_command): Skip inferiors marked
10270         not-deletable instead of comparing with the current inferior.
10271         (initialize_inferiors): Increment the initial inferior's refcount.
10272         * inferior.h (struct inferior): Forward declare.
10273         Include "common/refcounted-object.h".
10274         (current_inferior, set_current_inferior): Move declaration to
10275         before struct inferior's definition, and fix comment.
10276         (inferior): Inherit from refcounted_object.  Add comments.
10277         * thread.c (switch_to_thread_no_regs): Reference the thread's
10278         inferior pointer directly instead of doing a ptid lookup.
10279         (switch_to_no_thread): New function.
10280         (switch_to_thread(thread_info *)): New function, factored out
10281         from ...
10282         (switch_to_thread(ptid_t)): ... this.
10283         (restore_current_thread): Delete.
10284         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
10285         fields, and add 'inf' field.
10286         (do_restore_current_thread_cleanup): Check whether old->inf is
10287         alive instead of looking up an inferior by ptid.  Use
10288         switch_to_thread and switch_to_no_thread.
10289         (restore_current_thread_cleanup_dtor): Use old->inf directly
10290         instead of lookup up an inferior by id.  Decref the inferior.
10291         Don't restore 'removable'.
10292         (make_cleanup_restore_current_thread): Same the inferior pointer
10293         in old, instead of the inferior number.  Incref the inferior.
10294         Don't save/clear 'removable'.
10295
10296 2017-04-19  Pedro Alves  <palves@redhat.com>
10297
10298         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10299         unittests/scoped_restore-selftests.c.
10300         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
10301         * common/scoped_restore.h (scoped_restore_base): Make "class".
10302         (scoped_restore_base::release): New public method.
10303         (scoped_restore_base::scoped_restore_base): New protected ctor.
10304         (scoped_restore_base::m_saved_var): New protected field.
10305         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
10306         scoped_restore_base base class instead of m_saved_var directly.
10307         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
10308         (scoped_restore_tmpl::scoped_restore_tmpl(const
10309         scoped_restore_tmpl<T>&)): Likewise.
10310         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
10311         method.
10312         (scoped_restore_tmpl::saved_var): New method.
10313         (scoped_restore_tmpl::m_saved_var): Delete.
10314         * inferior.h (inferior::detaching): Now a bool.
10315         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
10316         cleanup.
10317         * unittests/scoped_restore-selftests.c: New file.
10318
10319 2017-04-19  Pedro Alves  <palves@redhat.com>
10320
10321         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
10322         Re-sort in alphabetic order.
10323
10324 2017-04-18  Pedro Alves  <palves@redhat.com>
10325
10326         * xml-support.c (obstack_xml_printf): Delete.
10327         * xml-support.h (obstack_xml_printf): Delete.
10328
10329 2017-04-18  Pedro Alves  <palves@redhat.com>
10330
10331         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
10332         vdebug, verror, body_text, start_element, end_element, name,
10333         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
10334         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
10335         is_xinclude>: Make private and add m_ prefix.
10336         (gdb_xml_parser::body_text): New method, based on ...
10337         (gdb_xml_body_text): ... this.  Adjust.
10338         (gdb_xml_parser::vdebug): New method, based on ...
10339         (gdb_xml_debug): ... this.  Adjust.
10340         (gdb_xml_parser::verror): New method, based on ...
10341         (gdb_xml_error): ... this.  Adjust.
10342         (gdb_xml_parser::start_element): New method, based on ...
10343         (gdb_xml_start_element): ... this.  Adjust.
10344         (gdb_xml_start_element_wrapper): Defer to
10345         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
10346         (gdb_xml_parser::end_element): New method, based on ...
10347         (gdb_xml_end_element_wrapper): ... this.  Adjust.
10348         (gdb_xml_parser::~gdb_xml_parser): Adjust.
10349         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
10350         (gdb_xml_parser::use_dtd): New method, based on ...
10351         (gdb_xml_use_dtd): ... this.  Adjust.
10352         (gdb_xml_parser::parse): New method, based on ...
10353         (gdb_xml_parse): ... this.  Adjust.
10354         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
10355         (xinclude_start_include): Adjust to call the parser's name method.
10356         (xml_xinclude_default, xml_xinclude_start_doctype)
10357         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
10358         method.
10359         (xml_process_xincludes): Adjust to call parser methods.
10360         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
10361         declarations.
10362
10363 2017-04-18  Pedro Alves  <palves@redhat.com>
10364
10365         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
10366         gdb::optional<std::string>.
10367         * xml-support.c: Include <string>.
10368         (scope_level::scope_level(scope_level &&))
10369         (scope_level::~scope_level): Delete.
10370         (scope_level::body): Now a std::string.
10371         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
10372         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
10373         parameter.
10374         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
10375         (xinclude_parsing_data::output): Now a std::string reference.
10376         (xinclude_start_include): Adjust.
10377         (xml_xinclude_default): Adjust.
10378         (xml_process_xincludes): Add 'output' parameter, and return bool.
10379         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
10380         and return bool.
10381         * xml-tdesc.c: Include <unordered_map> and <string>.
10382         (tdesc_xml_cache): Delete.
10383         (tdesc_xml_cache_s): Delete.
10384         (xml_cache): Now an std::unordered_map.
10385         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
10386         (target_fetch_description_xml): Change return type to
10387         gdb::optional<std::string>, and adjust.
10388         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
10389         (target_fetch_description_xml): Change return type to
10390         gdb::optional<std::string>.
10391
10392 2017-04-18  Pedro Alves  <palves@redhat.com>
10393
10394         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10395         unittests/optional-selftests.c.
10396         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
10397         * unittests/optional-selftests.c: New file.
10398         * unittests/optional/assignment/1.cc: New file.
10399         * unittests/optional/assignment/2.cc: New file.
10400         * unittests/optional/assignment/3.cc: New file.
10401         * unittests/optional/assignment/4.cc: New file.
10402         * unittests/optional/assignment/5.cc: New file.
10403         * unittests/optional/assignment/6.cc: New file.
10404         * unittests/optional/assignment/7.cc: New file.
10405         * unittests/optional/cons/copy.cc: New file.
10406         * unittests/optional/cons/default.cc: New file.
10407         * unittests/optional/cons/move.cc: New file.
10408         * unittests/optional/cons/value.cc: New file.
10409         * unittests/optional/in_place.cc: New file.
10410         * unittests/optional/observers/1.cc: New file.
10411         * unittests/optional/observers/2.cc: New file.
10412
10413 2017-04-18  Pedro Alves  <palves@redhat.com>
10414
10415         * common/gdb_optional.h: Include common/traits.h.
10416         (in_place_t): New type.
10417         (in_place): New constexpr variable.
10418         (optional::optional): Remove member initialization of
10419         m_instantiated.
10420         (optional::optional(in_place_t...)): New constructor.
10421         (optional::~optional): Use reset.
10422         (optional::optional(const optional&)): New.
10423         (optional::optional(const optional&&)): New.
10424         (optional::optional(T &)): New.
10425         (optional::optional(T &&)): New.
10426         (operator::operator=(const optional &)): New.
10427         (operator::operator=(optional &&)): New.
10428         (operator::operator= (const T &))
10429         (operator::operator= (T &&))
10430         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
10431         (operator::reset): New.
10432         (operator::m_instantiated):: Add in-class initializer.
10433         * common/traits.h: Include <type_traits>.
10434         (struct And): New types.
10435
10436 2017-04-18  Pedro Alves  <palves@redhat.com>
10437
10438         * xml-support.c: Include <vector>.
10439         (scope_level::scope_level(const gdb_xml_element *))
10440         (scope_level::scope_level(scope_level&&)): New.
10441         (scope_level::~scope_level): New.
10442         (scope_level_s): Delete.
10443         (gdb_xml_parser::scopes): Now a std::vector.
10444         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
10445         Use std::vector.
10446         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
10447         scope cleanup code.
10448         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
10449         of the scopes member.  Use std::vector::emplace_back.
10450
10451 2017-04-18  Pedro Alves  <palves@redhat.com>
10452
10453         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
10454         a bool.
10455         (gdb_xml_end_element): Change type of first parameter.
10456         (gdb_xml_cleanup): Rename to ...
10457         (gdb_xml_parser::~gdb_xml_parser): ... this.
10458         (gdb_xml_create_parser_and_cleanup): Delete with ...
10459         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
10460         to this new ctor.
10461         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
10462         using gdb_xml_create_parser_and_cleanup.
10463         (xinclude_parsing_data): Add ctor/dtor.
10464         (xml_xinclude_cleanup): Delete.
10465         (xml_process_xincludes): Create a local xinclude_parsing_data
10466         instead of heap-allocating one.  Create a local gdb_xml_parser
10467         instead of heap-allocating one with
10468         gdb_xml_create_parser_and_cleanup.
10469
10470 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
10471
10472         PR threads/20743
10473         * fbsd-nat.c (resume_one_thread_cb): Remove.
10474         (resume_all_threads_cb): Remove.
10475         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
10476         iterate_over_threads.
10477
10478 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10479
10480         * NEWS: Create a new section for the next release branch.
10481         Rename the section of the current branch, now that it has
10482         been cut.
10483
10484 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10485
10486         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
10487         * version.in: Bump version to 8.0.50.DATE-git.
10488
10489 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
10490
10491         PR gdb/21385
10492         * windows-nat.c (windows_create_inferior): Declare 'allargs'
10493         independently of the host, and fix build breakage on Cygwin.
10494
10495 2017-04-13  Pedro Alves  <palves@redhat.com>
10496
10497         * inferior.c (free_inferior): Convert to ...
10498         (inferior::~inferior): ... this dtor.
10499         (inferior::inferior): New ctor, factored out from ...
10500         (add_inferior_silent): ... here.  Allocate the inferior with a new
10501         expression.
10502         (delete_inferior): Call delete instead of free_inferior.
10503         * inferior.h (gdb_environ, continuation): Forward declare.
10504         (inferior): Now a class.  Add in-class initialization to all
10505         members.  Make boolean fields bool, except 'detaching'.
10506         (inferior::inferior): New explicit ctor.
10507         (inferior::~inferior): New.
10508
10509 2017-04-13  Pedro Alves  <palves@redhat.com>
10510
10511         * inferior.c (init_inferior_list): Delete.
10512         * inferior.h (init_inferior_list): Delete.
10513
10514 2017-04-13  Pedro Alves  <palves@redhat.com>
10515
10516         PR threads/13217
10517         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
10518         (top level): Call it twice, with different thread sets.
10519
10520 2017-04-13  Pedro Alves  <palves@redhat.com>
10521
10522         * thread.c: Include <algorithm>.
10523         (thread_array_cleanup): Delete.
10524         (scoped_inc_dec_ref): New class.
10525         (live_threads_count): New function.
10526         (set_thread_refcount): Delete.
10527         (tp_array_compar_ascending): Now a bool.
10528         (tp_array_compar): Convert to a std::sort comparison function.
10529         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
10530         and live_threads_count.
10531
10532 2017-04-13  Pedro Alves  <palves@redhat.com>
10533
10534         * infrun.c (follow_fork_inferior): Also switch the current
10535         inferior.
10536
10537 2017-04-13  Pedro Alves  <palves@redhat.com>
10538
10539         * breakpoint.c (watch_command_1): Save watchpoint-frame info
10540         before calling create_internal_breakpoint.
10541
10542 2017-04-13  Pedro Alves  <palves@redhat.com>
10543
10544         * fork-child.c (execv_argv): New class.
10545         (breakup_args): Refactored as ...
10546         (execv_argv::init_for_no_shell): .. this method of execv_argv.
10547         Copy arguments to storage and replace separators with NULL
10548         terminators in place.
10549         (escape_bang_in_quoted_argument): Adjust to return bool.
10550         (execv_argv::execv_argv): New ctor.
10551         (execv_argv::init_for_shell): New method, factored out from
10552         fork_inferior.  Don't strdup strings into the vector.
10553         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
10554         Remove free_vector_argv call.
10555
10556 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10557
10558         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10559         tdep->rx_psw_type.
10560
10561 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10562
10563         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10564         * rx-tdep.c (rx_gdbarch_init): Likewise.
10565
10566 2017-04-13  Pedro Alves  <palves@redhat.com>
10567
10568         * breakpoint.h (struct breakpoint): Reindent.
10569
10570 2017-04-13  Pedro Alves  <palves@redhat.com>
10571
10572         * breakpoint.c (bp_location): Rename to ...
10573         (bp_locations): ... this.  All references updated.
10574         (bp_location_count): Rename to ...
10575         (bp_locations_count): ... this.  All references updated.
10576         (bp_location_placed_address_before_address_max): Rename to ...
10577         (bp_locations_placed_address_before_address_max): ... this.  All
10578         references updated.
10579         (bp_location_shadow_len_after_address_max): Rename to ...
10580         (bp_locations_shadow_len_after_address_max): ... this.  All
10581         references updated.
10582         (bp_location_compare_addrs): Rename to ...
10583         (bp_locations_compare_addrs): ... this.  All references updated.
10584         (bp_location_compare):Rename to ...
10585         (bp_locations_compare): ... this.  All references updated.
10586         (bp_location_target_extensions_update): Rename to ...
10587         (bp_locations_target_extensions_update): ... this.  All references
10588         updated.
10589
10590 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10591
10592         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10593         * common/common.m4: Check headers 'termios.h', 'termio.h' and
10594         'sgtty.h'.
10595         * common/gdb_termios.h: New file, with parts of "terminal.h".
10596         * inflow.c: Include "gdb_termios.h".
10597         * ser-unix.c: Include "gdb_termios.h".
10598         * terminal.h: Move terminal-related defines to
10599         "common/gdb_termios.h".
10600
10601 2017-04-12  Tom Tromey  <tom@tromey.com>
10602
10603         * probe.c (parse_probes): Update.
10604         * location.h (delete_event_location): Don't declare.
10605         (event_location_deleter::operator()): Update.
10606         * location.c (event_location_deleter::operator()): Rename from
10607         delete_event_location.
10608         * linespec.h (linespec_result) <location>: Change type to
10609         event_location_up.
10610         * linespec.c (canonicalize_linespec, event_location_to_sals)
10611         (decode_objc): Update.
10612         (linespec_result): Don't call delete_event_location.
10613         * breakpoint.c (create_breakpoints_sal)
10614         (bkpt_probe_create_sals_from_location)
10615         (strace_marker_create_sals_from_location): Update.
10616
10617 2017-04-12  Tom Tromey  <tom@tromey.com>
10618
10619         * linespec.h (struct linespec_result): Add constructor and
10620         destructor.
10621         (init_linespec_result, destroy_linespec_result)
10622         (make_cleanup_destroy_linespec_result): Don't declare.
10623         * linespec.c (init_linespec_result): Remove.
10624         (linespec_result::~linespec_result): Rename from
10625         destroy_linespec_result.  Update.
10626         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10627         Remove.
10628         * breakpoint.c (create_breakpoint, break_range_command)
10629         (decode_location_default): Update.
10630         * ax-gdb.c (agent_command_1): Update.
10631
10632 2017-04-12  Tom Tromey  <tom@tromey.com>
10633
10634         * remote.c (remote_download_tracepoint): Update.
10635         * python/py-breakpoint.c (bppy_get_location): Update.
10636         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10637         (gdbscm_breakpoint_location): Update.
10638         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10639         * breakpoint.h (struct breakpoint) <location, location_range_end>:
10640         Change type to event_location_up.
10641         * breakpoint.c (create_overlay_event_breakpoint)
10642         (create_longjmp_master_breakpoint)
10643         (create_std_terminate_master_breakpoint)
10644         (create_exception_master_breakpoint)
10645         (breakpoint_event_location_empty_p, print_breakpoint_location)
10646         (print_one_breakpoint_location, create_thread_event_breakpoint)
10647         (init_breakpoint_sal, create_breakpoint)
10648         (print_recreate_ranged_breakpoint, break_range_command)
10649         (init_ada_exception_breakpoint, say_where): Update.
10650         (base_breakpoint_dtor): Don't call delete_event_location.
10651         (bkpt_print_recreate, tracepoint_print_recreate)
10652         (dprintf_print_recreate, update_static_tracepoint)
10653         (breakpoint_re_set_default): Update.
10654
10655 2017-04-12  Tom Tromey  <tom@tromey.com>
10656
10657         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10658         type of "to_do".  Update.
10659         (compute_stack_depth): Use std::vector.
10660
10661 2017-04-12  Tom Tromey  <tom@tromey.com>
10662
10663         * printcmd.c (find_instruction_backward): Use std::vector.
10664
10665 2017-04-12  Tom Tromey  <tom@tromey.com>
10666
10667         * symfile.c (objfilep): Remove typedef.
10668         (reread_symbols): Use a std::vector.
10669
10670 2017-04-12  Tom Tromey  <tom@tromey.com>
10671
10672         * mi/mi-main.c (exec_direction_forward): Remove.
10673         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10674         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10675         scoped_restore.
10676         * guile/guile.c (guile_repl_command, guile_command)
10677         (gdbscm_execute_gdb_command): Use scoped_restore.
10678         * go-exp.y (go_parse): Use scoped_restore.
10679         * d-exp.y (d_parse): Use scoped_restore.
10680         * cli/cli-decode.c (cmd_func): Use scoped_restore.
10681         * c-exp.y (c_parse): Use scoped_restore.
10682
10683 2017-04-12  Tom Tromey  <tom@tromey.com>
10684
10685         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10686         (mi_parse): Update return type.
10687         (mi_parse_free): Remove.
10688         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10689         (mi_parse::~mi_parse): Rename from mi_parse_free.
10690         (mi_parse_cleanup): Remove.
10691         (mi_parse): Return a unique_ptr.  Use new.
10692         * mi/mi-main.c (mi_execute_command): Update.
10693
10694 2017-04-12  Tom Tromey  <tom@tromey.com>
10695
10696         * location.c (explicit_location_lex_one): Return a
10697         unique_xmalloc_ptr.
10698         (string_to_explicit_location): Update.  Remove cleanups.
10699
10700 2017-04-12  Tom Tromey  <tom@tromey.com>
10701
10702         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10703         (compare_value_and_voffset): Change type.  Update.
10704         (compute_vtable_size): Change type of "offset_vec".
10705         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
10706         (gnuv3_get_typeid): Remove extraneous declaration.
10707
10708 2017-04-12  Tom Tromey  <tom@tromey.com>
10709
10710         * charset.h (wchar_iterator): Fix comment.
10711
10712 2017-04-12  Tom Tromey  <tom@tromey.com>
10713
10714         * charset.c (iconv_wrapper): New class.
10715         (cleanup_iconv): Remove.
10716         (convert_between_encodings): Use it.
10717
10718 2017-04-12  Tom Tromey  <tom@tromey.com>
10719
10720         * symfile.h (increment_reading_symtab): Update type.
10721         * symfile.c (decrement_reading_symtab): Remove.
10722         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10723         * psymtab.c (psymtab_to_symtab): Update.
10724         * dwarf2read.c (dw2_instantiate_symtab): Update.
10725
10726 2017-04-12  Tom Tromey  <tom@tromey.com>
10727
10728         * jit.c (struct jit_reader): Declare separately.  Add constructor
10729         and destructor.  Change type of "handle".
10730         (loaded_jit_reader): Define separately.
10731         (jit_reader_load): Update.  New "new".
10732         (jit_reader_unload_command): Use "delete".
10733         * gdb-dlfcn.h (struct dlclose_deleter): New.
10734         (gdb_dlhandle_up): New typedef.
10735         (gdb_dlopen, gdb_dlsym): Update types.
10736         (gdb_dlclose): Remove.
10737         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10738         (gdb_dlsym): Change type of "handle".
10739         (make_cleanup_dlclose): Remove.
10740         (dlclose_deleter::operator()): Rename from gdb_dlclose.
10741         * compile/compile-c-support.c (load_libcc): Update.
10742
10743 2017-04-12  Tom Tromey  <tom@tromey.com>
10744
10745         * symtab.h (find_pcs_for_symtab_line): Change return type.
10746         * symtab.c (find_pcs_for_symtab_line): Change return type.
10747         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10748         type of "vec".  Update.
10749         (ltpy_get_pcs_for_line): Update.
10750         * linespec.c (decode_digits_ordinary): Update.
10751
10752 2017-04-12  Tom Tromey  <tom@tromey.com>
10753
10754         * tracepoint.c (actions_command): Update.
10755         * python/python.c (python_command, python_interactive_command):
10756         Update.
10757         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10758         * guile/guile.c (guile_command): Update.
10759         * defs.h (read_command_lines, read_command_lines_1): Return
10760         command_line_up.
10761         (command_lines_deleter): New struct.
10762         (command_line_up): New typedef.
10763         * compile/compile.c (compile_code_command)
10764         (compile_print_command): Update.
10765         * cli/cli-script.h (get_command_line, copy_command_lines): Return
10766         command_line_up.
10767         (make_cleanup_free_command_lines): Remove.
10768         * cli/cli-script.c (get_command_line, read_command_lines_1)
10769         (copy_command_lines): Return command_line_up.
10770         (while_command, if_command, read_command_lines, define_command)
10771         (document_command): Update.
10772         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10773         Remove.
10774         * breakpoint.h (breakpoint_set_commands): Change type of
10775         "commands".
10776         * breakpoint.c (breakpoint_set_commands): Change type of
10777         "commands".  Update.
10778         (do_map_commands_command, update_dprintf_command_list)
10779         (create_tracepoint_from_upload): Update.
10780
10781 2017-04-12  Tom Tromey  <tom@tromey.com>
10782
10783         * tracepoint.c (scope_info): Update.
10784         * spu-tdep.c (spu_catch_start): Update.
10785         * python/python.c (gdbpy_decode_line): Update.
10786         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10787         * python/py-breakpoint.c (bppy_init): Update.
10788         * probe.c (parse_probes): Update.
10789         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10790         * location.h (event_location_deleter): New struct.
10791         (event_location_up): New typedef.
10792         (new_linespec_location, new_address_location, new_probe_location)
10793         (new_explicit_location, copy_event_location)
10794         (string_to_event_location, string_to_event_location_basic)
10795         (string_to_explicit_location): Update return type.
10796         (make_cleanup_delete_event_location): Remove.
10797         * location.c (new_linespec_location, new_address_location)
10798         (new_probe_location, new_explicit_location, copy_event_location):
10799         Return event_location_up.
10800         (delete_event_location_cleanup)
10801         (make_cleanup_delete_event_location): Remove.
10802         (string_to_explicit_location, string_to_event_location_basic)
10803         (string_to_event_location): Return event_location_up.
10804         * linespec.c (canonicalize_linespec, event_location_to_sals)
10805         (decode_line_with_current_source)
10806         (decode_line_with_last_displayed, decode_objc): Update.
10807         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10808         * completer.c (location_completer): Update.
10809         * cli/cli-cmds.c (edit_command, list_command): Update.
10810         * breakpoint.c (create_overlay_event_breakpoint)
10811         (create_longjmp_master_breakpoint)
10812         (create_std_terminate_master_breakpoint)
10813         (create_exception_master_breakpoint)
10814         (create_thread_event_breakpoint): Update.
10815         (init_breakpoint_sal): Update.  Remove some dead code.
10816         (create_breakpoint_sal): Change type of "location".  Update.
10817         (create_breakpoints_sal, create_breakpoint, break_command_1)
10818         (dprintf_command, break_range_command, until_break_command)
10819         (init_ada_exception_breakpoint)
10820         (strace_marker_create_sals_from_location)
10821         (update_static_tracepoint, trace_command, ftrace_command)
10822         (strace_command, create_tracepoint_from_upload): Update.
10823         * break-catch-throw.c (re_set_exception_catchpoint): Update.
10824         * ax-gdb.c (agent_command_1): Update.
10825
10826 2017-04-12  Pedro Alves  <palves@redhat.com>
10827
10828         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10829         * configure.tgt: Handle i[34567]86-*-go32* and
10830         i[34567]86-*-msdosdjgpp*.
10831         * i386-tdep.c (i386_svr4_reg_to_regnum):
10832         Make extern.
10833         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10834         i386-go32-tdep.c.
10835         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10836         * i386-go32-tdep.c: New file.
10837         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10838         declarations.
10839
10840 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
10841
10842         * aix-thread.c (pd_status2str): Change return type to const char *.
10843
10844 2017-04-12  Pedro Alves  <palves@redhat.com>
10845
10846         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10847         calls to set_gdbarch_gnu_triplet_regexp.
10848
10849 2017-04-12  Pedro Alves  <palves@redhat.com>
10850
10851         PR gdb/21323
10852         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10853         New enum value.
10854         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10855         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10856         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10857         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10858         * gdbarch.h, gdbarch.c: Regenerate.
10859         * aarch64-tdep.c (aarch64_gdbarch_init): Override
10860         gdbarch_wchar_bit and gdbarch_wchar_signed.
10861         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10862         * arm-tdep.c (arm_gdbarch_init): Likewise.
10863         * avr-tdep.c (avr_gdbarch_init): Likewise.
10864         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10865         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10866         * i386-tdep.c (i386_go32_init_abi): Likewise.
10867         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10868         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10869         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10870         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10871         * sh-tdep.c (sh_gdbarch_init): Likewise.
10872         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10873         * sparc64-tdep.c (sparc64_init_abi): Likewise.
10874         * windows-tdep.c (windows_init_abi): Likewise.
10875         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10876
10877 2017-04-12  Pedro Alves  <palves@redhat.com>
10878
10879         PR c++/21323
10880         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10881         cplus_primitive_type_char32_t>: New enum values.
10882         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10883         and cplus_primitive_type_char32_t.
10884         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10885         32, use the archtecture's built-in type for char16_t and char32_t,
10886         respectively.  Otherwise, fallback to init_integer_type as before,
10887         but make the type unsigned, and issue a complaint.
10888         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10889
10890 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
10891
10892         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10893         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10894
10895 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10896
10897         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10898         'const char *'.
10899
10900 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10901
10902         * common/common-utils.c (free_vector_argv): New function.
10903         * common/common-utils.h: Include <vector>.
10904         (free_vector_argv): New prototype.
10905         * darwin-nat.c (darwin_create_inferior): Rewrite function
10906         prototype in order to constify "exec_file" and accept a
10907         "std::string" for "allargs".
10908         * fork-child.c: Include <vector>.
10909         (breakup_args): Rewrite function, using C++.
10910         (fork_inferior): Rewrite function header, constify "exec_file_arg"
10911         and accept "std::string" for "allargs".  Update the code to
10912         calculate "argv" based on "allargs".  Update calls to "exec_fun"
10913         and "execvp".
10914         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10915         order to constify "exec_file" and accept a "std::string" for
10916         "allargs".
10917         * go32-nat.c (go32_create_inferior): Likewise.
10918         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10919         * infcmd.c (run_command_1): Constify "exec_file".  Use
10920         "std::string" for inferior arguments.
10921         * inferior.h (fork_inferior): Update prototype.
10922         * linux-nat.c (linux_nat_create_inferior): Rewrite function
10923         prototype in order to constify "exec_file" and accept a
10924         "std::string" for "allargs".
10925         * nto-procfs.c (procfs_create_inferior): Likewise.
10926         * procfs.c (procfs_create_inferior): Likewise.
10927         * remote-sim.c (gdbsim_create_inferior): Likewise.
10928         * remote.c (extended_remote_run): Update code to accept
10929         "std::string" as argument.
10930         (extended_remote_create_inferior): Rewrite function prototype in
10931         order to constify "exec_file" and accept a "std::string" for
10932         "allargs".
10933         * rs6000-nat.c (super_create_inferior): Likewise.
10934         (rs6000_create_inferior): Likewise.
10935         * target.h (struct target_ops) <to_create_inferior>: Likewise.
10936         * windows-nat.c (windows_create_inferior): Likewise.
10937
10938 2017-04-11  Pedro Alves  <palves@redhat.com>
10939
10940         * thread.c: Fix whitespace throughout.
10941
10942 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10943
10944         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10945
10946 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
10947
10948         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10949
10950 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
10951
10952         PR gdb/21364
10953         * osdata.c (info_osdata): Check if 'type' is an empty string
10954         instead of NULL.
10955
10956 2017-04-10  Pedro Alves  <palves@redhat.com>
10957
10958         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
10959         (ptid_to_global_thread_id, in_thread_list)
10960         (do_captured_list_thread_ids, set_resumed, set_running)
10961         (set_executing, set_stop_requested, finish_thread_state)
10962         (validate_registers_access, can_access_registers_ptid)
10963         (print_thread_info_1, switch_to_thread)
10964         (do_restore_current_thread_cleanup)
10965         (make_cleanup_restore_current_thread, thread_command)
10966         (thread_name_command): Use operator== instead of ptid_equal.
10967
10968 2017-04-10  Pedro Alves  <palves@redhat.com>
10969
10970         * thread.c (struct current_thread_cleanup) <next>: Delete field.
10971         (current_thread_cleanup_chain): Delete.
10972         (restore_current_thread_cleanup_dtor)
10973         (make_cleanup_restore_current_thread): Remove references to
10974         current_thread_cleanup_chain.
10975
10976 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
10977
10978         * msp430-tdep.c (msp430_pseudo_register_read): Never return
10979         REG_UNKNOWN.
10980
10981 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10982
10983         PR gdb/19942
10984         * gdbthread.h (thread_info::deletable): New method.
10985         (thread_info::incref): New method.
10986         (thread_info::decref): New method.
10987         (thread_info::refcount): Move it to private.
10988         * infrun.c (save_stop_context): Call inc_refcount.
10989         (release_stop_context_cleanup): Likewise.
10990         * thread.c (set_thread_exited): New function.
10991         (init_thread_list): Delete "tp" only it is deletable, otherwise
10992         call set_thread_exited.
10993         (delete_thread_1): Call set_thread_exited.
10994         (current_thread_cleanup) <inferior_pid>: Remove.
10995         <thread>: New field.
10996         (restore_current_thread_ptid_changed): Removed.
10997         (do_restore_current_thread_cleanup): Adjust.
10998         (restore_current_thread_cleanup_dtor): Don't call
10999         find_thread_ptid.
11000         (set_thread_refcount): Use dec_refcount.
11001         (make_cleanup_restore_current_thread): Adjust.
11002         (thread_apply_all_command): Call inc_refcount.
11003         (_initialize_thread): Don't call
11004         observer_attach_thread_ptid_changed.
11005
11006 2017-04-10  Yao Qi  <yao.qi@linaro.org>
11007
11008         * thread.c (delete_thread_1): Hoist code on marking thread as
11009         exited.
11010
11011 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11012
11013         * windows-nat.c (windows_detach): Initialize ptid with
11014         minus_one_ptid.
11015
11016 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11017
11018         * unittests/ptid-selftests.c: Fix erroneous assert messages.
11019
11020 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
11021
11022         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
11023         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
11024         (bfin_pseudo_register_write): Likewise
11025
11026 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
11027
11028         * common/ptid.h (struct ptid): Change to...
11029         (class ptid_t): ... this.
11030         <ptid_t>: New constructors.
11031         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
11032         matches>: New methods.
11033         <make_null, make_minus_one>: New static methods.
11034         <pid>: Rename to...
11035         <m_pid>: ...this.
11036         <lwp>: Rename to...
11037         <m_lwp>: ...this.
11038         <tid>: Rename to...
11039         <m_tid>: ...this.
11040         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
11041         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
11042         as references, move comment to class ptid_t.
11043         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
11044         ptid_t static methods.
11045         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
11046         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
11047         Take ptid arguments as references, implement using ptid_t methods.
11048         * unittests/ptid-selftests.c: New file.
11049         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11050         unittests/ptid-selftests.c.
11051         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
11052
11053 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11054
11055         * python/python.c (python_run_simple_file): Cast mode literal to
11056         non-const char pointer as expected by PyFile_FromString.
11057
11058 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
11059
11060         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
11061         minus_one_ptid and null_ptid.
11062
11063 2017-04-05  Pedro Alves  <palves@redhat.com>
11064
11065         * warning.m4 (build_warnings): Remove -Wno-write-strings.
11066         * configure: Regenerate.
11067
11068 2017-04-05  Pedro Alves  <palves@redhat.com>
11069
11070         * ada-exp.y (yyerror): Constify.
11071         * ada-lang.c (bound_name, get_selections)
11072         (ada_variant_discrim_type)
11073         (ada_variant_discrim_name, ada_value_struct_elt)
11074         (ada_lookup_struct_elt_type, is_unchecked_variant)
11075         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
11076         (catch_ada_exception_command_split)
11077         (catch_ada_assert_command_split, catch_assert_command)
11078         (ada_op_name): Constify.
11079         * ada-lang.h (ada_yyerror, get_selections)
11080         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
11081         * arc-tdep.c (arc_print_frame_cache): Constify.
11082         * arm-tdep.c (arm_skip_stub): Constify.
11083         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
11084         (gen_aggregate_elt_ref): Constify.
11085         * bcache.c (print_bcache_statistics): Constify.
11086         * bcache.h (print_bcache_statistics): Constify.
11087         * break-catch-throw.c (catch_exception_command_1):
11088         * breakpoint.c (struct ep_type_description::description):
11089         Constify.
11090         (add_solib_catchpoint): Constify.
11091         (catch_fork_command_1): Add cast.
11092         (add_catch_command): Constify.
11093         * breakpoint.h (add_catch_command, add_solib_catchpoint):
11094         Constify.
11095         * bsd-uthread.c (bsd_uthread_state): Constify.
11096         * buildsym.c (patch_subfile_names): Constify.
11097         * buildsym.h (next_symbol_text_func, patch_subfile_names):
11098         Constify.
11099         * c-exp.y (yyerror): Constify.
11100         (token::oper): Constify.
11101         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
11102         * c-varobj.c (cplus_describe_child): Constify.
11103         * charset.c (find_charset_names): Add cast.
11104         (find_charset_names): Constify array and add const_cast.
11105         * cli/cli-cmds.c (complete_command, cd_command): Constify.
11106         (edit_command): Constify.
11107         * cli/cli-decode.c (lookup_cmd): Constify.
11108         * cli/cli-dump.c (dump_memory_command, dump_value_command):
11109         Constify.
11110         (struct dump_context): Constify.
11111         (add_dump_command, restore_command): Constify.
11112         * cli/cli-script.c (get_command_line): Constify.
11113         * cli/cli-script.h (get_command_line): Constify.
11114         * cli/cli-utils.c (check_for_argument): Constify.
11115         * cli/cli-utils.h (check_for_argument): Constify.
11116         * coff-pe-read.c (struct read_pe_section_data): Constify.
11117         * command.h (lookup_cmd): Constify.
11118         * common/print-utils.c (decimal2str): Constify.
11119         * completer.c (gdb_print_filename): Constify.
11120         * corefile.c (set_gnutarget): Constify.
11121         * cp-name-parser.y (yyerror): Constify.
11122         * cp-valprint.c (cp_print_class_member): Constify.
11123         * cris-tdep.c (cris_register_name, crisv32_register_name):
11124         Constify.
11125         * d-exp.y (yyerror): Constify.
11126         (struct token::oper): Constify.
11127         * d-lang.h (d_yyerror): Constify.
11128         * dbxread.c (struct header_file_location::name): Constify.
11129         (add_old_header_file, add_new_header_file, last_function_name)
11130         (dbx_next_symbol_text, add_bincl_to_list)
11131         (find_corresponding_bincl_psymtab, set_namestring)
11132         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
11133         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
11134         * defs.h (command_line_input, print_address_symbolic)
11135         (deprecated_readline_begin_hook): Constify.
11136         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
11137         Constify.
11138         * event-top.c (handle_line_of_input): Constify and add cast.
11139         * exceptions.c (catch_errors): Constify.
11140         * exceptions.h (catch_errors): Constify.
11141         * expprint.c (print_subexp_standard, op_string, op_name)
11142         (op_name_standard, dump_raw_expression, dump_raw_expression):
11143         * expression.h (op_name, op_string, dump_raw_expression):
11144         Constify.
11145         * f-exp.y (yyerror): Constify.
11146         (struct token::oper): Constify.
11147         (struct f77_boolean_val::name): Constify.
11148         * f-lang.c (f_word_break_characters): Constify.
11149         * f-lang.h (f_yyerror): Constify.
11150         * fork-child.c (fork_inferior): Add cast.
11151         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
11152         (new_variant): Constify.
11153         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
11154         * gdbarch.c: Regenerate.
11155         * gdbcore.h (set_gnutarget): Constify.
11156         * go-exp.y (yyerror): Constify.
11157         (token::oper): Constify.
11158         * go-lang.h (go_yyerror): Constify.
11159         * go32-nat.c (go32_sysinfo): Constify.
11160         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
11161         * guile/scm-cmd.c (cmdscm_function): Constify.
11162         * guile/scm-param.c (pascm_param_value): Constify.
11163         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
11164         (h8300sx_register_name): Constify.
11165         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
11166         Constify.
11167         * ia64-tdep.c (ia64_register_names): Constify.
11168         * infcmd.c (construct_inferior_arguments): Constify.
11169         (path_command, attach_post_wait): Constify.
11170         * language.c (show_range_command, show_case_command)
11171         (unk_lang_error): Constify.
11172         * language.h (language_defn::la_error)
11173         (language_defn::la_name_of_this): Constify.
11174         * linespec.c (decode_line_2): Constify.
11175         * linux-thread-db.c (thread_db_err_str): Constify.
11176         * lm32-tdep.c (lm32_register_name): Constify.
11177         * m2-exp.y (yyerror): Constify.
11178         * m2-lang.h (m2_yyerror): Constify.
11179         * m32r-tdep.c (m32r_register_names): Constify and make static.
11180         * m68hc11-tdep.c (m68hc11_register_names): Constify.
11181         * m88k-tdep.c (m88k_register_name): Constify.
11182         * macroexp.c (appendmem): Constify.
11183         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
11184         (upgrade_type, parse_external, parse_partial_symbols)
11185         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
11186         (new_symbol): Constify.
11187         * memattr.c (mem_info_command): Constify.
11188         * mep-tdep.c (register_name_from_keyword): Constify.
11189         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
11190         Constify.
11191         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
11192         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
11193         * mi/mi-main.c (captured_mi_execute_command): Constify and add
11194         cast.
11195         (mi_execute_async_cli_command): Constify.
11196         * mips-tdep.c (mips_register_name): Constify.
11197         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
11198         (am33_register_name, am33_2_register_name)
11199         * moxie-tdep.c (moxie_register_names): Constify.
11200         * nat/linux-osdata.c (osdata_type): Constify fields.
11201         * nto-tdep.c (nto_parse_redirection): Constify.
11202         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
11203         (lookup_child_selector): Constify.
11204         (objc_methcall::name): Constify.
11205         * objc-lang.h (lookup_objc_class, lookup_child_selector)
11206         (lookup_struct_typedef): Constify.
11207         * objfiles.c (pc_in_section): Constify.
11208         * objfiles.h (pc_in_section): Constify.
11209         * p-exp.y (struct token::oper): Constify.
11210         (yyerror): Constify.
11211         * p-lang.h (pascal_yyerror): Constify.
11212         * parser-defs.h (op_name_standard): Constify.
11213         (op_print::string): Constify.
11214         (exp_descriptor::op_name): Constify.
11215         * printcmd.c (print_address_symbolic): Constify.
11216         * psymtab.c (print_partial_symbols): Constify.
11217         * python/py-breakpoint.c (stop_func): Constify.
11218         (bppy_get_expression): Constify.
11219         * python/py-cmd.c (cmdpy_completer::name): Constify.
11220         (cmdpy_function): Constify.
11221         * python/py-event.c (evpy_add_attribute)
11222         (gdbpy_initialize_event_generic): Constify.
11223         * python/py-event.h (evpy_add_attribute)
11224         (gdbpy_initialize_event_generic): Constify.
11225         * python/py-evts.c (add_new_registry): Constify.
11226         * python/py-finishbreakpoint.c (outofscope_func): Constify.
11227         * python/py-framefilter.c (get_py_iter_from_func): Constify.
11228         * python/py-inferior.c (get_buffer): Add cast.
11229         * python/py-param.c (parm_constant::name): Constify.
11230         * python/py-unwind.c (fprint_frame_id): Constify.
11231         * python/python.c (gdbpy_parameter_value): Constify.
11232         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
11233         * remote.c (memory_packet_config::name): Constify.
11234         (show_packet_config_cmd, remote_write_bytes)
11235         (remote_buffer_add_string):
11236         * reverse.c (exec_reverse_once): Constify.
11237         * rs6000-tdep.c (variant::name, variant::description): Constify.
11238         * rust-exp.y (rustyyerror): Constify.
11239         * rust-lang.c (rust_op_name): Constify.
11240         * rust-lang.h (rustyyerror): Constify.
11241         * serial.h (serial_ops::name): Constify.
11242         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
11243         (sh_sh3e_register_name, sh_sh2e_register_name)
11244         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
11245         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
11246         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
11247         (sh_sh4al_dsp_register_name): Constify.
11248         * sh64-tdep.c (sh64_register_name): Constify.
11249         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
11250         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
11251         * stabsread.c (patch_block_stabs, read_type_number)
11252         (ref_map::stabs, ref_add, process_reference)
11253         (symbol_reference_defined, define_symbol, define_symbol)
11254         (error_type, read_type, read_member_functions, read_cpp_abbrev)
11255         (read_one_struct_field, read_struct_fields, read_baseclasses)
11256         (read_tilde_fields, read_struct_type, read_array_type)
11257         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
11258         (read_huge_number, read_range_type, read_args, common_block_start)
11259         (find_name_end): Constify.
11260         * stabsread.h (common_block_start, define_symbol)
11261         (process_one_symbol, symbol_reference_defined, ref_add):
11262         * symfile.c (get_section_index, add_symbol_file_command):
11263         * symfile.h (get_section_index): Constify.
11264         * target-descriptions.c (tdesc_type::name): Constify.
11265         (tdesc_free_type): Add cast.
11266         * target.c (find_default_run_target):
11267         (add_deprecated_target_alias, find_default_run_target)
11268         (target_announce_detach): Constify.
11269         (do_option): Constify.
11270         * target.h (add_deprecated_target_alias): Constify.
11271         * thread.c (print_thread_info_1): Constify.
11272         * top.c (deprecated_readline_begin_hook, command_line_input):
11273         Constify.
11274         (init_main): Add casts.
11275         * top.h (handle_line_of_input): Constify.
11276         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
11277         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
11278         (tfind_command): Rename to ...
11279         (tfind_command_1): ... this and constify.
11280         (tfind_command): New function.
11281         (tfind_end_command, tfind_start_command): Adjust.
11282         (encode_source_string): Constify.
11283         * tracepoint.h (encode_source_string): Constify.
11284         * tui/tui-data.c (tui_partial_win_by_name): Constify.
11285         * tui/tui-data.h (tui_partial_win_by_name): Constify.
11286         * tui/tui-source.c (tui_set_source_content_nil): Constify.
11287         * tui/tui-source.h (tui_set_source_content_nil): Constify.
11288         * tui/tui-win.c (parse_scrolling_args): Constify.
11289         * tui/tui-windata.c (tui_erase_data_content): Constify.
11290         * tui/tui-windata.h (tui_erase_data_content): Constify.
11291         * tui/tui-winsource.c (tui_erase_source_content): Constify.
11292         * tui/tui.c (tui_enable): Add cast.
11293         * utils.c (defaulted_query): Constify.
11294         (init_page_info): Add cast.
11295         (puts_debug, subset_compare): Constify.
11296         * utils.h (subset_compare): Constify.
11297         * varobj.c (varobj_format_string): Constify.
11298         * varobj.h (varobj_format_string): Constify.
11299         * vax-tdep.c (vax_register_name): Constify.
11300         * windows-nat.c (windows_detach): Constify.
11301         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
11302         * xml-support.c (gdb_xml_end_element): Constify.
11303         * xml-tdesc.c (tdesc_start_reg): Constify.
11304         * xstormy16-tdep.c (xstormy16_register_name): Constify.
11305         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
11306         * xtensa-tdep.h (xtensa_register_t::name): Constify.
11307
11308 2017-04-05  Pedro Alves  <palves@redhat.com>
11309
11310         * proc-api.c (struct trans): Constify.
11311         (procfs_note): Constify.
11312         * proc-events.c (struct trans, syscall_table):
11313         * proc-flags.c (struct trans): Constify.
11314         * proc-utils.h (procfs_note): Constify.
11315         * proc-why.c (struct trans): Constify.
11316         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
11317         (procfs_detach): Constify.
11318         * sol-thread.c (struct string_map): Constify.
11319         (td_err_string, td_state_string): Constify.
11320
11321 2017-04-05  Pedro Alves  <palves@redhat.com>
11322
11323         * proc-api.c (procfs_filename): Don't initialize
11324         procfs_filename.
11325         (prepare_to_trace): Assume procfs_filename is non-NULL.
11326         (_initialize_proc_api): Give procfs_filename a default value here.
11327
11328 2017-04-05  Pedro Alves  <palves@redhat.com>
11329
11330         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
11331         'cond_string' parameter.
11332         (extract_exception_regexp): Constify 'string' parameter.
11333         (catch_exception_command_1): Constify.
11334         * breakpoint.c (init_catchpoint)
11335         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
11336         parameter.
11337         (ep_parse_optional_if_clause, catch_fork_command_1)
11338         (catch_exec_command_1): Constify.
11339         * breakpoint.h (init_catchpoint): Constify 'cond_string'
11340         parameter.
11341         (ep_parse_optional_if_clause): Constify.
11342         * cli/cli-utils.c (remove_trailing_whitespace)
11343         (check_for_argument): Constify.
11344         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
11345         non-const overload.
11346         (check_for_argument): Likewise.
11347
11348 2017-04-05  Pedro Alves  <palves@redhat.com>
11349
11350         * event-top.c (command_line_handler): Add cast to execute_command
11351         call.
11352         * record-btrace.c (cmd_record_btrace_bts_start)
11353         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
11354         (cmd_record_btrace_start): Add cast to execute_command call.
11355         * record-full.c (record_full_goto_insn):
11356         * record.c (record_start, record_stop): Add cast to
11357         execute_command_to_string calls.
11358         (cmd_record_start): Add cast to execute_command calls.
11359
11360 2017-04-05  Pedro Alves  <palves@redhat.com>
11361
11362         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
11363         static inline function.
11364         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
11365         array and use gdb_PyArg_ParseTupleAndKeywords.
11366         * python/py-cmd.c (cmdpy_init): Likewise.
11367         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
11368         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
11369         (infpy_search_memory): Likewise.
11370         * python/py-objfile.c (objfpy_add_separate_debug_file)
11371         (gdbpy_lookup_objfile): Likewise.
11372         * python/py-symbol.c (gdbpy_lookup_symbol)
11373         (gdbpy_lookup_global_symbol): Likewise.
11374         * python/py-type.c (gdbpy_lookup_type): Likewise.
11375         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
11376         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
11377         Likewise.
11378
11379 2017-04-05  Pedro Alves  <palves@redhat.com>
11380
11381         * python/python-internal.h (gdb_PyGetSetDef): New type.
11382         * python/py-block.c (block_object_getset)
11383         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
11384         * python/py-event.c (event_object_getset)
11385         (finish_breakpoint_object_getset): Likewise.
11386         * python/py-inferior.c (inferior_object_getset): Likewise.
11387         * python/py-infthread.c (thread_object_getset): Likewise.
11388         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
11389         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
11390         * python/py-objfile.c (objfile_getset): Likewise.
11391         * python/py-progspace.c (pspace_getset): Likewise.
11392         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
11393         Likewise.
11394         * python/py-record.c (recpy_record_getset): Likewise.
11395         * python/py-symbol.c (symbol_object_getset): Likewise.
11396         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
11397         Likewise.
11398         * python/py-type.c (type_object_getset, field_object_getset):
11399         Likewise.
11400         * python/py-value.c (value_object_getset): Likewise.
11401
11402 2017-04-05  Pedro Alves  <palves@redhat.com>
11403
11404         * python/python-internal.h (gdb_PyObject_CallMethod)
11405         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
11406         New functions.
11407         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
11408         (PySys_GetObject, PySys_SetPath): New macros.
11409
11410 2017-04-05  Pedro Alves  <palves@redhat.com>
11411
11412         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
11413         info_osdata_command.
11414         * osdata.c (info_osdata_command): Rename to ...
11415         (info_osdata): ... this.  Constify 'type' parameter, and remove
11416         the 'from_tty' parameter.  Accept NULL TYPE.
11417         (info_osdata_command): New function.
11418         * osdata.h (info_osdata_command): Remove declaration.
11419         (info_osdata): New declaration.
11420
11421 2017-04-05  Pedro Alves  <palves@redhat.com>
11422
11423         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
11424         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
11425         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
11426         parameter.
11427         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
11428         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
11429         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
11430         parameter.
11431         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
11432         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
11433         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
11434         (mi_cmd_file_list_exec_source_files)
11435         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
11436         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11437         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
11438         parameter.
11439         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
11440         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
11441         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
11442         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
11443         (mi_cmd_stack_info_frame): Constify 'command' parameter.
11444         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
11445         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
11446         'command' parameter.
11447         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
11448         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
11449         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
11450         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
11451         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
11452         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
11453         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
11454         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
11455         (mi_cmd_var_set_update_range): Constify 'command' parameter.
11456         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
11457         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
11458         parameter.
11459         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
11460         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
11461         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
11462         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
11463         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
11464         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
11465         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
11466         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
11467         (mi_cmd_data_list_changed_registers)
11468         (mi_cmd_data_write_register_values)
11469         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
11470         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
11471         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
11472         (mi_cmd_list_features, mi_cmd_list_target_features)
11473         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
11474         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
11475         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
11476         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
11477         (mi_cmd_trace_frame_collected): Constify 'command'
11478         parameter.
11479         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
11480         'command' parameter.
11481
11482 2017-04-05  Pedro Alves  <palves@redhat.com>
11483
11484         * ada-lang.c (ada_completer_word_break_characters): Now a const
11485         array.
11486         (ada_get_gdb_completer_word_break_characters): Constify.
11487         * completer.c (gdb_completer_command_word_break_characters)
11488         (gdb_completer_file_name_break_characters)
11489         (gdb_completer_quote_characters): Now const arrays.
11490         (get_gdb_completer_quote_characters): Constify.
11491         (set_rl_completer_word_break_characters): New function.
11492         (set_gdb_completion_word_break_characters)
11493         (complete_line_internal): Use it.
11494         * completer.h (get_gdb_completer_quote_characters): Constify.
11495         (set_rl_completer_word_break_characters): Declare.
11496         * f-lang.c (f_word_break_characters): Constify.
11497         * language.c (default_word_break_characters): Constify.
11498         * language.h (language_defn::la_word_break_characters): Constify.
11499         (default_word_break_characters): Constify.
11500         * top.c (init_main): Use set_rl_completer_word_break_characters.
11501
11502 2017-04-05  Pedro Alves  <palves@redhat.com>
11503
11504         * aix-thread.c (aix_thread_pid_to_str)
11505         (aix_thread_extra_thread_info): Constify.
11506         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
11507         * bsd-uthread.c (bsd_uthread_extra_thread_info)
11508         (bsd_uthread_pid_to_str): Constify.
11509         * corelow.c (core_pid_to_str): Constify.
11510         * darwin-nat.c (darwin_pid_to_str): Constify.
11511         * fbsd-nat.c (fbsd_pid_to_str): Constify.
11512         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
11513         Constify.
11514         * gnu-nat.c (gnu_pid_to_str): Constify.
11515         * go32-nat.c (go32_pid_to_str): Constify.
11516         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
11517         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
11518         * inferior.c (inferior_pid_to_str): Constify.
11519         * linux-nat.c (linux_nat_pid_to_str): Constify.
11520         * linux-tdep.c (linux_core_pid_to_str): Constify.
11521         * linux-thread-db.c (thread_db_pid_to_str)
11522         (thread_db_extra_thread_info): Constify.
11523         * nto-tdep.c (nto_extra_thread_info): Constify.
11524         * nto-tdep.h (nto_extra_thread_info): Constify.
11525         * obsd-nat.c (obsd_pid_to_str): Constify.
11526         * procfs.c (procfs_pid_to_str): Constify.
11527         * ravenscar-thread.c (ravenscar_extra_thread_info)
11528         (ravenscar_pid_to_str): Constify.
11529         * remote-sim.c (gdbsim_pid_to_str): Constify.
11530         * remote.c (remote_threads_extra_info, remote_pid_to_str):
11531         Constify.
11532         * sol-thread.c (solaris_pid_to_str): Constify.
11533         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
11534         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
11535         * target.c (default_pid_to_str, target_pid_to_str)
11536         (normal_pid_to_str, default_pid_to_str): Constify.
11537         * target.h (target_ops::to_pid_to_str)
11538         (target_ops::to_extra_thread_info): Constify.
11539         (target_pid_to_str, normal_pid_to_str): Constify.
11540         * windows-nat.c (windows_pid_to_str): Constify.
11541         * gdbarch.sh (core_pid_to_str): Constify.
11542         * target-delegates.c: Regenerate.
11543         * gdbarch.h, gdbarch.c: Regenerate.
11544
11545 2017-04-05  Pedro Alves  <palves@redhat.com>
11546
11547         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
11548         the memory of the temporary warning_pre_print override.
11549         * utils.c (warning_pre_print): Constify.
11550         * utils.h (warning_pre_print): Constify.
11551
11552 2017-04-05  Pedro Alves  <palves@redhat.com>
11553
11554         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
11555         (shell_command): New function.
11556         (make_command): Use std::string.
11557         (init_cli_cmds): Register shell_command instead of shell_escape.
11558
11559 2017-04-05  Pedro Alves  <palves@redhat.com>
11560
11561         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11562         * tracepoint.c (default_collect): Don't initialize.
11563
11564 2017-04-05  Pedro Alves  <palves@redhat.com>
11565
11566         * macroexp.c (macro_buffer::shared): Now a bool.
11567         (init_buffer): Update.
11568         (init_shared_buffer): Constify 'addr' parameter.
11569         (substitute_args, expand, macro_expand, macro_expand_next): Remove
11570         casts.
11571
11572 2017-04-05  Pedro Alves  <palves@redhat.com>
11573
11574         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
11575         * disasm.c (set_disassembler_options): Constify local.
11576         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11577
11578 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
11579
11580         PR gdb/21352
11581         * tracefile.c (tsave_command): Fix argument parsing for '-r'
11582         option.
11583
11584 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11585
11586         * frame.c (frame_unwind_register_unsigned): Call
11587         frame_unwind_register_value.
11588
11589 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11590
11591         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11592         Use gdb_test_multiple, and don't match anchor.
11593
11594 2017-04-05  Pedro Alves  <palves@redhat.com>
11595
11596         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11597         (Write After Approval): Remove Simon Marchi.
11598
11599 2017-04-05  Pedro Alves  <palves@redhat.com>
11600
11601         * common/gdb_optional.h (optional::optional): Make constexpr and
11602         initialize m_dummy.
11603
11604 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11605
11606         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11607         (amd64fbsd_jmp_buf_reg_offset): Remove.
11608         (amd64fbsd_supply_uthread): Remove function.
11609         (amd64fbsd_collect_uthread): Remove function.
11610         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11611         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11612         (x86_64-*-freebsd*): Remove bsd-uthread.o.
11613         (fbsd-nat.c): Update comment.
11614         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11615         (i386fbsd_jmp_buf_reg_offset): Remove.
11616         (i386fbsd_supply_uthread): Remove function.
11617         (i386fbsd_collect_uthread): Remove function.
11618         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11619
11620 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11621
11622         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11623         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11624         * NEWS: Mention that support for FreeBSD/alpha was removed.
11625         * alpha-fbsd-tdep.c: Delete file.
11626         * config/alpha/fbsd.mh: Delete file.
11627         * configure.host: Delete alpha*-*-freebsd* and
11628         alpha*-*-kfreebsd*-gnu.
11629         * configure.tgt: Delete alpha*-*-freebsd* and
11630         alpha*-*-kfreebsd*-gnu.
11631
11632 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11633
11634         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11635         amd64bsd_store_inferior_registers): Use ptid from regcache.
11636
11637 2017-04-04  Pedro Alves  <palves@redhat.com>
11638
11639         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
11640         data fields, make them private and add "m_" prefixes.
11641         (lnp_state_machine::lnp_state_machine): New ctor.
11642         (record_line, check_line_address, handle_set_discriminator)
11643         (handle_set_address, handle_advance_pc, handle_special_opcode)
11644         (handle_advance_line, handle_set_file, handle_negate_stmt)
11645         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11646         (end_sequence, advance_line): New methods.
11647         (m_gdbarch, m_record_lines_p): New fields.
11648         (lnp_reader_state): Delete.
11649         (dwarf_record_line): Rename to ...
11650         (lnp_state_machine::record_line): ... adjust.
11651         (init_lnp_state_machine): Delete.
11652         (lnp_state_machine::lnp_state_machine): New.
11653         (check_line_address): Rename to ...
11654         (lnp_state_machine::check_line_address): This.
11655         (dwarf_decode_lines_1): Remove reference to "reader_state".
11656         Adjust lnp_state_machine having a non-default ctor.  Use bool.
11657         State machine internal state manipulation moved to
11658         lnp_state_machine methods.
11659
11660 2017-04-04  Pedro Alves  <palves@redhat.com>
11661
11662         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11663         unittests/offset-type-selftests.c.
11664         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11665         * common/offset-type.h: New file.
11666         * common/preprocessor.h: New file.
11667         * common/traits.h: New file.
11668         * common/valid-expr.h: New file.
11669         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
11670         sect_offset and cu_offset strong typedefs throughout.
11671         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11672         typedefs throughout.
11673         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
11674         sect_offset and cu_offset strong typedefs throughout.
11675         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11676         typedefs throughout.
11677         * gdbtypes.h: Include "common/offset-type.h".
11678         (cu_offset): Now an offset type (strong typedef) instead of a
11679         struct.
11680         (sect_offset): Likewise.
11681         (union call_site_parameter_u): Rename "param_offset" field to
11682         "param_cu_off".
11683         * unittests/offset-type-selftests.c: New file.
11684
11685 2017-04-04  Pedro Alves  <palves@redhat.com>
11686
11687         * common/underlying.h: New file.
11688         * dwarf2read.c: Include "common/gdb_optional.h" and
11689         "common/underlying.h".
11690         (dir_index, file_name_index): New types.
11691         (file_entry): Use them.
11692         (file_entry::include): Use to_underlying.
11693         (line_header::add_file_name): Use dir_index.
11694         (read_formatted_entries): Use gdb::optional.  Read form before
11695         writting to file_entry.
11696         (dwarf_decode_line_header): Use dir_index.
11697         (lnp_state_machine::current_file): Use to_underlying.
11698         (lnp_state_machine::file): Change type to file_name_index.
11699         (dwarf_record_line): Use to_underlying.
11700         (init_lnp_state_machine): Use file_name_index.
11701         (dwarf_decode_lines_1): Use dir_index and file_name_index.
11702
11703 2017-04-04  Pedro Alves  <palves@redhat.com>
11704
11705         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11706         operator bool, has_value and get methods.
11707
11708 2017-04-04  Pedro Alves  <palves@redhat.com>
11709
11710         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11711         fields.
11712         (line_header): Initialize all data fields.  Change type of
11713         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11714         Change type of include_dirs to std::vector<const char *>.  Remove
11715         num_include_dirs, include_dirs_size.  Change type of file_names to
11716         std::vector<file_entry>.  Remove num_file_names, file_names_size.
11717         (line_header::line_header): New.
11718         (line_header::add_include_dir, line_header::add_file_name): New
11719         methods.
11720         (line_header::include_dir_at): Remove NULL check.
11721         (line_header::file_name_at): Add const overload.
11722         (line_header_up): New unique_ptr typedef.
11723         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
11724         std::vector.  Remove free_line_header call.
11725         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
11726         free_line_header call.
11727         (free_cu_line_header): Delete.
11728         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11729         (setup_type_unit_groups): Use line_header_up instead of cleanups.
11730         Adjust to use std::vector.
11731         (free_line_header): Delete.
11732         (free_line_header_voidp): Use delete.
11733         (add_include_dir): Replace with ...
11734         (line_header::add_include_dir): ... this method.  Use std::vector.
11735         (add_file_name): Replace with ...
11736         (line_header::add_file_name): ... this method.  Use std::vector.
11737         (add_include_dir_stub): Delete.
11738         (read_formatted_entries): Remove memset.
11739         (dwarf_decode_line_header): Return a line_header_up instead of a
11740         raw pointer.  Remove cleanup handling.  Pass lambdas to
11741         read_formatted_entries.  Adjust to use line_header methods.
11742         (dwarf_decode_lines_1): Adjust to use line_header methods.
11743         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11744         use std::vector.
11745
11746 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
11747
11748         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11749         instead of struct ptid.
11750
11751 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
11752
11753         * frame.c (get_frame_register_bytes): Unwind using value.
11754         (put_frame_register_bytes): Likewise.
11755
11756 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
11757
11758         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11759         aggregate-like.
11760
11761 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
11762
11763         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11764
11765 2017-03-29  Yao Qi  <yao.qi@linaro.org>
11766
11767         * gdbthread.h (struct thread_info): Declare constructor and
11768         destructor.  Add some in-class member initializers.
11769         * thread.c (free_thread): Remove.
11770         (init_thread_list): Call delete instead of free_thread.
11771         (new_thread): Call thread_info constructor.
11772         (thread_info::thread_info): New function.
11773         (thread_info::~thread_info): New function.
11774         (delete_thread_1): Call delete instead of free_thread.
11775         (make_cleanup_restore_current_thread): Move tp and frame to
11776         inner block.
11777
11778 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11779
11780         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11781         (arc_skip_prologue): Likewise.
11782         (arc_make_frame_cache): Likewise.
11783         (arc_pv_get_operand): New function.
11784         (arc_is_in_prologue): Likewise.
11785         (arc_analyze_prologue): Likewise.
11786         (arc_print_frame_cache): Likewise.
11787         (MAX_PROLOGUE_LENGTH): New constant.
11788
11789 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11790
11791         * configure.tgt: Add arc-insn.o.
11792         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11793         (dump_arc_instruction_command): New function.
11794         (arc_fprintf_disasm): Likewise.
11795         (arc_disassemble_info): Likewise.
11796         (arc_insn_get_operand_value): Likewise.
11797         (arc_insn_get_operand_value_signed): Likewise.
11798         (arc_insn_get_memory_base_reg): Likewise.
11799         (arc_insn_get_memory_offset): Likewise.
11800         (arc_insn_get_branch_target): Likewise.
11801         (arc_insn_dump): Likewise.
11802         (arc_insn_get_linear_next_pc): Likewise.
11803         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11804         (arc_disassemble_info): Likewise.
11805         (arc_insn_get_branch_target): Likewise.
11806         (arc_insn_get_linear_next_pc): Likewise.
11807         * NEWS: Mention new "maint print arc arc-instruction".
11808
11809 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11810
11811         * arc-tdep (maintenance_print_arc_list): New variable.
11812         (maintenance_print_arc_command): New function.
11813
11814 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11815
11816         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11817         Add "limm" and "reserved".
11818         (arc_cannot_fetch_register, arc_cannot_store_register): Add
11819         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11820         * arc-tdep.h (arc_regnum): Likewise.
11821
11822 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11823
11824         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11825         for THREADPTR register.
11826         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11827         register.
11828         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11829         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11830         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11831
11832 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11833
11834         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11835         registers above gdbarch_num_regs (gdbarch) as privileged in
11836         call0 ABI.
11837
11838 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11839
11840         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11841         for a single specified register or for all registers in
11842         a0_base..a0_base + C0_NREGS range.
11843         (supply_gregset_reg): Call regcache_raw_supply for a single
11844         specified register or for all registers in a0_base..a0_base +
11845         C0_NREGS range.
11846
11847 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11848
11849         * arch/xtensa.h (C0_NREGS): Add definition.
11850         * xtensa-tdep.c (C0_NREGS): Remove definition.
11851
11852 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11853
11854         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11855         Drop xtensa_default_isa initialization.
11856         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11857
11858 2017-03-27  Pedro Alves  <palves@redhat.com>
11859
11860         * dwarf2read.c (file_entry) <dir_index>: Add comment.
11861         (file_entry::include_dir): New method.
11862         (line_header::include_dir_at, line_header::file_name_at): New
11863         methods.
11864         (setup_type_unit_groups, setup_type_unit_groups)
11865         (psymtab_include_file_name): Simplify using the new methods.
11866         (lnp_state_machine) <the_line_header>: New field.
11867         <file>: Add comment.
11868         (lnp_state_machine::current_file): New method.
11869         (dwarf_record_line): Simplify using the new methods.
11870         (init_lnp_state_machine): Initialize the "the_line_header" field.
11871         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11872         Simplify using the new methods.
11873
11874 2017-03-27  Pedro Alves  <palves@redhat.com>
11875
11876         * cp-name-parser.y (make_empty): Delete.
11877         (demangler_special, nested_name, ptr_operator, array_indicator)
11878         (direct_declarator, declarator_1): Use fill_comp instead of
11879         make_empty.
11880
11881 2017-03-27  Pedro Alves  <palves@redhat.com>
11882
11883         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11884         to ATTRIBUTE_PRINTF.
11885         * solib-target.c (library_list_start_list): Print "string" not
11886         "version".
11887         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11888         gdb_xml_error call.
11889
11890 2017-03-27  Pedro Alves  <palves@redhat.com>
11891
11892         * dwarf2read.c (struct file_and_directory): New.
11893         (dwarf2_get_dwz_file): Adjust to use std::string.
11894         (dw2_get_file_names_reader): Adjust to use file_and_directory.
11895         (find_file_and_directory): Adjust to return a file_and_directory
11896         object.
11897         (read_file_scope): Adjust to use file_and_directory.  Remove
11898         make_cleanup/do_cleanups calls.
11899         (open_and_init_dwp_file): Adjust to use std::string.  Remove
11900         make_cleanup/do_cleanups calls.
11901         * python/python.c (do_start_initialization): Adjust to ldirname
11902         returning a std::string.
11903         * utils.c (ldirname): Now returns a std::string.
11904         * utils.h (ldirname): Change return type to std::string.
11905         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11906         returning a std::string.
11907         * xml-tdesc.c (file_read_description_xml): Likewise.
11908
11909 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
11910
11911         * regcache.c (regcache_debug_print_register): New function.
11912         * regcache.h (regcache_debug_print_register): New declaration.
11913         * target.c (debug_print_register): Remove.
11914         (target_fetch_registers): Call regcache_debug_print_register.
11915         (target_store_registers): Likewise.
11916
11917 2017-03-24  Pádraig Brady  <pbrady@fb.com>
11918
11919         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11920         reference beyond the 'lh->include_dirs' array before accessing to
11921         it.
11922         (psymtab_include_file_name): Likewise.
11923         (dwarf_decode_lines_1): Likewise.
11924         (dwarf_decode_lines): Likewise.
11925         (file_file_name): Likewise.
11926
11927 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
11928
11929         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11930         inferior_ptid.
11931         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11932         ps_lsetfpregs): Likewise.
11933         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11934         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11935         ps_lsetfpregs): Likewise.
11936         * target.c (target_fetch_registers, target_store_registers):
11937         Remove asserts.
11938
11939 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
11940
11941         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11942
11943 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11944
11945         * aarch64-tdep.c (aarch64_process_record_test): Declare.
11946         (_initialize_aarch64_tdep): Register it.
11947         (aarch64_record_load_store): Handle PRFM instruction.
11948         (aarch64_process_record_test): New function.
11949
11950 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11951
11952         * aarch64-tdep.c (aarch64_record_load_store): Fix code
11953         indentation.
11954
11955 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11956
11957         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
11958
11959 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11960
11961         python/python.c (do_start_initialization): Fix memory leak.
11962
11963 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11964
11965         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
11966         using get_ptrace_pid.
11967         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
11968         inferior_ptid.
11969         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
11970         inferior_ptid instead of pid.
11971
11972 2017-03-22  Yao Qi  <yao.qi@linaro.org>
11973
11974         * aarch64-tdep.c: Wrap locally used classes in anonymous
11975         namespace.
11976         * arm-tdep.c: Likewise.
11977         * linespec.c: Likewise.
11978         * ui-out.c: Likewise.
11979
11980 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
11981
11982         PR gdb/19637
11983         * python/lib/gdb/printer/bound_registers.py: Import sys.
11984
11985 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11986
11987         * windows-nat.c (do_windows_fetch_inferior_registers): Add
11988         windows_thread_info parameter and use it instead of
11989         current_thread.
11990         (windows_fetch_inferior_registers): Don't set current_thread,
11991         pass the thread to do_windows_fetch_inferior_registers.  Use
11992         ptid from regcache instead of inferior_ptid.
11993         (do_windows_store_inferior_registers): Add windows_thread_info
11994         parameter and use it instead of current_thread.
11995         (windows_store_inferior_registers): Don't set current_thread,
11996         pass the thread to do_windows_store_inferior_registers.  Use
11997         ptid from regcache instead of inferior_ptid.
11998
11999 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
12000
12001         * ser-mingw.c (ser_windows_raw): Remove reference to
12002         struct serial::current_timeout.
12003
12004 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
12005
12006         PR tdep/20928
12007         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
12008         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
12009         (sparc64_fsr_type): Fix %fsr decoding.
12010
12011 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
12012
12013         * python/py-record-btrace.c (btpy_insn_data): Change return type
12014         for Python 2.
12015
12016 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12017
12018         * spu-linux-nat.c (spu_fetch_inferior_registers,
12019         spu_store_inferior_registers): Use ptid from regcache, set and
12020         restore inferior_ptid.
12021         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
12022         Likewise.
12023
12024 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
12025
12026         * i386-linux-nat.c (fetch_register, store_register,
12027         i386_linux_fetch_inferior_registers,
12028         i386_linux_store_inferior_registers): Use ptid from regcache.
12029         * ia64-linux-nat.c (ia64_linux_fetch_register,
12030         ia64_linux_store_register): Likewise.
12031         * inf-ptrace.c (inf_ptrace_fetch_register,
12032         inf_ptrace_store_register): Likewise.
12033         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
12034         m32r_linux_store_inferior_registers): Likewise.
12035         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
12036         m68kbsd_store_inferior_registers): Likewise.
12037         * m68k-linux-nat.c (fetch_register, store_register,
12038         m68k_linux_fetch_inferior_registers,
12039         m68k_linux_store_inferior_registers): Likewise.
12040         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
12041         m88kbsd_store_inferior_registers): Likewise.
12042         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
12043         mips_fbsd_store_inferior_registers): Likewise.
12044         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
12045         mips64_linux_regsets_store_registers): Likewise.
12046         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
12047         mipsnbsd_store_inferior_registers): Likewise.
12048         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
12049         mips64obsd_store_inferior_registers): Likewise.
12050         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
12051         Likewise.
12052         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
12053         ppcfbsd_store_inferior_registers): Likewise.
12054         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
12055         ppc_linux_store_inferior_registers): Likewise.
12056         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
12057         ppcnbsd_store_inferior_registers): Likewise.
12058         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
12059         ppcobsd_store_registers): Likewise.
12060         * procfs.c (procfs_fetch_registers, procfs_store_registers):
12061         Likewise.
12062         * ravenscar-thread.c (ravenscar_fetch_registers,
12063         ravenscar_store_registers, ravenscar_prepare_to_store):
12064         Likewise.
12065         * record-btrace.c (record_btrace_fetch_registers,
12066         record_btrace_store_registers, record_btrace_prepare_to_store):
12067         Likewise.
12068         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
12069         Lookup inferior using ptid from regcache, instead of
12070         current_inferior.
12071         * remote.c (remote_fetch_registers, remote_store_registers): Use
12072         ptid from regcache.
12073         * rs6000-nat.c (fetch_register, store_register): Likewise.
12074         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
12075         s390_linux_store_inferior_registers): Likewise.
12076         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
12077         shnbsd_store_inferior_registers): Likewise.
12078         * sol-thread.c (sol_thread_fetch_registers,
12079         sol_thread_store_registers): Likewise.
12080         * sparc-nat.c (sparc_fetch_inferior_registers,
12081         sparc_store_inferior_registers): Likewise.
12082         * tilegx-linux-nat.c (fetch_inferior_registers,
12083         store_inferior_registers): Likewise.
12084         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
12085         vaxbsd_store_inferior_registers): Likewise.
12086         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
12087         store_xtregs): Likewise.
12088
12089 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12090
12091         PR gdb/14441
12092         * NEWS: Mention support for rvalue references in GDB and python.
12093         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
12094         supports both lvalue and rvalue references.
12095
12096 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12097
12098         PR gdb/14441
12099         * gdbtypes.c (rank_one_type): Implement overloading
12100         resolution rules regarding rvalue references.
12101
12102 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12103
12104         PR gdb/14441
12105         * aarch64-tdep.c (aarch64_type_align)
12106         (aarch64_extract_return_value, aarch64_store_return_value): Change
12107         lvalue reference type checks to general reference type checks.
12108         * amd64-tdep.c (amd64_classify): Likewise.
12109         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
12110         Likewise.
12111         * arm-tdep.c (arm_type_align, arm_extract_return_value)
12112         (arm_store_return_value): Likewise.
12113         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
12114         * c-typeprint.c (c_print_type): Likewise.
12115         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
12116         (cplus_number_of_children, cplus_describe_child): Likewise.
12117         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
12118         * completer.c (expression_completer): Likewise.
12119         * cp-support.c (make_symbol_overload_list_adl_namespace):
12120         Likewise.
12121         * darwin-nat-info.c (info_mach_region_command): Likewise.
12122         * dwarf2loc.c (entry_data_value_coerce_ref)
12123         (value_of_dwarf_reg_entry): Likewise.
12124         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
12125         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
12126         Likewise.
12127         * findvar.c (extract_typed_address, store_typed_address):
12128         Likewise.
12129         * gdbtypes.c (rank_one_type): Likewise.
12130         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
12131         * infcall.c (value_arg_coerce): Likewise.
12132         * language.c (pointer_type): Likewise.
12133         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
12134         Likewise.
12135         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
12136         * mn10300-tdep.c (mn10300_type_align): Likewise.
12137         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
12138         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
12139         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
12140         Likewise.
12141         * printcmd.c (print_formatted, x_command): Likewise.
12142         * python/py-type.c (typy_get_composite, typy_template_argument):
12143         Likewise.
12144         * python/py-value.c (valpy_referenced_value)
12145         (valpy_get_dynamic_type, value_has_field): Likewise.
12146         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
12147         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
12148         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
12149         * spu-tdep.c (spu_scalar_value_p): Likewise.
12150         * symtab.c (lookup_symbol_aux): Likewise.
12151         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
12152         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
12153         Likewise.
12154         * valops.c (value_cast_pointers, value_cast)
12155         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
12156         (value_struct_elt, value_struct_elt_bitpos)
12157         (value_find_oload_method_list, find_overload_match)
12158         (value_rtti_indirect_type): Likewise.
12159         * valprint.c (val_print_scalar_type_p, generic_val_print):
12160         Likewise.
12161         * value.c (value_actual_type, value_as_address, unpack_long)
12162         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
12163         (coerce_ref): Likewise.
12164         * varobj.c (varobj_get_value_type): Likewise.
12165
12166 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12167
12168         PR gdb/14441
12169         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
12170         table of constants.
12171         * python/lib/gdb/command/explore.py: Support exploring values
12172         of rvalue reference types.
12173         * python/lib/gdb/types.py: Implement get_basic_type() for
12174         rvalue reference types.
12175         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
12176         constant.
12177         * python/py-value.c (valpy_getitem): Add an rvalue reference
12178         check.
12179         (valpy_reference_value): Add new parameter "refcode".
12180         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
12181         New wrappers for valpy_reference_value().
12182         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12183         (gdbpy_invoke_xmethod): Likewise.
12184
12185 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12186
12187         PR gdb/14441
12188         * dwarf2read.c (process_die, read_type_die_1): Handle the
12189         DW_TAG_rvalue_reference_type DIE.
12190         (read_tag_reference_type): Add new parameter "refcode".
12191
12192 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12193
12194         PR gdb/14441
12195         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
12196         (c_type_print_modifier, c_type_print_varspec_suffix)
12197         (c_type_print_base): Support printing rvalue reference types.
12198         * c-valprint.c (c_val_print, c_value_print): Support printing
12199         rvalue reference values.
12200
12201 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12202
12203         PR gdb/14441
12204         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
12205         typename.
12206         * cp-support.c (replace_typedefs): Handle
12207         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
12208         * python/py-type.c (typy_lookup_type): Likewise.
12209
12210 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12211
12212         PR gdb/14441
12213         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
12214         * parse.c (insert_type): Change assert statement.
12215         (follow_types): Handle rvalue reference types.
12216         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
12217         constant.
12218
12219 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12220
12221         PR gdb/14441
12222         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
12223         value_ref() interface.
12224         * c-valprint.c (c_value_print): Likewise.
12225         * infcall.c (value_arg_coerce): Likewise.
12226         * python/py-value.c (valpy_reference_value): Likewise.
12227         * valops.c (value_cast, value_reinterpret_cast)
12228         (value_dynamic_cast, typecmp): Likewise.
12229         (value_ref): Parameterize by kind of return value reference type.
12230         * value.h (value_ref): Add new parameter "refcode".
12231
12232 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12233
12234         PR gdb/14441
12235         * dwarf2read.c (read_tag_reference_type): Use
12236         lookup_lvalue_reference_type() instead of lookup_reference_type().
12237         * eval.c (evaluate_subexp_standard): Likewise.
12238         * f-exp.y: Likewise.
12239         * gdbtypes.c (make_reference_type, lookup_reference_type):
12240         Generalize with rvalue reference types.
12241         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
12242         convenience wrappers for lookup_reference_type().
12243         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
12244         reference kind parameter.
12245         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
12246         wrappers for lookup_reference_type().
12247         * guile/scm-type.c (gdbscm_type_reference): Use
12248         lookup_lvalue_reference_type() instead of lookup_reference_type().
12249         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
12250         * parse.c (follow_types): Likewise.
12251         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
12252         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
12253         Likewise.
12254         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12255         (gdbpy_invoke_xmethod): Likewise.
12256         * stabsread.c: Provide extra argument to make_reference_type()
12257         call.
12258         * valops.c (value_ref, value_rtti_indirect_type): Use
12259         lookup_lvalue_reference_type() instead of lookup_reference_type().
12260
12261 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12262
12263         PR gdb/14441
12264         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
12265         (TYPE_IS_REFERENCE): New macro.
12266         (struct type): Add rvalue_reference_type field.
12267         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
12268
12269 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
12270
12271         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
12272         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
12273         New function definition.
12274         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
12275         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
12276         New function declaration.
12277         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
12278         * mi/mi-interp.h: New file.
12279         * solib.c (info_sharedlibrary_command): Replace for loop with
12280         ALL_SO_LIBS macro
12281         * solib.h (update_solib_list): New function declaration.
12282         (so_list_head): Move macro.
12283         * solist.h (ALL_SO_LIBS): New macro.
12284
12285 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
12286
12287         * infcmd.c (post_create_inferior): Remove unused argument in
12288         call to solib_add.
12289         * remote.c (remote_start_remote): Likewise.
12290         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
12291         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
12292         (enable_break): Likewise.
12293         * solib.c (update_solib_list): Remove unused target argument
12294         and its documentation.
12295         (solib_add): Remove unused target argument.  Remove unused
12296         argument in call to update_solib_list.
12297         (info_sharedlibrary_command): Remove unused argument in call
12298         to update_solib_list.
12299         (sharedlibrary_command): Remove unused argument in call to
12300         solib_add.
12301         (handle_solib_event): Likewise.
12302         (reload_shared_libraries): Likewise.
12303         * solib.h (solib_add): Remove unused target argument.
12304
12305 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12306
12307         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
12308         (s390_displaced_step_fixup): Cover relative branches with the
12309         default fixup handling.  This fixes lack of support for some
12310         relative branch instructions.
12311
12312 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12313
12314         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
12315         ptid from regcache.
12316
12317 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12318
12319         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
12320         i386_darwin_store_inferior_registers): Use ptid from regcache.
12321
12322 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12323
12324         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
12325         i386bsd_store_inferior_registers): Use ptid from regcache.
12326
12327 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12328
12329         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
12330         hppaobsd_store_registers): Use ptid from regcache.
12331
12332 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12333
12334         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
12335         hppanbsd_store_registers): Use ptid from regcache.
12336
12337 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12338
12339         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
12340         from regcache.  Use get_ptrace_pid.
12341
12342 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12343
12344         * corelow.c (get_core_register_section): Use ptid from regcache,
12345         update doc.
12346
12347 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12348
12349         * bsd-uthread.c (bsd_uthread_fetch_registers,
12350         bsd_uthread_store_registers): Use ptid from regcache, set and
12351         restore inferior_ptid.
12352
12353 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12354
12355         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
12356         fetch_fp_regs, store_register, store_regs, store_fp_register,
12357         store_fp_regs): Use ptid from regcache.
12358
12359 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12360
12361         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
12362         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
12363         store_vfp_regs): Use ptid from regcache.
12364
12365 2017-03-17  Pedro Alves  <palves@redhat.com>
12366
12367         PR remote/21188
12368         * ser-base.c (ser_base_wait_for): Add comment.
12369         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
12370         version.
12371         * ser-unix.c (hardwire_raw): Remove reference to
12372         scb->current_timeout.
12373         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
12374         (hardwire_ops): Install ser_base_readchar instead of
12375         hardwire_readchar.
12376         * serial.h (struct serial) <current_timeout, timeout_remaining>:
12377         Remove fields.
12378
12379 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
12380
12381         PR gdb/19637
12382         * python/lib/gdb/printer/bound_registers.py: Add support for
12383         Python 3.
12384
12385 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12386
12387         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
12388         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
12389         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
12390         byte_offset to subobj_byte_offset.  Fix the handling of
12391         DWARF_VALUE_STACK on big-endian targets when coming via an
12392         implicit pointer.
12393         (dwarf2_evaluate_loc_desc): Adjust call to
12394         dwarf2_evaluate_loc_desc_full.
12395         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
12396         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
12397
12398 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12399
12400         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
12401         and REVSH instructions.
12402
12403 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12404
12405         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
12406         (arm_record_test): Declare.
12407         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
12408         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
12409         align with the manual.
12410         (thumb_record_misc): Adjust the code order to align with the
12411         manual.
12412         (thumb2_record_decode_insn_handler): Fix instruction matching.
12413         (instruction_reader_thumb): New class.
12414         (arm_record_test): New function.
12415
12416 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12417
12418         * arm-tdep.c (abstract_memory_reader): New class.
12419         (instruction_reader): New class.
12420         (extract_arm_insn): Add argument 'reader'.  Callers updated.
12421         (decode_insn): Likewise.
12422
12423 2017-03-16  Doug Evans  <dje@google.com>
12424
12425         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
12426         member.  Change type of TYPE member to SCM.  All uses updated.
12427         (lsscm_make_lazy_string_smob): Add assert.
12428         (lsscm_make_lazy_string): Flag bad length values.
12429         (lsscm_elt_type): New function.
12430         (gdbscm_lazy_string_to_value): Rewrite to use
12431         lsscm_safe_lazy_string_to_value.
12432         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
12433         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
12434         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
12435         in incoming type.
12436         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12437         * guile/scm-type.c (tyscm_scm_to_type): New function.
12438
12439 2017-03-15  Doug Evans  <dje@google.com>
12440
12441         PR python/17728, python/18439, python/18779
12442         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
12443         member.  Change type of TYPE member to PyObject *.  All uses updated.
12444         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
12445         (gdbpy_create_lazy_string_object): Flag bad length values.
12446         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
12447         Handle typedefs in incoming type.
12448         (stpy_lazy_string_elt_type): New function.
12449         (gdbpy_extract_lazy_string): Call it.
12450         * python/py-value.c (valpy_lazy_string): Flag bad length values.
12451         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
12452         typedefs in incoming type.
12453
12454 2017-03-16  Doug Evans  <dje@google.com>
12455
12456         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12457         * guile/scm-type.c (tyscm_scm_to_type): New function.
12458
12459 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
12460
12461         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
12462         "ULONGEST" for "skip".
12463
12464 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12465
12466         PR gdb/21220
12467         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
12468         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
12469         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
12470         over ptrace peek/poke until end of buffer or error.
12471
12472 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
12473
12474         * parse.c (length_of_subexp): Make static.
12475         * parser-defs.h (length_of_subexp): Remove.
12476
12477 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12478
12479         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
12480         as well.
12481
12482 2017-03-14  Pedro Alves  <palves@redhat.com>
12483
12484         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
12485         (main): Use std::unique_ptr.  Remove calls to
12486         cp_demangled_name_parse_free.
12487
12488 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12489
12490         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
12491         alphabsd_store_inferior_registers): Use regcache->ptid instead
12492         of inferior_ptid.
12493
12494 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12495
12496         * aix-thread.c (aix_thread_fetch_registers,
12497         aix_thread_store_registers): Use regcache->ptid instead of
12498         inferior_ptid.
12499
12500 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12501
12502         * aarch64-linux-nat.c (fetch_gregs_from_thread,
12503         store_gregs_to_thread, fetch_fpregs_from_thread,
12504         store_fpregs_to_thread): Use regcache->ptid instead of
12505         inferior_ptid.
12506
12507 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12508
12509         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
12510         amd64_linux_fetch_inferior_registers): Use regcache->ptid
12511         instead of inferior_ptid.
12512
12513 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12514
12515         * target.c (target_fetch_registers, target_store_registers): Add
12516         assert.
12517
12518 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12519
12520         * regcache.h (regcache_get_ptid): New function.
12521         * regcache.c (regcache_get_ptid): New function.
12522
12523 2017-03-13  Mark Wielaard  <mark@klomp.org>
12524
12525         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
12526
12527 2017-03-10  Keith Seitz  <keiths@redhat.com>
12528
12529         PR c++/8218
12530         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
12531
12532 2017-03-08  Pedro Alves  <palves@redhat.com>
12533
12534         PR gdb/18360
12535         * infrun.c (start_step_over, do_target_resume, resume)
12536         (restart_threads): Assert we're not resuming a thread that is
12537         meant to be stopped.
12538         (infrun_thread_stop_requested_callback): Delete.
12539         (infrun_thread_stop_requested): If the thread is internally
12540         stopped, queue a pending stop event and clear the thread's
12541         inline-frame state.
12542         (handle_stop_requested): New function.
12543         (handle_syscall_event, handle_inferior_event_1): Use
12544         handle_stop_requested.
12545         (handle_stop_requested): New function.
12546         (handle_signal_stop): Set the thread's stop_signal here instead of
12547         at caller.
12548         (finish_step_over): Clear step over info unconditionally.
12549         (handle_signal_stop): If the user had interrupted the event
12550         thread, consider the stop a random signal.
12551         (handle_signal_stop) <signal arrived while stepping over
12552         breakpoint>: Don't restart threads here.
12553         (stop_waiting): Don't clear step-over info here.
12554
12555 2017-03-08  Pedro Alves  <palves@redhat.com>
12556
12557         PR 21206
12558         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12559         goes to argument 2, not 1.
12560
12561 2017-03-08  Pedro Alves  <palves@redhat.com>
12562
12563         PR cli/21218
12564         * top.c (gdb_readline_wrapper): Avoid passing NULL to
12565         display_gdb_prompt.
12566         (command_line_input): Add comment.
12567
12568 2017-03-08  Pedro Alves  <palves@redhat.com>
12569
12570         PR tui/21216
12571         * tui/tui-file.c (tui_file::write): New.
12572         * tui/tui-file.h (tui_file): Override "write".
12573         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
12574         factored out from ...
12575         (tui_puts): ... here.
12576         (tui_putc): Use them.
12577         (tui_write): New function.
12578         * tui/tui-io.h (tui_write): Declare.
12579
12580 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
12581
12582         * Makefile.in (SFILES): Replace "environ.c" with
12583         "common/environ.c".
12584         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12585         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
12586         to...
12587         * common/environ.c: ... here.
12588         * environ.h: Moved to...
12589         * common/environ.h: ... here.
12590
12591 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12592
12593         * gdbarch.sh (pstring_ptr): New static function.
12594         (gdbarch_disassembler_options): Use it.
12595         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12596         not valid_disassembler_option->name.
12597         * gdbarch.c: Regenerate.
12598
12599 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12600
12601         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12602
12603 2017-03-07  Pedro Alves  <palves@redhat.com>
12604
12605         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12606
12607 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12608
12609         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12610         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12611         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
12612         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
12613
12614 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
12615
12616         * xtensa-linux-nat.c (fetch_gregs): Remove const.
12617
12618 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
12619
12620         * remote.c (remote_add_target_side_commands): Use range-based
12621         for loop.
12622
12623 2017-03-03  Yao Qi  <yao.qi@linaro.org>
12624
12625         PR gdb/21165
12626         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12627         value is lazy.
12628         * valprint.c (common_val_print): Likewise.
12629
12630 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
12631
12632         * NEWS: Mention new set/show disassembler-options commands.
12633         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12634         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12635         (prospective_options): New static variable.
12636         (gdb_disassembler::gdb_disassembler): Initialize
12637         m_di.disassembler_options.
12638         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12639         (get_disassembler_options): New function.
12640         (set_disassembler_options): Likewise.
12641         (set_disassembler_options_sfunc): Likewise.
12642         (show_disassembler_options_sfunc): Likewise.
12643         (disassembler_options_completer): Likewise.
12644         (_initialize_disasm): Likewise.
12645         * disasm.h (get_disassembler_options): New prototype.
12646         (set_disassembler_options): Likewise.
12647         * gdbarch.sh (gdbarch_disassembler_options): New variable.
12648         (gdbarch_verify_disassembler_options): Likewise.
12649         * gdbarch.c: Regenerate.
12650         * gdbarch.h: Likewise.
12651         * arm-tdep.c (num_disassembly_options): Delete.
12652         (set_disassembly_style): Likewise.
12653         (arm_disassembler_options): New static variable.
12654         (set_disassembly_style_sfunc): Convert short style name into long
12655         option name.  Call set_disassembler_options.
12656         (show_disassembly_style_sfunc): New function.
12657         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12658         set_gdbarch_verify_disassembler_options.
12659         (_initialize_arm_tdep): Delete regnames variable and update callers.
12660         (arm_disassembler_options): Initialize.
12661         (disasm_options): New variable.
12662         (num_disassembly_options): Rename from this...
12663         (num_disassembly_styles): ...to this.  Compute by scanning through
12664         disasm_options.
12665         (valid_disassembly_styles): Initialize using disasm_options.
12666         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12667         set_arm_regname_option.
12668         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12669         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12670         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12671         set_gdbarch_verify_disassembler_options.
12672         * s390-tdep.c (s390_disassembler_options): New static variable.
12673         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12674         set_gdbarch_verify_disassembler_options.
12675
12676 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12677
12678         * remote.c (remote_add_target_side_condition): Remove "struct"
12679         keyword from range-based for loop.
12680
12681 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12682
12683         * remote.c (remote_add_target_side_condition): Use range-based
12684         for loop.  Update comment.
12685
12686 2017-02-27  Yao Qi  <yao.qi@linaro.org>
12687
12688         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12689
12690 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
12691
12692         * regcache.c (regcache_raw_update): New function.
12693         (regcache_raw_read): Move code to regcache_raw_update.
12694         * regcache.h (regcache_raw_update): New declaration.
12695         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12696
12697 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
12698
12699         * dwarf2read.c (create_debug_type_hash_table): Initialize
12700         header.signature and header.type_offset_in_tu.
12701
12702 2017-02-24  Pedro Alves  <palves@redhat.com>
12703
12704         * symtab.c (make_file_symbol_completion_list_1): Use
12705         add_symtab_completions.
12706
12707 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12708
12709         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12710
12711 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12712
12713         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12714         I386_MAX_REGISTER_SIZE.
12715         (i386_pseudo_register_write): Likewise.
12716         (i386_process_record): Likewise.
12717         * i387-tdep.c (i387_supply_xsave): Likewise.
12718         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12719         (store_register): Likewise.
12720
12721 2017-02-23  Pedro Alves  <palves@redhat.com>
12722
12723         * ada-lang.c: Include "common/function-view.h".
12724         (ada_iterate_over_symbols): Adjust to use function_view as
12725         callback type.
12726         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12727         (ada_make_symbol_completion_list): Use a lambda.
12728         (ada_exc_search_name_matches): Delete.
12729         (name_matches_regex): New.
12730         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12731         * compile/compile-c-support.c: Include "common/function-view.h".
12732         (print_one_macro): Change prototype to accept a ui_file pointer.
12733         (write_macro_definitions): Use a lambda.
12734         * dwarf2read.c: Include "common/function-view.h".
12735         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12736         (dw2_expand_symtabs_matching): Adjust to use function_view as
12737         callback type.
12738         * language.h: Include "common/function-view.h".
12739         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12740         function_view as callback type.
12741         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12742         * linespec.c: Include "common/function-view.h".
12743         (collect_info::add_symbol): New method.
12744         (struct symbol_and_data_callback, iterate_inline_only, struct
12745         symbol_matcher_data, iterate_name_matcher): Delete.
12746         (iterate_over_all_matching_symtabs): Adjust to use function_view
12747         as callback type and lambdas.
12748         (iterate_over_file_blocks): Adjust to use function_view as
12749         callback type.
12750         (decode_compound_collector): Now a class with private fields.
12751         (decode_compound_collector::release_symbols): New method.
12752         (collect_one_symbol): Rename to...
12753         (decode_compound_collector::operator()): ... this and adjust.
12754         (lookup_prefix_sym): decode_compound_collector construction bits
12755         move to decode_compound_collector ctor.  Pass the
12756         decode_compound_collector object directly as callback.  Remove
12757         cleanups and use decode_compound_collector::release_symbols
12758         instead.
12759         (symtab_collector): Now a class with private fields.
12760         (symtab_collector::release_symtabs): New method.
12761         (add_symtabs_to_list): Rename to...
12762         (symtab_collector::operator()): ... this and adjust.
12763         (collect_symtabs_from_filename): symtab_collector construction
12764         bits move to symtab_collector ctor.  Pass the symtab_collector
12765         object directly as callback.  Remove cleanups and use
12766         symtab_collector::release_symtabs instead.
12767         (collect_symbols): Delete.
12768         (add_matching_symbols_to_info): Use lambdas.
12769         * macrocmd.c (print_macro_callback): Delete.
12770         (info_macro_command): Use a lambda.
12771         (info_macros_command): Pass print_macro_definition as callable
12772         directly.
12773         (print_one_macro): Remove 'ignore' parameter.
12774         (macro_list_command): Adjust.
12775         * macrotab.c (macro_for_each_data::fn): Now a function_view.
12776         (macro_for_each_data::user_data): Delete field.
12777         (foreach_macro): Adjust to call the function_view.
12778         (macro_for_each): Adjust to use function_view as callback type.
12779         (foreach_macro_in_scope): Adjust to call the function_view.
12780         (macro_for_each_in_scope): Adjust to use function_view as callback
12781         type.
12782         * macrotab.h: Include "common/function-view.h".
12783         (macro_callback_fn): Declare a prototype instead of a pointer.
12784         Remove "user_data" parameter.
12785         (macro_for_each, macro_for_each_in_scope): Adjust to use
12786         function_view as callback type.
12787         * psymtab.c (partial_map_expand_apply)
12788         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12789         Adjust to use function_view as callback type and to return bool.
12790         (psym_expand_symtabs_matching): Adjust to use function_view as
12791         callback types.
12792         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12793         to use function_view as callback type and to return bool.
12794         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12795         callback types.
12796         * symfile.c (expand_symtabs_matching): Adjust to use function_view
12797         as callback types.
12798         * symfile.h: Include "common/function-view.h".
12799         (expand_symtabs_file_matcher_ftype)
12800         (expand_symtabs_symbol_matcher_ftype)
12801         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12802         return bool.
12803         (quick_symbol_functions::map_symtabs_matching_filename)
12804         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12805         function_view as callback type and return bool.
12806         (expand_symtabs_matching): Adjust to use function_view as callback
12807         type.
12808         (maintenance_expand_name_matcher)
12809         (maintenance_expand_file_matcher): Delete.
12810         (maintenance_expand_symtabs): Use lambdas.
12811         * symtab.c (iterate_over_some_symtabs): Adjust to use
12812         function_view as callback types and return bool.
12813         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
12814         of a cleanup.
12815         (lookup_symtab_callback): Delete.
12816         (lookup_symtab): Use a lambda.
12817         (iterate_over_symbols): Adjust to use function_view as callback
12818         type.
12819         (struct search_symbols_data, search_symbols_file_matches)
12820         (search_symbols_name_matches): Delete.
12821         (search_symbols): Use a pair of lambdas.
12822         (struct add_name_data, add_macro_name, symbol_completion_matcher)
12823         (symtab_expansion_callback): Delete.
12824         (default_make_symbol_completion_list_break_on_1): Use lambdas.
12825         * symtab.h: Include "common/function-view.h".
12826         (iterate_over_some_symtabs): Adjust to use function_view as
12827         callback type and return bool.
12828         (iterate_over_symtabs): Adjust to use function_view as callback
12829         type.
12830         (symbol_found_callback_ftype): Remove 'data' parameter and return
12831         bool.
12832         (iterate_over_symbols): Adjust to use function_view as callback
12833         type.
12834
12835 2017-02-23  Pedro Alves  <palves@redhat.com>
12836
12837         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12838         (%.o) <unittests/%.c>: New pattern.
12839         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12840         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12841         * common/function-view.h: New file.
12842         * unittests/function-view-selftests.c: New file.
12843         * configure: Regenerate.
12844
12845 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
12846
12847         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12848         inferior_ptid.
12849         * go32-nat.c (go32_thread_alive): Likewise.
12850
12851 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12852
12853         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12854         delete.
12855
12856 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12857
12858         * varobj.c (varobj_clear_saved_item): Use delete instead of
12859         xfree.
12860         (update_dynamic_varobj_children): Likewise.
12861
12862 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12863
12864         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12865
12866 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
12867
12868         * common/enum-flags.h (enum_flags::enum_flags): Initialize
12869         m_enum_value to 0 in default constructor.
12870
12871 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
12872
12873         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12874         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12875         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12876         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12877         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12878         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12879         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12880         IS_STORE_CONDITIONAL_INSN.
12881
12882 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12883
12884         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12885
12886 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12887
12888         * NEWS (Changes since GDB 7.12): Add DWARF-5.
12889
12890 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12891
12892         * dwarf2read.c (skip_one_die, read_attribute_value)
12893         (dwarf2_const_value_attr, dump_die_shallow)
12894         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12895         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12896
12897 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12898
12899         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12900         (dwarf_parse_macro_header): Accept DWARF version 5.
12901         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12902
12903 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12904
12905         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12906         DW_AT_GNU_*.
12907         * common/common-exceptions.h (enum errors): Likewise.
12908         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12909         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12910         (dwarf_expr_context::execute_stack_op): Likewise.
12911         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12912         Likewise.
12913         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12914         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12915         (show_entry_values_debug, call_site_to_target_addr)
12916         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12917         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12918         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12919         (value_of_dwarf_block_entry, indirect_pieced_value)
12920         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12921         (disassemble_dwarf_expression): Likewise.
12922         * dwarf2read.c (process_die, inherit_abstract_dies)
12923         (read_call_site_scope): Likewise.
12924         * gdbtypes.h (struct func_type, struct call_site_parameter)
12925         (struct call_site): Likewise.
12926         * stack.c (read_frame_arg): Likewise.
12927         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12928
12929 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12930
12931         * defs.h (read_unsigned_leb128): New declaration.
12932         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12933         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12934         (dwarf2_find_location_expression): Call also
12935         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
12936         * dwarf2loc.h (dwarf2_version): New declaration.
12937         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12938         rnglists.
12939         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12940         .debug_rnglists.
12941         (struct dwop_section_names): Add loclists_dwo.
12942         (dwop_section_names): Add .debug_loclists.dwo.
12943         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12944         (struct dwarf2_per_cu_data): Add dwarf_version.
12945         (struct dwo_sections): Add loclists.
12946         (struct attr_abbrev): Add implicit_const.
12947         (read_indirect_line_string): New declaration.
12948         (read_unsigned_leb128): Delete declaration.
12949         (rcuh_kind): New definition.
12950         (read_and_check_comp_unit_head): Change parameter
12951         is_debug_types_section to section_kind.
12952         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
12953         (read_comp_unit_head): Change parameter abfd to section, add parameter
12954         section_kind.  Handle DWARF-5.
12955         (error_check_comp_unit_head): Accept also DWARF version 5.
12956         (read_and_check_comp_unit_head): Change parameter
12957         is_debug_types_section to section_kind.
12958         (read_and_check_type_unit_head): Delete function.
12959         (read_abbrev_offset): Handle DWARF-5.
12960         (create_debug_type_hash_table): Add parameter section_kind.  Process
12961         only DW_UT_type.  Use signature and type_offset_in_tu from struct
12962         comp_unit_head.
12963         (create_debug_types_hash_table): Update create_debug_type_hash_table
12964         caller.
12965         (create_all_type_units): Call create_debug_type_hash_table.
12966         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
12967         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
12968         caller.
12969         (skip_one_die): Handle DW_FORM_implicit_const.
12970         (dwarf2_rnglists_process): New function.
12971         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
12972         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
12973         (read_attribute_value): Handle DW_FORM_implicit_const,
12974         DW_FORM_line_strp.
12975         (read_attribute): Handle DW_FORM_implicit_const.
12976         (read_indirect_string_at_offset_from): New function from
12977         read_indirect_string_at_offset.
12978         (read_indirect_string_at_offset): Call
12979         read_indirect_string_at_offset_from.
12980         (read_indirect_line_string_at_offset): New function.
12981         (read_indirect_string): New function comment.
12982         (read_indirect_line_string): New function.
12983         (read_unsigned_leb128): Make it global.
12984         (dwarf2_string_attr): Handle DWARF-5.
12985         (add_include_dir_stub, read_formatted_entries): New functions.
12986         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
12987         Handle DWARF-5.
12988         (per_cu_header_read_in): Update read_comp_unit_head caller.
12989         (dwarf2_version): New function.
12990         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
12991         rnglists.
12992         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
12993         fields.
12994
12995 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12996
12997         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
12998
12999 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13000
13001         * dwarf2read.c (dwarf2_ranges_process): New function from
13002         dwarf2_ranges_read.
13003         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
13004         dwarf2_ranges_process.
13005
13006 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
13007
13008         * dwarf2read.c (create_debug_type_hash_table): New function from
13009         create_debug_types_hash_table.
13010         (create_debug_types_hash_table): Call create_debug_type_hash_table.
13011         (create_all_type_units, open_and_init_dwo_file): Update
13012         create_debug_types_hash_table callers.
13013
13014 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13015
13016         PR gdb/16188
13017         * fork-child.c (trace_start_error): Fix thinko.  va_end should
13018         refer to 'ap', not 'args'.
13019
13020 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
13021             Pedro Alves  <palves@redhat.com>
13022
13023         PR gdb/16188
13024         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
13025         calls succeeded.
13026         * fork-child.c (trace_start_error): New function.
13027         (trace_start_error_with_name): Likewise.
13028         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
13029         * inf-ptrace.c (inf_ptrace_me): Likewise.
13030         * inferior.h (trace_start_error): New prototype.
13031         (trace_start_error_with_name): Likewise.
13032
13033 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
13034
13035         PR gdb/21164
13036         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
13037         NULL before using it.
13038         * symmisc.c (maintenance_print_symbols): Likewise.
13039         (maintenance_print_msymbols): Likewise.
13040
13041 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13042
13043         * NEWS: Add record Python bindings entry.
13044
13045 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13046
13047         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
13048         py-record-full.o.
13049         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
13050         * python/py-record-btrace.c, python/py-record-btrace.h,
13051         python/py-record-full.c, python/py-record-full.h: New file.
13052         * python/py-record.c: Add include for py-record-btrace.h and
13053         py-record-full.h.
13054         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
13055         recpy_instruction_history, recpy_function_call_history, recpy_begin,
13056         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
13057         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
13058         New definition.
13059         (gdbpy_initialize_btrace): New export.
13060         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
13061
13062 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13063
13064         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
13065         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
13066         * python/py-record.c: New file.
13067         * python/python-internal.h (gdbpy_start_recording,
13068         gdbpy_current_recording, gdpy_stop_recording,
13069         gdbpy_initialize_record): New export.
13070         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
13071         (python_GdbMethods): Add gdbpy_start_recording,
13072         gdbpy_current_recording and gdbpy_stop_recording.
13073
13074 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13075
13076         * record-btrace.c (record_btrace_record_method): New function.
13077         (init_record_btrace_ops): Initialize to_record_method.
13078         * record-full.c (record_full_record_method): New function.
13079         (init_record_full_ops, init_record_full_core_ops): Add
13080         record_full_record_method.
13081         * record.h (enum record_method): New enum.
13082         * target-debug.h (target_debug_print_enum_record_method: New define.
13083         * target-delegates.c: Regenerate.
13084         * target.c (target_record_method): New function.
13085         * target.h: Include record.h.
13086         (struct target_ops) <to_record_method>: New field.
13087         (target_record_method): New export.
13088
13089 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13090
13091         * record.h (record_start, record_stop): New export.
13092         * record.c (record_start, record_stop): New function.
13093
13094 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13095
13096         * btrace.c (btrace_fetch): Copy function call segments pointer
13097         into a vector.
13098         (btrace_clear): Clear the vector.
13099         (btrace_find_insn_by_number): Use binary search to find the correct
13100         function call segment.
13101         * btrace.h (brace_fun_p): New typedef.
13102         (struct btrace_thread_info) <functions>: New field.
13103
13104 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13105
13106         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
13107         * btrace.c (btrace_decode_error): ... here.  New function.
13108         * btrace.h (btrace_decode_error): New export.
13109
13110 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13111
13112         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
13113         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
13114         btrace_find_insn_by_number): Remove special case for gaps.
13115         * btrace.h (btrace_insn_get_error): New export.
13116         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
13117         * record-btrace.c (btrace_insn_history): Print number for gaps.
13118         (record_btrace_info, record_btrace_goto): Handle gaps.
13119
13120 2017-02-14  Tom Tromey  <tom@tromey.com>
13121
13122         PR python/13598:
13123         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
13124         event.
13125         * python/py-evts.c (gdbpy_initialize_py_events): Add
13126         before_prompt registry.
13127         * python/py-events.h (events_object) <before_prompt>: New field.
13128
13129 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
13130
13131         * btrace.c (ftrace_new_switch): Preserve up link and flags.
13132
13133 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
13134
13135         * symfile (_initialize_symfile): Add usage text to the load command's
13136         help text.
13137
13138 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
13139
13140         * utils.c (defaulted_query): Don't query on secondary UIs.
13141
13142 2017-02-10  Tom Tromey  <tom@tromey.com>
13143
13144         * rust-lang.c (rust_get_disr_info): Remove unused variable.
13145
13146 2017-02-10  Tom Tromey  <tom@tromey.com>
13147
13148         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
13149         "cleanup" local.
13150         * python/py-type.c (typy_legacy_template_argument): Remove
13151         unnecessary "cleanup" local.
13152
13153 2017-02-10  Tom Tromey  <tom@tromey.com>
13154
13155         * python/python.c (do_start_initialization): New function, from
13156         _initialize_python.
13157         (_initialize_python): Call do_start_initialization.
13158         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
13159         goto.
13160
13161 2017-02-10  Tom Tromey  <tom@tromey.com>
13162
13163         * python/py-prettyprint.c (pretty_print_one_value): Use
13164         gdbpy_ref.
13165
13166 2017-02-10  Tom Tromey  <tom@tromey.com>
13167
13168         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
13169         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
13170         gdbpy_ref.
13171         * python/py-type.c (field_new): Use gdbpy_ref.
13172         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
13173         gdbpy_ref.
13174         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
13175         (py_free_pspace): Likewise.
13176         (pspace_to_pspace_object): Likewise.
13177         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
13178         (py_free_objfile): Likewise.
13179         (objfile_to_objfile_object): Likewise.
13180         * python/py-inferior.c (delete_thread_object): Use
13181         gdbpy_ref.
13182         (infpy_read_memory): Likewise.
13183         (py_free_inferior): Likewise.
13184         * python/py-evtregistry.c (create_eventregistry_object): Use
13185         gdbpy_ref.
13186         * python/py-event.c (create_event_object): Use gdbpy_ref.
13187
13188 2017-02-10  Tom Tromey  <tom@tromey.com>
13189
13190         * python/py-ref.h (gdbpy_ref_policy): Now a template.
13191         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
13192         used.
13193         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
13194         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
13195         python/py-exitedevent.c, python/py-finishbreakpoint.c,
13196         python/py-framefilter.c, python/py-function.c,
13197         python/py-inferior.c, python/py-infevents.c,
13198         python/py-linetable.c, python/py-newobjfileevent.c,
13199         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
13200         python/py-signalevent.c, python/py-stopevent.c,
13201         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
13202         python/py-unwind.c, python/py-utils.c, python/py-value.c,
13203         python/py-varobj.c, python/py-xmethods.c, python/python.c,
13204         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
13205
13206 2017-02-10  Tom Tromey  <tom@tromey.com>
13207
13208         * ui-out.h (ui_out_emit_type): New class.
13209         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
13210         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
13211         and ui_out_emit_tuple.
13212         (enumerate_locals): Likewise.
13213         (py_mi_print_variables, py_print_locals, py_print_args): Use
13214         ui_out_emit_list.
13215         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
13216         ui_out_emit_list.
13217         * common/gdb_optional.h: New file.
13218
13219 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
13220
13221         * MAINTAINERS (Write After Approval): Update my e-mail address.
13222
13223 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
13224
13225         PR gdb/21122
13226         * breakpoint.c (_initialize_breakpoint): Update the help description
13227         of the 'commands' command to indicate that it takes a list argument.
13228
13229 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
13230
13231         * interps.c (current_interp_set_logging): Remove "return".
13232
13233 2017-02-09  Gary Benson  <gbenson@redhat.com>
13234
13235         * symtab.c (add_symtab_completions): Prevent NULL pointer
13236         dereference.
13237
13238 2017-02-08  Pedro Alves  <palves@redhat.com>
13239
13240         * interps.c (interp::interp): Remove reference to quiet_p.
13241         (interp_set): Make static.  Remove dead "Switching to" output
13242         code.
13243         (interp_quiet_p, interp_set_quiet): Delete.
13244         (interpreter_exec_cmd): Don't set the interpreter quiet.
13245         * interps.h (interp_quiet_p): Make static.
13246         (class interp) <quiet_p>: Remove field
13247
13248 2017-02-08  Jerome Guitton  <guitton@adacore.com>
13249
13250         * cli/cli-decode.c (find_command_name_length): Make it extern.
13251         * cli/cli-decode.h (find_command_name_length): Declare.
13252         * cli/cli-script.c (command_name_equals, line_first_arg):
13253         New functions.
13254         (process_next_line): Use cli-decode to parse command names.
13255         (build_command_line): Make args a constant pointer.
13256
13257 2017-02-08  Jerome Guitton  <guitton@adacore.com>
13258
13259         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
13260         Remove case-insensitive search.
13261
13262 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13263
13264         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
13265         at the end of the line.  Avoids an ARI warning.
13266
13267 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
13268
13269         * NEWS: Mention support for record/replay of Intel 64 rdrand and
13270         rdseed instructions.
13271         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
13272
13273 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
13274
13275         PR tdep/20936
13276         Provide and use sparc32 and sparc64 target description XML files.
13277         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
13278         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
13279         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
13280         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
13281         * features/sparc/sparc32-solaris.xml: New file.
13282         * features/sparc/sparc64-solaris.xml: New file.
13283         * features/sparc/sparc32-solaris.c: Generated.
13284         * features/sparc/sparc64-solaris.c: Generated.
13285         * sparc-tdep.h: Account for differences in target descriptions.
13286         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
13287         (sparc32_register_type): Use target provided registers.
13288         (validate_tdesc_registers): New function.
13289         (sparc32_gdbarch_init): Use tdesc_has_registers.
13290         Set pseudoregister functions.
13291         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
13292         (sparc64_register_type): Use target provided registers.
13293         (sparc64_init_abi): Set pseudoregister functions.
13294
13295 2017-02-03  Tom Tromey  <tom@tromey.com>
13296
13297         PR rust/21097:
13298         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
13299         with a single member.
13300
13301 2017-02-03  Pedro Alves  <palves@redhat.com>
13302
13303         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
13304         (cli_interp_base::~cli_interp_base): New.
13305         (cli_interp): New struct.
13306         (as_cli_interp): Cast the interp itself to cli_interp.
13307         (cli_interpreter_pre_command_loop): Rename to ...
13308         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
13309         parameter.
13310         (cli_interpreter_init): Rename to ...
13311         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
13312         boolean.  Make extern.
13313         (cli_interpreter_resume): Rename to ...
13314         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
13315         extern.
13316         (cli_interpreter_suspend): Rename to ...
13317         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
13318         extern.
13319         (cli_interpreter_exec): Rename to ...
13320         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
13321         extern.
13322         (cli_interpreter_supports_command_editing): Rename to ...
13323         (cli_interp_base::supports_command_editing): ... this.  Remove
13324         'interp' parameter.  Make extern.
13325         (cli_ui_out): Rename to ...
13326         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
13327         Make extern.
13328         (cli_set_logging): Rename to ...
13329         (cli_interp_base::set_logging): ... this.  Remove 'interp'
13330         parameter.  Make extern.
13331         (cli_interp_procs): Delete.
13332         (cli_interp_factory): Adjust to use "new".
13333         * cli/cli-interp.h: Include "interps.h".
13334         (struct cli_interp_base): New struct.
13335         * interps.c (struct interp): Delete.  Fields moved to interps.h.
13336         (interp_new): Delete.
13337         (interp::interp, interp::~interp): New.
13338         (interp_set): Use bool, and return void.  Assume the interpreter
13339         has suspend, init and resume methods, and that the all return
13340         void.
13341         (set_top_level_interpreter): interp_set returns void.
13342         (interp_ui_out): Adapt.
13343         (current_interp_set_logging): Adapt.
13344         (interp_data): Delete.
13345         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
13346         (interp_exec): Adapt.
13347         (top_level_interpreter_data): Delete.
13348         * interps.h (interp_init_ftype, interp_resume_ftype)
13349         (interp_suspend_ftype, interp_exec_ftype)
13350         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
13351         (class interp): New.
13352         (interp_new): Delete.
13353         (interp_set): Now returns void.  Use bool.
13354         (interp_data, top_level_interpreter_data): Delete.
13355         * mi/mi-common.h: Include interps.h.
13356         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
13357         init, resume, suspect, exec, interp_ui_out, set_logging and
13358         pre_command_loop methods.
13359         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
13360         (mi_interpreter_init): Rename to ...
13361         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
13362         bool, return void and make extern.  Adjust.
13363         (mi_interpreter_resume): ... Rename to ...
13364         (mi_interp::resume): ... this.  Remove the 'data' parameter,
13365         return void and make extern.  Adjust.
13366         (mi_interpreter_suspend): ... Rename to ...
13367         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
13368         return void and make extern.  Adjust.
13369         (mi_interpreter_exec): ... Rename to ...
13370         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
13371         extern.  Adjust.
13372         (mi_interpreter_pre_command_loop): ... Rename to ...
13373         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
13374         parameter and make extern.
13375         (mi_on_normal_stop_1): Adjust.
13376         (mi_ui_out): Rename to ...
13377         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
13378         parameter and make extern.  Adjust.
13379         (mi_set_logging): Rename to ...
13380         (mi_interp::set_logging): ... this.  Remove the 'interp'
13381         parameter and make extern.  Adjust.
13382         (mi_interp_procs): Delete.
13383         (mi_interp_factory): Adjust to use 'new'.
13384         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
13385         (mi_print_exception, mi_execute_command, mi_load_progress):
13386         Adjust.
13387         * tui/tui-interp.c (tui_interp): New class.
13388         (as_tui_interp): Return a tui_interp pointer.
13389         (tui_on_normal_stop, tui_on_signal_received)
13390         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
13391         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
13392         to use interp::interp_ui_out.
13393         (tui_init): Rename to ...
13394         (tui_interp::init): ... this.  Remove the 'self' parameter, use
13395         bool, return void and make extern.  Adjust.
13396         (tui_resume): Rename to ...
13397         (tui_interp::resume): ... this.  Remove the 'data' parameter,
13398         return void and make extern.  Adjust.
13399         (tui_suspend): Rename to ...
13400         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
13401         return void and make extern.  Adjust.
13402         (tui_ui_out): Rename to ...
13403         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
13404         parameter, and make extern.  Adjust.
13405         (tui_exec): Rename to ...
13406         (tui_interp::exec): ... this.  Remove the 'data' parameter and
13407         make extern.
13408         (tui_interp_procs): Delete.
13409         (tui_interp_factory): Use "new".
13410
13411 2017-02-02  Tom Tromey  <tom@tromey.com>
13412
13413         * rust-exp.y (ends_raw_string, space_then_number)
13414         (rust_identifier_start_p): Return bool.
13415         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
13416         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
13417         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
13418         (rust_chartype_p): Return bool.
13419         (val_print_struct, rust_print_struct_def, rust_print_type):
13420         Update.
13421         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
13422         Return bool.
13423
13424 2017-02-02  Tom Tromey  <tom@tromey.com>
13425
13426         * rust-lang.c: Reindent.
13427
13428 2017-02-02  Tom Tromey  <tom@tromey.com>
13429
13430         * rust-lang.h (rust_crate_for_block): Update.
13431         * rust-lang.c (rust_crate_for_block): Return std::string.
13432         (rust_get_disr_info): Use std:;string, not
13433         gdb::unique_xmalloc_ptr.
13434         * rust-exp.y (crate_name): Update.
13435
13436 2017-02-02  Pedro Alves  <palves@redhat.com>
13437
13438         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
13439         field out of gdb_disassembler_test and make it static.
13440
13441 2017-02-02  Pedro Alves  <palves@redhat.com>
13442
13443         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
13444         mi1_interp and mi_interp fields.
13445
13446 2017-02-02  Pedro Alves  <palves@redhat.com>
13447
13448         * cli/cli-interp.c (struct saved_output_files, saved_output):
13449         Moved from cli/cli-logging.c.
13450         (cli_set_logging): New function.
13451         (cli_interp_procs): Install cli_set_logging.
13452         * cli/cli-interp.h (make_logging_output, cli_set_logging):
13453         Declare.
13454         * cli/cli-logging.c (struct saved_output_files, saved_output):
13455         Moved to cli/cli-interp.c.
13456         (pop_output_files): Don't save outputs here.
13457         (make_logging_output): New function.
13458         (handle_redirections): Don't build tee nor save previous outputs
13459         here.
13460         * interps.c (current_interp_set_logging): Change prototype.
13461         Assume there's always a set_logging_proc method installed.
13462         * interps.h (interp_set_logging_ftype): Change prototype.
13463         (current_interp_set_logging): Change prototype and adjust comment.
13464         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
13465         use make_logging_output.
13466         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
13467 2017-02-02  Pedro Alves  <palves@redhat.com>
13468
13469         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
13470         from ...
13471         (set_logging_overwrite): ... here.
13472         (logging_no_redirect_file): Delete.
13473         (set_logging_redirect): Don't handle redirection on the fly.
13474         Instead warn that "logging off" / "logging on" is necessary.
13475         (pop_output_files): Delete references to logging_no_redirect_file.
13476         (show_logging_command): Always speak in terms of what will happen
13477         once logging is reenabled.
13478
13479 2017-02-02  Pedro Alves  <palves@redhat.com>
13480
13481         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
13482
13483 2017-02-02  Pedro Alves  <palves@redhat.com>
13484
13485         * disasm.c (gdb_pretty_print_insn): Rename to ...
13486         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
13487         Remove gdbarch parameter.  Adapt to clear the object's buffers
13488         instead of allocating new buffers, and to print using the object's
13489         gdb_disassembler instead of calling gdb_print_insn.
13490         (dump_insns): Use gdb_pretty_print_disassembler.
13491         * disasm.h (gdb_pretty_print_insn): Delete declaration.
13492         (gdb_pretty_print_disassembler): New class.
13493         * record-btrace.c (btrace_insn_history): Use
13494         gdb_pretty_print_disassembler.
13495
13496 2017-02-02  Pedro Alves  <palves@redhat.com>
13497
13498         * ada-lang.c (type_as_string): Use string_file.
13499         * ada-valprint.c (ada_print_floating): Use string_file.
13500         * ada-varobj.c (ada_varobj_scalar_image)
13501         (ada_varobj_get_value_image): Use string_file.
13502         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
13503         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
13504         * breakpoint.c (update_inserted_breakpoint_locations)
13505         (insert_breakpoint_locations, reattach_breakpoints)
13506         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
13507         (print_it_watchpoint): Use string_file.
13508         (save_breakpoints): Use stdio_file.
13509         * c-exp.y (oper): Use string_file.
13510         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
13511         tee_file.
13512         (pop_output_files): Use delete.
13513         (handle_redirections): Use stdio_file and tee_file.
13514         * cli/cli-setshow.c (do_show_command): Use string_file.
13515         * compile/compile-c-support.c (c_compute_program): Use
13516         string_file.
13517         * compile/compile-c-symbols.c (generate_vla_size): Take a
13518         'string_file &' instead of a 'ui_file *'.
13519         (generate_c_for_for_one_variable): Take a 'string_file &' instead
13520         of a 'ui_file *'.  Use string_file.
13521         (generate_c_for_variable_locations): Take a 'string_file &'
13522         instead of a 'ui_file *'.
13523         * compile/compile-internal.h (generate_c_for_for_one_variable):
13524         Take a 'string_file &' instead of a 'ui_file *'.
13525         * compile/compile-loc2c.c (push, pushf, unary, binary)
13526         (print_label, pushf_register_address, pushf_register)
13527         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
13528         'ui_file *'.  Adjust.
13529         * compile/compile.c (compile_to_object): Use string_file.
13530         * compile/compile.h (compile_dwarf_expr_to_c)
13531         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
13532         'ui_file *'.
13533         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
13534         (replace_typedefs_qualified_name): Use string_file and
13535         obstack_copy0.
13536         * disasm.c (gdb_pretty_print_insn): Use string_file.
13537         (gdb_disassembly): Adjust reference the null_stream global.
13538         (do_ui_file_delete): Delete.
13539         (gdb_insn_length): Use null_stream.
13540         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
13541         * dwarf2loc.c (dwarf2_compile_property_to_c)
13542         (locexpr_generate_c_location, loclist_generate_c_location): Take a
13543         'string_file &' instead of a 'ui_file *'.
13544         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
13545         * dwarf2read.c (do_ui_file_peek_last): Delete.
13546         (dwarf2_compute_name): Use string_file.
13547         * event-top.c (gdb_setup_readline): Use stdio_file.
13548         * gdbarch.sh (verify_gdbarch): Use string_file.
13549         * gdbtypes.c (safe_parse_type): Use null_stream.
13550         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
13551         string_file.
13552         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
13553         'string_file *' instead of a 'ui_file *'.
13554         (gdbscm_arch_disassemble): Use string_file.
13555         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
13556         * guile/scm-ports.c (class ioscm_file_port): Now a class that
13557         inherits from ui_file.
13558         (ioscm_file_port_delete, ioscm_file_port_rewind)
13559         (ioscm_file_port_put): Delete.
13560         (ioscm_file_port_write): Rename to ...
13561         (ioscm_file_port::write): ... this.  Remove file_port_magic
13562         checks.
13563         (ioscm_file_port_new): Delete.
13564         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13565         ui_file_up.
13566         * guile/scm-type.c (tyscm_type_name): Use string_file.
13567         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
13568         Use string_file.
13569         * infcmd.c (print_return_value_1): Use string_file.
13570         * infrun.c (print_target_wait_results): Use string_file.
13571         * language.c (add_language): Use string_file.
13572         * location.c (explicit_to_string_internal): Use string_file.
13573         * main.c (captured_main_1): Use null_file.
13574         * maint.c (maintenance_print_architecture): Use stdio_file.
13575         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13576         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13577         event_channel>: Change type to mi_console_file pointer.
13578         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13579         (mi_console_file_delete): Delete.
13580         (struct mi_console_file): Delete.
13581         (mi_console_file_magic): Delete.
13582         (mi_console_file_new): Delete.
13583         (mi_console_file::mi_console_file): New.
13584         (mi_console_file_delete): Delete.
13585         (mi_console_file_fputs): Delete.
13586         (mi_console_file::write): New.
13587         (mi_console_raw_packet): Delete.
13588         (mi_console_file::flush): New.
13589         (mi_console_file_flush): Delete.
13590         (mi_console_set_raw): Rename to ...
13591         (mi_console_file::set_raw): ... this.
13592         * mi/mi-console.h (class mi_console_file): New class.
13593         (mi_console_file_new, mi_console_set_raw): Delete.
13594         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13595         (mi_set_logging): Use delete and tee_file.  Adjust.
13596         * mi/mi-main.c (output_register): Use string_file.
13597         (mi_cmd_data_evaluate_expression): Use string_file.
13598         (mi_cmd_data_read_memory): Use string_file.
13599         (mi_cmd_execute, print_variable_or_computed): Use string_file.
13600         * mi/mi-out.c (mi_ui_out::main_stream): New.
13601         (mi_ui_out::rewind): Use main_stream and
13602         string_file.
13603         (mi_ui_out::put): Use main_stream and string_file.
13604         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13605         Allocate a 'string_file' instead.
13606         (mi_out_new): Don't allocate a mem_fileopen stream here.
13607         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13608         (mi_ui_out::main_stream): Declare method.
13609         * printcmd.c (eval_command): Use string_file.
13610         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13611         * python/py-arch.c (archpy_disassemble): Use string_file.
13612         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13613         * python/py-frame.c (frapy_str): Use string_file.
13614         * python/py-framefilter.c (py_print_type, py_print_single_arg):
13615         Use string_file.
13616         * python/py-type.c (typy_str): Use string_file.
13617         * python/py-unwind.c (unwind_infopy_str): Use string_file.
13618         * python/py-value.c (valpy_str): Use string_file.
13619         * record-btrace.c (btrace_insn_history): Use string_file.
13620         * regcache.c (regcache_print): Use stdio_file.
13621         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13622         * remote.c (escape_buffer): Use string_file.
13623         * rust-lang.c (rust_get_disr_info): Use string_file.
13624         * serial.c (serial_open_ops_1): Use stdio_file.
13625         (do_serial_close): Use delete.
13626         * stack.c (print_frame_arg): Use string_file.
13627         (print_frame_args): Remove local mem_fileopen stream, not used.
13628         (print_frame): Use string_file.
13629         * symmisc.c (maintenance_print_symbols): Use stdio_file.
13630         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13631         Take a 'string_file *' instead of a 'ui_file *'.
13632         * top.c (new_ui): Use stdio_file and stderr_file.
13633         (free_ui): Use delete.
13634         (execute_command_to_string): Use string_file.
13635         (quit_confirm): Use string_file.
13636         * tracepoint.c (collection_list::append_exp): Use string_file.
13637         * tui/tui-disasm.c (tui_disassemble): Use string_file.
13638         * tui/tui-file.c: Don't include "ui-file.h".
13639         (enum streamtype, struct tui_stream): Delete.
13640         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13641         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13642         (tui_file::tui_file): New method.
13643         (tui_file_fputs): Delete.
13644         (tui_file_get_strbuf): Delete.
13645         (tui_file::puts): New method.
13646         (tui_file_adjust_strbuf): Delete.
13647         (tui_file_flush): Delete.
13648         (tui_file::flush): New method.
13649         * tui/tui-file.h: Tweak intro comment.
13650         Include ui-file.h.
13651         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13652         (tui_file_adjust_strbuf): Delete declarations.
13653         (class tui_file): New class.
13654         * tui/tui-io.c (tui_initialize_io): Use tui_file.
13655         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13656         (tui_register_format): Use string_stream.
13657         * tui/tui-stack.c (tui_make_status_line): Use string_file.
13658         (tui_get_function_from_frame): Use string_file.
13659         * typeprint.c (type_to_string): Use string_file.
13660         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13661         (null_stream): New global.
13662         (ui_file_delete): Delete.
13663         (ui_file::ui_file): New.
13664         (null_file_isatty): Delete.
13665         (ui_file::~ui_file): New.
13666         (null_file_rewind): Delete.
13667         (ui_file::printf): New.
13668         (null_file_put): Delete.
13669         (null_file_flush): Delete.
13670         (ui_file::putstr): New.
13671         (null_file_write): Delete.
13672         (ui_file::putstrn): New.
13673         (null_file_read): Delete.
13674         (ui_file::putc): New.
13675         (null_file_fputs): Delete.
13676         (null_file_write_async_safe): Delete.
13677         (ui_file::vprintf): New.
13678         (null_file_delete): Delete.
13679         (null_file::write): New.
13680         (null_file_fseek): Delete.
13681         (null_file::puts): New.
13682         (ui_file_data): Delete.
13683         (null_file::write_async_safe): New.
13684         (gdb_flush, ui_file_isatty): Adjust.
13685         (ui_file_put, ui_file_rewind): Delete.
13686         (ui_file_write): Adjust.
13687         (ui_file_write_for_put): Delete.
13688         (ui_file_write_async_safe, ui_file_read): Adjust.
13689         (ui_file_fseek): Delete.
13690         (fputs_unfiltered): Adjust.
13691         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13692         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13693         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13694         (set_ui_file_data): Delete.
13695         (string_file::~string_file, string_file::write)
13696         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13697         (do_ui_file_as_string, ui_file_as_string): Delete.
13698         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13699         (struct mem_file): Delete.
13700         (mem_file_new): Delete.
13701         (stdio_file::stdio_file): New.
13702         (mem_file_delete): Delete.
13703         (stdio_file::stdio_file): New.
13704         (mem_fileopen): Delete.
13705         (stdio_file::~stdio_file): New.
13706         (mem_file_rewind): Delete.
13707         (stdio_file::set_stream): New.
13708         (mem_file_put): Delete.
13709         (stdio_file::open): New.
13710         (mem_file_write): Delete.
13711         (stdio_file_magic, struct stdio_file): Delete.
13712         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13713         (stdio_file::flush): New.
13714         (stdio_file_read): Rename to ...
13715         (stdio_file::read): ... this.  Adjust.
13716         (stdio_file_write): Rename to ...
13717         (stdio_file::write): ... this.  Adjust.
13718         (stdio_file_write_async_safe): Rename to ...
13719         (stdio_file::write_async_safe) ... this.  Adjust.
13720         (stdio_file_fputs): Rename to ...
13721         (stdio_file::puts) ... this.  Adjust.
13722         (stdio_file_isatty): Delete.
13723         (stdio_file_fseek): Delete.
13724         (stdio_file::isatty): New.
13725         (stderr_file_write): Rename to ...
13726         (stderr_file::write) ... this.  Adjust.
13727         (stderr_file_fputs): Rename to ...
13728         (stderr_file::puts) ... this.  Adjust.
13729         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13730         (stderr_file::stderr_file): New.
13731         (tee_file_magic): Delete.
13732         (struct tee_file): Delete.
13733         (tee_file::tee_file): New.
13734         (tee_file_new): Delete.
13735         (tee_file::~tee_file): New.
13736         (tee_file_delete): Delete.
13737         (tee_file_flush): Rename to ...
13738         (tee_file::flush): ... this.  Adjust.
13739         (tee_file_write): Rename to ...
13740         (tee_file::write): ... this.  Adjust.
13741         (tee_file::write_async_safe): New.
13742         (tee_file_fputs): Rename to ...
13743         (tee_file::puts): ... this.  Adjust.
13744         (tee_file_isatty): Rename to ...
13745         (tee_file::isatty): ... this.  Adjust.
13746         * ui-file.h (struct obstack, struct ui_file): Don't
13747         forward-declare.
13748         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13749         (ui_file_write_ftype)
13750         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13751         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13752         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13753         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13754         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13755         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13756         (set_ui_file_fseek): Delete.
13757         (ui_file_data, ui_file_delete, ui_file_rewind)
13758         (struct ui_file): New.
13759         (ui_file_up): New.
13760         (class null_file): New.
13761         (null_stream): Declare.
13762         (ui_file_write_for_put, ui_file_put): Delete.
13763         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13764         Delete.
13765         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13766         (gdb_fopen, tee_file_new): Delete.
13767         (struct string_file): New.
13768         (struct stdio_file): New.
13769         (stdio_file_up): New.
13770         (struct stderr_file): New.
13771         (class tee_file): New.
13772         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13773         of a 'ui_file *'.  Adjust.
13774         * ui-out.h (class ui_out) <field_stream>: Likewise.
13775         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13776         (null_stream): Delete.
13777         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13778         Adjust.
13779         * utils.h (struct ui_file): Delete forward declaration..
13780         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13781         (error_stream): Take a 'string_file &' instead of a
13782         'ui_file *'.
13783         * varobj.c (varobj_value_get_print_value): Use string_file.
13784         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13785         * gdbarch.c: Regenerate.
13786
13787 2017-02-02  Pedro Alves  <palves@redhat.com>
13788
13789         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13790         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
13791         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
13792         Adjust to call gdb_print_insn instead of
13793         gdb_disassembler::print_insn.
13794         (dump_insns, do_mixed_source_and_assembly_deprecated)
13795         (do_mixed_source_and_assembly, do_assembly_only): Add back a
13796         'gdbarch' parameter.  Remove gdb_disassembler parameter.
13797         (gdb_disassembly): Don't allocate a gdb_disassembler here.
13798         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13799         declaration.
13800         (gdb_pretty_print_insn): Re-add declaration.
13801         * record-btrace.c (btrace_insn_history): Don't allocate a
13802         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
13803
13804 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
13805
13806         * disasm.h (gdb_disassembly): Remove file_string parameter.
13807         * disasm.c (gdb_disassembly): Likewise.
13808         * cli/cli-cmds.c (print_disassembly): Adapt.
13809         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13810         * stack.c (do_gdb_disassembly): Likewise.
13811
13812 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13813
13814         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13815         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13816         targets.  And if the implicit value is longer than needed, extract
13817         the first bytes instead of the "least significant" ones.
13818
13819 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13820
13821         * btrace.c (btrace_enable): Do not call btrace_add_pc for
13822         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13823         (btrace_fetch): Assert can_access_registers_ptid.
13824         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13825         validate_registers_access.
13826
13827 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13828
13829         * gdbthread.h (can_access_registers_ptid): New.
13830         * thread.c (can_access_registers_ptid): New.
13831
13832 2017-02-01  Pedro Alves  <palves@redhat.com>
13833
13834         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13835
13836 2017-01-31  Pedro Alves  <palves@redhat.com>
13837
13838         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13839         Fix typos.
13840
13841 2017-01-31  Pedro Alves  <palves@redhat.com>
13842
13843         * stack.c (print_frame_args): Remove local mem_fileopen stream,
13844         not used.
13845
13846 2017-01-31  Pedro Alves  <palves@redhat.com>
13847
13848         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13849
13850 2017-01-31  Pedro Alves  <palves@redhat.com>
13851
13852         * common/scoped_restore.h
13853         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13854         change the value's parameter type to T2.
13855         (make_scoped_restore): Likewise.
13856
13857 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13858             Richard Henderson  <rth@redhat.com>
13859
13860         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13861         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13862         GS_BASE for older kernels.
13863         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13864         GS_BASE for older kernels.
13865         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13866         and GS_BASE to the offset table.
13867         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13868         system register group.
13869         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13870         for older kernels.
13871         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13872         amd64 ABI.
13873         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13874         AMD64_GSBASE_REGNUM.
13875         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13876         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13877         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13878         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13879         i386/64bit-segments.xml in those rules.
13880         * features/i386/64bit-segments.xml: New file.
13881         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13882         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13883         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13884         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13885         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13886         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13887         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13888         * features/i386/amd64-avx-linux.c: Regenerated.
13889         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13890         * features/i386/amd64-avx-mpx.c: Regenerated.
13891         * features/i386/amd64-avx512-linux.c: Regenerated.
13892         * features/i386/amd64-linux.c: Regenerated.
13893         * features/i386/amd64-mpx-linux.c: Regenerated.
13894         * features/i386/i386-avx-mpx-linux.c: Regenerated.
13895         * features/i386/i386-avx-mpx.c: Regenerated.
13896         * features/i386/x32-avx-linux.c: Regenerated.
13897         * features/i386/x32-avx512-linux.c: Regenerated.
13898         * regformats/i386/amd64-avx-linux.dat: Regenerated.
13899         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13900         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13901         * regformats/i386/amd64-linux.dat: Regenerated.
13902         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13903         * regformats/i386/x32-avx-linux.dat: Regenerated.
13904         * regformats/i386/x32-avx512-linux.dat: Regenerated.
13905         * regformats/i386/x32-linux.dat: Regenerated.
13906
13907 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13908
13909         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13910         Set to AMD64_NUM_REGS.
13911
13912 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13913
13914         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13915         that checks validity of a register number.
13916
13917 2017-01-27  Kees Cook  <keescook@google.com>
13918
13919         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13920         fetch_fpregs if target has fpa registers.
13921         (arm_linux_store_inferior_registers): Call store_fpregs if target
13922         has fpa registers.
13923
13924 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13925
13926         * cris-tdep.c (cris_gdbarch_init): Remove check for
13927         info.byte_order and force it to BFD_ENDIAN_LITTLE.
13928
13929 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
13930
13931         * corelow.c (get_core_register_section): Check for regset
13932         existence before checking for REGSET_VARIABLE_SIZE.
13933
13934 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13935             Pedro Alves  <palves@redhat.com>
13936
13937         PR gdb/20939
13938         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13939         call memory_error, save memaddr instead.
13940         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13941         negative, cal memory_error.
13942         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13943
13944 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13945
13946         * disasm-selftests.c (memory_error_test): New function.
13947         (_initialize_disasm_selftests): Register memory_error_test.
13948
13949 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13950
13951         * Makefile.in (SFILES): Add disasm-selftests.c and
13952         selftest-arch.c.
13953         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
13954         * disasm-selftests.c: New file.
13955         * selftest-arch.c: New file.
13956         * selftest-arch.h: New file.
13957
13958 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13959
13960         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
13961         to bfd_arch_mep.  Don't return 0 if section is not
13962         found.  Call print_insn_mep.
13963
13964 2017-01-26  Pedro Alves  <palves@redhat.com>
13965             Yao Qi  <yao.qi@linaro.org>
13966
13967         * arm-tdep.c: Include "disasm.h".
13968         (gdb_print_insn_arm): Update code to get gdbarch.
13969         * disasm.c (dis_asm_read_memory): Change it to
13970         gdb_disassembler::dis_asm_read_memory.
13971         (dis_asm_memory_error): Likewise.
13972         (dis_asm_print_address): Likewise.
13973         (gdb_pretty_print_insn): Change it to
13974         gdb_disassembler::pretty_print_insn.
13975         (dump_insns): Add one argument gdb_disassemlber.  All
13976         callers updated.
13977         (do_mixed_source_and_assembly_deprecated): Likewise.
13978         (do_mixed_source_and_assembly): Likewise.
13979         (do_assembly_only): Likewise.
13980         (gdb_disassembler::gdb_disassembler): New.
13981         (gdb_disassembler::print_insn): New.
13982         * disasm.h (class gdb_disassembler): New.
13983         (gdb_pretty_print_insn): Remove declaration.
13984         (gdb_disassemble_info): Likewise.
13985         * guile/scm-disasm.c (class gdbscm_disassembler): New.
13986         (gdbscm_disasm_read_memory_worker): Update.
13987         (gdbscm_disasm_read_memory): Update.
13988         (gdbscm_disasm_memory_error): Remove.
13989         (gdbscm_disasm_print_address): Remove.
13990         (gdbscm_disassembler::gdbscm_disassembler): New.
13991         (gdbscm_print_insn_from_port): Update.
13992         * mips-tdep.c: Include disasm.h.
13993         (gdb_print_insn_mips): Update code to get gdbarch.
13994         * record-btrace.c (btrace_insn_history): Update.
13995         * spu-tdep.c: Include disasm.h.
13996         (struct spu_dis_asm_data): Remove.
13997         (struct spu_dis_asm_info): New.
13998         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
13999         SPU id.
14000         (gdb_print_insn_spu): Cast disassemble_info to
14001         spu_dis_asm_info.
14002
14003 2017-01-26  Yao Qi  <yao.qi@linaro.org>
14004
14005         * disasm.c (do_ui_file_delete): Delete.
14006         (gdb_insn_length): Move code creating stream to ...
14007         * utils.c (null_stream): ... here.  New function.
14008         * utils.h (null_stream): Declare.
14009
14010 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
14011
14012         * python/py-inferior.c (find_thread_object): Return directly
14013         from the loop.  Remove "found" variable.
14014
14015 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
14016
14017         GDB 7.12.1 released.
14018
14019 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14020
14021         * python/py-function.c (fnpy_call): Reorder declarations to have
14022         the gdbpy_enter object declared first.
14023         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
14024
14025 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
14026
14027         PR python/21068
14028         * python/python-internal.h (PyMem_RawMalloc): Define for
14029         Python < 3.4.
14030         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
14031         PyMem_RawMalloc instead of PyMem_Malloc.
14032
14033 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
14034             Luis Machado  <lgustavo@codesourcery.com>
14035
14036         * NEWS (New commands): Mention flash-erase.
14037         (New MI commands): Mention target-flash-erase.
14038         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
14039         command.
14040         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
14041         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
14042         * target.c (flash_erase_command): New function.
14043         (initialize_targets): Add new flash-erase command.
14044         * target.h (flash_erase_command): New declaration.
14045
14046 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
14047
14048         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
14049         HAVE_SYS_PROCFS_H is defined.
14050
14051 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14052
14053         * remote.c (struct cached_reg): Change data into a pointer.
14054         * (stop_reply_dtr): Free data pointers before deleting vector.
14055         (process_stop_reply): Likewise.
14056         (remote_parse_stop_reply): Allocate space for data
14057
14058 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
14059
14060         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
14061         MAX_REGISTER_SIZE.
14062         (amd64_pseudo_register_read_value): Likewise.
14063         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
14064         (store_register_using_P): Likewise.
14065         * regcache.c (regcache_xfer_part): Likewise.
14066
14067 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
14068
14069         Split real and pseudo registers.
14070         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
14071         (sparc32_pseudo_regnum): New enum.
14072         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
14073         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
14074         (SPARC32_CP0_REGISTERS): New macro.
14075         (sparc32_pseudo_register_name): New function.
14076         (sparc32_register_name): Use sparc32_pseudo_register_name.
14077         (sparc32_pseudo_register_type): New function.
14078         (sparc32_register_type): Use sparc32_pseudo_register_type.
14079         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
14080         pseudo register numbers.
14081         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
14082         (SPARC64_CP0_REGISTERS): New macro.
14083         (sparc64_pseudo_register_name): New function.
14084         (sparc64_register_name): Use sparc64_pseudo_register_name.
14085         (sparc64_pseudo_register_type): New function.
14086         (sparc64_register_type): Use sparc64_pseudo_register_type.
14087         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
14088         pseudo register numbers.
14089         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
14090         sparc64_store_arguments): Handle pseudo register numbers.
14091
14092 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14093
14094         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
14095         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
14096         output.
14097         (getpkt_or_notif_sane_1): Likewise.
14098
14099 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14100
14101         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
14102         of CC.  Pass "-x c++-header" instead of "-x c".
14103
14104 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14105
14106         * remote.c (remote_can_async_p): Update comment.
14107
14108 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14109
14110         * linux-nat.c (linux_nat_can_async_p): Update comment.
14111
14112 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14113
14114         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
14115
14116 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
14117
14118         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
14119
14120 2017-01-10  Tom Tromey  <tom@tromey.com>
14121
14122         * python/py-type.c (typy_legacy_template_argument): Update.
14123         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
14124         ~demangle_parse_info): Declare new members.
14125         (cp_demangled_name_to_comp): Return unique_ptr.
14126         (cp_demangled_name_parse_free)
14127         (make_cleanup_cp_demangled_name_parse_free)
14128         (cp_new_demangle_parse_info): Remove.
14129         * cp-support.c (do_demangled_name_parse_free_cleanup)
14130         (make_cleanup_cp_demangled_name_parse_free): Remove.
14131         (inspect_type, cp_canonicalize_string_full)
14132         (cp_canonicalize_string): Update.
14133         (mangled_name_to_comp): Change return type.
14134         (cp_class_name_from_physname, method_name_from_physname)
14135         (cp_func_name, cp_remove_params): Update.
14136         * cp-name-parser.y (demangle_parse_info): New constructor, from
14137         cp_new_demangle_parse_info.
14138         (~demangle_parse_info): New destructor, from
14139         cp_demangled_name_parse_free.
14140         (cp_merge_demangle_parse_infos): Update.
14141         (cp_demangled_name_to_comp): Change return type.
14142
14143 2017-01-10  Tom Tromey  <tom@tromey.com>
14144
14145         * top.c (prevent_dont_repeat): Change return type.
14146         * python/python.c (execute_gdb_command): Use std::string.
14147         Update.
14148         * guile/guile.c (gdbscm_execute_gdb_command): Update.
14149         * command.h (prevent_dont_repeat): Change return type.
14150         * breakpoint.c (bpstat_do_actions_1): Update.
14151
14152 2017-01-10  Tom Tromey  <tom@tromey.com>
14153
14154         * value.h (scoped_value_mark::~scoped_value_mark): Call
14155         free_to_mark.
14156         (scoped_value_mark::free_to_mark): New method.
14157         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
14158         scoped_value_mark.
14159
14160 2017-01-10  Tom Tromey  <tom@tromey.com>
14161
14162         * python/py-value.c (valpy_dereference, valpy_referenced_value)
14163         (valpy_reference_value, valpy_const_value, valpy_get_address)
14164         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
14165         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
14166         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
14167         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
14168         scoped_value_mark.
14169         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
14170         * value.h (scoped_value_mark): New class.
14171
14172 2017-01-10  Tom Tromey  <tom@tromey.com>
14173
14174         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
14175         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
14176         * psymtab.c (discard_psymtabs_upto): Remove.
14177         (make_cleanup_discard_psymtabs): Remove.
14178         (struct psymtab_state): Remove.
14179
14180 2017-01-10  Tom Tromey  <tom@tromey.com>
14181
14182         * record-full.c (record_full_save_cleanups): Remove.
14183         (record_full_save): Use gdb::unlinker.
14184         * gcore.c (do_bfd_delete_cleanup): Remove.
14185         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
14186         cleanups.
14187         * dwarf2read.c (unlink_if_set): Remove.
14188         (write_psymtabs_to_index): Use gdb::unlinker.
14189         * common/gdb_unlinker.h: New file.
14190
14191 2017-01-10  Tom Tromey  <tom@tromey.com>
14192
14193         * windows-tdep.c (windows_xfer_shared_library): Update.
14194         * windows-nat.c (windows_make_so): Update.
14195         * utils.h (make_cleanup_bfd_unref): Remove.
14196         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
14197         * symfile.h (symfile_bfd_open)
14198         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
14199         * symfile.c (read_symbols, symbol_file_add)
14200         (separate_debug_file_exists): Update.
14201         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
14202         (generic_load, reread_symbols): Update.
14203         * symfile-mem.c (symbol_file_add_from_memory): Update.
14204         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
14205         (spu_symbol_file_add_from_memory): Update.
14206         * solist.h (struct target_so_ops) <bfd_open>: Return
14207         gdb_bfd_ref_ptr.
14208         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
14209         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
14210         gdb_bfd_ref_ptr.
14211         (solib_map_sections, reload_shared_libraries_1): Update.
14212         * solib-svr4.c (enable_break): Update.
14213         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
14214         * solib-frv.c (enable_break2): Update.
14215         * solib-dsbt.c (enable_break): Update.
14216         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
14217         gdb_bfd_ref_ptr.
14218         (darwin_solib_get_all_image_info_addr_at_init): Update.
14219         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
14220         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
14221         * record-full.c (record_full_save): Update.
14222         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
14223         * procfs.c (insert_dbx_link_bpt_in_file): Update.
14224         * minidebug.c (find_separate_debug_file_in_section): Return
14225         gdb_bfd_ref_ptr.
14226         * machoread.c (macho_add_oso_symfile): Change abfd to
14227         gdb_bfd_ref_ptr.
14228         (macho_symfile_read_all_oso): Update.
14229         (macho_check_dsym): Return gdb_bfd_ref_ptr.
14230         (macho_symfile_read): Update.
14231         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
14232         (jit_bfd_try_read_symtab): Update.
14233         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14234         (gdb_bfd_openw, gdb_bfd_openr_iovec)
14235         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14236         gdb_bfd_ref_ptr.
14237         (gdb_bfd_ref_policy): New struct.
14238         (gdb_bfd_ref_ptr): New typedef.
14239         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14240         (gdb_bfd_openw, gdb_bfd_openr_iovec)
14241         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14242         gdb_bfd_ref_ptr.
14243         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14244         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14245         (gcore_command): Update.
14246         * exec.c (exec_file_attach): Update.
14247         * elfread.c (elf_symfile_read): Update.
14248         * dwarf2read.c (dwarf2_get_dwz_file): Update.
14249         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
14250         (open_and_init_dwo_file): Update.
14251         (open_dwp_file): Return gdb_bfd_ref_ptr.
14252         (open_and_init_dwp_file): Update.
14253         * corelow.c (core_open): Update.
14254         * compile/compile-object-load.c (compile_object_load): Update.
14255         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
14256         * coffread.c (coff_symfile_read): Update.
14257         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
14258         gdb_bfd_ref_ptr.  Rename.
14259         (dump_bfd_file, restore_command): Update.
14260         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14261         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14262         (find_separate_debug_file_by_buildid): Update.
14263
14264 2017-01-10  Tom Tromey  <tom@tromey.com>
14265
14266         * common/gdb_ref_ptr.h: New file.
14267         * python/py-ref.h (struct gdbpy_ref_policy): New.
14268         (gdbpy_ref): Now a typedef.
14269
14270 2017-01-10  Tom Tromey  <tom@tromey.com>
14271
14272         * utils.h (make_cleanup_htab_delete): Don't declare.
14273         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
14274         Remove.
14275         * linespec.c (decode_compound_collector): Add constructor,
14276         destructor.
14277         (lookup_prefix_sym): Remove cleanup.
14278         (symtab_collector): Add constructor, destructor.
14279         (collect_symtabs_from_filename): Remove cleanup.
14280         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
14281         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
14282         Use htab_up.
14283         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
14284         * dwarf2read.c (dw2_expand_symtabs_matching)
14285         (dw2_map_symbol_filenames, dwarf_decode_macros)
14286         (write_psymtabs_to_index): Use htab_up.
14287         * dwarf2loc.c (func_verify_no_selftailcall)
14288         (call_site_find_chain_1, func_verify_no_selftailcall)
14289         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
14290         std::vector, gdb::unique_xmalloc_ptr.
14291         (call_sitep): Remove typedef.
14292         (dwarf2_locexpr_baton_eval): Remove unused variable.
14293
14294 2017-01-10  Tom Tromey  <tom@tromey.com>
14295
14296         * python/python-internal.h (make_cleanup_py_decref)
14297         (make_cleanup_py_xdecref): Don't declare.
14298         * python/py-utils.c (py_decref, make_cleanup_py_decref)
14299         (py_xdecref, make_cleanup_py_xdecref): Remove.
14300
14301 2017-01-10  Tom Tromey  <tom@tromey.com>
14302
14303         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
14304         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
14305
14306 2017-01-10  Tom Tromey  <tom@tromey.com>
14307
14308         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
14309
14310 2017-01-10  Tom Tromey  <tom@tromey.com>
14311
14312         * python/py-utils.c (unicode_to_encoded_string)
14313         (python_string_to_target_string)
14314         (python_string_to_target_python_string)
14315         (python_string_to_host_string, gdbpy_obj_to_string)
14316         (get_addr_from_python): Use gdbpy_ref.
14317
14318 2017-01-10  Tom Tromey  <tom@tromey.com>
14319
14320         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
14321         gdbpy_ref.
14322
14323 2017-01-10  Tom Tromey  <tom@tromey.com>
14324
14325         * python/python.c (eval_python_command, gdbpy_decode_line)
14326         (gdbpy_run_events, gdbpy_start_type_printers)
14327         (gdbpy_apply_type_printers): Use gdbpy_ref.
14328
14329 2017-01-10  Tom Tromey  <tom@tromey.com>
14330
14331         * python/py-param.c (get_doc_string, compute_enum_values): Use
14332         gdbpy_ref.
14333
14334 2017-01-10  Tom Tromey  <tom@tromey.com>
14335
14336         * python/py-inferior.c (find_thread_object, build_inferior_list):
14337         Use gdbpy_ref.
14338
14339 2017-01-10  Tom Tromey  <tom@tromey.com>
14340
14341         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14342
14343 2017-01-10  Tom Tromey  <tom@tromey.com>
14344
14345         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
14346         gdbpy_ref.
14347
14348 2017-01-10  Tom Tromey  <tom@tromey.com>
14349
14350         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
14351         extra incref.
14352         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
14353         Use gdbpy_ref.
14354
14355 2017-01-10  Tom Tromey  <tom@tromey.com>
14356
14357         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14358         gdbpy_ref.
14359
14360 2017-01-10  Tom Tromey  <tom@tromey.com>
14361
14362         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
14363         decref results of PyArg_ParseTupleAndKeywords.
14364
14365 2017-01-10  Tom Tromey  <tom@tromey.com>
14366
14367         * python/python.c (python_run_simple_file): Use
14368         unique_xmalloc_ptr, gdbpy_ref.
14369
14370 2017-01-10  Tom Tromey  <tom@tromey.com>
14371
14372         * python/py-prettyprint.c (print_stack_unless_memory_error)
14373         (print_string_repr, print_children): Use gdbpy_ref.
14374         (dummy_python_frame): New class.
14375         (dummy_python_frame::dummy_python_frame): Rename from
14376         push_dummy_python_frame.
14377         (py_restore_tstate): Remove.
14378
14379 2017-01-10  Tom Tromey  <tom@tromey.com>
14380
14381         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14382
14383 2017-01-10  Tom Tromey  <tom@tromey.com>
14384
14385         * python/python.c (ensure_python_env, restore_python_env):
14386         Remove.
14387         * python/python-internal.h (ensure_python_env): Don't declare.
14388         * varobj.h (varobj_ensure_python_env): Don't declare.
14389         * varobj.c (varobj_ensure_python_env): Remove.
14390
14391 2017-01-10  Tom Tromey  <tom@tromey.com>
14392
14393         * varobj.c (varobj_value_get_print_value): Use
14394         gdbpy_enter_varobj.
14395
14396 2017-01-10  Tom Tromey  <tom@tromey.com>
14397
14398         * python/py-prettyprint.c (print_string_repr, print_children):
14399         Update.
14400         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
14401         of "encoding".
14402         * varobj.c (varobj_value_get_print_value): Update.
14403         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
14404
14405 2017-01-10  Tom Tromey  <tom@tromey.com>
14406
14407         * varobj.c (varobj_get_display_hint)
14408         (dynamic_varobj_has_child_method, install_new_value_visualizer)
14409         (varobj_set_visualizer, free_variable): Use
14410         gdbpy_enter_varobj.
14411
14412 2017-01-10  Tom Tromey  <tom@tromey.com>
14413
14414         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
14415         (do_finish_initialization): New function.  Use gdbpy_ref.
14416         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
14417         do_finish_initialization.
14418
14419 2017-01-10  Tom Tromey  <tom@tromey.com>
14420
14421         * python/py-param.c (get_set_value, get_show_value): Use
14422         gdbpy_enter, gdbpy_ref.
14423
14424 2017-01-10  Tom Tromey  <tom@tromey.com>
14425
14426         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
14427
14428 2017-01-10  Tom Tromey  <tom@tromey.com>
14429
14430         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
14431
14432 2017-01-10  Tom Tromey  <tom@tromey.com>
14433
14434         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
14435         Use gdbpy_enter_varobj.
14436
14437 2017-01-10  Tom Tromey  <tom@tromey.com>
14438
14439         * varobj.c (gdbpy_enter_varobj): New constructor.
14440         * python/python-internal.h (gdbpy_enter_varobj): New class.
14441         * python/py-varobj.c (py_varobj_get_iterator): Use
14442         gdbpy_enter_varobj.
14443
14444 2017-01-10  Tom Tromey  <tom@tromey.com>
14445
14446         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
14447         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14448         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
14449         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
14450         unique_xmalloc_ptr.
14451         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
14452
14453 2017-01-10  Tom Tromey  <tom@tromey.com>
14454
14455         * python/py-xmethods.c (invoke_match_method): Use
14456         gdbpy_ref.
14457
14458 2017-01-10  Tom Tromey  <tom@tromey.com>
14459
14460         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
14461         gdbpy_enter, gdbpy_ref.
14462
14463 2017-01-10  Tom Tromey  <tom@tromey.com>
14464
14465         * python/python.c (python_interactive_command): Use gdbpy_enter.
14466
14467 2017-01-10  Tom Tromey  <tom@tromey.com>
14468
14469         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
14470         gdbpy_ref.
14471
14472 2017-01-10  Tom Tromey  <tom@tromey.com>
14473
14474         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
14475         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14476
14477 2017-01-10  Tom Tromey  <tom@tromey.com>
14478
14479         * utils.h (htab_deleter): New struct.
14480         (htab_up): New typedef.
14481         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
14482         gdbpy_enter, gdbpy_ref, htab_up.
14483
14484 2017-01-10  Tom Tromey  <tom@tromey.com>
14485
14486         * python/py-unwind.c (pending_frame_invalidate): Remove.
14487         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
14488
14489 2017-01-10  Tom Tromey  <tom@tromey.com>
14490
14491         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
14492         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
14493
14494 2017-01-10  Tom Tromey  <tom@tromey.com>
14495
14496         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
14497
14498 2017-01-10  Tom Tromey  <tom@tromey.com>
14499
14500         * python/python.c (gdbpy_eval_from_control_command)
14501         (gdbpy_source_script, gdbpy_run_events)
14502         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
14503         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
14504         gdbpy_enter.
14505
14506 2017-01-10  Tom Tromey  <tom@tromey.com>
14507
14508         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
14509
14510 2017-01-10  Tom Tromey  <tom@tromey.com>
14511
14512         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
14513
14514 2017-01-10  Tom Tromey  <tom@tromey.com>
14515
14516         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
14517         (python_on_inferior_call_pre, python_on_inferior_call_post)
14518         (python_on_memory_change, python_on_register_change)
14519         (python_inferior_exit, python_new_objfile, add_thread_object)
14520         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
14521
14522 2017-01-10  Tom Tromey  <tom@tromey.com>
14523
14524         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
14525         (bpfinishpy_handle_exit): Use gdbpy_enter.
14526
14527 2017-01-10  Tom Tromey  <tom@tromey.com>
14528
14529         * python/py-cmd.c (cmdpy_destroyer)
14530         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
14531         gdbpy_enter.
14532
14533 2017-01-10  Tom Tromey  <tom@tromey.com>
14534
14535         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14536         gdbpy_enter.
14537         (gdbpy_breakpoint_has_cond): Likewise.
14538
14539 2017-01-10  Tom Tromey  <tom@tromey.com>
14540
14541         * python/python.c (gdbpy_enter): New constructor.
14542         (~gdbpy_enter): New destructor.
14543         (restore_python_env, ensure_python_env): Rewrite.
14544         * python/python-internal.h (gdbpy_enter): New class.
14545
14546 2017-01-10  Tom Tromey  <tom@tromey.com>
14547
14548         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
14549
14550 2017-01-10  Tom Tromey  <tom@tromey.com>
14551
14552         * python/py-value.c (value_has_field, get_field_flag)
14553         (get_field_type, valpy_getitem, convert_value_from_python): Use
14554         gdbpy_ref.
14555
14556 2017-01-10  Tom Tromey  <tom@tromey.com>
14557
14558         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14559         gdbpy_ref.
14560
14561 2017-01-10  Tom Tromey  <tom@tromey.com>
14562
14563         * python/py-prettyprint.c (search_pp_list)
14564         (find_pretty_printer_from_objfiles)
14565         (find_pretty_printer_from_progspace)
14566         (find_pretty_printer_from_gdb, find_pretty_printer)
14567         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
14568         gdbpy_ref.
14569
14570 2017-01-10  Tom Tromey  <tom@tromey.com>
14571
14572         * python/py-param.c (call_doc_function): Use gdbpy_ref.
14573
14574 2017-01-10  Tom Tromey  <tom@tromey.com>
14575
14576         * python/py-linetable.c (build_line_table_tuple_from_pcs)
14577         (ltpy_get_all_source_lines): Use gdbpy_ref.
14578
14579 2017-01-10  Tom Tromey  <tom@tromey.com>
14580
14581         * python/py-framefilter.c (extract_sym, extract_value)
14582         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14583         gdbpy_ref.
14584
14585 2017-01-10  Tom Tromey  <tom@tromey.com>
14586
14587         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14588
14589 2017-01-10  Tom Tromey  <tom@tromey.com>
14590
14591         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14592
14593 2017-01-10  Tom Tromey  <tom@tromey.com>
14594
14595         * python/py-function.c (convert_values_to_python, fnpy_init): Use
14596         gdbpy_ref.
14597
14598 2017-01-10  Tom Tromey  <tom@tromey.com>
14599
14600         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14601
14602 2017-01-10  Tom Tromey  <tom@tromey.com>
14603
14604         * python/py-type.c (convert_field, make_fielditem, typy_fields)
14605         (typy_range): Use gdbpy_ref.
14606
14607 2017-01-10  Tom Tromey  <tom@tromey.com>
14608
14609         * python/py-threadevent.c (create_thread_event_object): Use
14610         gdbpy_ref.
14611         * python/py-stopevent.c (create_stop_event_object): Simplify.
14612         (emit_stop_event): Use gdbpy_ref.
14613         * python/py-signalevent.c (create_signal_event_object): Use
14614         gdbpy_ref.
14615         * python/py-newobjfileevent.c (create_new_objfile_event_object)
14616         (emit_new_objfile_event, create_clear_objfiles_event_object)
14617         (emit_clear_objfiles_event): Use gdbpy_ref.
14618         * python/py-infevents.c (create_inferior_call_event_object)
14619         (create_register_changed_event_object)
14620         (create_memory_changed_event_object, emit_inferior_call_event)
14621         (emit_memory_changed_event, emit_register_changed_event): Use
14622         gdbpy_ref.
14623         * python/py-exitedevent.c (create_exited_event_object)
14624         (emit_exited_event): Use gdbpy_ref.
14625         * python/py-event.h (evpy_emit_event): Remove
14626         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14627         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14628         * python/py-continueevent.c (emit_continue_event): Use
14629         gdbpy_ref.
14630         * python/py-breakpoint.c (gdbpy_breakpoint_created)
14631         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14632         gdbpy_ref.
14633         * python/py-bpevent.c (create_breakpoint_event_object): Use
14634         gdbpy_ref.
14635
14636 2017-01-10  Tom Tromey  <tom@tromey.com>
14637
14638         * python/py-ref.h: New file.
14639
14640 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14641
14642         * cli-out.c (cli_ui_out::do_redirect): Change return type to
14643         void.
14644         * cli-out.h (cli_ui_out::do_redirect): Likewise.
14645         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14646         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14647         * ui-out.c (ui_out::redirect): Likewise.
14648         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14649         * cli/cli-logging.c (set_logging_redirect): Update call site of
14650         ui_out::redirect.
14651         (handle_redirections): Likewise.
14652         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14653         * top.c (execute_command_to_string): Likewise.
14654         * utils.c (do_ui_out_redirect_pop): Likewise.
14655
14656 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14657
14658         * stack.c (_initialize_stack): Update "frame" command help message.
14659
14660 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
14661
14662         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14663
14664 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14665
14666         * x86-linux-nat.h: Include gdb_proc_service.h.
14667
14668 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14669
14670         * ser-base.h: Include serial.h.
14671
14672 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14673
14674         * ppc-linux-tdep.h: Include ppc-tdep.h.
14675
14676 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14677
14678         * nat/amd64-linux-siginfo.h: Include signal.h.
14679
14680 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14681
14682         * nat/aarch64-linux-hw-point.h: Include break-common.h.
14683
14684 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14685
14686         * mi/mi-parse.h: Include mi-cmds.h.
14687
14688 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14689
14690         * inf-loop.c: Don't include "target.h".
14691         * inf-loop.h: Include it here.
14692
14693 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14694
14695         * dfp.h: Include "dboulest.h" and "expression.h".
14696
14697 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14698
14699         * ax-gdb.h: Include "ax.h".
14700
14701 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14702
14703         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14704         with nat/gdb_ptrace.h.
14705
14706 2017-01-05  Yao Qi  <yao.qi@linaro.org>
14707
14708         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14709         new line.
14710         (mips64_fbsd_sigframe_init): Likewise.
14711
14712 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14713
14714         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14715         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14716
14717 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14718
14719         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14720         * NEWS: Mention new FreeBSD/mips native configuration.
14721         * config/mips/fbsd.mh: New file.
14722         * configure.host: Add mips*-*-freebsd*.
14723         * mips-fbsd-nat.c: New file.
14724
14725 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14726
14727         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14728         (ALLDEPFILES): Add mips-fbsd-tdep.c.
14729         * NEWS: Mention new FreeBSD/mips target.
14730         * configure.tgt: Add mips*-*-freebsd*.
14731         * mips-fbsd-tdep.c: New file.
14732         * mips-fbsd-tdep.h: New file.
14733
14734 2017-01-04  Yao Qi  <yao.qi@linaro.org>
14735
14736         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14737         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14738
14739 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14740
14741         Update copyright year range in all GDB files.
14742
14743 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14744
14745         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14746
14747 For older changes see ChangeLog-2016.
14748 \f
14749 Local Variables:
14750 mode: change-log
14751 left-margin: 8
14752 fill-column: 74
14753 version-control: never
14754 coding: utf-8
14755 End: